mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05:00
DEV: Fix rubocop issues (#14715)
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user