bundler 1.0.19.rc → 1.0.20.rc
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 +20 -5
- data/bin/bundle +10 -10
- data/bundler.gemspec +2 -1
- data/lib/bundler.rb +3 -2
- data/lib/bundler/cli.rb +7 -7
- data/lib/bundler/dependency.rb +1 -8
- data/lib/bundler/installer.rb +2 -1
- data/lib/bundler/rubygems_ext.rb +3 -1
- data/lib/bundler/rubygems_integration.rb +1 -0
- data/lib/bundler/settings.rb +1 -3
- data/lib/bundler/source.rb +1 -0
- data/lib/bundler/version.rb +1 -1
- data/man/bundle-install.ronn +3 -3
- data/man/gemfile.5.ronn +2 -2
- data/spec/{other → bundler}/gem_helper_spec.rb +7 -0
- data/spec/install/gems/groups_spec.rb +14 -0
- data/spec/lock/lockfile_spec.rb +1 -2
- data/spec/other/help_spec.rb +2 -1
- data/spec/support/builders.rb +6 -1
- metadata +6 -6
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,31 @@
|
|
1
|
+
## 1.0.20.rc (September 18, 2011)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Rescue interrupts to `bundle` while loading bundler.rb (#1395)
|
6
|
+
- Allow clearing without groups by passing `--without ''` (#1259)
|
7
|
+
|
8
|
+
Bugfixes:
|
9
|
+
|
10
|
+
- Manually sort requirements in the lockfile (#1375)
|
11
|
+
- Remove several warnings generated by ruby -w (@stephencelis)
|
12
|
+
- Handle trailing slashes on names passed to `gem` (#1372)
|
13
|
+
- Name modules for gems like 'test-foo_bar' correctly (#1303)
|
14
|
+
- Don't require Psych if Syck is already loaded (#1239)
|
15
|
+
|
1
16
|
## 1.0.19.rc (September 13, 2011)
|
2
17
|
|
3
18
|
Features:
|
4
19
|
|
5
|
-
|
6
|
-
|
7
|
-
|
20
|
+
- Compatability with Rubygems 1.8.10 installer changes
|
21
|
+
- Report gem installation failures clearly (@rwilcox, #1380)
|
22
|
+
- Useful error for cap and vlad on first deploy (@nexmat, @kirs)
|
8
23
|
|
9
24
|
Bugfixes:
|
10
25
|
|
11
|
-
|
26
|
+
- `exec` now works when the command contains 'exec'
|
12
27
|
- Only touch lock after changes on Windows (@robertwahler, #1358)
|
13
|
-
|
28
|
+
- Keep load paths when #setup is called multiple times (@radsaq, #1379)
|
14
29
|
|
15
30
|
## 1.0.18 (August 16, 2011)
|
16
31
|
|
data/bin/bundle
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Check if an older version of bundler is installed
|
4
|
-
require 'bundler'
|
5
|
-
$:.each do |path|
|
6
|
-
if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
|
7
|
-
abort "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`."
|
8
|
-
end
|
9
|
-
end
|
10
|
-
require 'bundler/cli'
|
11
|
-
|
12
2
|
begin
|
3
|
+
require 'bundler'
|
4
|
+
# Check if an older version of bundler is installed
|
5
|
+
$:.each do |path|
|
6
|
+
if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
|
7
|
+
err = "Please remove Bundler 0.8 versions."
|
8
|
+
err << "This can be done by running `gem cleanup bundler`."
|
9
|
+
abort(err)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
require 'bundler/cli'
|
13
13
|
Bundler::CLI.start
|
14
14
|
rescue Bundler::BundlerError => e
|
15
15
|
Bundler.ui.error e.message
|
data/bundler.gemspec
CHANGED
@@ -22,7 +22,8 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
# Man files are required because they are ignored by git
|
24
24
|
man_files = Dir.glob("lib/bundler/man/**/*")
|
25
|
-
|
25
|
+
git_files = `git ls-files`.split("\n") rescue ''
|
26
|
+
s.files = git_files + man_files
|
26
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
27
28
|
s.executables = %w(bundle)
|
28
29
|
s.require_paths = ["lib"]
|
data/lib/bundler.rb
CHANGED
@@ -3,11 +3,12 @@ require 'fileutils'
|
|
3
3
|
require 'pathname'
|
4
4
|
|
5
5
|
begin
|
6
|
-
|
6
|
+
# Pull in Psych if we can, but not if Syck is already loaded
|
7
|
+
require 'psych' unless defined?(YAML)
|
7
8
|
rescue LoadError
|
9
|
+
require 'yaml'
|
8
10
|
end
|
9
11
|
|
10
|
-
require 'yaml'
|
11
12
|
require 'bundler/rubygems_ext'
|
12
13
|
require 'bundler/rubygems_integration'
|
13
14
|
require 'bundler/version'
|
data/lib/bundler/cli.rb
CHANGED
@@ -150,12 +150,11 @@ module Bundler
|
|
150
150
|
"Install using defaults tuned for deployment environments"
|
151
151
|
def install(path = nil)
|
152
152
|
opts = options.dup
|
153
|
-
opts[:without]
|
154
|
-
|
155
|
-
opts[:without] = opts[:without].map{|g| g.split(" ") }
|
153
|
+
if opts[:without]
|
154
|
+
opts[:without].map!{|g| g.split(" ") }
|
156
155
|
opts[:without].flatten!
|
156
|
+
opts[:without].map!{|g| g.to_sym }
|
157
157
|
end
|
158
|
-
opts[:without] = opts[:without].map{|g| g.to_sym }
|
159
158
|
|
160
159
|
# Can't use Bundler.settings for this because settings needs gemfile.dirname
|
161
160
|
ENV['BUNDLE_GEMFILE'] = File.expand_path(opts[:gemfile]) if opts[:gemfile]
|
@@ -214,7 +213,7 @@ module Bundler
|
|
214
213
|
Bundler.settings[:bin] = opts["binstubs"] if opts[:binstubs]
|
215
214
|
Bundler.settings[:no_prune] = true if opts["no-prune"]
|
216
215
|
Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? '1' : nil
|
217
|
-
Bundler.settings.without = opts[:without]
|
216
|
+
Bundler.settings.without = opts[:without]
|
218
217
|
Bundler.ui.be_quiet! if opts[:quiet]
|
219
218
|
|
220
219
|
Installer.install(Bundler.root, Bundler.definition, opts)
|
@@ -473,9 +472,10 @@ module Bundler
|
|
473
472
|
desc "gem GEM", "Creates a skeleton for creating a rubygem"
|
474
473
|
method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :banner => "Generate a binary for your library."
|
475
474
|
def gem(name)
|
475
|
+
name = name.chomp("/") # remove trailing slash if present
|
476
476
|
target = File.join(Dir.pwd, name)
|
477
|
-
constant_name = name.split('_').map{|p| p.
|
478
|
-
constant_name = constant_name.split('-').map{|q| q.
|
477
|
+
constant_name = name.split('_').map{|p| p[0..0].upcase + p[1..-1] }.join
|
478
|
+
constant_name = constant_name.split('-').map{|q| q[0..0].upcase + q[1..-1] }.join('::') if constant_name =~ /-/
|
479
479
|
constant_array = constant_name.split('::')
|
480
480
|
git_author_name = `git config user.name`.chomp
|
481
481
|
git_author_email = `git config user.email`.chomp
|
data/lib/bundler/dependency.rb
CHANGED
@@ -71,15 +71,8 @@ module Bundler
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def to_lock
|
74
|
-
out =
|
75
|
-
|
76
|
-
unless requirement == Gem::Requirement.default
|
77
|
-
reqs = requirement.requirements.map{|o,v| "#{o} #{v}" }
|
78
|
-
out << " (#{reqs.join(', ')})"
|
79
|
-
end
|
80
|
-
|
74
|
+
out = super
|
81
75
|
out << '!' if source
|
82
|
-
|
83
76
|
out << "\n"
|
84
77
|
end
|
85
78
|
|
data/lib/bundler/installer.rb
CHANGED
@@ -67,11 +67,12 @@ module Bundler
|
|
67
67
|
Bundler.ui.debug "from #{spec.loaded_from} "
|
68
68
|
end
|
69
69
|
|
70
|
-
# newline after installing, some gems say "with native extensions"
|
70
|
+
# newline comes after installing, some gems say "with native extensions"
|
71
71
|
Bundler.ui.info ""
|
72
72
|
generate_bundler_executable_stubs(spec) if Bundler.settings[:bin]
|
73
73
|
FileUtils.rm_rf(Bundler.tmp)
|
74
74
|
rescue Exception => e
|
75
|
+
Bundler.ui.info ""
|
75
76
|
Bundler.ui.warn "#{e.class}: #{e.message}"
|
76
77
|
msg = "An error occured while installing #{spec.name} (#{spec.version}),"
|
77
78
|
msg << " and Bundler cannot continue.\nMake sure that `gem install"
|
data/lib/bundler/rubygems_ext.rb
CHANGED
@@ -40,6 +40,7 @@ module Gem
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# RubyGems 1.8+ used only.
|
43
|
+
remove_method :gem_dir if method_defined? :gem_dir
|
43
44
|
def gem_dir
|
44
45
|
full_gem_path
|
45
46
|
end
|
@@ -123,7 +124,7 @@ module Gem
|
|
123
124
|
def to_lock
|
124
125
|
out = " #{name}"
|
125
126
|
unless requirement == Gem::Requirement.default
|
126
|
-
reqs = requirement.requirements.map{|o,v| "#{o} #{v}" }
|
127
|
+
reqs = requirement.requirements.map{|o,v| "#{o} #{v}" }.sort.reverse
|
127
128
|
out << " (#{reqs.join(', ')})"
|
128
129
|
end
|
129
130
|
out
|
@@ -151,6 +152,7 @@ module Gem
|
|
151
152
|
MSWIN = Gem::Platform.new('mswin32')
|
152
153
|
MINGW = Gem::Platform.new('x86-mingw32')
|
153
154
|
|
155
|
+
undef_method :hash if method_defined? :hash
|
154
156
|
def hash
|
155
157
|
@cpu.hash ^ @os.hash ^ @version.hash
|
156
158
|
end
|
@@ -180,6 +180,7 @@ module Bundler
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def stub_source_index170(specs)
|
183
|
+
Gem::SourceIndex.send(:alias_method, :old_initialize, :initialize)
|
183
184
|
Gem::SourceIndex.send(:define_method, :initialize) do |*args|
|
184
185
|
@gems = {}
|
185
186
|
# You're looking at this thinking: Oh! This is how I make those
|
data/lib/bundler/settings.rb
CHANGED
data/lib/bundler/source.rb
CHANGED
data/lib/bundler/version.rb
CHANGED
@@ -2,5 +2,5 @@ module Bundler
|
|
2
2
|
# We're doing this because we might write tests that deal
|
3
3
|
# with other versions of bundler and we are unsure how to
|
4
4
|
# handle this better.
|
5
|
-
VERSION = "1.0.
|
5
|
+
VERSION = "1.0.20.rc" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
data/man/bundle-install.ronn
CHANGED
@@ -54,9 +54,9 @@ update process below under [CONSERVATIVE UPDATING][].
|
|
54
54
|
|
55
55
|
* `--local`:
|
56
56
|
Do not attempt to connect to `rubygems.org`, instead using just
|
57
|
-
the gems
|
58
|
-
appropriate platform-specific gem exists on
|
59
|
-
|
57
|
+
the gems already present in Rubygems' cache or in `vendor/cache`.
|
58
|
+
Note that if a more appropriate platform-specific gem exists on
|
59
|
+
`rubygems.org`, it will not be found.
|
60
60
|
|
61
61
|
* `--deployment`:
|
62
62
|
Switches bundler's defaults into [deployment mode][DEPLOYMENT MODE].
|
data/man/gemfile.5.ronn
CHANGED
@@ -280,5 +280,5 @@ bundler uses the following priority order:
|
|
280
280
|
repository otherwise declared. This results in bundler prioritizing the
|
281
281
|
ActiveSupport gem from the Rails git repository over ones from
|
282
282
|
`rubygems.org`
|
283
|
-
3. The sources specified via `source`,
|
284
|
-
|
283
|
+
3. The sources specified via `source`, searching each source in your `Gemfile`
|
284
|
+
from last added to first added.
|
@@ -31,6 +31,13 @@ describe "Bundler::GemHelper tasks" do
|
|
31
31
|
File.open(File.join(app.to_s, 'test2.gemspec'), 'w') {|f| f << ''}
|
32
32
|
proc { Bundler::GemHelper.new(app.to_s) }.should raise_error(/Unable to determine name/)
|
33
33
|
end
|
34
|
+
|
35
|
+
it "handles namespaces and converting to CamelCase" do
|
36
|
+
bundle 'gem test-foo_bar'
|
37
|
+
lib = bundled_app('test-foo_bar').join('lib/test-foo_bar.rb').read
|
38
|
+
lib.should include("module Test")
|
39
|
+
lib.should include("module FooBar")
|
40
|
+
end
|
34
41
|
end
|
35
42
|
|
36
43
|
context "gem management" do
|
@@ -136,6 +136,20 @@ describe "bundle install with gem sources" do
|
|
136
136
|
|
137
137
|
ENV["BUNDLE_WITHOUT"] = nil
|
138
138
|
end
|
139
|
+
|
140
|
+
it "clears without when passed an empty list" do
|
141
|
+
bundle :install, :without => "emo"
|
142
|
+
|
143
|
+
bundle 'install --without ""'
|
144
|
+
should_be_installed "activesupport 2.3.5"
|
145
|
+
end
|
146
|
+
|
147
|
+
it "doesn't clear without when nothing is passed" do
|
148
|
+
bundle :install, :without => "emo"
|
149
|
+
|
150
|
+
bundle :install
|
151
|
+
should_not_be_installed "activesupport 2.3.5"
|
152
|
+
end
|
139
153
|
end
|
140
154
|
|
141
155
|
describe "with gems assigned to multiple groups" do
|
data/spec/lock/lockfile_spec.rb
CHANGED
data/spec/other/help_spec.rb
CHANGED
@@ -7,7 +7,8 @@ describe "bundle help" do
|
|
7
7
|
system_gems "bundler-0.8.1"
|
8
8
|
|
9
9
|
bundle "help", :expect_err => true
|
10
|
-
err.should
|
10
|
+
err.should include("Please remove Bundler 0.8 versions.")
|
11
|
+
err.should include("This can be done by running `gem cleanup bundler`.")
|
11
12
|
end
|
12
13
|
|
13
14
|
it "uses groff when available" do
|
data/spec/support/builders.rb
CHANGED
@@ -167,7 +167,12 @@ module Spec
|
|
167
167
|
# The yard gem iterates over Gem.source_index looking for plugins
|
168
168
|
build_gem "yard" do |s|
|
169
169
|
s.write "lib/yard.rb", <<-Y
|
170
|
-
Gem.
|
170
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.8.10")
|
171
|
+
specs = Gem::Specification
|
172
|
+
else
|
173
|
+
specs = Gem.source_index.find_name('')
|
174
|
+
end
|
175
|
+
specs.each do |gem|
|
171
176
|
puts gem.full_name
|
172
177
|
end
|
173
178
|
Y
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7712090
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 20
|
10
10
|
- rc
|
11
|
-
version: 1.0.
|
11
|
+
version: 1.0.20.rc
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- "Andr\xC3\xA9 Arko"
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2011-09-
|
22
|
+
date: 2011-09-19 00:00:00 -07:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- man/bundle.ronn
|
147
147
|
- man/gemfile.5.ronn
|
148
148
|
- man/index.txt
|
149
|
+
- spec/bundler/gem_helper_spec.rb
|
149
150
|
- spec/cache/gems_spec.rb
|
150
151
|
- spec/cache/git_spec.rb
|
151
152
|
- spec/cache/path_spec.rb
|
@@ -174,7 +175,6 @@ files:
|
|
174
175
|
- spec/other/console_spec.rb
|
175
176
|
- spec/other/exec_spec.rb
|
176
177
|
- spec/other/ext_spec.rb
|
177
|
-
- spec/other/gem_helper_spec.rb
|
178
178
|
- spec/other/help_spec.rb
|
179
179
|
- spec/other/init_spec.rb
|
180
180
|
- spec/other/newgem_spec.rb
|
@@ -254,6 +254,7 @@ signing_key:
|
|
254
254
|
specification_version: 3
|
255
255
|
summary: The best way to manage your application's dependencies
|
256
256
|
test_files:
|
257
|
+
- spec/bundler/gem_helper_spec.rb
|
257
258
|
- spec/cache/gems_spec.rb
|
258
259
|
- spec/cache/git_spec.rb
|
259
260
|
- spec/cache/path_spec.rb
|
@@ -282,7 +283,6 @@ test_files:
|
|
282
283
|
- spec/other/console_spec.rb
|
283
284
|
- spec/other/exec_spec.rb
|
284
285
|
- spec/other/ext_spec.rb
|
285
|
-
- spec/other/gem_helper_spec.rb
|
286
286
|
- spec/other/help_spec.rb
|
287
287
|
- spec/other/init_spec.rb
|
288
288
|
- spec/other/newgem_spec.rb
|