bundler 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bundler might be problematic. Click here for more details.

@@ -63,13 +63,13 @@ such as testing or deployment.
63
63
 
64
64
  You can specify groups of gems in the Gemfile using the following syntax:
65
65
 
66
- gem "nokogiri", :group => :test
66
+ gem "nokogiri", :group => :test
67
67
 
68
- # or
68
+ # or
69
69
 
70
- group :test do
70
+ group :test do
71
71
  gem "webrat"
72
- end
72
+ end
73
73
 
74
74
  Note that Bundler adds all the gems without an explicit group name to the
75
75
  `:default` group.
@@ -235,15 +235,15 @@ The following Bundler 0.8 APIs are no longer supported:
235
235
  explicitly. So `Bundler.require_env(:test)` becomes
236
236
  `Bundler.require(:default, :test)`
237
237
 
238
- 2. `require 'vendor/gems/environment.rb`: In unlocked
238
+ 2. `require 'vendor/gems/environment'`: In unlocked
239
239
  mode, where using system gems, this becomes
240
240
  `Bundler.setup(:multiple, groups)`. If you don't
241
241
  specify any groups, this puts all groups on the load
242
- path. In locked, mode, it becomes `require .bundle/environment`
242
+ path. In locked, mode, it becomes `require '.bundle/environment'`
243
243
 
244
244
  ## Reporting bugs
245
245
 
246
246
  Please report all bugs on the github issue tracker for the project located
247
247
  at:
248
248
 
249
- http://github.com/wycats/bundler/issues/
249
+ http://github.com/carlhuda/bundler/issues/
@@ -4,7 +4,7 @@ require 'yaml'
4
4
  require 'bundler/rubygems'
5
5
 
6
6
  module Bundler
7
- VERSION = "0.9.1"
7
+ VERSION = "0.9.2"
8
8
 
9
9
  autoload :Definition, 'bundler/definition'
10
10
  autoload :Dependency, 'bundler/dependency'
@@ -63,6 +63,10 @@ module Bundler
63
63
 
64
64
  environment = Bundler.load
65
65
  environment.lock
66
+ rescue GemNotFound, VersionConflict => e
67
+ Bundler.ui.error(e.message)
68
+ Bundler.ui.info "Run `bundle install` to install missing gems"
69
+ exit 128
66
70
  end
67
71
 
68
72
  desc "unlock", "Unlock the bundle. This allows gem versions to be changed"
@@ -1,3 +1,5 @@
1
+ require "digest/sha1"
2
+
1
3
  module Bundler
2
4
  class Definition
3
5
  def self.from_gemfile(gemfile)
@@ -13,7 +15,13 @@ module Bundler
13
15
  def self.from_lock(lockfile)
14
16
  # gemfile_definition = from_gemfile(nil)
15
17
  locked_definition = Locked.new(YAML.load_file(lockfile))
16
- # raise GemfileError unless gemfile_definition.equivalent?(locked_definition)
18
+
19
+ # TODO: Switch to using equivalent?
20
+ hash = Digest::SHA1.hexdigest(File.read("#{Bundler.root}/Gemfile"))
21
+ unless locked_definition.hash == hash
22
+ raise GemfileError, "You changed your Gemfile after locking. Please relock using `gem lock`"
23
+ end
24
+
17
25
  locked_definition
18
26
  end
19
27
 
@@ -55,6 +63,10 @@ module Bundler
55
63
  @details = details
56
64
  end
57
65
 
66
+ def hash
67
+ @details["hash"]
68
+ end
69
+
58
70
  def sources
59
71
  @sources ||= @details["sources"].map do |args|
60
72
  name, options = args.to_a.flatten
@@ -1,3 +1,5 @@
1
+ require "digest/md5"
2
+
1
3
  module Bundler
2
4
  class Runtime < Environment
3
5
  def setup(*groups)
@@ -159,6 +161,7 @@ module Bundler
159
161
 
160
162
  def details
161
163
  details = {}
164
+ details["hash"] = Digest::SHA1.hexdigest(File.read("#{root}/Gemfile"))
162
165
  details["sources"] = sources.map { |s| { s.class.name.split("::").last => s.options} }
163
166
 
164
167
  details["specs"] = specs.map do |s|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Lerche