bundler 1.6.3 → 1.6.4

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47d03cb52cb9c56cfb0a8e3ac50050a2dfe2e73e
4
- data.tar.gz: 4a1e485a82e9703c83f4eec7fd8b11d36c0aaeef
3
+ metadata.gz: fdd61d3f649a2286c95d0bc5515d4ea65c973eb9
4
+ data.tar.gz: 76e9fa0bc5815e53bb843aba5740beb312c0e431
5
5
  SHA512:
6
- metadata.gz: 04ff3dd741753285f4f95d1bc62830025f861176f922308b0fdaad31c13bc7661c34a4d3e225045ecafe7725ceaf6d666b16cf68af884b763eb0f70b374826e4
7
- data.tar.gz: 7f4850dfe4fabc581ca1a5be0fad0caf357f48c8397a92f5aadcf5537e48ee322248d7c4021cc5cb92c1a124c2c84e1bb3c0f676834c73100ffde153a7c36745
6
+ metadata.gz: b8632f839d3b851aa0616049fba43da47ae30cb3ccb2ec08b17bff58500918587734e5355fea0b4315b60a393a573a11991bac41c606a4762ec69dbe76f60c36
7
+ data.tar.gz: 03c4b99989fc26da6126342f4e79625d153bb06c1675b426fd64bb1e2570592e8123c5c5adddcc4bfff8e7dc9ec5c0331b01d724f8d9e7d25e6d38f1a3445d34
@@ -1,3 +1,15 @@
1
+ ## 1.6.4 (2014-07-17)
2
+
3
+ Bugfixes:
4
+
5
+ - fix undefined constant error when can't find gem during binstubs (#3095, @jetaggart)
6
+ - work when installed git gems are not writable (#3092, @pmahoney)
7
+ - don't store configured source credentials in Gemfile.lock (#3045, @lhz)
8
+ - don't include config source credentials in the lockfile (Lars Haugseth)
9
+ - use threads for jobs on Rubinius (@YorickPeterse)
10
+ - skip dependencies from other platforms (@mvz)
11
+ - work when Rubygems was built without SSL (@andremedeiros)
12
+
1
13
  ## 1.6.3 (2014-06-16)
2
14
 
3
15
  Bugfixes:
data/Rakefile CHANGED
@@ -30,11 +30,10 @@ end
30
30
  namespace :spec do
31
31
  desc "Ensure spec dependencies are installed"
32
32
  task :deps do
33
- deps = {
34
- "rdiscount" => "~> 1.6",
35
- "ronn" => "~> 0.7.3",
36
- "rspec" => "~> 3.0.beta"
37
- }
33
+ spec = Gem::Specification.load("bundler.gemspec")
34
+ deps = Hash[spec.development_dependencies.map do |d|
35
+ [d.name, d.requirement.to_s]
36
+ end]
38
37
 
39
38
  # JRuby can't build ronn or rdiscount, so we skip that
40
39
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
@@ -77,7 +76,6 @@ namespace :spec do
77
76
  end
78
77
 
79
78
  begin
80
- # running the specs needs both rspec and ronn
81
79
  require 'rspec/core/rake_task'
82
80
 
83
81
  desc "Run specs"
data/bin/bundle CHANGED
@@ -14,7 +14,8 @@ $LOAD_PATH.each do |path|
14
14
  end
15
15
  end
16
16
 
17
- require 'bundler/cli'
18
-
19
17
  require 'bundler/friendly_errors'
20
- Bundler.with_friendly_errors { Bundler::CLI.start(ARGV, :debug => true) }
18
+ Bundler.with_friendly_errors do
19
+ require 'bundler/cli'
20
+ Bundler::CLI.start(ARGV, :debug => true)
21
+ end
@@ -1,10 +1,21 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'bundler'
4
- require 'bundler/cli'
3
+ # Exit cleanly from an early interrupt
4
+ Signal.trap("INT") { exit 1 }
5
5
 
6
- ui = Bundler::UI::Shell.new
7
- ui.error "It's recommended to use Bundler through 'bundle' binary instead of 'bundler'"
6
+ require 'bundler'
7
+ # Check if an older version of bundler is installed
8
+ $LOAD_PATH.each do |path|
9
+ if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
10
+ err = "Looks like you have a version of bundler that's older than 0.9.\n"
11
+ err << "Please remove your old versions.\n"
12
+ err << "An easy way to do this is by running `gem cleanup bundler`."
13
+ abort(err)
14
+ end
15
+ end
8
16
 
9
- bin = "#{File.dirname(__FILE__)}/bundle #{ARGV.join(" ")}"
10
- exec bin
17
+ require 'bundler/friendly_errors'
18
+ Bundler.with_friendly_errors do
19
+ require 'bundler/cli'
20
+ Bundler::CLI.start(ARGV, :debug => true)
21
+ end
@@ -16,8 +16,9 @@ Gem::Specification.new do |spec|
16
16
  spec.required_ruby_version = '>= 1.8.7'
17
17
  spec.required_rubygems_version = '>= 1.3.6'
18
18
 
19
+ spec.add_development_dependency 'rdiscount', '~> 1.6'
19
20
  spec.add_development_dependency 'ronn', '~> 0.7.3'
20
- spec.add_development_dependency 'rspec', '~> 2.99.0.beta1'
21
+ spec.add_development_dependency 'rspec', '~> 3.0.0.beta1'
21
22
 
22
23
  spec.files = `git ls-files -z`.split("\x0")
23
24
  spec.files += Dir.glob('lib/bundler/man/**/*') # man/ is ignored by git
@@ -136,8 +136,7 @@ module Bundler
136
136
  "Run bundle clean automatically after install"
137
137
  method_option "trust-policy", :alias => "P", :type => :string, :banner =>
138
138
  "Gem trust policy (like gem install -P). Must be one of " +
139
- Bundler.rubygems.security_policies.keys.join('|') unless
140
- Bundler.rubygems.security_policies.empty?
139
+ Bundler.rubygems.security_policy_keys.join('|')
141
140
  method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
142
141
  "Specify the number of jobs to run in parallel"
143
142
 
@@ -1,3 +1,5 @@
1
+ require "bundler/cli/common"
2
+
1
3
  module Bundler
2
4
  class CLI::Binstubs
3
5
  attr_reader :options, :gems
@@ -580,6 +580,7 @@ module Bundler
580
580
  deps = []
581
581
  dependencies.each do |dep|
582
582
  dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
583
+ next unless remote || dep.current_platform?
583
584
  dep.gem_platforms(@platforms).each do |p|
584
585
  deps << DepProxy.new(dep, p) if remote || p == generic(Gem::Platform.local)
585
586
  end
@@ -8,7 +8,7 @@ module Bundler
8
8
  autoload :ThreadWorker, "bundler/parallel_workers/thread_worker"
9
9
 
10
10
  def self.worker_pool(size, job)
11
- if Bundler.current_ruby.mswin? || Bundler.current_ruby.jruby?
11
+ if Bundler.current_ruby.mswin? || Bundler.current_ruby.jruby? || Bundler.current_ruby.rbx?
12
12
  ThreadWorker.new(size, job)
13
13
  else
14
14
  UnixWorker.new(size, job)
@@ -202,6 +202,10 @@ module Bundler
202
202
  fetcher.download(spec, uri, path)
203
203
  end
204
204
 
205
+ def security_policy_keys
206
+ %w{High Medium Low AlmostNo No}.map { |level| "#{level}Security" }
207
+ end
208
+
205
209
  def security_policies
206
210
  @security_policies ||= begin
207
211
  require 'rubygems/security'
@@ -79,11 +79,12 @@ module Bundler
79
79
  def install_path
80
80
  @install_path ||= begin
81
81
  git_scope = "#{base_name}-#{shortref_for_path(revision)}"
82
+ path = Bundler.install_path.join(git_scope)
82
83
 
83
- if Bundler.requires_sudo?
84
+ if !path.exist? && Bundler.requires_sudo?
84
85
  Bundler.user_bundle_path.join(Bundler.ruby_scope).join(git_scope)
85
86
  else
86
- Bundler.install_path.join(git_scope)
87
+ path
87
88
  end
88
89
  end
89
90
  end
@@ -50,7 +50,9 @@ module Bundler
50
50
 
51
51
  def to_lock
52
52
  out = "GEM\n"
53
- out << remotes.map {|r| " remote: #{r}\n" }.join
53
+ out << remotes.map { |remote|
54
+ " remote: #{suppress_configured_credentials remote}\n"
55
+ }.join
54
56
  out << " specs:\n"
55
57
  end
56
58
 
@@ -183,6 +185,15 @@ module Bundler
183
185
  uri
184
186
  end
185
187
 
188
+ def suppress_configured_credentials(remote)
189
+ remote_nouser = remote.tap { |uri| uri.user = uri.password = nil }.to_s
190
+ if remote.userinfo && remote.userinfo == Bundler.settings[remote_nouser]
191
+ remote_nouser
192
+ else
193
+ remote
194
+ end
195
+ end
196
+
186
197
  def fetch_specs
187
198
  # remote_specs usually generates a way larger Index than the other
188
199
  # sources, and large_idx.use small_idx is way faster than
@@ -6,7 +6,9 @@ TODO: Write a gem description
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem '<%=config[:name]%>'
9
+ ```ruby
10
+ gem '<%=config[:name]%>'
11
+ ```
10
12
 
11
13
  And then execute:
12
14
 
@@ -1,20 +1,12 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
18
10
  *.bundle
19
11
  *.so
20
12
  *.o
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ["lib"]
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> <%= Bundler::VERSION.split(".")[0..1].join(".") %>"
25
- spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
26
  <% if config[:ext] -%>
27
27
  spec.add_development_dependency "rake-compiler"
28
28
  <% end -%>
@@ -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.6.3" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.6.4" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -91,8 +91,9 @@ update process below under [CONSERVATIVE UPDATING][].
91
91
 
92
92
  * `--trust-policy=[<policy>]`:
93
93
  Apply the Rubygems security policy named <policy>, where policy is one of
94
- HighSecurity, MediumSecurity, LowSecurity, or NoSecurity. For more detail,
95
- see the Rubygems signing documentation, linked below in [SEE ALSO][].
94
+ HighSecurity, MediumSecurity, LowSecurity, AlmostNoSecurity, or NoSecurity.
95
+ For more detail, see the Rubygems signing documentation, linked below in
96
+ [SEE ALSO][].
96
97
 
97
98
  * `--jobs=[<size>]`:
98
99
  Install gems parallely by starting <size> number of parallel workers.
@@ -367,5 +368,5 @@ does not work, run [bundle update(1)][bundle-update].
367
368
 
368
369
  ## SEE ALSO
369
370
 
370
- * Gem install docs: http://docs.rubygems.org/read/chapter/2
371
- * Rubygems signing docs: http://docs.rubygems.org/read/chapter/21
371
+ * Gem install docs: http://guides.rubygems.org/rubygems-basics/#installing-gems
372
+ * Rubygems signing docs: http://guides.rubygems.org/security/
@@ -105,6 +105,19 @@ describe "bundle binstubs <gem>" do
105
105
  end
106
106
  end
107
107
 
108
+ context "when the gem doesn't exist" do
109
+ it "displays an error with correct status" do
110
+ install_gemfile <<-G
111
+ source "file://#{gem_repo1}"
112
+ G
113
+
114
+ bundle "binstubs doesnt_exist", :exitstatus => true
115
+
116
+ expect(exitstatus).to eq(7)
117
+ expect(out).to eq("Could not find gem 'doesnt_exist'.")
118
+ end
119
+ end
120
+
108
121
  context "--path" do
109
122
  it "sets the binstubs dir" do
110
123
  install_gemfile <<-G
@@ -70,6 +70,31 @@ describe "the lockfile format" do
70
70
  G
71
71
  end
72
72
 
73
+ it "generates a lockfile wihout credentials for a configured source" do
74
+ bundle "config http://localgemserver.test/ user:pass"
75
+
76
+ install_gemfile(<<-G, :artifice => "endpoint_strict_basic_authentication", :quiet => true)
77
+ source "http://localgemserver.test/"
78
+
79
+ gem "rack-obama", ">= 1.0"
80
+ G
81
+
82
+ lockfile_should_be <<-G
83
+ GEM
84
+ remote: http://localgemserver.test/
85
+ specs:
86
+ rack (1.0.0)
87
+ rack-obama (1.0)
88
+ rack
89
+
90
+ PLATFORMS
91
+ #{generic(Gem::Platform.local)}
92
+
93
+ DEPENDENCIES
94
+ rack-obama (>= 1.0)
95
+ G
96
+ end
97
+
73
98
  it "generates lockfiles with multiple requirements" do
74
99
  install_gemfile <<-G
75
100
  source "file://#{gem_repo1}"
@@ -42,13 +42,13 @@ describe "The library itself" do
42
42
  end
43
43
 
44
44
  RSpec::Matchers.define :be_well_formed do
45
- failure_message do |actual|
46
- actual.join("\n")
47
- end
48
-
49
45
  match do |actual|
50
46
  actual.empty?
51
47
  end
48
+
49
+ failure_message_for_should do |actual|
50
+ actual.join("\n")
51
+ end
52
52
  end
53
53
 
54
54
  it "has no malformed whitespace" do
@@ -368,21 +368,18 @@ describe "Bundler.setup" do
368
368
  end
369
369
 
370
370
  it "does not randomly change the path when specifying --path and the bundle directory becomes read only" do
371
- begin
372
- bundle "install --path vendor/bundle"
371
+ bundle "install --path vendor/bundle"
373
372
 
374
- Dir["**/*"].each do |f|
375
- File.directory?(f) ?
376
- File.chmod(0555, f) :
377
- File.chmod(0444, f)
378
- end
373
+ with_read_only("**/*") do
374
+ should_be_installed "rack 1.0.0"
375
+ end
376
+ end
377
+
378
+ it "finds git gem when default bundle path becomes read only" do
379
+ bundle "install"
380
+
381
+ with_read_only("#{Bundler.bundle_path}/**/*") do
379
382
  should_be_installed "rack 1.0.0"
380
- ensure
381
- Dir["**/*"].each do |f|
382
- File.directory?(f) ?
383
- File.chmod(0755, f) :
384
- File.chmod(0644, f)
385
- end
386
383
  end
387
384
  end
388
385
  end
@@ -341,5 +341,19 @@ module Spec
341
341
  ensure
342
342
  $stdout = actual_stdout
343
343
  end
344
+
345
+ def with_read_only(pattern)
346
+ chmod = lambda do |dirmode, filemode|
347
+ lambda do |f|
348
+ mode = File.directory?(f) ? dirmode : filemode
349
+ File.chmod(mode, f)
350
+ end
351
+ end
352
+
353
+ Dir[pattern].each(&chmod[0555, 0444])
354
+ yield
355
+ ensure
356
+ Dir[pattern].each(&chmod[0755, 0644])
357
+ end
344
358
  end
345
359
  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.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -11,8 +11,22 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-06-16 00:00:00.000000000 Z
14
+ date: 2014-07-18 00:00:00.000000000 Z
15
15
  dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rdiscount
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '1.6'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.6'
16
30
  - !ruby/object:Gem::Dependency
17
31
  name: ronn
18
32
  requirement: !ruby/object:Gem::Requirement
@@ -33,14 +47,14 @@ dependencies:
33
47
  requirements:
34
48
  - - "~>"
35
49
  - !ruby/object:Gem::Version
36
- version: 2.99.0.beta1
50
+ version: 3.0.0.beta1
37
51
  type: :development
38
52
  prerelease: false
39
53
  version_requirements: !ruby/object:Gem::Requirement
40
54
  requirements:
41
55
  - - "~>"
42
56
  - !ruby/object:Gem::Version
43
- version: 2.99.0.beta1
57
+ version: 3.0.0.beta1
44
58
  description: Bundler manages an application's dependencies through its entire life,
45
59
  across many machines, systematically and repeatably
46
60
  email: