rubygem_requirement_patch 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,16 +2,22 @@
2
2
 
3
3
  patch_file = '/tmp/rubygems.patch'
4
4
 
5
- if ruby_info = `which rvm && rvm info homes`.split(/\n/).grep(/^\s*ruby:/).first
6
- ruby_home = File.join(ruby_info.gsub(/^\s*ruby:\s*"([^"]+)"/, '\1'), 'lib/ruby')
7
- else
8
- ruby_home = '/usr/local/lib'
5
+ gem_location = `which gem`.strip
6
+ if gem_location.nil? || gem_location == ''
7
+ $stderr.puts "Unable to locate rubygems installation; cannot find gem executable"
8
+ exit 1
9
+ end
10
+
11
+ rubygems_info = `gem which rubygems`.strip
12
+ if rubygems_info.nil? || rubygems_info == ''
13
+ $stderr.puts "Unable to locate rubygems installation; gem which rubygems failed"
14
+ exit 2
9
15
  end
10
16
 
11
- patch_target = File.join(ruby_home, 'site_ruby/1.8/rubygems/requirement.rb')
17
+ patch_target = File.join(File.dirname(rubygems_info), 'rubygems', 'requirement.rb')
12
18
 
13
19
  unless File.exists?(patch_target)
14
- $stderr.puts "Unable to locate rubygems installation; tried #{patch_target}"
20
+ $stderr.puts "Unable to locate rubygems installation; tried '#{patch_target}'"
15
21
  exit 1
16
22
  end
17
23
 
@@ -1,3 +1,3 @@
1
1
  module RubygemRequirementPatch
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygem_requirement_patch
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
4
+ hash: 21
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - EMI Music
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-21 00:00:00 -08:00
18
+ date: 2011-02-03 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements: []
67
67
 
68
68
  rubyforge_project: rubygem_requirement_patch
69
- rubygems_version: 1.3.7
69
+ rubygems_version: 1.4.2
70
70
  signing_key:
71
71
  specification_version: 3
72
72
  summary: Patches rubygems 1.3.7 and similar to prevent Array.hash bug