bundler 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- data/CHANGELOG.md +8 -1
- data/README.md +1 -1
- data/lib/bundler/cli.rb +11 -7
- data/lib/bundler/definition.rb +2 -2
- data/lib/bundler/fetcher.rb +3 -3
- data/lib/bundler/friendly_errors.rb +6 -5
- data/lib/bundler/graph.rb +0 -1
- data/lib/bundler/psyched_yaml.rb +1 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +1 -1
- data/lib/bundler/ui.rb +6 -1
- data/lib/bundler/version.rb +1 -1
- data/spec/install/gems/simple_case_spec.rb +2 -2
- data/spec/other/newgem_spec.rb +26 -13
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Bundler: a gem to bundle gems [](http://travis-ci.org/carlhuda/bundler)
|
2
2
|
|
3
3
|
Bundler keeps ruby applications running the same code on every machine.
|
4
4
|
|
data/lib/bundler/cli.rb
CHANGED
@@ -264,15 +264,17 @@ module Bundler
|
|
264
264
|
end
|
265
265
|
|
266
266
|
clean if Bundler.settings[:clean] && Bundler.settings[:path]
|
267
|
-
rescue GemNotFound => e
|
267
|
+
rescue GemNotFound, VersionConflict => e
|
268
268
|
if opts[:local] && Bundler.app_cache.exist?
|
269
269
|
Bundler.ui.warn "Some gems seem to be missing from your vendor/cache directory."
|
270
270
|
end
|
271
271
|
|
272
|
-
if Bundler.definition.
|
273
|
-
Bundler.ui.warn
|
274
|
-
|
275
|
-
|
272
|
+
if Bundler.definition.rubygems_remotes.empty?
|
273
|
+
Bundler.ui.warn <<-WARN, :wrap => true
|
274
|
+
Your Gemfile has no gem server sources. If you need gems that are \
|
275
|
+
not already on your machine, add a line like this to your Gemfile:
|
276
|
+
source 'https://rubygems.org'
|
277
|
+
WARN
|
276
278
|
end
|
277
279
|
raise e
|
278
280
|
end
|
@@ -647,6 +649,8 @@ module Bundler
|
|
647
649
|
method_option :requirements, :type => :boolean, :default => false, :aliases => '-r', :banner => "Set to show the version of each required dependency."
|
648
650
|
method_option :format, :type => :string, :default => "png", :aliases => '-F', :banner => "This is output format option. Supported format is png, jpg, svg, dot ..."
|
649
651
|
def viz
|
652
|
+
require 'graphviz'
|
653
|
+
|
650
654
|
output_file = File.expand_path(options[:file])
|
651
655
|
graph = Graph.new(Bundler.load, output_file, options[:version], options[:requirements], options[:format])
|
652
656
|
|
@@ -863,8 +867,8 @@ module Bundler
|
|
863
867
|
|
864
868
|
def without_groups_message
|
865
869
|
groups = Bundler.settings.without
|
866
|
-
group_list = [groups[0...-1].join(", "), groups[-1]].
|
867
|
-
reject{|s| s.empty? }.join(" and ")
|
870
|
+
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
|
871
|
+
reject{|s| s.to_s.empty? }.join(" and ")
|
868
872
|
group_str = (groups.size == 1) ? "group" : "groups"
|
869
873
|
"Gems in the #{group_str} #{group_list} were not installed."
|
870
874
|
end
|
data/lib/bundler/definition.rb
CHANGED
data/lib/bundler/fetcher.rb
CHANGED
@@ -18,7 +18,7 @@ module Bundler
|
|
18
18
|
" is a chance you are experiencing a man-in-the-middle attack, but" \
|
19
19
|
" most likely your system doesn't have the CA certificates needed" \
|
20
20
|
" for verification. For information about OpenSSL certificates, see" \
|
21
|
-
" bit.ly/ssl
|
21
|
+
" bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile" \
|
22
22
|
" sources and change 'https' to 'http'."
|
23
23
|
end
|
24
24
|
end
|
@@ -68,7 +68,7 @@ module Bundler
|
|
68
68
|
@remote_uri = remote_uri
|
69
69
|
@public_uri = remote_uri.dup
|
70
70
|
@public_uri.user, @public_uri.password = nil, nil # don't print these
|
71
|
-
if defined?(
|
71
|
+
if defined?(Net::HTTP::Persistent)
|
72
72
|
@connection = Net::HTTP::Persistent.new 'bundler', :ENV
|
73
73
|
@connection.verify_mode = (Bundler.settings[:ssl_verify_mode] ||
|
74
74
|
OpenSSL::SSL::VERIFY_PEER)
|
@@ -198,7 +198,7 @@ module Bundler
|
|
198
198
|
|
199
199
|
begin
|
200
200
|
Bundler.ui.debug "Fetching from: #{uri}"
|
201
|
-
if
|
201
|
+
if defined?(Net::HTTP::Persistent)
|
202
202
|
response = @connection.request(uri)
|
203
203
|
else
|
204
204
|
req = Net::HTTP::Get.new uri.request_uri
|
@@ -8,9 +8,11 @@ module Bundler
|
|
8
8
|
rescue LoadError => e
|
9
9
|
raise e unless e.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/
|
10
10
|
Bundler.ui.error "\nCould not load OpenSSL."
|
11
|
-
Bundler.ui.warn
|
12
|
-
|
13
|
-
|
11
|
+
Bundler.ui.warn <<-WARN, :wrap => true
|
12
|
+
You must recompile Ruby with OpenSSL support or change the sources in your \
|
13
|
+
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL \
|
14
|
+
using RVM are available at rvm.io/packages/openssl.
|
15
|
+
WARN
|
14
16
|
Bundler.ui.trace e
|
15
17
|
exit 1
|
16
18
|
rescue Interrupt => e
|
@@ -21,9 +23,8 @@ module Bundler
|
|
21
23
|
exit e.status
|
22
24
|
rescue Exception => e
|
23
25
|
Bundler.ui.error <<-ERR, :wrap => true
|
24
|
-
Unfortunately, a fatal error has occurred. Please see the Bundler
|
26
|
+
Unfortunately, a fatal error has occurred. Please see the Bundler \
|
25
27
|
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
|
26
|
-
|
27
28
|
ERR
|
28
29
|
raise e
|
29
30
|
end
|
data/lib/bundler/graph.rb
CHANGED
@@ -118,7 +118,6 @@ module Bundler
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def g
|
121
|
-
require 'graphviz'
|
122
121
|
@g ||= ::GraphViz.digraph(@graph_name, {:concentrate => true, :normalize => true, :nodesep => 0.55}) do |g|
|
123
122
|
g.edge[:weight] = 2
|
124
123
|
g.edge[:fontname] = g.node[:fontname] = 'Arial, Helvetica, SansSerif'
|
data/lib/bundler/psyched_yaml.rb
CHANGED
data/lib/bundler/ui.rb
CHANGED
@@ -110,8 +110,13 @@ module Bundler
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
+
def strip_leading_spaces(text)
|
114
|
+
spaces = text[/\A\s+/, 0]
|
115
|
+
spaces ? text.gsub(/#{spaces}/, '') : text
|
116
|
+
end
|
117
|
+
|
113
118
|
def word_wrap(text, line_width = @shell.terminal_width)
|
114
|
-
text.split("\n").collect do |line|
|
119
|
+
strip_leading_spaces(text).split("\n").collect do |line|
|
115
120
|
line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1\n").strip : line
|
116
121
|
end * "\n"
|
117
122
|
end
|
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.4" unless defined?(::Bundler::VERSION)
|
6
6
|
end
|
@@ -291,7 +291,7 @@ describe "bundle install with gem sources" do
|
|
291
291
|
G
|
292
292
|
|
293
293
|
bundle :install, :expect_err => true
|
294
|
-
expect(out).to match(/Your Gemfile has no
|
294
|
+
expect(out).to match(/Your Gemfile has no gem server sources/i)
|
295
295
|
end
|
296
296
|
|
297
297
|
it "creates a Gemfile.lock on a blank Gemfile" do
|
@@ -509,7 +509,7 @@ describe "bundle install with gem sources" do
|
|
509
509
|
G
|
510
510
|
|
511
511
|
bundle :install, :quiet => true
|
512
|
-
expect(out).to match(/Your Gemfile has no
|
512
|
+
expect(out).to match(/Your Gemfile has no gem server sources/)
|
513
513
|
end
|
514
514
|
end
|
515
515
|
|
data/spec/other/newgem_spec.rb
CHANGED
@@ -89,11 +89,11 @@ describe "bundle gem" do
|
|
89
89
|
it "runs rake without problems" do
|
90
90
|
system_gems ["rake-10.0.2"]
|
91
91
|
|
92
|
-
rakefile = <<-RAKEFILE
|
92
|
+
rakefile = strip_whitespace <<-RAKEFILE
|
93
93
|
task :default do
|
94
94
|
puts 'SUCCESS'
|
95
95
|
end
|
96
|
-
RAKEFILE
|
96
|
+
RAKEFILE
|
97
97
|
File.open(bundled_app("test_gem/Rakefile"), 'w') do |file|
|
98
98
|
file.puts rakefile
|
99
99
|
end
|
@@ -265,11 +265,11 @@ RAKEFILE
|
|
265
265
|
it "runs rake without problems" do
|
266
266
|
system_gems ["rake-10.0.2"]
|
267
267
|
|
268
|
-
rakefile = <<-RAKEFILE
|
268
|
+
rakefile = strip_whitespace <<-RAKEFILE
|
269
269
|
task :default do
|
270
270
|
puts 'SUCCESS'
|
271
271
|
end
|
272
|
-
RAKEFILE
|
272
|
+
RAKEFILE
|
273
273
|
File.open(bundled_app("test-gem/Rakefile"), 'w') do |file|
|
274
274
|
file.puts rakefile
|
275
275
|
end
|
@@ -332,6 +332,19 @@ RAKEFILE
|
|
332
332
|
it "creates a default test which fails" do
|
333
333
|
expect(bundled_app("test-gem/spec/test/gem_spec.rb").read).to match(/false.should be_true/)
|
334
334
|
end
|
335
|
+
|
336
|
+
it "creates a default rake task to run the specs" do
|
337
|
+
rakefile = strip_whitespace <<-RAKEFILE
|
338
|
+
require "bundler/gem_tasks"
|
339
|
+
require "rspec/core/rake_task"
|
340
|
+
|
341
|
+
RSpec::Core::RakeTask.new(:spec)
|
342
|
+
|
343
|
+
task :default => :spec
|
344
|
+
RAKEFILE
|
345
|
+
|
346
|
+
expect(bundled_app("test-gem/Rakefile").read).to eq(rakefile)
|
347
|
+
end
|
335
348
|
end
|
336
349
|
|
337
350
|
context "--test parameter set to minitest" do
|
@@ -358,17 +371,17 @@ RAKEFILE
|
|
358
371
|
expect(bundled_app("test-gem/test/test_test/gem.rb").read).to match(/assert false/)
|
359
372
|
end
|
360
373
|
|
361
|
-
it "creates a default rake task to run test suite" do
|
362
|
-
rakefile = <<-RAKEFILE
|
363
|
-
require "bundler/gem_tasks"
|
364
|
-
require "rake/testtask"
|
374
|
+
it "creates a default rake task to run the test suite" do
|
375
|
+
rakefile = strip_whitespace <<-RAKEFILE
|
376
|
+
require "bundler/gem_tasks"
|
377
|
+
require "rake/testtask"
|
365
378
|
|
366
|
-
Rake::TestTask.new
|
367
|
-
|
368
|
-
end
|
379
|
+
Rake::TestTask.new(:test) do |t|
|
380
|
+
t.libs << "test"
|
381
|
+
end
|
369
382
|
|
370
|
-
task default
|
371
|
-
RAKEFILE
|
383
|
+
task :default => :test
|
384
|
+
RAKEFILE
|
372
385
|
|
373
386
|
expect(bundled_app("test-gem/Rakefile").read).to eq(rakefile)
|
374
387
|
end
|
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.4
|
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-03-
|
15
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: ronn
|