lib/tasks/publish.rake in daddy-0.1.13 vs lib/tasks/publish.rake in daddy-0.1.14

- old
+ new

@@ -52,11 +52,11 @@ # 空HTMLを生成 system("bundle exec rake dad:cucumber PUBLISH=true EXPAND=false COVERAGE=false features/support") doc = Nokogiri::HTML(File.read('features/reports/index.html')) contents_div = doc.css('div.contents').first - features.each do |div| + features.sort{|a, b| a['id'] <=> b['id']}.each do |div| contents_div.add_child(div) end File.write("#{base_dir}/index.html", doc) end end @@ -76,11 +76,9 @@ img['src'] = File.basename(dir) + '/diary/' + img['src'] end ret << div end - ret = ret.sort{|a, b| b['id'] <=> a['id']} - ret end def self.dad_publish_base_dir(title) '/var/lib/daddy/' + dad_publish_title_to_dirname(title)