bundler 1.10.0.pre.2 → 1.10.0.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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2029d69f6f96ac800b5ee5b83df956338b5e2670
4
- data.tar.gz: c95b3b9baf42bd197d8167dd78f1e833db419462
3
+ metadata.gz: 13b6866c1bca64b1f7b086fe404f97694736ad07
4
+ data.tar.gz: ed15e5be200b5c249138408d21bc6100d6111be3
5
5
  SHA512:
6
- metadata.gz: 579493891195fa22de78c686052d557b8935246f8abc4f620a129979d6ba35364326ea187da31904b1e5fedc8eab39c6da4af9cdc919c7500fe83c84fef564ee
7
- data.tar.gz: 4b4f0a4c10b915be02b6ca77af03c7986d82ab749cda3f0a0463abc30ce2a62681337557befcad0e43dd30f0d191429905e8885944ad6dba104d4e238eefbdd3
6
+ metadata.gz: 7627557b7ad3a3f97d425b30c8a7c0ea73ad993a6b2ae5352bcbbade321b289682f79bb0c94293d620cda54e4cb5f2f4fa677bf10ed294ae3a05c48c4b714724
7
+ data.tar.gz: 2e38fed048910f874c5979c27e8abcb360ba2a6bc4078c9dfb298650229f7ab86e02aee03d6ae3f81b2595f20e19b452fb175c5f6cbf6f9a186f3390caeef614
@@ -5,6 +5,7 @@ before_script: travis_retry rake spec:travis:deps
5
5
  branches:
6
6
  only:
7
7
  - master
8
+ - 1-10-stable
8
9
  - 1-9-stable
9
10
  - 1-8-stable
10
11
  - 1-7-stable
@@ -41,7 +42,7 @@ env:
41
42
  # We need to know if changes to rubygems will break bundler on release
42
43
  - RGV=master
43
44
  # Test the latest rubygems release with all of our supported rubies
44
- - RGV=v2.4.6
45
+ - RGV=v2.4.7
45
46
 
46
47
  matrix:
47
48
  fast_finish: true
@@ -99,7 +100,7 @@ matrix:
99
100
  # Ruby 1.9.2 sanity check
100
101
  # (but it's just too slow and sometimes goes over the Travis limit)
101
102
  - rvm: 1.9.2
102
- env: RGV=v2.4.6
103
+ env: RGV=v2.4.7
103
104
  # Ruby-head (we want to know how we're doing, but not fail the build)
104
105
  - rvm: ruby-head
105
106
  env: RGV=master
