bundler 0.9.15 → 0.9.16
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.
- data/CHANGELOG.md +27 -8
- data/bin/bundle +3 -0
- data/lib/bundler/cli.rb +16 -13
- data/lib/bundler/dsl.rb +17 -6
- data/lib/bundler/index.rb +6 -0
- data/lib/bundler/resolver.rb +8 -7
- data/lib/bundler/rubygems_ext.rb +5 -5
- data/lib/bundler/runtime.rb +1 -1
- data/lib/bundler/setup.rb +6 -1
- data/lib/bundler/shared_helpers.rb +1 -1
- data/lib/bundler/specification.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,37 @@
|
|
1
|
+
## 0.9.16 (April 3, 2010)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- exit gracefully on INT signal
|
6
|
+
- resolver output now indicates whether remote sources were checked
|
7
|
+
- print error instead of backtrace when exec cannot find a binary (#241)
|
8
|
+
|
9
|
+
Bugfixes:
|
10
|
+
|
11
|
+
- show, check, and open commands work again while locked (oops)
|
12
|
+
- show command for git gems
|
13
|
+
- outputs branch names other than master
|
14
|
+
- gets the correct sha from the checkout
|
15
|
+
- doesn't print sha twice if :ref is set
|
16
|
+
- report errors from bundler/setup.rb without backtraces (#243)
|
17
|
+
- fix Gem::Spec#git_version to not error on unloaded specs
|
18
|
+
- improve deprecation, Gemfile, and command error messages (#242)
|
19
|
+
|
1
20
|
## 0.9.15 (April 1, 2010)
|
2
21
|
|
3
22
|
Features:
|
4
23
|
|
5
|
-
-
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
24
|
+
- use the env_file if possible instead of doing a runtime resolve
|
25
|
+
- huge speedup when calling Bundler.setup while locked
|
26
|
+
- ensures bundle exec is fast while locked
|
27
|
+
- regenerates env_file if it was generated by an older version
|
28
|
+
- update cached/packed gems when you update gems via bundle install
|
10
29
|
|
11
30
|
Bugfixes:
|
12
31
|
|
13
|
-
-
|
14
|
-
-
|
15
|
-
-
|
32
|
+
- prep for Rubygems 1.3.7 changes
|
33
|
+
- install command now pulls git branches correctly (#211)
|
34
|
+
- raise errors on invalid options in the Gemfile
|
16
35
|
|
17
36
|
## 0.9.14 (March 30, 2010)
|
18
37
|
|
data/bin/bundle
CHANGED
data/lib/bundler/cli.rb
CHANGED
@@ -44,7 +44,7 @@ module Bundler
|
|
44
44
|
|
45
45
|
desc "check", "Checks if the dependencies listed in Gemfile are satisfied by currently installed gems"
|
46
46
|
def check
|
47
|
-
env = Bundler.
|
47
|
+
env = Bundler.runtime
|
48
48
|
# Check top level dependencies
|
49
49
|
missing = env.dependencies.select { |d| env.index.search(d).empty? }
|
50
50
|
if missing.any?
|
@@ -52,14 +52,14 @@ module Bundler
|
|
52
52
|
missing.each do |d|
|
53
53
|
Bundler.ui.error " * #{d}"
|
54
54
|
end
|
55
|
-
Bundler.ui.
|
55
|
+
Bundler.ui.warn "Install missing gems with `bundle install`"
|
56
56
|
exit 1
|
57
57
|
else
|
58
58
|
not_installed = env.requested_specs.select { |spec| !spec.loaded_from }
|
59
59
|
|
60
60
|
if not_installed.any?
|
61
61
|
not_installed.each { |s| Bundler.ui.error "#{s.name} (#{s.version}) is cached, but not installed" }
|
62
|
-
Bundler.ui.
|
62
|
+
Bundler.ui.warn "Install missing gems with `bundle install`"
|
63
63
|
exit 1
|
64
64
|
else
|
65
65
|
Bundler.ui.info "The Gemfile's dependencies are satisfied"
|
@@ -103,15 +103,14 @@ module Bundler
|
|
103
103
|
remove_lockfiles
|
104
104
|
end
|
105
105
|
|
106
|
-
|
107
|
-
environment.lock
|
106
|
+
Bundler.runtime.lock
|
108
107
|
rescue GemNotFound, VersionConflict => e
|
109
108
|
Bundler.ui.error(e.message)
|
110
|
-
Bundler.ui.
|
109
|
+
Bundler.ui.warn "Run `bundle install` to install missing gems."
|
111
110
|
exit 128
|
112
111
|
end
|
113
112
|
|
114
|
-
desc "unlock", "Unlock the bundle. This allows gem versions to be changed"
|
113
|
+
desc "unlock", "Unlock the bundle. This allows gem versions to be changed."
|
115
114
|
def unlock
|
116
115
|
if locked?
|
117
116
|
remove_lockfiles
|
@@ -126,9 +125,8 @@ module Bundler
|
|
126
125
|
if gem_name
|
127
126
|
Bundler.ui.info locate_gem(gem_name)
|
128
127
|
else
|
129
|
-
environment = Bundler.load
|
130
128
|
Bundler.ui.info "Gems included by the bundle:"
|
131
|
-
|
129
|
+
Bundler.runtime.specs.sort_by { |s| s.name }.each do |s|
|
132
130
|
Bundler.ui.info " * #{s.name} (#{s.version}#{s.git_version})"
|
133
131
|
end
|
134
132
|
end
|
@@ -140,7 +138,7 @@ module Bundler
|
|
140
138
|
Bundler.runtime.cache
|
141
139
|
rescue GemNotFound => e
|
142
140
|
Bundler.ui.error(e.message)
|
143
|
-
Bundler.ui.
|
141
|
+
Bundler.ui.warn "Run `bundle install` to install missing gems."
|
144
142
|
exit 128
|
145
143
|
end
|
146
144
|
|
@@ -169,8 +167,13 @@ module Bundler
|
|
169
167
|
rubyopt.unshift "-I#{File.expand_path('../..', __FILE__)}"
|
170
168
|
ENV["RUBYOPT"] = rubyopt.join(' ')
|
171
169
|
|
172
|
-
|
173
|
-
|
170
|
+
begin
|
171
|
+
# Run
|
172
|
+
Kernel.exec *ARGV
|
173
|
+
rescue Errno::ENOENT
|
174
|
+
Bundler.ui.error "bundler: command not found: #{ARGV.first}"
|
175
|
+
Bundler.ui.warn "Install missing gem binaries with `bundle install`"
|
176
|
+
end
|
174
177
|
end
|
175
178
|
|
176
179
|
desc "open GEM", "Opens the source directory of the given bundled gem"
|
@@ -203,7 +206,7 @@ module Bundler
|
|
203
206
|
end
|
204
207
|
|
205
208
|
def locate_gem(name)
|
206
|
-
spec = Bundler.
|
209
|
+
spec = Bundler.runtime.specs.find{|s| s.name == name }
|
207
210
|
raise GemNotFound, "Could not find gem '#{name}' in the current bundle." unless spec
|
208
211
|
spec.full_gem_path
|
209
212
|
end
|
data/lib/bundler/dsl.rb
CHANGED
@@ -64,13 +64,20 @@ module Bundler
|
|
64
64
|
|
65
65
|
# Deprecated methods
|
66
66
|
|
67
|
-
def self.deprecate(name)
|
67
|
+
def self.deprecate(name, replacement = nil)
|
68
68
|
define_method(name) do |*|
|
69
|
-
|
69
|
+
message = "'#{name}' has been removed from the Gemfile DSL, "
|
70
|
+
if replacement
|
71
|
+
message << "and has been replaced with '#{replacement}'."
|
72
|
+
else
|
73
|
+
message << "and is no longer supported."
|
74
|
+
end
|
75
|
+
message << "\nSee the README for more information on upgrading from Bundler 0.8."
|
76
|
+
raise DeprecatedMethod, message
|
70
77
|
end
|
71
78
|
end
|
72
79
|
|
73
|
-
deprecate :only
|
80
|
+
deprecate :only, :group
|
74
81
|
deprecate :except
|
75
82
|
deprecate :disable_system_gems
|
76
83
|
deprecate :disable_rubygems
|
@@ -101,9 +108,13 @@ module Bundler
|
|
101
108
|
invalid_keys = opts.keys - %w(group git path name branch ref tag require)
|
102
109
|
if invalid_keys.any?
|
103
110
|
plural = invalid_keys.size > 1
|
104
|
-
|
105
|
-
|
106
|
-
" invalid"
|
111
|
+
message = "You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} "
|
112
|
+
if plural
|
113
|
+
message << "as options for gem '#{name}', but they are invalid."
|
114
|
+
else
|
115
|
+
message << "as an option for gem '#{name}', but it is invalid."
|
116
|
+
end
|
117
|
+
raise InvalidOption, message
|
107
118
|
end
|
108
119
|
|
109
120
|
group = opts.delete("group") || @group
|
data/lib/bundler/index.rb
CHANGED
data/lib/bundler/resolver.rb
CHANGED
@@ -148,18 +148,19 @@ module Bundler
|
|
148
148
|
versions = @source_requirements[name][name].map { |s| s.version }
|
149
149
|
message = "Could not find gem '#{current}' in #{current.source}.\n"
|
150
150
|
if versions.any?
|
151
|
-
message << "Source contains '#{
|
151
|
+
message << "Source contains '#{name}' at: #{versions.join(', ')}"
|
152
152
|
else
|
153
153
|
message << "Source does not contain any versions of '#{current}'"
|
154
154
|
end
|
155
|
-
|
156
|
-
raise GemNotFound, message
|
157
155
|
else
|
158
|
-
|
156
|
+
message = "Could not find gem '#{current}' "
|
157
|
+
if @index.sources.include?(Bundler::Source::Rubygems)
|
158
|
+
message << "in any of the gem sources."
|
159
|
+
else
|
160
|
+
message << "in the gems available on this machine."
|
161
|
+
end
|
159
162
|
end
|
160
|
-
|
161
|
-
raise GemNotFound, "Could not find gem '#{current}' in #{location}.\n" \
|
162
|
-
"Source contains fo"
|
163
|
+
raise GemNotFound, message
|
163
164
|
else
|
164
165
|
@errors[current.name] = [nil, current]
|
165
166
|
end
|
data/lib/bundler/rubygems_ext.rb
CHANGED
@@ -18,11 +18,11 @@ module Gem
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def git_version
|
21
|
-
|
22
|
-
|
23
|
-
branch =
|
24
|
-
branch
|
25
|
-
end
|
21
|
+
if @loaded_from && File.exist?(File.join(full_gem_path, ".git"))
|
22
|
+
sha = Dir.chdir(full_gem_path){ `git rev-parse HEAD`.strip }
|
23
|
+
branch = full_gem_path.split("-")[3]
|
24
|
+
(branch && branch != sha) ? " #{branch}-#{sha[0...6]}" : " #{sha[0...6]}"
|
25
|
+
end
|
26
26
|
end
|
27
27
|
|
28
28
|
def to_gemfile(path = nil)
|
data/lib/bundler/runtime.rb
CHANGED
@@ -64,7 +64,7 @@ module Bundler
|
|
64
64
|
FileUtils.mkdir_p("#{root}/.bundle")
|
65
65
|
write_yml_lock
|
66
66
|
write_rb_lock
|
67
|
-
Bundler.ui.
|
67
|
+
Bundler.ui.confirm("The bundle is now locked. Use `bundle show` to list the gems in the environment.")
|
68
68
|
end
|
69
69
|
|
70
70
|
def dependencies_for(*groups)
|
data/lib/bundler/setup.rb
CHANGED
data/lib/bundler/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 16
|
9
|
+
version: 0.9.16
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Carl Lerche
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-04-
|
19
|
+
date: 2010-04-03 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|