rails_gem_install 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.rdoc CHANGED
@@ -1,3 +1,13 @@
1
+ == 0.3.4
2
+
3
+ * Workaround to detect missing required gems that use a slash in their
4
+ require path, but need to use a dash when installin the gem by name.
5
+
6
+ == 0.3.3
7
+
8
+ * Fixed the installation of non-loaded gems to first check whether or not
9
+ they are actually installed (just not loaded).
10
+
1
11
  == 0.3.2
2
12
 
3
13
  * Fixed non-root gem install issues on FreeBSD.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -73,7 +73,18 @@ class RailsGemInstaller
73
73
  end
74
74
 
75
75
  puts cmd
76
- system cmd
76
+ exit_code = system(cmd)
77
+ if !exit_code && (gemspec[:name] =~ /^(.+)\/(.+)$/)
78
+ # The gem we're shooting for failed and has a slash in it's name,
79
+ # this is likely because there was a require that listed a path. One way
80
+ # this happens is when multiple gems like to install to the same
81
+ # require namespace to act like separate parts of a larger whole. For
82
+ # example redis and redis-namespace gems. To attempt to handle this,
83
+ # try the failed a/b gem as a-b.
84
+ exit_code = install_gem(gemspec.merge(:name => "#{$1}-#{$2}"))
85
+ end
86
+
87
+ return exit_code
77
88
  end
78
89
 
79
90
  # Finds all the gems that need to be installed for this Rails project to
@@ -0,0 +1,64 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rails_gem_install}
8
+ s.version = "0.3.4"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Scott W. Bradley"]
12
+ s.date = %q{2010-12-27}
13
+ s.default_executable = %q{rails_gem_install}
14
+ s.description = %q{Installs gem dependencies for a Rails 2 project where `rake gems:install` fails. I.e.: breaks the circular dependencies of requiring Rails and anything your vendored gems/plugins require in order to install these requirements.}
15
+ s.email = %q{scottwb@gmail.com}
16
+ s.executables = ["rails_gem_install"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".gitignore",
24
+ "CHANGES.rdoc",
25
+ "LICENSE",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bin/rails_gem_install",
30
+ "lib/rails_gem_install.rb",
31
+ "lib/rails_gem_install/rails.rb",
32
+ "lib/rails_gem_install/rails_gem_installer.rb",
33
+ "rails_gem_install.gemspec",
34
+ "spec/rails_gem_installer_spec.rb",
35
+ "spec/spec.opts",
36
+ "spec/spec_helper.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/scottwb/rails_gem_install}
39
+ s.rdoc_options = ["--charset=UTF-8"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.3.6}
42
+ s.summary = %q{Installs gem dependencies for a Rails 2 project.}
43
+ s.test_files = [
44
+ "spec/rails_gem_installer_spec.rb",
45
+ "spec/spec_helper.rb"
46
+ ]
47
+
48
+ if s.respond_to? :specification_version then
49
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
+ s.specification_version = 3
51
+
52
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
53
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
54
+ s.add_development_dependency(%q<rcov>, [">= 0.9.8"])
55
+ else
56
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
57
+ s.add_dependency(%q<rcov>, [">= 0.9.8"])
58
+ end
59
+ else
60
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
61
+ s.add_dependency(%q<rcov>, [">= 0.9.8"])
62
+ end
63
+ end
64
+
@@ -64,7 +64,7 @@ EOT
64
64
  - [I] gdata
65
65
  - [I] responders ~> 0.4.6
66
66
  - [I] sanitize = 1.2.1
67
- - [ ] nokogiri ~> 1.4.1
67
+ - [ ] somemissinggem ~> 1.4.1
68
68
  - [I] panztel-actionwebservice = 2.3.5
69
69
  - [R] actionpack = 2.3.5
70
70
  - [R] activerecord = 2.3.5
@@ -73,7 +73,7 @@ EOT
73
73
  EOT
74
74
  gemspecs.should have(1).gemspec
75
75
  gemspecs.first.should have(2).members
76
- gemspecs.first[:name].should == 'nokogiri'
76
+ gemspecs.first[:name].should == 'somemissinggem'
77
77
  gemspecs.first[:version].should == '~> 1.4.1'
78
78
  end
79
79
  end
@@ -98,6 +98,26 @@ EOT
98
98
  gemspecs.first[:name].should == 'gdata'
99
99
  end
100
100
  end
101
+
102
+ context "when there are installed-but-not-loaded dependencies" do
103
+ it "should not return those gems" do
104
+ # REVISIT: This assumes you have rspec installed, cuz who doesn't
105
+ # have that but is still trying to run specs?
106
+ gemspecs = subject.parse_deps <<EOT
107
+ - [I] rmagick
108
+ - [I] gdata
109
+ - [I] responders ~> 0.4.6
110
+ - [I] sanitize = 1.2.1
111
+ - [ ] rspec
112
+ - [I] panztel-actionwebservice = 2.3.5
113
+ - [R] actionpack = 2.3.5
114
+ - [R] activerecord = 2.3.5
115
+ - [I] fastthread
116
+ - [I] jammit = 0.4.4
117
+ EOT
118
+ gemspecs.should be_empty
119
+ end
120
+ end
101
121
  end
102
122
 
103
123
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 3
9
- version: 0.3.3
8
+ - 4
9
+ version: 0.3.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Scott W. Bradley
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-07 00:00:00 -08:00
17
+ date: 2010-12-27 00:00:00 -08:00
18
18
  default_executable: rails_gem_install
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -66,6 +66,7 @@ files:
66
66
  - lib/rails_gem_install.rb
67
67
  - lib/rails_gem_install/rails.rb
68
68
  - lib/rails_gem_install/rails_gem_installer.rb
69
+ - rails_gem_install.gemspec
69
70
  - spec/rails_gem_installer_spec.rb
70
71
  - spec/spec.opts
71
72
  - spec/spec_helper.rb