Skip to content

Commit

Permalink
Update Rubocop to 0.52
Browse files Browse the repository at this point in the history
lautis committed Dec 30, 2017
1 parent 73cb2d1 commit a859de3
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"

gemspec

gem 'rubocop', '~> 0.51.0', :group => [:development] if RUBY_VERSION >= '2.1'
gem 'rubocop', '~> 0.52.1', :group => [:development] if RUBY_VERSION >= '2.1'
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# encoding: utf-8

# rubocop:disable Metrics/BlockLength

require 'fileutils'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
@@ -24,6 +22,7 @@ def changelog_tail
end
end

# rubocop:disable Metrics/BlockLength
namespace :uglifyjs do
desc "Update UglifyJS source to version specified in VERSION environment variable"
task :update do
@@ -84,6 +83,7 @@ namespace :uglifyjs do
`git commit -m "Update UglifyJS to #{version}"`
end
end
# rubocop:enable Metrics/BlockLength

desc "Update UglifyJS to version specified in VERSION environment variable"
task :uglifyjs => ['uglifyjs:update', 'uglifyjs:build', 'uglifyjs:changelog', 'uglifyjs:commit']
8 changes: 2 additions & 6 deletions lib/uglifier.rb
Original file line number Diff line number Diff line change
@@ -188,9 +188,7 @@ def source_map_comments
suffix += "\n//# sourceMappingURL=" + @options[:source_map][:map_url]
end

if @options[:source_map][:url]
suffix += "\n//# sourceURL=" + @options[:source_map][:url]
end
suffix += "\n//# sourceURL=" + @options[:source_map][:url] if @options[:source_map][:url]
suffix
end

@@ -449,9 +447,7 @@ def input_source_map(source, generate_map)
source_map_options = @options[:source_map].is_a?(Hash) ? @options[:source_map] : {}
sanitize_map_root(source_map_options.fetch(:input_source_map) do
url = extract_source_mapping_url(source)
if url && url.start_with?("data:")
Base64.strict_decode64(url.split(",", 2)[-1])
end
Base64.strict_decode64(url.split(",", 2)[-1]) if url && url.start_with?("data:")
end)
rescue ArgumentError, JSON::ParserError
nil

0 comments on commit a859de3

Please sign in to comment.