Skip to content

Commit 19a49aa

Browse files
authored
Merge pull request #30 from rvm/bugfix/rubygems-1.4
Add support for rubygems 1.4.2, fixes #29
2 parents 1d5d22e + 3e1602c commit 19a49aa

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ notifications:
2525
matrix:
2626
fast_finish: true
2727
include:
28+
- rvm: 1.8.7
29+
env: WITH_RUBYGEMS=1.4.2
2830
- rvm: 1.8.7
2931
env: WITH_RUBYGEMS=1.6.2
3032
- rvm: 2.5

lib/executable-hooks/wrapper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def self.expanded_wrapper_name
1616
attr_reader :options
1717

1818
def initialize(options)
19-
@options = options || {}
19+
@options = options || RegenerateBinstubsCommand.default_install_options
2020
end
2121

2222
def install

lib/rubygems_plugin.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313

1414
# Set the custom_shebang if user did not set one
1515
Gem.pre_install do |gem_installer|
16-
ExecutableHooks::Wrapper.new(gem_installer.options).install
16+
options = if gem_installer.methods.map(&:to_s).include?('options')
17+
gem_installer.options
18+
end
19+
ExecutableHooks::Wrapper.new(options).install
1720
end
1821

1922
if Gem::Version.new(Gem::VERSION) < Gem::Version.new('2.0') then

0 commit comments

Comments
 (0)