gem-repair 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de1546b65c1f9dd21344f01ffdb924dd21b1d1ad18a837645702b875f331c468
4
- data.tar.gz: 20493791f64c066be2bd29303d7f846ef82d9837f0d271ad13226054f9642a73
3
+ metadata.gz: 8bde2dbf15a0a3121cb16b9cf9ce49a1b8da1968204c6cf2ab03b000b97b226d
4
+ data.tar.gz: 3695cccd7e32920fc394fde772e7be550a1af48db17ad953516706f6cf6b426b
5
5
  SHA512:
6
- metadata.gz: ac1791aead1e4f8ad1ee21a824a99c0f7bf8d114ed1e12a030d951f3bdfc1bd44dde72e0b79c5958e5ede695a785f286fb47443480356e3cc030b0575d715ae7
7
- data.tar.gz: 974848b02311245c9ae757046b3e2d12d4a6e059c562c0888c05d21a6170bd549ed31a0baa45227ca5835e443784792bc517facf62b0151e5022e6b4c0f0437e
6
+ metadata.gz: 19c1a1e960d933aa84ec923eda33586882fdfe915506be5fe919ab98c68351582a1235a2bd5537197f0dcdd1816db5c24c154dd35eaad8ce6a12cf282e61ee02
7
+ data.tar.gz: 8b90780d8c3a175c8806ae649a2dabd4bab177d6476b84e13c582c51a1695adc7b57d5d784efb13fe68895e4f3c77521d2f030a91c88143ebb8e21ff78f58975
@@ -101,7 +101,12 @@ Use -j to specify the number of parallel threads (default: 4).
101
101
 
102
102
  # Use spec.cache_file if available and valid, otherwise the installer might re-download
103
103
  # Forcing a specific installer might be needed if default behavior isn't right
104
- installer = Gem::Installer.at(spec.cache_file, installer_options)
104
+ installer = if Gem::Installer.respond_to?(:at)
105
+ Gem::Installer.at(spec.cache_file, installer_options)
106
+ else
107
+ # Gem::Installer.at was added in RubyGems 2.5.0 (Ruby 2.3)
108
+ Gem::Installer.new(spec.cache_file, installer_options)
109
+ end
105
110
  installer.install
106
111
  say "Successfully repaired #{spec.full_name} to #{spec.base_dir}"
107
112
  rescue Gem::Ext::BuildError, Gem::Package::FormatError, Gem::InstallError, Zlib::BufError, NameError => e
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-repair
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi SHIBATA