Skip to content

Commit 0cdab0e

Browse files
authored
Merge pull request #687 from coderdojo-japan/disable_dojos_sort_yaml
rake タスク dojos:sort_yaml をコメントアウト(無効化)
2 parents f1e4f07 + af7ff64 commit 0cdab0e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

lib/tasks/dojos.rake

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,18 @@ http://www.soumu.go.jp/denshijiti/code.html
6565
end
6666
end
6767

68-
desc '現在のyamlファイルのカラムをソートします'
69-
task sort_yaml: :environment do
70-
dojos = Dojo.load_attributes_from_yaml
71-
72-
# Dojo column should start with 'name' for human-readability
73-
dojos.map! do |dojo|
74-
dojo.sort_by { |a,b| a.last }.to_h
75-
end
76-
77-
Dojo.dump_attributes_to_yaml(dojos)
78-
end
68+
# NOTE: 2020年1月中はコメントアウトで残し、もし必要になる場面が無ければ翌月以降に削除する
69+
# desc '現在のyamlファイルのカラムをソートします'
70+
# task sort_yaml: :environment do
71+
# dojos = Dojo.load_attributes_from_yaml
72+
#
73+
# # Dojo column should start with 'name' for human-readability
74+
# dojos.map! do |dojo|
75+
# dojo.sort_by { |a,b| a.last }.to_h
76+
# end
77+
#
78+
# Dojo.dump_attributes_to_yaml(dojos)
79+
# end
7980

8081
desc 'DBからyamlファイルを生成します'
8182
task migrate_adding_id_to_yaml: :environment do

0 commit comments

Comments
 (0)