summaryrefslogtreecommitdiff
path: root/lib/bundler/spec_set.rb
diff options
context:
space:
mode:
authorHedgehog <hedgehogshiatus@gmail.com>2011-02-16 20:32:41 +1100
committerHedgehog <hedgehogshiatus@gmail.com>2011-02-16 20:32:41 +1100
commit23ef7cbcc1028a8fe7ee257d120c97ceeffad6ba (patch)
treef8936b9d03fb93e352616cba031414ad5236f6c6 /lib/bundler/spec_set.rb
parent3152238064fabdc20387c0527930f0ed8216c930 (diff)
downloadbundler-1.1.pre.1-chef.tar.gz
Extend Bundler to accommodate Chef use cases (Configure app servers)v1.1.pre.1-chef
closes #324 Gracefully handling missing git sources for gem dependencies closes #875 ENV['GEM_PATH'] respected but not ENV['BUNDLE_PATH'] closes #880 Can we get a :system option for :git gems? closes #898 Add :decorate and :overwrite subcommands to git (:git_* for gem) closes #979 Problem specifying alternate library name with :git scheme closes #1043 Remove Git dependency from bundler.gemspec Generally fixes up many spec's that were falsely passing. ## Closed issues notes: Extend Bundler to accommodate Chef use cases (Config app servers) 324 Gracefully handling missing git sources for gem dependencies - In the test case I cite in that bug report, the message is: Could not find gem 'couchdb', required by 'chef', in any of the sources 875 ENV['GEM_PATH'] respected but not ENV['BUNDLE_PATH'] - I've resolved this for Git sources by respecting ENV['BUNDLE_INSTALL_PATH'] in the Gemfile 880 Can we get a :system option for :git gems? - I've added `ENV[BUNDLE_INSTALL_PATH]` and bundle `--install-path`, which is the fallback the OP requests..."maybe if BUNDLE_PATH could be BUNDLE_PATH without the ruby_scope appended, that might give me a fallback" 898 Add :decorate and :overwrite subcommands to git (:git_* for gem) `git ... :decorate=><boolean>` `gem ... :git_decorate=><boolean>` - Hash decoration of installed folder name is off by default. - Hash decoration of local Git cache is still decorated. 979 Problem specifying alternate library name with :git scheme 1043 Remove Git dependency from bundler.gemspec ## Related issues: issue #1013 Problem resolving deps from a git repo issue #1016 issue #1017 Resolver not working correctly issue #1027 Path bug issue #396 Add :dest and :path sub-options to :git - While not configurable in the Gemfile, i.e. at the method level (git, and gem) You can direct Bundler to install to a path without any Bundler adding to the path: `bundle install --install-path '/install/exactly/here'` Signed-off-by: Hedgehog <hedgehogshiatus@gmail.com>
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r--lib/bundler/spec_set.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 901888a11e..f2618f7086 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -76,6 +76,14 @@ module Bundler
lookup.dup
end
+ def spec_check(spec)
+ if spec
+ # in the spec's match on this string to see that correct gems have been installed, awaits GH issue #881
+ puts "{:spec_set_gemspec => {:name => '#{spec.name}', :version => '#{spec.version}', :platform => '#{spec.platform}'}}" if Bundler.settings["spec_run"]
+ spec
+ end
+ end
+
def materialize(deps, missing_specs = nil)
materialized = self.for(deps, [], false, true).to_a
materialized.map! do |s|
@@ -86,7 +94,7 @@ module Bundler
else
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
end
- spec if spec
+ spec_check(spec)
end
SpecSet.new(materialized.compact)
end