bundler 1.9.1 → 1.9.2

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: 41d7927009486de82bc1e93eeaef65d49419e7df
4
- data.tar.gz: a03b3ee06e879cb4795e73c692d1b5d0308a807e
3
+ metadata.gz: 8959dab2aca0f74b3cf2ef31a9cfdefdb5b979a3
4
+ data.tar.gz: f8d8e8bb0eba3964ad33f760e113b517f4d0352d
5
5
  SHA512:
6
- metadata.gz: d65135c439064b73f6dc08a5940c6125374395047eccd4bd39b2e848471e57643632f0df36c7600419db24934965aa169be1642d2257a8ea1a7240430bd93223
7
- data.tar.gz: 99dcf65cf946d7c3752cd82034f833d9968813f9d41f15992b60a3d86998448913040d5d567361f01da3ec7f6808ced4f0072993ce9550f5bc3c2181c55e011a
6
+ metadata.gz: 6d020ea8360eff4a45a0cc985a79023a9d8d2e3a0c6e884dc7519fc73a8ce9c56edfaa8d27189e2e4d3483093bbdae1cc84be2823f54eff003135f46f3f9de17
7
+ data.tar.gz: d6ebd846da9c842b5ba185e18d7c17d9818e60c293ef1879e862cfce13c94246664ba911a915cadb9a8a61904d80dde8aa98601921db6c26be87b305884082b6
@@ -1,3 +1,13 @@
1
+ ## 1.9.2 (2015-03-30)
2
+
3
+ Bugfixes:
4
+
5
+ - ensure gem executables are executable (#3517, #3511, @indirect)
6
+ - fix warnings in Molinillo (#3516, @segiddins)
7
+ - ensure duplicate dependencies do not propagate (#3522, @segiddins)
8
+ - keep gems locked when updating another gem from the same source (#3250, @indirect)
9
+ - resolve race that could build gems without saved arguments (#3404, @indirect)
10
+
1
11
  ## 1.9.1 (2015-03-21)
2
12
 
3
13
  Bugfixes:
@@ -31,6 +41,13 @@ Features:
31
41
  - Molinillo resolver, shared with CocoaPods (@segiddins)
32
42
  - updated Thor to v0.19.1 (@segiddins)
33
43
 
44
+ ## 1.8.6 (2015-03-30)
45
+
46
+ Bugfixes:
47
+
48
+ - keep gems locked when updating another gem from the same source (#3250, @indirect)
49
+ - resolve race that could build gems without saved arguments (#3404, @indirect)
50
+
34
51
  ## 1.8.5 (2015-03-11)
35
52
 
36
53
  Bugfixes:
@@ -16,10 +16,11 @@ Gem::Specification.new do |s|
16
16
  s.required_ruby_version = '>= 1.8.7'
17
17
  s.required_rubygems_version = '>= 1.3.6'
18
18
 
19
- s.add_development_dependency 'mustache', '0.99.6'
19
+ s.add_development_dependency 'mustache', '0.99.6'
20
20
  s.add_development_dependency 'rdiscount', '~> 1.6'
21
- s.add_development_dependency 'ronn', '~> 0.7.3'
22
- s.add_development_dependency 'rspec', '~> 3.0'
21
+ s.add_development_dependency 'ronn', '~> 0.7.3'
22
+ s.add_development_dependency 'rspec', '~> 3.0'
23
+ s.add_development_dependency 'rake'
23
24
 
24
25
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
26
  # we don't check in man pages, but we need to ship them because
@@ -54,6 +54,11 @@ module Bundler
54
54
  "bin/setup.tt" => "bin/setup"
55
55
  }
56
56
 
57
+ executables = %w[
58
+ bin/console
59
+ bin/setup
60
+ ]
61
+
57
62
  if ask_and_set(:coc, "Do you want to include a code of conduct in gems you generate?",
58
63
  "Codes of conduct can increase contributions to your project by contributors who " \
59
64
  "prefer collaborative, safe spaces. You can read more about the code of conduct at " \
@@ -105,6 +110,12 @@ module Bundler
105
110
  thor.template("newgem/#{src}", target.join(dst), config)
106
111
  end
107
112
 
113
+ executables.each do |file|
114
+ path = target.join(file)
115
+ executable = (path.stat.mode | 0111)
116
+ path.chmod(executable)
117
+ end
118
+
108
119
  Bundler.ui.info "Initializing git repo in #{target}"
109
120
  Dir.chdir(target) { `git init`; `git add .` }
110
121
 
@@ -272,7 +272,7 @@ module Bundler
272
272
  each do |spec|
273
273
  next if spec.name == 'bundler'
274
274
  out << spec.to_lock
275
- end
275
+ end
276
276
  out << "\n"
277
277
  end
278
278
 
@@ -561,8 +561,11 @@ module Bundler
561
561
  resolve
562
562
  end
563
563
 
564
- def in_locked_deps?(dep, d)
565
- d && dep.source == d.source
564
+ def in_locked_deps?(dep, locked_dep)
565
+ # Because the lockfile can't link a dep to a specific remote, we need to
566
+ # treat sources as equivalent anytime the locked dep has all the remotes
567
+ # that the Gemfile dep does.
568
+ locked_dep && locked_dep.source && dep.source && locked_dep.source.include?(dep.source)
566
569
  end
567
570
 
568
571
  def satisfies_locked_spec?(dep)
@@ -96,20 +96,26 @@ module Bundler
96
96
 
97
97
  def install_gem_from_spec(spec, standalone = false, worker = 0)
98
98
  # Fetch the build settings, if there are any
99
- settings = Bundler.settings["build.#{spec.name}"]
100
- install_message = nil
101
- post_install_message = nil
102
- debug_message = nil
103
- Bundler.rubygems.with_build_args [settings] do
104
- install_message, post_install_message, debug_message = spec.source.install(spec)
105
- if install_message.include? 'Installing'
106
- Bundler.ui.confirm install_message
107
- else
108
- Bundler.ui.info install_message
99
+ settings = Bundler.settings["build.#{spec.name}"]
100
+ messages = nil
101
+
102
+ if settings
103
+ Bundler.rubygems.with_build_args [settings] do
104
+ messages = spec.source.install(spec)
109
105
  end
110
- Bundler.ui.debug debug_message if debug_message
111
- Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
106
+ else
107
+ messages = spec.source.install(spec)
108
+ end
109
+
110
+ install_message, post_install_message, debug_message = *messages
111
+
112
+ if install_message.include? 'Installing'
113
+ Bundler.ui.confirm install_message
114
+ else
115
+ Bundler.ui.info install_message
112
116
  end
117
+ Bundler.ui.debug debug_message if debug_message
118
+ Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
113
119
 
114
120
  if Bundler.settings[:bin] && standalone
115
121
  generate_standalone_bundler_executable_stubs(spec)
@@ -41,7 +41,7 @@ module Bundler
41
41
  out = " #{name} (#{version}-#{platform})\n"
42
42
  end
43
43
 
44
- dependencies.sort_by {|d| d.to_s }.each do |dep|
44
+ dependencies.sort_by {|d| d.to_s }.uniq.each do |dep|
45
45
  next if dep.type == :development
46
46
  out << " #{dep.to_lock}\n"
47
47
  end
@@ -161,12 +161,14 @@ module Bundler
161
161
  end
162
162
 
163
163
  def with_build_args(args)
164
- old_args = self.build_args
165
- begin
166
- self.build_args = args
167
- yield
168
- ensure
169
- self.build_args = old_args
164
+ ext_lock.synchronize do
165
+ old_args = self.build_args
166
+ begin
167
+ self.build_args = args
168
+ yield
169
+ ensure
170
+ self.build_args = old_args
171
+ end
170
172
  end
171
173
  end
172
174
 
@@ -35,32 +35,27 @@ module Bundler
35
35
  end
36
36
 
37
37
  def default_bundle_dir
38
- global_bundle_dir = File.join(Bundler.rubygems.user_home, ".bundle")
39
38
  bundle_dir = find_directory(".bundle")
39
+ return nil unless bundle_dir
40
40
 
41
- if bundle_dir && bundle_dir != global_bundle_dir
42
- Pathname.new(bundle_dir)
43
- else
44
- nil
45
- end
41
+ global_bundle_dir = File.join(Bundler.rubygems.user_home, ".bundle")
42
+ return nil if bundle_dir == global_bundle_dir
43
+
44
+ Pathname.new(bundle_dir)
46
45
  end
47
46
 
48
47
  def in_bundle?
49
48
  find_gemfile
50
49
  end
51
50
 
52
- def chdir_monitor
53
- Bundler.rubygems.ext_lock
54
- end
55
-
56
51
  def chdir(dir, &blk)
57
- chdir_monitor.synchronize do
52
+ Bundler.rubygems.ext_lock.synchronize do
58
53
  Dir.chdir dir, &blk
59
54
  end
60
55
  end
61
56
 
62
57
  def pwd
63
- chdir_monitor.synchronize do
58
+ Bundler.rubygems.ext_lock.synchronize do
64
59
  Dir.pwd
65
60
  end
66
61
  end
@@ -37,5 +37,10 @@ module Bundler
37
37
  def can_lock?(spec)
38
38
  spec.source == self
39
39
  end
40
+
41
+ def include?(other)
42
+ other == self
43
+ end
44
+
40
45
  end
41
46
  end
@@ -36,11 +36,15 @@ module Bundler
36
36
  end
37
37
 
38
38
  def eql?(o)
39
- o.is_a?(Rubygems) && remotes_equal?(o.remotes)
39
+ o.is_a?(Rubygems) && o.credless_remotes == credless_remotes
40
40
  end
41
41
 
42
42
  alias == eql?
43
43
 
44
+ def include?(o)
45
+ o.is_a?(Rubygems) && (o.credless_remotes - credless_remotes).empty?
46
+ end
47
+
44
48
  def can_lock?(spec)
45
49
  spec.source.is_a?(Rubygems)
46
50
  end
@@ -200,6 +204,10 @@ module Bundler
200
204
 
201
205
  protected
202
206
 
207
+ def credless_remotes
208
+ remotes.map(&method(:suppress_configured_credentials))
209
+ end
210
+
203
211
  def source_uris_for_spec(spec)
204
212
  specs.search_all(spec.name).inject([]) do |uris, s|
205
213
  uris << s.source_uri.without_credentials if s.source_uri
@@ -370,10 +378,6 @@ module Bundler
370
378
  spec.loaded_from && spec.loaded_from.include?("specifications/default/")
371
379
  end
372
380
 
373
- def remotes_equal?(other_remotes)
374
- remotes.map(&method(:suppress_configured_credentials)) == other_remotes.map(&method(:suppress_configured_credentials))
375
- end
376
-
377
381
  end
378
382
  end
379
383
  end
@@ -61,7 +61,7 @@ module Bundler::Molinillo
61
61
  hash[name] = vertex.dup.tap { |v| v.graph = self }
62
62
  end
63
63
  end
64
- @root_vertices = Hash[vertices.select { |n, _v| other.root_vertices[n] }]
64
+ @root_vertices = Hash[@vertices.select { |n, _v| other.root_vertices[n] }]
65
65
  @edges = other.edges.map do |edge|
66
66
  Edge.new(
67
67
  vertex_named(edge.origin.name),
@@ -1,3 +1,3 @@
1
1
  module Bundler::Molinillo
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -73,6 +73,19 @@ module Bundler::Molinillo
73
73
  end_resolution
74
74
  end
75
75
 
76
+ # @return [Integer] the number of resolver iterations in between calls to
77
+ # {#resolver_ui}'s {UI#indicate_progress} method
78
+ attr_accessor :iteration_rate
79
+ private :iteration_rate
80
+
81
+ # @return [Time] the time at which resolution began
82
+ attr_accessor :started_at
83
+ private :started_at
84
+
85
+ # @return [Array<ResolutionState>] the stack of states for the resolution
86
+ attr_accessor :states
87
+ private :states
88
+
76
89
  private
77
90
 
78
91
  # Sets up the resolution process
@@ -101,16 +114,6 @@ module Bundler::Molinillo
101
114
  require 'bundler/vendor/molinillo/lib/molinillo/state'
102
115
  require 'bundler/vendor/molinillo/lib/molinillo/modules/specification_provider'
103
116
 
104
- # @return [Integer] the number of resolver iterations in between calls to
105
- # {#resolver_ui}'s {UI#indicate_progress} method
106
- attr_accessor :iteration_rate
107
-
108
- # @return [Time] the time at which resolution began
109
- attr_accessor :started_at
110
-
111
- # @return [Array<ResolutionState>] the stack of states for the resolution
112
- attr_accessor :states
113
-
114
117
  ResolutionState.new.members.each do |member|
115
118
  define_method member do |*args, &block|
116
119
  state.send(member, *args, &block)
@@ -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.9.1" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.9.2" unless defined?(::Bundler::VERSION)
6
6
  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.9.1
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-03-22 00:00:00.000000000 Z
14
+ date: 2015-03-31 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache
@@ -69,6 +69,20 @@ dependencies:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '3.0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: rake
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
72
86
  description: Bundler manages an application's dependencies through its entire life,
73
87
  across many machines, systematically and repeatably
74
88
  email: