diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-21 10:20:47 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-21 10:20:47 +0000 |
commit | 5335ce0e060c7a2a0b01c57f8f8a64254f2658e1 (patch) | |
tree | c63321cb7c7c5c15454a79d81123c7188be2c51e /lib/rubygems/commands/pristine_command.rb | |
parent | 2f023c5dbaadede9ceac3eb9ac0e73f3050e5ada (diff) |
Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
https://github.com/rubygems/rubygems/pull/2478
* Enable Style/MultilineIfThen in Rubocop
https://github.com/rubygems/rubygems/pull/2479
* Fix required_ruby_version with prereleases and improve error message
https://github.com/rubygems/rubygems/pull/2344
* Fix bundler rubygems binstub not properly looking for bundler
https://github.com/rubygems/rubygems/pull/2426
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/pristine_command.rb')
-rw-r--r-- | lib/rubygems/commands/pristine_command.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb index 575c344130..b686d8341d 100644 --- a/lib/rubygems/commands/pristine_command.rb +++ b/lib/rubygems/commands/pristine_command.rb @@ -88,13 +88,13 @@ extensions will be restored. end def execute - specs = if options[:all] then + specs = if options[:all] Gem::Specification.map # `--extensions` must be explicitly given to pristine only gems # with extensions. elsif options[:extensions_set] and - options[:extensions] and options[:args].empty? then + options[:extensions] and options[:args].empty? Gem::Specification.select do |spec| spec.extensions and not spec.extensions.empty? end @@ -104,7 +104,7 @@ extensions will be restored. end.flatten end - if specs.to_a.empty? then + if specs.to_a.empty? raise Gem::Exception, "Failed to find gems #{options[:args]} #{options[:version]}" end @@ -134,14 +134,14 @@ extensions will be restored. next end - unless spec.extensions.empty? or options[:extensions] or options[:only_executables] then + unless spec.extensions.empty? or options[:extensions] or options[:only_executables] say "Skipped #{spec.full_name}, it needs to compile an extension" next end gem = spec.cache_file - unless File.exist? gem or options[:only_executables] then + unless File.exist? gem or options[:only_executables] require 'rubygems/remote_fetcher' say "Cached gem for #{spec.full_name} not found, attempting to fetch..." @@ -159,7 +159,7 @@ extensions will be restored. end env_shebang = - if options.include? :env_shebang then + if options.include? :env_shebang options[:env_shebang] else install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS['install'] @@ -177,7 +177,7 @@ extensions will be restored. :bin_dir => bin_dir } - if options[:only_executables] then + if options[:only_executables] installer = Gem::Installer.for_spec(spec, installer_options) installer.generate_bin else |