rubygem_requirement_patch 1.0.0
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.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/README.md +4 -0
- data/Rakefile +2 -0
- data/bin/rubygem_requirement_patch +34 -0
- data/lib/rubygem_requirement_patch/version.rb +3 -0
- data/rubygem_requirement_patch.gemspec +21 -0
- metadata +74 -0
data/Gemfile
ADDED
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
patch_file = '/tmp/rubygems.patch'
|
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'
|
9
|
+
end
|
10
|
+
|
11
|
+
patch_target = File.join(ruby_home, 'site_ruby/1.8/rubygems/requirement.rb')
|
12
|
+
|
13
|
+
unless File.exists?(patch_target)
|
14
|
+
$stderr.puts "Unable to locate rubygems installation; tried #{patch_target}"
|
15
|
+
exit 1
|
16
|
+
end
|
17
|
+
|
18
|
+
File.open(patch_file, 'w') do |io|
|
19
|
+
io.write <<-END_PATCH
|
20
|
+
--- requirement.rb.orig
|
21
|
+
+++ requirement.rb
|
22
|
+
@@ -106,7 +106,7 @@
|
23
|
+
end
|
24
|
+
|
25
|
+
def hash # :nodoc:
|
26
|
+
- requirements.hash
|
27
|
+
+ requirements.inject(0) { |h, r| h ^ r.first.hash ^ r.last.hash }
|
28
|
+
end
|
29
|
+
END_PATCH
|
30
|
+
end
|
31
|
+
|
32
|
+
command = "patch -N -r /tmp/rubygems.patch.rej #{patch_target} #{patch_file}"
|
33
|
+
puts command
|
34
|
+
system command
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "rubygem_requirement_patch/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "rubygem_requirement_patch"
|
7
|
+
s.version = RubygemRequirementPatch::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["EMI Music"]
|
10
|
+
s.email = ["stephan.zuercher@emimusic.com"]
|
11
|
+
s.homepage = "http://emi.github.com"
|
12
|
+
s.summary = %q{Patches rubygems 1.3.7 and similar to prevent Array.hash bug}
|
13
|
+
s.description = %q{Patches rubygems 1.3.7 and similar to prevent Array.hash bug}
|
14
|
+
|
15
|
+
s.rubyforge_project = "rubygem_requirement_patch"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubygem_requirement_patch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- EMI Music
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-01-21 00:00:00 -08:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: Patches rubygems 1.3.7 and similar to prevent Array.hash bug
|
23
|
+
email:
|
24
|
+
- stephan.zuercher@emimusic.com
|
25
|
+
executables:
|
26
|
+
- rubygem_requirement_patch
|
27
|
+
extensions: []
|
28
|
+
|
29
|
+
extra_rdoc_files: []
|
30
|
+
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- README.md
|
35
|
+
- Rakefile
|
36
|
+
- bin/rubygem_requirement_patch
|
37
|
+
- lib/rubygem_requirement_patch/version.rb
|
38
|
+
- rubygem_requirement_patch.gemspec
|
39
|
+
has_rdoc: true
|
40
|
+
homepage: http://emi.github.com
|
41
|
+
licenses: []
|
42
|
+
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
hash: 3
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 3
|
63
|
+
segments:
|
64
|
+
- 0
|
65
|
+
version: "0"
|
66
|
+
requirements: []
|
67
|
+
|
68
|
+
rubyforge_project: rubygem_requirement_patch
|
69
|
+
rubygems_version: 1.3.7
|
70
|
+
signing_key:
|
71
|
+
specification_version: 3
|
72
|
+
summary: Patches rubygems 1.3.7 and similar to prevent Array.hash bug
|
73
|
+
test_files: []
|
74
|
+
|