bundler 1.3.0 → 1.3.1
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/.travis.yml +13 -10
- data/CHANGELOG.md +9 -0
- data/Rakefile +17 -7
- data/bundler.gemspec +1 -1
- data/lib/bundler/cli.rb +25 -22
- data/lib/bundler/fetcher.rb +6 -3
- data/lib/bundler/friendly_errors.rb +25 -19
- data/lib/bundler/gem_helper.rb +11 -9
- data/lib/bundler/installer.rb +6 -6
- data/lib/bundler/rubygems_integration.rb +11 -2
- data/lib/bundler/ui.rb +28 -21
- data/lib/bundler/vendored_persistent.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/spec/install/gems/dependency_api_spec.rb +5 -5
- metadata +18 -2
data/.travis.yml
CHANGED
@@ -4,6 +4,7 @@ before_script: rake spec:travis:deps
|
|
4
4
|
branches:
|
5
5
|
only:
|
6
6
|
- master
|
7
|
+
- 1-3-stable
|
7
8
|
- 1-2-stable
|
8
9
|
- 1-1-stable
|
9
10
|
- 1-0-stable
|
@@ -22,39 +23,41 @@ notifications:
|
|
22
23
|
rooms:
|
23
24
|
- secure: "geau3P+A9ZJHkA/OHN5v9Mcb8hAti1PllXw5DsHNJfLAWBAw5ReGGMA8Xfpf\nLdT7ktIUlQwzw94cKQ6sRZk8szXTiHncf3bxXTACJf2RpiKmbkoQU51TmCDq\nYSMuY1FIryk/3t9aZCrarufbIDI3DBscDEe4Bj9bERl+TJ8ArBY="
|
24
25
|
rvm:
|
26
|
+
- 2.0.0
|
25
27
|
- 1.9.3
|
26
|
-
- 1.9.2
|
27
|
-
- 1.8.7
|
28
28
|
# Rubygems versions MUST be available as rake tasks
|
29
29
|
# see Rakefile:66 for the list of possible RGV values
|
30
30
|
env:
|
31
31
|
# we need to know if changes to rubygems will break bundler on release
|
32
32
|
- RGV=master
|
33
33
|
# test the latest rubygems release with all of our supported rubies
|
34
|
-
- RGV=
|
34
|
+
- RGV=v2.0.0
|
35
35
|
matrix:
|
36
36
|
allow_failures:
|
37
37
|
# we want to know how we're doing with head, but not fail the build
|
38
38
|
- rvm: ruby-head
|
39
|
-
|
40
|
-
- rvm: 2.0.0
|
39
|
+
- env: RGV=master
|
41
40
|
# 1.9.2 is simply too slow. it sometimes exceeds the 25m hard limit.
|
42
41
|
- rvm: 1.9.2
|
43
42
|
include:
|
44
43
|
# riding the edge
|
45
44
|
- rvm: ruby-head
|
46
45
|
env: RGV=master
|
47
|
-
#
|
48
|
-
- rvm:
|
49
|
-
env: RGV=
|
50
|
-
# Bundler 1.x supports Rubygems down to 1.5.3 on Ruby 1.9.3
|
46
|
+
# Rubygems goes down to 1.5.3 on Ruby 1.9.3
|
47
|
+
- rvm: 1.9.3
|
48
|
+
env: RGV=v1.8.25
|
51
49
|
- rvm: 1.9.3
|
52
50
|
env: RGV=v1.7.2
|
53
51
|
- rvm: 1.9.3
|
54
52
|
env: RGV=v1.6.2
|
55
53
|
- rvm: 1.9.3
|
56
54
|
env: RGV=v1.5.3
|
57
|
-
#
|
55
|
+
# We only want an overview of how 1.9.2 is doing
|
56
|
+
- rvm: 1.9.2
|
57
|
+
env: RGV=v1.8.25
|
58
|
+
# Rubygems goes down to 1.3.6 on Ruby 1.8.7
|
59
|
+
- rvm: 1.8.7
|
60
|
+
env: RGV=v1.8.25
|
58
61
|
- rvm: 1.8.7
|
59
62
|
env: RGV=v1.7.2
|
60
63
|
- rvm: 1.8.7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 1.3.1 (3 March 2013)
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- include manpages in gem, restoring many help pages
|
6
|
+
- handle more SSL certificate verification failures
|
7
|
+
- check for the full version of SSL, which we need (@alup)
|
8
|
+
- gem rake task 'install' now depends on task 'build' (@sunaku)
|
9
|
+
|
1
10
|
## 1.3.0 (24 February 2013)
|
2
11
|
|
3
12
|
Features:
|
data/Rakefile
CHANGED
@@ -5,9 +5,6 @@ require 'rubygems'
|
|
5
5
|
require 'shellwords'
|
6
6
|
require 'benchmark'
|
7
7
|
|
8
|
-
task :build => ["man:clean", "man:build"]
|
9
|
-
task :release => ["man:clean", "man:build"]
|
10
|
-
|
11
8
|
def safe_task(&block)
|
12
9
|
yield
|
13
10
|
true
|
@@ -32,7 +29,7 @@ end
|
|
32
29
|
namespace :spec do
|
33
30
|
desc "Ensure spec dependencies are installed"
|
34
31
|
task :deps do
|
35
|
-
{"rdiscount" => "~> 1.6", "ronn" => "~> 0.7.3", "rspec" => "~> 2.
|
32
|
+
{"rdiscount" => "~> 1.6", "ronn" => "~> 0.7.3", "rspec" => "~> 2.13"}.each do |name, version|
|
36
33
|
sh "#{Gem.ruby} -S gem list #{name} -v '#{version}' | grep '#{name}' -q || " \
|
37
34
|
"#{Gem.ruby} -S gem install #{name} -v '#{version}' --no-ri --no-rdoc"
|
38
35
|
end
|
@@ -91,7 +88,7 @@ begin
|
|
91
88
|
namespace :rubygems do
|
92
89
|
# Rubygems specs by version
|
93
90
|
rubyopt = ENV["RUBYOPT"]
|
94
|
-
%w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.
|
91
|
+
%w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.25 v2.0.0).each do |rg|
|
95
92
|
desc "Run specs with Rubygems #{rg}"
|
96
93
|
RSpec::Core::RakeTask.new(rg) do |t|
|
97
94
|
t.rspec_opts = %w(-fs --color)
|
@@ -176,6 +173,15 @@ begin
|
|
176
173
|
end
|
177
174
|
end
|
178
175
|
|
176
|
+
rescue LoadError
|
177
|
+
task :spec do
|
178
|
+
abort "Run `rake spec:deps` to be able to run the specs"
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
begin
|
183
|
+
require 'ronn'
|
184
|
+
|
179
185
|
namespace :man do
|
180
186
|
directory "lib/bundler/man"
|
181
187
|
|
@@ -204,11 +210,15 @@ begin
|
|
204
210
|
end
|
205
211
|
|
206
212
|
rescue LoadError
|
207
|
-
|
208
|
-
abort "
|
213
|
+
namespace :man do
|
214
|
+
task(:build) { abort "Install the ronn gem to be able to release!" }
|
215
|
+
task(:clean) { abort "Install the ronn gem to be able to release!" }
|
209
216
|
end
|
210
217
|
end
|
211
218
|
|
219
|
+
task :build => ["man:clean", "man:build"]
|
220
|
+
task :release => ["man:clean", "man:build"]
|
221
|
+
|
212
222
|
namespace :vendor do
|
213
223
|
desc "Build the vendor dir"
|
214
224
|
task :build => :clean do
|
data/bundler.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency 'rspec', '~> 2.11'
|
21
21
|
|
22
22
|
spec.files = `git ls-files`.split($/)
|
23
|
-
spec.files += Dir.glob('man/**/*') # man/ is ignored by git
|
23
|
+
spec.files += Dir.glob('lib/bundler/man/**/*') # man/ is ignored by git
|
24
24
|
spec.test_files = spec.files.grep(%r{^spec/})
|
25
25
|
|
26
26
|
spec.executables = %w(bundle)
|
data/lib/bundler/cli.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
+
require 'bundler'
|
1
2
|
require 'bundler/similarity_detector'
|
2
3
|
require 'bundler/vendored_thor'
|
3
|
-
require 'rubygems/user_interaction'
|
4
|
-
require 'rubygems/security'
|
5
4
|
|
6
5
|
module Bundler
|
7
6
|
class CLI < Thor
|
@@ -14,7 +13,7 @@ module Bundler
|
|
14
13
|
raise InvalidOption, e.message
|
15
14
|
ensure
|
16
15
|
Bundler.ui = UI::Shell.new(options)
|
17
|
-
Bundler.ui.debug
|
16
|
+
Bundler.ui.level = "debug" if options["verbose"]
|
18
17
|
end
|
19
18
|
|
20
19
|
check_unknown_options!(:except => [:config, :exec])
|
@@ -170,8 +169,10 @@ module Bundler
|
|
170
169
|
"Use the rubygems modern index instead of the API endpoint"
|
171
170
|
method_option "clean", :type => :boolean, :banner =>
|
172
171
|
"Run bundle clean automatically after install"
|
173
|
-
|
174
|
-
"
|
172
|
+
unless Bundler.rubygems.security_policies.empty?
|
173
|
+
method_option "trust-policy", :alias => "P", :type => :string, :banner =>
|
174
|
+
"Gem trust policy (like gem install -P). Must be one of " + Bundler.rubygems.security_policies.keys.join('|')
|
175
|
+
end
|
175
176
|
|
176
177
|
def install
|
177
178
|
opts = options.dup
|
@@ -193,9 +194,9 @@ module Bundler
|
|
193
194
|
end
|
194
195
|
|
195
196
|
if (opts["trust-policy"])
|
196
|
-
unless (
|
197
|
+
unless (Bundler.rubygems.security_policies.keys.include?(opts["trust-policy"]))
|
197
198
|
Bundler.ui.error "Rubygems doesn't know about trust policy '#{opts["trust-policy"]}'. " \
|
198
|
-
"The known policies are: #{
|
199
|
+
"The known policies are: #{Bundler.rubygems.security_policies.keys.join(', ')}."
|
199
200
|
exit 1
|
200
201
|
end
|
201
202
|
Bundler.settings["trust-policy"] = opts["trust-policy"]
|
@@ -225,20 +226,20 @@ module Bundler
|
|
225
226
|
end
|
226
227
|
|
227
228
|
# Can't use Bundler.settings for this because settings needs gemfile.dirname
|
228
|
-
Bundler.settings[:path]
|
229
|
-
Bundler.settings[:path]
|
230
|
-
Bundler.settings[:path]
|
231
|
-
Bundler.settings[:path]
|
232
|
-
Bundler.settings[:bin]
|
233
|
-
Bundler.settings[:bin]
|
234
|
-
Bundler.settings[:shebang]
|
229
|
+
Bundler.settings[:path] = nil if opts[:system]
|
230
|
+
Bundler.settings[:path] = "vendor/bundle" if opts[:deployment]
|
231
|
+
Bundler.settings[:path] = opts[:path] if opts[:path]
|
232
|
+
Bundler.settings[:path] ||= "bundle" if opts[:standalone]
|
233
|
+
Bundler.settings[:bin] = opts["binstubs"] if opts["binstubs"]
|
234
|
+
Bundler.settings[:bin] = nil if opts["binstubs"] && opts["binstubs"].empty?
|
235
|
+
Bundler.settings[:shebang] = opts["shebang"] if opts[:shebang]
|
235
236
|
Bundler.settings[:no_prune] = true if opts["no-prune"]
|
237
|
+
Bundler.settings[:clean] = opts[:clean] if opts[:clean]
|
238
|
+
Bundler.settings.without = opts[:without]
|
239
|
+
Bundler.ui.level = "warn" if opts[:quiet]
|
240
|
+
Bundler::Fetcher.disable_endpoint = opts["full-index"]
|
236
241
|
Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? '1' : nil
|
237
|
-
Bundler.settings.without = opts[:without]
|
238
|
-
Bundler.ui.quiet = opts[:quiet]
|
239
|
-
Bundler.settings[:clean] = opts[:clean] if opts[:clean]
|
240
242
|
|
241
|
-
Bundler::Fetcher.disable_endpoint = opts["full-index"]
|
242
243
|
# rubygems plugins sometimes hook into the gem install process
|
243
244
|
Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)
|
244
245
|
|
@@ -289,7 +290,7 @@ module Bundler
|
|
289
290
|
"Use the rubygems modern index instead of the API endpoint"
|
290
291
|
def update(*gems)
|
291
292
|
sources = Array(options[:source])
|
292
|
-
Bundler.ui.
|
293
|
+
Bundler.ui.level = "warn" if options[:quiet]
|
293
294
|
|
294
295
|
if gems.empty? && sources.empty?
|
295
296
|
# We're doing a full update
|
@@ -742,9 +743,11 @@ module Bundler
|
|
742
743
|
method_option "ruby", :type => :boolean, :default => false, :banner =>
|
743
744
|
"only display ruby related platform information"
|
744
745
|
def platform
|
745
|
-
platforms
|
746
|
-
|
747
|
-
|
746
|
+
platforms, ruby_version = Bundler.ui.silence do
|
747
|
+
[ Bundler.definition.platforms.map {|p| "* #{p}" },
|
748
|
+
Bundler.definition.ruby_version ]
|
749
|
+
end
|
750
|
+
output = []
|
748
751
|
|
749
752
|
if options[:ruby]
|
750
753
|
if ruby_version
|
data/lib/bundler/fetcher.rb
CHANGED
@@ -123,9 +123,9 @@ module Bundler
|
|
123
123
|
end
|
124
124
|
|
125
125
|
index
|
126
|
-
rescue
|
126
|
+
rescue CertificateFailureError => e
|
127
127
|
Bundler.ui.info "" if gem_names && use_api # newline after dots
|
128
|
-
raise
|
128
|
+
raise e
|
129
129
|
end
|
130
130
|
|
131
131
|
# fetch index
|
@@ -197,6 +197,8 @@ module Bundler
|
|
197
197
|
req = Net::HTTP::Get.new uri.request_uri
|
198
198
|
response = @connection.request(req)
|
199
199
|
end
|
200
|
+
rescue OpenSSL::SSL::SSLError
|
201
|
+
raise CertificateFailureError.new(@public_uri)
|
200
202
|
rescue *HTTP_ERRORS
|
201
203
|
raise HTTPError, "Network error while fetching #{uri}"
|
202
204
|
end
|
@@ -250,10 +252,11 @@ module Bundler
|
|
250
252
|
def fetch_all_remote_specs
|
251
253
|
Bundler.rubygems.sources = ["#{@remote_uri}"]
|
252
254
|
Bundler.rubygems.fetch_all_remote_specs
|
253
|
-
rescue Gem::RemoteFetcher::FetchError => e
|
255
|
+
rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError => e
|
254
256
|
if e.message.match("certificate verify failed")
|
255
257
|
raise CertificateFailureError.new(@public_uri)
|
256
258
|
else
|
259
|
+
Bundler.ui.trace e
|
257
260
|
raise HTTPError, "Could not fetch specs from #{@public_uri}"
|
258
261
|
end
|
259
262
|
end
|
@@ -1,24 +1,30 @@
|
|
1
1
|
module Bundler
|
2
2
|
def self.with_friendly_errors
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
3
|
+
yield
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
Bundler.ui.error e.message, :wrap => true
|
6
|
+
Bundler.ui.trace e
|
7
|
+
exit e.status_code
|
8
|
+
rescue LoadError => e
|
9
|
+
raise e unless e.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/
|
10
|
+
Bundler.ui.error "\nCould not load OpenSSL."
|
11
|
+
Bundler.ui.warn "You must recompile Ruby with OpenSSL support or change the sources in your" \
|
12
|
+
"\nGemfile from 'https' to 'http'. Instructions for compiling with OpenSSL" \
|
13
|
+
"\nusing RVM are available at rvm.io/packages/openssl."
|
14
|
+
Bundler.ui.trace e
|
15
|
+
exit 1
|
16
|
+
rescue Interrupt => e
|
17
|
+
Bundler.ui.error "\nQuitting..."
|
18
|
+
Bundler.ui.trace e
|
19
|
+
exit 1
|
20
|
+
rescue SystemExit => e
|
21
|
+
exit e.status
|
22
|
+
rescue Exception => e
|
23
|
+
Bundler.ui.error <<-ERR, :wrap => true
|
24
|
+
Unfortunately, a fatal error has occurred. Please see the Bundler
|
25
|
+
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
|
19
26
|
|
20
|
-
|
21
|
-
|
22
|
-
end
|
27
|
+
ERR
|
28
|
+
raise e
|
23
29
|
end
|
24
30
|
end
|
data/lib/bundler/gem_helper.rb
CHANGED
@@ -33,19 +33,21 @@ module Bundler
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def install
|
36
|
+
built_gem_path = nil
|
37
|
+
|
36
38
|
desc "Build #{name}-#{version}.gem into the pkg directory."
|
37
39
|
task 'build' do
|
38
|
-
build_gem
|
40
|
+
built_gem_path = build_gem
|
39
41
|
end
|
40
42
|
|
41
43
|
desc "Build and install #{name}-#{version}.gem into system gems."
|
42
|
-
task 'install' do
|
43
|
-
install_gem
|
44
|
+
task 'install' => 'build' do
|
45
|
+
install_gem(built_gem_path)
|
44
46
|
end
|
45
47
|
|
46
48
|
desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to Rubygems"
|
47
|
-
task 'release' do
|
48
|
-
release_gem
|
49
|
+
task 'release' => 'build' do
|
50
|
+
release_gem(built_gem_path)
|
49
51
|
end
|
50
52
|
|
51
53
|
GemHelper.instance = self
|
@@ -62,16 +64,16 @@ module Bundler
|
|
62
64
|
File.join(base, 'pkg', file_name)
|
63
65
|
end
|
64
66
|
|
65
|
-
def install_gem
|
66
|
-
built_gem_path
|
67
|
+
def install_gem(built_gem_path=nil)
|
68
|
+
built_gem_path ||= build_gem
|
67
69
|
out, _ = sh_with_code("gem install '#{built_gem_path}' --local")
|
68
70
|
raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" unless out[/Successfully installed/]
|
69
71
|
Bundler.ui.confirm "#{name} (#{version}) installed."
|
70
72
|
end
|
71
73
|
|
72
|
-
def release_gem
|
74
|
+
def release_gem(built_gem_path=nil)
|
73
75
|
guard_clean
|
74
|
-
built_gem_path
|
76
|
+
built_gem_path ||= build_gem
|
75
77
|
tag_version { git_push } unless already_tagged?
|
76
78
|
rubygem_push(built_gem_path) if gem_push?
|
77
79
|
end
|
data/lib/bundler/installer.rb
CHANGED
@@ -66,13 +66,13 @@ module Bundler
|
|
66
66
|
end
|
67
67
|
|
68
68
|
if Bundler.default_lockfile.exist? && !options["update"]
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
local = Bundler.ui.silence do
|
70
|
+
begin
|
71
|
+
tmpdef = Definition.build(Bundler.default_gemfile, Bundler.default_lockfile, nil)
|
72
|
+
true unless tmpdef.new_platform? || tmpdef.missing_specs.any?
|
73
|
+
rescue BundlerError
|
74
|
+
end
|
74
75
|
end
|
75
|
-
Bundler.ui = real_ui
|
76
76
|
end
|
77
77
|
|
78
78
|
# Since we are installing, we can resolve the definition
|
@@ -166,6 +166,15 @@ module Bundler
|
|
166
166
|
Gem::RemoteFetcher.fetcher.download(spec, uri, path)
|
167
167
|
end
|
168
168
|
|
169
|
+
def security_policies
|
170
|
+
@security_policies ||= begin
|
171
|
+
require 'rubygems/security'
|
172
|
+
Gem::Security::Policies
|
173
|
+
rescue LoadError
|
174
|
+
{}
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
169
178
|
def reverse_rubygems_kernel_mixin
|
170
179
|
# Disable rubygems' gem activation system
|
171
180
|
::Kernel.class_eval do
|
@@ -424,8 +433,6 @@ module Bundler
|
|
424
433
|
|
425
434
|
# Rubygems 2.0
|
426
435
|
class Future < RubygemsIntegration
|
427
|
-
require 'rubygems/package'
|
428
|
-
|
429
436
|
def stub_rubygems(specs)
|
430
437
|
Gem::Specification.all = specs
|
431
438
|
|
@@ -460,12 +467,14 @@ module Bundler
|
|
460
467
|
end
|
461
468
|
|
462
469
|
def gem_from_path(path, policy = nil)
|
470
|
+
require 'rubygems/package'
|
463
471
|
p = Gem::Package.new(path)
|
464
472
|
p.security_policy = policy if policy
|
465
473
|
return p
|
466
474
|
end
|
467
475
|
|
468
476
|
def build(spec)
|
477
|
+
require 'rubygems/package'
|
469
478
|
Gem::Package.build(spec)
|
470
479
|
end
|
471
480
|
|
data/lib/bundler/ui.rb
CHANGED
@@ -28,7 +28,8 @@ module Bundler
|
|
28
28
|
end
|
29
29
|
|
30
30
|
class Shell < UI
|
31
|
-
|
31
|
+
LEVELS = %w(silent error warn confirm info debug)
|
32
|
+
|
32
33
|
attr_writer :shell
|
33
34
|
|
34
35
|
def initialize(options = {})
|
@@ -36,52 +37,51 @@ module Bundler
|
|
36
37
|
Thor::Base.shell = Thor::Shell::Basic
|
37
38
|
end
|
38
39
|
@shell = Thor::Base.shell.new
|
39
|
-
@
|
40
|
-
@debug = ENV['DEBUG']
|
41
|
-
@trace = ENV['TRACE']
|
40
|
+
@level = ENV['DEBUG'] ? "debug" : "info"
|
42
41
|
end
|
43
42
|
|
44
43
|
def info(msg, newline = nil)
|
45
|
-
tell_me(msg, nil, newline) if
|
44
|
+
tell_me(msg, nil, newline) if level("info")
|
46
45
|
end
|
47
46
|
|
48
47
|
def confirm(msg, newline = nil)
|
49
|
-
tell_me(msg, :green, newline) if
|
48
|
+
tell_me(msg, :green, newline) if level("confirm")
|
50
49
|
end
|
51
50
|
|
52
51
|
def warn(msg, newline = nil)
|
53
|
-
tell_me(msg, :yellow, newline)
|
52
|
+
tell_me(msg, :yellow, newline) if level("warn")
|
54
53
|
end
|
55
54
|
|
56
55
|
def error(msg, newline = nil)
|
57
|
-
tell_me(msg, :red, newline)
|
58
|
-
end
|
59
|
-
|
60
|
-
def quiet=(value)
|
61
|
-
@quiet = value
|
56
|
+
tell_me(msg, :red, newline) if level("error")
|
62
57
|
end
|
63
58
|
|
64
|
-
def
|
65
|
-
|
59
|
+
def debug(msg, newline = nil)
|
60
|
+
tell_me(msg, nil, newline) if level("debug")
|
66
61
|
end
|
67
62
|
|
68
63
|
def debug?
|
69
64
|
# needs to be false instead of nil to be newline param to other methods
|
70
|
-
|
71
|
-
end
|
72
|
-
|
73
|
-
def debug!
|
74
|
-
@debug = true
|
65
|
+
level("debug")
|
75
66
|
end
|
76
67
|
|
77
|
-
def
|
78
|
-
|
68
|
+
def quiet?
|
69
|
+
LEVELS.index(@level) <= LEVELS.index("warn")
|
79
70
|
end
|
80
71
|
|
81
72
|
def ask(msg)
|
82
73
|
@shell.ask(msg)
|
83
74
|
end
|
84
75
|
|
76
|
+
def level=(level)
|
77
|
+
raise ArgumentError unless LEVELS.include?(level.to_s)
|
78
|
+
@level = level
|
79
|
+
end
|
80
|
+
|
81
|
+
def level(name = nil)
|
82
|
+
name ? LEVELS.index(name) <= LEVELS.index(@level) : @level
|
83
|
+
end
|
84
|
+
|
85
85
|
def trace(e, newline = nil)
|
86
86
|
msg = ["#{e.class}: #{e.message}", *e.backtrace].join("\n")
|
87
87
|
if debug?
|
@@ -91,6 +91,13 @@ module Bundler
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
def silence
|
95
|
+
old_level, @level = @level, "silent"
|
96
|
+
yield
|
97
|
+
ensure
|
98
|
+
@level = old_level
|
99
|
+
end
|
100
|
+
|
94
101
|
private
|
95
102
|
|
96
103
|
# valimism
|
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.3.
|
5
|
+
VERSION = "1.3.1" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
@@ -433,13 +433,13 @@ describe "gemcutter's dependency API" do
|
|
433
433
|
end
|
434
434
|
|
435
435
|
context "when SSL certificate verification fails" do
|
436
|
-
it "explains what
|
436
|
+
it "explains what happened" do
|
437
437
|
# Install a monkeypatch that reproduces the effects of openssl raising
|
438
|
-
# a certificate validation error
|
438
|
+
# a certificate validation error when Rubygems tries to connect.
|
439
439
|
gemfile <<-G
|
440
|
-
class
|
441
|
-
def
|
442
|
-
raise OpenSSL::SSL::SSLError, "
|
440
|
+
class Net::HTTP
|
441
|
+
def start
|
442
|
+
raise OpenSSL::SSL::SSLError, "certificate verify failed"
|
443
443
|
end
|
444
444
|
end
|
445
445
|
|
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: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-
|
15
|
+
date: 2013-03-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: ronn
|
@@ -269,6 +269,22 @@ files:
|
|
269
269
|
- spec/update/gems_spec.rb
|
270
270
|
- spec/update/git_spec.rb
|
271
271
|
- spec/update/source_spec.rb
|
272
|
+
- lib/bundler/man/bundle
|
273
|
+
- lib/bundler/man/bundle-config
|
274
|
+
- lib/bundler/man/bundle-config.txt
|
275
|
+
- lib/bundler/man/bundle-exec
|
276
|
+
- lib/bundler/man/bundle-exec.txt
|
277
|
+
- lib/bundler/man/bundle-install
|
278
|
+
- lib/bundler/man/bundle-install.txt
|
279
|
+
- lib/bundler/man/bundle-package
|
280
|
+
- lib/bundler/man/bundle-package.txt
|
281
|
+
- lib/bundler/man/bundle-platform
|
282
|
+
- lib/bundler/man/bundle-platform.txt
|
283
|
+
- lib/bundler/man/bundle-update
|
284
|
+
- lib/bundler/man/bundle-update.txt
|
285
|
+
- lib/bundler/man/bundle.txt
|
286
|
+
- lib/bundler/man/gemfile.5
|
287
|
+
- lib/bundler/man/gemfile.5.txt
|
272
288
|
homepage: http://gembundler.com
|
273
289
|
licenses:
|
274
290
|
- MIT
|