@@ -1,3 +1,16 @@
1
+ ## 1.10.0.rc (2015-05-16)
2
+
3
+ Features:
4
+
5
+ - dramatically speed up resolving some slow Gemfiles (#3635, @segiddins)
6
+ - track CI platforms running Bundler (#3646, @fotanus)
7
+
8
+ Bugfixes:
9
+
10
+ - allow `viz` to work with prereleases (#3621, #3217, @aprescott)
11
+ - validate gemspecs used in path and git gems (#3639, @segiddins, @indirect)
12
+ - stop printing config warnings when config is unchanged (#3649, @fotanus, @indirect)
13
+
1
14
  ## 1.10.0.pre.2 (2015-05-07)
2
15
 
3
16
  Bugfixes:
@@ -41,6 +54,24 @@ Deprecations:
41
54
 
42
55
  - deprecated the (never enabled) `bundle_ruby` binary (@smlance)
43
56
 
57
+ ## 1.9.9 (2015-05-16)
58
+
59
+ Bugfixes:
60
+
61
+ - read mirror and credential settings from older versions (#3557, @Strech)
62
+
63
+ ## 1.9.8 (2015-05-12)
64
+
65
+ Bugfixes:
66
+
67
+ - fix regression in sudo mode introduced by 1.9.7 (#3642, @segiddins)
68
+
69
+ ## 1.9.7 (2015-05-11)
70
+
71
+ Bugfixes:
72
+
73
+ - always clean up tmp dirs (#3277, @hone, @indirect, @segiddins)
74
+
44
75
  ## 1.9.6 (2015-05-02)
45
76
 
46
77
  Bugfixes:
@@ -4,7 +4,7 @@ The Bundler project strongly values contributors from anywhere, regardless of ge
4
4
 
5
5
  ### Summary
6
6
 
7
- Harassment in code and discussion or violation of physical boundaries is completely unacceptable anywhere in the Bundler project’s codebases, issue trackers, IRC channel, Campfire, mailing lists, meetups, and other events. Violators will be warned and then blocked or banned by the core team at or before the 3rd violation.
7
+ Harassment in code and discussion or violation of physical boundaries is completely unacceptable anywhere in the Bundler project’s codebases, issue trackers, chat rooms, mailing lists, meetups, and any other events. Violators will be warned and then blocked or banned by the core team at or before the 3rd violation.
8
8
 
9
9
  ### In detail
10
10
 
data/Rakefile CHANGED
@@ -114,8 +114,10 @@ namespace :spec do
114
114
  system "sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd"
115
115
  # Strip secure_path so that RVM paths transmit through sudo -E
116
116
  system "sudo sed -i '/secure_path/d' /etc/sudoers"
117
- # Install groff for the ronn gem
117
+ # Install groff so ronn can generate man/help pages
118
118
  sh "sudo apt-get install groff -y"
119
+ # Install graphviz so that the viz specs can run
120
+ sh "sudo apt-get install graphviz -y 2>&1 | tail -n 2"
119
121
  if RUBY_VERSION < '1.9'
120
122
  # Downgrade Rubygems on 1.8 so Ronn can be required
121
123
  # https://github.com/rubygems/rubygems/issues/784
@@ -169,7 +171,7 @@ begin
169
171
  rubyopt = ENV["RUBYOPT"]
170
172
  # When editing this list, also edit .travis.yml!
171
173
  branches = %w(master)
172
- releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.3 v2.4.6)
174
+ releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.3 v2.4.7)
173
175
  (branches + releases).each do |rg|
174
176
  desc "Run specs with Rubygems #{rg}"
175
177
  RSpec::Core::RakeTask.new(rg) do |t|
@@ -269,8 +271,9 @@ begin
269
271
  namespace :man do
270
272
  directory "lib/bundler/man"
271
273
 
272
- Dir["man/*.ronn"].each do |ronn|
273
- basename = File.basename(ronn, ".ronn")
274
+ sources = Dir["man/*.ronn"].map{|f| File.basename(f, ".ronn") }
275
+ sources.map do |basename|
276
+ ronn = "man/#{basename}.ronn"
274
277
  roff = "lib/bundler/man/#{basename}"
275
278
 
276
279
  file roff => ["lib/bundler/man", ronn] do
@@ -284,11 +287,19 @@ begin
284
287
  task :build_all_pages => "#{roff}.txt"
285
288
  end
286
289
 
290
+ task :clean do
291
+ leftovers = Dir["lib/bundler/man/*"].reject do |f|
292
+ basename = File.basename(f).sub(/\.(txt|ronn)/, '')
293
+ sources.include?(basename)
294
+ end
295
+ rm leftovers if leftovers.any?
296
+ end
297
+
287
298
  desc "Build the man pages"
288
- task :build => "man:build_all_pages"
299
+ task :build => ["man:clean", "man:build_all_pages"]
289
300
 
290
- desc "Clean up from the built man pages"
291
- task :clean do
301
+ desc "Remove all built man pages"
302
+ task :clobber do
292
303
  rm_rf "lib/bundler/man"
293
304
  end
294
305
 
@@ -299,7 +310,6 @@ rescue LoadError
299
310
  namespace :man do
300
311
  task(:require) { abort "Install the ronn gem to be able to release!" }
301
312
  task(:build) { warn "Install the ronn gem to build the help pages" }
302
- task(:clean) { }
303
313
  end
304
314
  end
305
315
 
@@ -310,7 +320,7 @@ task :update_certs => "spec:rubygems:clone_rubygems_master" do
310
320
  end
311
321
 
312
322
  require 'bundler/gem_tasks'
313
- task :build => ["man:clean", "man:build"]
314
- task :release => ["man:require", "man:clean", "man:build"]
323
+ task :build => ["man:build"]
324
+ task :release => ["man:require", "man:build"]
315
325
 
316
326
  task :default => :spec
@@ -17,10 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.required_rubygems_version = '>= 1.3.6'
18
18
 
19
19
  s.add_development_dependency 'mustache', '0.99.6'
20
+ s.add_development_dependency 'rake', '~> 10.0'
20
21
  s.add_development_dependency 'rdiscount', '~> 1.6'
21
22
  s.add_development_dependency 'ronn', '~> 0.7.3'
22
23
  s.add_development_dependency 'rspec', '~> 3.0'
23
- s.add_development_dependency 'rake'
24
24
 
25
25
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
26
  # we don't check in man pages, but we need to ship them because
@@ -85,14 +85,19 @@ module Bundler
85
85
  class MarshalError < StandardError; end
86
86
 
87
87
  class << self
88
- attr_writer :ui, :bundle_path
88
+ attr_writer :bundle_path
89
89
 
90
90
  def configure
91
91
  @configured ||= configure_gem_home_and_path
92
92
  end
93
93
 
94
94
  def ui
95
- @ui ||= UI::Silent.new
95
+ @ui || (self.ui = UI::Silent.new)
96
+ end
97
+
98
+ def ui=(ui)
99
+ Bundler.rubygems.ui = UI::RGProxy.new(ui)
100
+ @ui = ui
96
101
  end
97
102
 
98
103
  # Returns absolute path of where gems are installed on the filesystem.
@@ -341,27 +346,32 @@ module Bundler
341
346
  raise MarshalError, "#{e.class}: #{e.message}"
342
347
  end
343
348
 
344
- def load_gemspec(file)
349
+ def load_gemspec(file, validate = false)
345
350
  @gemspec_cache ||= {}
346
351
  key = File.expand_path(file)
347
- spec = ( @gemspec_cache[key] ||= load_gemspec_uncached(file) )
352
+ @gemspec_cache[key] ||= load_gemspec_uncached(file, validate)
348
353
  # Protect against caching side-effected gemspecs by returning a
349
354
  # new instance each time.
350
- spec.dup if spec
355
+ @gemspec_cache[key].dup if @gemspec_cache[key]
351
356
  end
352
357
 
353
- def load_gemspec_uncached(file)
358
+ def load_gemspec_uncached(file, validate = false)
354
359
  path = Pathname.new(file)
355
360
  # Eval the gemspec from its parent directory, because some gemspecs
356
361
  # depend on "./" relative paths.
357
362
  SharedHelpers.chdir(path.dirname.to_s) do
358
363
  contents = path.read
359
364
  if contents[0..2] == "---" # YAML header
360
- eval_yaml_gemspec(path, contents)
365
+ spec = eval_yaml_gemspec(path, contents)
361
366
  else
362
- eval_gemspec(path, contents)
367
+ spec = eval_gemspec(path, contents)
363
368
  end
369
+ Bundler.rubygems.validate(spec) if spec && validate
370
+ spec
364
371
  end
372
+ rescue Gem::InvalidSpecificationException => e
373
+ raise InvalidOption, "The gemspec at #{file} is not valid. " \
374
+ "The validation error was '#{e.message}'"
365
375
  end
366
376
 
367
377
  def clear_gemspec_cache
@@ -19,7 +19,6 @@ module Bundler
19
19
  custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
20
20
  ENV['BUNDLE_GEMFILE'] = File.expand_path(custom_gemfile) if custom_gemfile
21
21
  Bundler.settings[:retry] = options[:retry] if options[:retry]
22
- Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui)
23
22
  auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
24
23
  rescue UnknownArgumentError => e
25
24
  raise InvalidOption, e.message
@@ -46,34 +46,37 @@ module Bundler
46
46
  return
47
47
  end
48
48
 
49
+ new_value = args.join(" ")
49
50
  locations = Bundler.settings.locations(name)
50
51
 
51
52
  if scope == "global"
52
- if local = locations[:local]
53
- Bundler.ui.info "Your application has set #{name} to #{local.inspect}. This will override the " \
54
- "global value you are currently setting"
53
+ if locations[:local]
54
+ Bundler.ui.info "Your application has set #{name} to #{locations[:local].inspect}. " \
55
+ "This will override the global value you are currently setting"
55
56
  end
56
57
 
57
- if env = locations[:env]
58
- Bundler.ui.info "You have a bundler environment variable for #{name} set to #{env.inspect}. " \
59
- "This will take precedence over the global value you are setting"
58
+ if locations[:env]
59
+ Bundler.ui.info "You have a bundler environment variable for #{name} set to " \
60
+ "#{locations[:env].inspect}. This will take precedence over the global value you are setting"
60
61
  end
61
62
 
62
- if global = locations[:global]
63
- Bundler.ui.info "You are replacing the current global value of #{name}, which is currently #{global.inspect}"
63
+ if locations[:global] && locations[:global] != new_value
64
+ Bundler.ui.info "You are replacing the current global value of #{name}, which is currently " \
65
+ "#{locations[:global].inspect}"
64
66
  end
65
67
  end
66
68
 
67
- if scope == "local" && local = locations[:local]
68
- Bundler.ui.info "You are replacing the current local value of #{name}, which is currently #{local.inspect}"
69
+ if scope == "local" && locations[:local] != new_value
70
+ Bundler.ui.info "You are replacing the current local value of #{name}, which is currently " \
71
+ "#{locations[:local].inspect}"
69
72
  end
70
73
 
71
74
  if name.match(/\Alocal\./)
72
75
  pathname = Pathname.new(args.join(" "))
73
- self.args = [pathname.expand_path.to_s] if pathname.directory?
76
+ new_value = pathname.expand_path.to_s if pathname.directory?
74
77
  end
75
78
 
76
- Bundler.settings.send("set_#{scope}", name, args.join(" "))
79
+ Bundler.settings.send("set_#{scope}", name, new_value)
77
80
  else
78
81
  Bundler.ui.error "Invalid scope --#{scope} given. Please use --local or --global."
79
82
  exit 1
@@ -66,6 +66,7 @@ module Bundler
66
66
  "of enforcing it, so be sure that you are prepared to do that. For suggestions about " \
67
67
  "how to enforce codes of conduct, see bit.ly/coc-enforcement."
68
68
  )
69
+ config[:coc] = true
69
70
  Bundler.ui.info "Code of conduct enabled in config"
70
71
  templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
71
72
  end
@@ -103,6 +103,7 @@ module Bundler
103
103
 
104
104
  definition = Bundler.definition
105
105
  definition.validate_ruby!
106
+
106
107
  Installer.install(Bundler.root, definition, options)
107
108
  Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.settings[:frozen]
108
109
 
@@ -47,11 +47,16 @@ module Bundler
47
47
  def initialize(lockfile, dependencies, sources, unlock, ruby_version = nil, optional_groups = [])
48
48
  @unlocking = unlock == true || !unlock.empty?
49
49
 
50
- @dependencies, @sources, @unlock, @optional_groups = dependencies, sources, unlock, optional_groups
51
- @remote = false
52
- @specs = nil
53
- @lockfile_contents = ""
54
- @ruby_version = ruby_version
50
+ @dependencies = dependencies
51
+ @sources = sources
52
+ @unlock = unlock
53
+ @optional_groups = optional_groups
54
+ @remote = false
55
+ @specs = nil
56
+ @ruby_version = ruby_version
57
+
58
+ @lockfile_contents = ""
59
+ @locked_bundler_version = nil
55
60
 
56
61
  if lockfile && File.exist?(lockfile)
57
62
  @lockfile_contents = Bundler.read_file(lockfile)
@@ -49,8 +49,14 @@ module Bundler
49
49
  case gemspecs.size
50
50
  when 1
51
51
  spec = Bundler.load_gemspec(gemspecs.first)
52
- raise InvalidOption, "There was an error loading the gemspec at #{gemspecs.first}." unless spec
52
+
53
+ unless spec
54
+ raise InvalidOption, "There was an error loading the gemspec at " \
55
+ "#{file}. Make sure you can build the gem, then try again."
56
+ end
57
+
53
58
  gem spec.name, :path => path, :glob => glob
59
+
54
60
  group(development_group) do
55
61
  spec.development_dependencies.each do |dep|
56
62
  gem dep.name, *(dep.requirement.as_list + [:type => :development])
@@ -59,7 +65,8 @@ module Bundler
59
65
  when 0
60
66
  raise InvalidOption, "There are no gemspecs at #{expanded_path}."
61
67
  else
62
- raise InvalidOption, "There are multiple gemspecs at #{expanded_path}. Please use the :name option to specify which one."
68
+ raise InvalidOption, "There are multiple gemspecs at #{expanded_path}. " \
69
+ "Please use the :name option to specify which one should be used."
63
70
  end
64
71
  end
65
72
 
@@ -155,6 +155,8 @@ module Bundler
155
155
 
156
156
  agent << " options/#{Bundler.settings.all.join(",")}"
157
157
 
158
+ agent << " ci/#{cis.join(",")}" if cis.any?
159
+
158
160
  # add a random ID so we can consolidate runs server-side
159
161
  agent << " " << SecureRandom.hex(8)
160
162
 
@@ -178,6 +180,21 @@ module Bundler
178
180
 
179
181
  FETCHERS = [Dependency, Index]
180
182
 
183
+ def cis
184
+ env_cis = {
185
+ "TRAVIS" => "travis",
186
+ "CIRCLECI" => "circle",
187
+ "SEMAPHORE" => "semaphore",
188
+ "JENKINS_URL" => "jenkins",
189
+ "BUILDBOX" => "buildbox",
190
+ "GO_SERVER_URL" => "go",
191
+ "SNAP_CI" => "snap",
192
+ "CI_NAME" => ENV["CI_NAME"],
193
+ "CI" => "ci"
194
+ }
195
+ env_cis.find_all{ |env, ci| ENV[env]}.map{ |env, ci| ci }
196
+ end
197
+
181
198
  def connection
182
199
  @connection ||= begin
183
200
  needs_ssl = remote_uri.scheme == "https" ||
@@ -36,6 +36,9 @@ module Bundler
36
36
  else
37
37
  tmp = Set.new
38
38
  parent_dependencies.each do |dependency|
39
+ # if the dependency is a prerelease, allow to_spec to be non-nil
40
+ dependency.prerelease = true
41
+
39
42
  child_dependencies = dependency.to_spec.runtime_dependencies.to_set
40
43
  @relations[dependency.name] += child_dependencies.map(&:name).to_set
41
44
  tmp += child_dependencies
@@ -25,7 +25,7 @@
25
25
  # gem 'cocoapods', '~> 0.34.1'
26
26
  # end
27
27
  #
28
- # puts Pod::VERSION => "0.34.4"
28
+ # puts Pod::VERSION # => "0.34.4"
29
29
  #
30
30
  def gemfile(install = false, &gemfile)
31
31
  require 'bundler'
@@ -37,10 +37,19 @@ def gemfile(install = false, &gemfile)
37
37
 
38
38
  builder = Bundler::Dsl.new
39
39
  builder.instance_eval(&gemfile)
40
+
40
41
  definition = builder.to_definition(nil, true)
41
42
  def definition.lock(file); end
42
43
  definition.validate_ruby!
43
- Bundler::Installer.install(Bundler.root, definition, :system => true) if install
44
+
45
+ if install
46
+ Bundler.ui = Bundler::UI::Shell.new
47
+ Bundler::Installer.install(Bundler.root, definition, :system => true)
48
+ Bundler::Installer.post_install_messages.each do |name, message|
49
+ Bundler.ui.info "Post install message from #{name}:\n#{message}"
50
+ end
51
+ end
52
+
44
53
  runtime = Bundler::Runtime.new(nil, definition)
45
54
  runtime.setup_environment
46
55
  runtime.setup.require
@@ -22,12 +22,13 @@ module Bundler
22
22
  PATH = "PATH"
23
23
  SPECS = " specs:"
24
24
  OPTIONS = /^ ([a-z]+): (.*)$/i
25
+ SOURCE = [GIT, GEM, PATH]
25
26
 
26
27
  def initialize(lockfile)
27
28
  @platforms = []
28
29
  @sources = []
29
30
  @dependencies = []
30
- @state = :source
31
+ @state = nil
31
32
  @specs = {}
32
33
 
33
34
  @rubygems_aggregate = Source::Rubygems.new
@@ -38,13 +39,18 @@ module Bundler
38
39
  end
39
40
 
40
41
  lockfile.split(/(?:\r?\n)+/).each do |line|
41
- if line == DEPENDENCIES
42
+ if SOURCE.include?(line)
43
+ @state = :source
44
+ parse_source(line)
45
+ elsif line == DEPENDENCIES
42
46
  @state = :dependency
43
47
  elsif line == PLATFORMS
44
48
  @state = :platform
45
49
  elsif line == BUNDLED
46
50
  @state = :bundled_with
47
- else
51
+ elsif line =~ /^[^\s]/
52
+ @state = nil
53
+ elsif @state
48
54
  send("parse_#{@state}", line)
49
55
  end
50
56
  end
@@ -179,7 +185,7 @@ module Bundler
179
185
  end
180
186
 
181
187
  def parse_bundled_with(line)
182
- line = line[3..-1]
188
+ line = line.strip
183
189
  if Gem::Version.correct?(line)
184
190
  @bundler_version = Gem::Version.create(line)
185
191
  end
@@ -190,7 +190,6 @@ module Bundler
190
190
  @base = base
191
191
  @resolver = Molinillo::Resolver.new(self, self)
192
192
  @search_for = {}
193
- @prereleases_cache = Hash.new { |h,k| h[k] = k.prerelease? }
194
193
  @base_dg = Molinillo::DependencyGraph.new
195
194
  @base.each { |ls| @base_dg.add_root_vertex ls.name, Dependency.new(ls.name, ls.version) }
196
195
  end
@@ -296,13 +295,26 @@ module Bundler
296
295
  name = name_for(dependency)
297
296
  [
298
297
  activated.vertex_named(name).payload ? 0 : 1,
299
- @prereleases_cache[dependency.requirement] ? 0 : 1,
298
+ amount_constrained(dependency),
300
299
  conflicts[name] ? 0 : 1,
301
300
  activated.vertex_named(name).payload ? 0 : search_for(dependency).count,
302
301
  ]
303
302
  end
304
303
  end
305
304
 
305
+ def amount_constrained(dependency)
306
+ @amount_constrained ||= {}
307
+ @amount_constrained[dependency.name] ||= begin
308
+ base_dep = Dependency.new dependency.name, '>= 0.a'
309
+ all = search_for(DepProxy.new base_dep, dependency.__platform)
310
+ if all.size == 0
311
+ 0
312
+ else
313
+ search_for(dependency).size.to_f / all.size.to_f
314
+ end
315
+ end
316
+ end
317
+
306
318
  def verify_gemfile_dependencies_are_found!(requirements)
307
319
  requirements.each do |requirement|
308
320
  next if requirement.name == 'bundler'
@@ -4,6 +4,11 @@ require 'rubygems/config_file'
4
4
 
5
5
  module Bundler
6
6
  class RubygemsIntegration
7
+ if defined?(Gem::Ext::Builder::CHDIR_MONITOR)
8
+ EXT_LOCK = Gem::Ext::Builder::CHDIR_MONITOR
9
+ else
10
+ EXT_LOCK = Monitor.new
11
+ end
7
12
 
8
13
  def self.version
9
14
  @version ||= Gem::Version.new(Gem::VERSION)
@@ -34,9 +39,18 @@ module Bundler
34
39
  end
35
40
 
36
41
  def mark_loaded(spec)
42
+ if spec.respond_to?(:activated=)
43
+ current = Gem.loaded_specs[spec.name]
44
+ current.activated = false if current
45
+ spec.activated = true
46
+ end
37
47
  Gem.loaded_specs[spec.name] = spec
38
48
  end
39
49
 
50
+ def validate(spec)
51
+ Bundler.ui.silence { spec.validate }
52
+ end
53
+
40
54
  def path(obj)
41
55
  obj.to_s
42
56
  end
@@ -149,7 +163,7 @@ module Bundler
149
163
  end
150
164
 
151
165
  def ext_lock
152
- @ext_lock ||= Monitor.new
166
+ EXT_LOCK
153
167
  end
154
168
 
155
169
  def fetch_specs(all, pre, &blk)
@@ -446,6 +460,13 @@ module Bundler
446
460
  def find_name(name)
447
461
  Gem.source_index.find_name(name)
448
462
  end
463
+
464
+ def validate(spec)
465
+ # Missing summary is downgraded to a warning in later versions,
466
+ # so we set it to an empty string to prevent an exception here.
467
+ spec.summary ||= ""
468
+ super
469
+ end
449
470
  end
450
471
 
451
472
  # Rubygems versions 1.3.6 and 1.3.7
@@ -603,10 +624,6 @@ module Bundler
603
624
  end
604
625
  end
605
626
 
606
- def ext_lock
607
- Gem::Ext::Builder::CHDIR_MONITOR
608
- end
609
-
610
627
  if Gem::Specification.respond_to?(:stubs_for)
611
628
  def find_name(name)
612
629
  Gem::Specification.stubs_for(name).map(&:to_spec)
@@ -228,7 +228,7 @@ module Bundler
228
228
  config_regex = /^(BUNDLE_.+): (['"]?)(.*(?:\n(?!BUNDLE).+)?)\2$/
229
229
  config_pairs = config_file.read.scan(config_regex).map do |m|
230
230
  key, _, value = m
231
- [key, value.gsub(/\s+/, " ").tr('"', "'")]
231
+ [convert_to_backward_compatible_key(key), value.gsub(/\s+/, " ").tr('"', "'")]
232
232
  end
233
233
  Hash[config_pairs]
234
234
  else
@@ -236,6 +236,12 @@ module Bundler
236
236
  end
237
237
  end
238
238
 
239
+ def convert_to_backward_compatible_key(key)
240
+ key = "#{key}/" if key =~ /https?:/i && key !~ %r[/\Z]
241
+ key = key.gsub(".", "__") if key.include?(".")
242
+ key
243
+ end
244
+
239
245
  # TODO: duplicates Rubygems#normalize_uri
240
246
  # TODO: is this the correct place to validate mirror URIs?
241
247
  def normalize_uri(uri)
@@ -1,6 +1,5 @@
1
1
  module Bundler
2
2
  class Source
3
-
4
3
  class Path < Source
5
4
  autoload :Installer, 'bundler/source/path/installer'
6
5
 
@@ -132,8 +131,7 @@ module Bundler
132
131
  if File.directory?(expanded_path)
133
132
  # We sort depth-first since `<<` will override the earlier-found specs
134
133
  Dir["#{expanded_path}/#{@glob}"].sort_by { |p| -p.split(File::SEPARATOR).size }.each do |file|
135
- spec = Bundler.load_gemspec(file)
136
- if spec
134
+ if spec = Bundler.load_gemspec(file, :validate)
137
135
  spec.loaded_from = file.to_s
138
136
  spec.source = self
139
137
  index << spec
@@ -220,7 +218,7 @@ module Bundler
220
218
  end
221
219
  end
222
220
  end
223
- end
224
221
 
222
+ end
225
223
  end
226
224
  end
@@ -26,14 +26,16 @@ TODO: Write usage instructions here
26
26
 
27
27
  ## Development
28
28
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the code located in this directory, ignoring other installed copies of this gem.<% end %>
29
+ After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test].sub('mini', '') %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %>
30
30
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
32
 
33
33
  ## Contributing
34
34
 
35
- 1. Fork it ( https://github.com/[my-github-username]/<%=config[:name]%>/fork )
36
- 2. Create your feature branch (`git checkout -b my-new-feature`)
37
- 3. Commit your changes (`git commit -am 'Add some feature'`)
38
- 4. Push to the branch (`git push origin my-new-feature`)
39
- 5. Create a new Pull Request
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/<%= config[:name] %>.<% if config[:coc] %> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.<% end %>
36
+ <% if config[:mit] %>
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+ <% end %>
@@ -1,3 +1,5 @@
1
+ require 'bundler/vendored_thor'
2
+
1
3
  module Bundler
2
4
  module UI
3
5
  class Shell
@@ -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.10.0.pre.2" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.10.0.rc" 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.10.0.pre.2
4
+ version: 1.10.0.rc
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-05-07 00:00:00.000000000 Z
14
+ date: 2015-05-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache
@@ -28,61 +28,61 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.99.6
30
30
  - !ruby/object:Gem::Dependency
31
- name: rdiscount
31
+ name: rake
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
34
  - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '1.6'
36
+ version: '10.0'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '1.6'
43
+ version: '10.0'
44
44
  - !ruby/object:Gem::Dependency
45
- name: ronn
45
+ name: rdiscount
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: 0.7.3
50
+ version: '1.6'
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: 0.7.3
57
+ version: '1.6'
58
58
  - !ruby/object:Gem::Dependency
59
- name: rspec
59
+ name: ronn
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: '3.0'
64
+ version: 0.7.3
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: '3.0'
71
+ version: 0.7.3
72
72
  - !ruby/object:Gem::Dependency
73
- name: rake
73
+ name: rspec
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - ">="
76
+ - - "~>"
77
77
  - !ruby/object:Gem::Version
78
- version: '0'
78
+ version: '3.0'
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - ">="
83
+ - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: '0'
85
+ version: '3.0'
86
86
  description: Bundler manages an application's dependencies through its entire life,
87
87
  across many machines, systematically and repeatably
88
88
  email: