DEV: Fix rubocop issues (#14715)

This commit is contained in:
Dan Ungureanu
2021-10-27 11:39:28 +03:00
committed by GitHub
parent 6aa6275f3f
commit 69f0f48dc0
27 changed files with 65 additions and 69 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ task 'assets:prestage' => :environment do |t|
puts "pre staging: #{assets.join(' ')}"
# makes testing simpler leaving this here
config = YAML::load(File.open("#{Rails.root}/config/cdn.yml"))
config = YAML::safe_load(File.open("#{Rails.root}/config/cdn.yml"))
start = Time.now
+2 -2
View File
@@ -284,7 +284,7 @@ desc "update emoji images"
task "emoji:update" do
copy_emoji_db
json_db = open(File.join(GENERATED_PATH, "db.json")).read
json_db = File.read(File.join(GENERATED_PATH, "db.json"))
db = JSON.parse(json_db)
write_db_json(db["emojis"], db["translations"])
@@ -352,7 +352,7 @@ end
def generate_emoji_groups(keywords, sections)
puts "Generating groups..."
list = open(EMOJI_ORDERING_URL).read
list = URI.parse(EMOJI_ORDERING_URL).read
doc = Nokogiri::HTML5(list)
table = doc.css("table")[0]
+1 -1
View File
@@ -30,7 +30,7 @@ task "themes:install" => :environment do |task, args|
use_json = theme_args == ''
theme_args = begin
use_json ? JSON.parse(ARGV.last.gsub('--', '')) : YAML::load(theme_args)
use_json ? JSON.parse(ARGV.last.gsub('--', '')) : YAML::safe_load(theme_args)
rescue
puts use_json ? "Invalid JSON input. \n#{ARGV.last}" : "Invalid YML: \n#{theme_args}"
exit 1