Add rubocop to our build. (#5004)

This commit is contained in:
Guo Xiang Tan
2017-07-28 10:20:09 +09:00
committed by GitHub
parent ff4e295c4f
commit 5012d46cbd
871 changed files with 5480 additions and 6056 deletions
+3 -6
View File
@@ -20,16 +20,15 @@ class AddThemes < ActiveRecord::Migration
remove_column :color_schemes, :versioned_id
enabled_theme_count = execute("SELECT count(*) FROM themes WHERE enabled")
.to_a[0]["count"].to_i
.to_a[0]["count"].to_i
enabled_scheme_id = execute("SELECT id FROM color_schemes WHERE enabled")
.to_a[0]&.fetch("id")
.to_a[0]&.fetch("id")
theme_key, theme_id =
execute("SELECT key, id FROM themes WHERE enabled").to_a[0]&.values
if (enabled_theme_count == 0 && enabled_scheme_id) || enabled_theme_count > 1
if (enabled_theme_count == 0 && enabled_scheme_id) || enabled_theme_count > 1
puts "Creating a new default theme!"
@@ -67,8 +66,6 @@ SQL
execute(sql)
end
remove_column :themes, :enabled
remove_column :color_schemes, :enabled
end