bundler 1.2.5 → 1.3.0.pre

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.

Files changed (124) hide show
  1. data/.gitignore +10 -7
  2. data/.travis.yml +12 -3
  3. data/CHANGELOG.md +26 -19
  4. data/CONTRIBUTE.md +97 -0
  5. data/README.md +4 -2
  6. data/Rakefile +17 -59
  7. data/bundler.gemspec +2 -1
  8. data/lib/bundler.rb +23 -20
  9. data/lib/bundler/cli.rb +68 -22
  10. data/lib/bundler/definition.rb +3 -2
  11. data/lib/bundler/deprecate.rb +15 -0
  12. data/lib/bundler/dsl.rb +14 -16
  13. data/lib/bundler/environment.rb +0 -5
  14. data/lib/bundler/fetcher.rb +23 -78
  15. data/lib/bundler/friendly_errors.rb +4 -5
  16. data/lib/bundler/gem_helper.rb +14 -16
  17. data/lib/bundler/injector.rb +64 -0
  18. data/lib/bundler/installer.rb +1 -7
  19. data/lib/bundler/lazy_specification.rb +6 -3
  20. data/lib/bundler/lockfile_parser.rb +25 -13
  21. data/lib/bundler/resolver.rb +0 -1
  22. data/lib/bundler/rubygems_integration.rb +83 -17
  23. data/lib/bundler/settings.rb +4 -2
  24. data/lib/bundler/similarity_detector.rb +63 -0
  25. data/lib/bundler/source.rb +3 -886
  26. data/lib/bundler/source/git.rb +267 -0
  27. data/lib/bundler/source/git/git_proxy.rb +142 -0
  28. data/lib/bundler/source/path.rb +209 -0
  29. data/lib/bundler/source/path/installer.rb +33 -0
  30. data/lib/bundler/source/rubygems.rb +261 -0
  31. data/lib/bundler/templates/newgem/newgem.gemspec.tt +3 -0
  32. data/lib/bundler/templates/newgem/rspec.tt +2 -0
  33. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +9 -0
  34. data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -0
  35. data/lib/bundler/templates/newgem/test/minitest_helper.rb.tt +4 -0
  36. data/lib/bundler/templates/newgem/test/test_newgem.rb.tt +11 -0
  37. data/lib/bundler/ui.rb +20 -5
  38. data/lib/bundler/vendor/.document +0 -0
  39. data/lib/bundler/vendor/thor.rb +74 -5
  40. data/lib/bundler/vendor/thor/actions.rb +5 -5
  41. data/lib/bundler/vendor/thor/actions/directory.rb +1 -0
  42. data/lib/bundler/vendor/thor/actions/file_manipulation.rb +7 -1
  43. data/lib/bundler/vendor/thor/base.rb +44 -11
  44. data/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +5 -0
  45. data/lib/bundler/vendor/thor/parser/argument.rb +14 -7
  46. data/lib/bundler/vendor/thor/parser/arguments.rb +7 -1
  47. data/lib/bundler/vendor/thor/parser/option.rb +8 -8
  48. data/lib/bundler/vendor/thor/parser/options.rb +62 -24
  49. data/lib/bundler/vendor/thor/runner.rb +1 -1
  50. data/lib/bundler/vendor/thor/shell/basic.rb +2 -2
  51. data/lib/bundler/vendor/thor/task.rb +2 -2
  52. data/lib/bundler/vendor/thor/version.rb +1 -1
  53. data/lib/bundler/vendored_persistent.rb +3 -15
  54. data/lib/bundler/version.rb +1 -1
  55. data/man/bundle-exec.ronn +1 -1
  56. data/man/bundle-update.ronn +1 -1
  57. data/man/bundle.ronn +4 -1
  58. data/spec/bundler/bundler_spec.rb +2 -28
  59. data/spec/bundler/cli_rspec.rb +9 -0
  60. data/spec/bundler/definition_spec.rb +1 -1
  61. data/spec/bundler/dsl_spec.rb +15 -8
  62. data/spec/bundler/gem_helper_spec.rb +38 -21
  63. data/spec/bundler/psyched_yaml_spec.rb +1 -0
  64. data/spec/bundler/source_spec.rb +3 -3
  65. data/spec/cache/gems_spec.rb +24 -24
  66. data/spec/cache/git_spec.rb +21 -23
  67. data/spec/cache/path_spec.rb +11 -11
  68. data/spec/cache/platform_spec.rb +6 -6
  69. data/spec/install/deploy_spec.rb +38 -38
  70. data/spec/install/gems/c_ext_spec.rb +2 -2
  71. data/spec/install/gems/dependency_api_spec.rb +23 -116
  72. data/spec/install/gems/env_spec.rb +1 -1
  73. data/spec/install/gems/flex_spec.rb +7 -8
  74. data/spec/install/gems/groups_spec.rb +10 -10
  75. data/spec/install/gems/packed_spec.rb +4 -4
  76. data/spec/install/gems/platform_spec.rb +3 -3
  77. data/spec/install/gems/post_install_spec.rb +9 -9
  78. data/spec/install/gems/resolving_spec.rb +2 -2
  79. data/spec/install/gems/simple_case_spec.rb +50 -53
  80. data/spec/install/gems/standalone_spec.rb +19 -19
  81. data/spec/install/gems/sudo_spec.rb +31 -16
  82. data/spec/install/gems/win32_spec.rb +1 -1
  83. data/spec/install/gemspec_spec.rb +6 -6
  84. data/spec/install/git_spec.rb +34 -34
  85. data/spec/install/invalid_spec.rb +3 -3
  86. data/spec/install/path_spec.rb +71 -8
  87. data/spec/install/upgrade_spec.rb +2 -2
  88. data/spec/integration/inject.rb +78 -0
  89. data/spec/lock/git_spec.rb +2 -2
  90. data/spec/lock/lockfile_spec.rb +14 -14
  91. data/spec/other/check_spec.rb +29 -29
  92. data/spec/other/clean_spec.rb +47 -48
  93. data/spec/other/config_spec.rb +20 -20
  94. data/spec/other/console_spec.rb +5 -5
  95. data/spec/other/exec_spec.rb +48 -28
  96. data/spec/other/ext_spec.rb +3 -3
  97. data/spec/other/help_spec.rb +6 -6
  98. data/spec/other/init_spec.rb +8 -8
  99. data/spec/other/newgem_spec.rb +95 -15
  100. data/spec/other/open_spec.rb +10 -5
  101. data/spec/other/outdated_spec.rb +8 -8
  102. data/spec/other/platform_spec.rb +45 -45
  103. data/spec/other/show_spec.rb +10 -10
  104. data/spec/quality_spec.rb +2 -2
  105. data/spec/realworld/dependency_api_spec.rb +61 -0
  106. data/spec/realworld/edgecases_spec.rb +8 -8
  107. data/spec/runtime/executable_spec.rb +13 -13
  108. data/spec/runtime/load_spec.rb +12 -12
  109. data/spec/runtime/platform_spec.rb +1 -1
  110. data/spec/runtime/require_spec.rb +24 -24
  111. data/spec/runtime/setup_spec.rb +113 -56
  112. data/spec/runtime/with_clean_env_spec.rb +11 -13
  113. data/spec/spec_helper.rb +6 -0
  114. data/spec/support/artifice/endpoint.rb +28 -13
  115. data/spec/support/artifice/endpoint_extra.rb +4 -0
  116. data/spec/support/builders.rb +1 -1
  117. data/spec/support/helpers.rb +2 -7
  118. data/spec/support/indexes.rb +3 -3
  119. data/spec/support/matchers.rb +6 -6
  120. data/spec/update/gems_spec.rb +19 -8
  121. data/spec/update/git_spec.rb +10 -10
  122. data/spec/update/source_spec.rb +1 -1
  123. metadata +86 -55
  124. data/.rspec +0 -2
data/.gitignore CHANGED
@@ -1,22 +1,25 @@
1
+ # Please do not submit patches for including directives to ignore IDE/editor
2
+ # generated files. Use a global gitignore as described in
3
+ # https://help.github.com/articles/ignoring-files and find useful gitignore
4
+ # samples at https://github.com/github/gitignore
5
+
1
6
  # system crap
2
7
  .DS_Store
3
8
  .*.swp
4
9
 
5
10
  # files created by running the specs
6
- tmp
11
+ tmp/
7
12
 
8
13
  # built gems
9
- pkg
14
+ pkg/
10
15
  *.gem
11
16
 
12
17
  # rubinius bytecode
13
18
  *.rbc
19
+ .rbx/
14
20
 
15
21
  # output from ronn
16
- lib/bundler/man
22
+ lib/bundler/man/
17
23
 
18
24
  # output from ci_reporter
19
- spec/reports
20
-
21
- # Netbeans
22
- nbproject
25
+ spec/reports/
@@ -1,6 +1,12 @@
1
1
  language: ruby
2
2
  script: rake spec:travis
3
- before_script: rake spec:travis:deps
3
+ before_script:
4
+ - rake --version
5
+ - gem install rake -v '10.0.2'
6
+ - gem list rake
7
+ - rake --version
8
+ - sudo apt-get install groff -y
9
+ - rake spec:deps
4
10
  notifications:
5
11
  email:
6
12
  - mail@arko.net
@@ -11,17 +17,20 @@ notifications:
11
17
  channels:
12
18
  - "irc.freenode.org#bundler"
13
19
  rvm:
20
+ - ruby-head
21
+ - 2.0.0
14
22
  - 1.9.3
15
23
  - 1.9.2
16
24
  - 1.8.7
25
+
17
26
  # Rubygems versions MUST be available as rake tasks
18
27
  # see Rakefile:66 for the list of possible RGV values
19
28
  env:
20
- # test the supported rubygems release with all of our supported rubies
29
+ - RGV=master
21
30
  - RGV=v1.8.24
22
31
  matrix:
23
32
  allow_failures:
24
- # 1.9.2 is simply too slow. it sometimes exceeds the 25m hard limit.
33
+ - rvm: ruby-head
25
34
  - rvm: 1.9.2
26
35
  include:
27
36
  # Bundler 1.x supports Rubygems down to 1.5.3 on Ruby 1.9.3
@@ -1,25 +1,32 @@
1
- ## 1.2.5 (Feb 24, 2013)
2
-
3
- Bugfixes:
4
-
5
- - install Gemfiles with HTTP sources even without OpenSSL present
6
- - display CerficateFailureError message in full
7
-
8
- ## 1.2.4 (Feb 12, 2013)
1
+ ## 1.3.0.pre (Nov 29, 2012)
9
2
 
10
3
  Features:
11
4
 
12
- - warn about Ruby 2.0 and Rubygems 2.0
13
- - inform users when the resolver starts
14
- - disable reverse DNS to speed up API requests (@raggi)
15
-
16
- Bugfixes:
17
-
18
- - don't send user/pass when redirected to another host (@perplexes)
19
- - load gemspecs containing unicode (@gaffneyc, #2301)
20
- - support any ruby version in --standalone
21
- - resolve some ruby -w warnings (@chastell, #2193)
22
- - don't scare users with an error message during API fallback
5
+ - compatibile with Ruby 2.0.0-preview2
6
+ - compatibile with Rubygems 2.0.0.preview2 (@drbrain, @evanphx)
7
+ - ruby 2.0 added to the `:ruby19` ABI-compatible platform
8
+ - lazy load YAML, allowing Psych to be specified in the Gemfile
9
+ - significant performance improvements (@cheald, #2181)
10
+ - `inject` command for scripted Gemfile additions (Engine Yard)
11
+ - :github option uses slashless arguements as repo owner (@rking)
12
+ - `open` suggests gem names for typos (@jdelStrother)
13
+ - `update` reports non-existent gems (@jdelStrother)
14
+ - `gem` option --test can generate rspec stubs (@MafcoCinco)
15
+ - `gem` option --test can generate minitest stubs (@kcurtin)
16
+ - `gem` command generates MIT license (@BrentWheeldon)
17
+ - gem rake task 'release' resuses existing tags (@shtirlic)
18
+
19
+ Bugfixes:
20
+
21
+ - JRuby new works with HTTPS gem sources (@davidcelis)
22
+ - `install` installs both rake rake-built gems at once (@crowbot, #2107)
23
+ - handle Errno::ETIMEDOUT errors (@jmoses)
24
+ - handle Errno::EAGAIN errors on JRuby
25
+ - disable ANSI coloring when output is redirected (@tomykaira)
26
+ - raise LoadErrors correctly during Bundler.require (@Empact)
27
+ - do not swallow --verbose on `bundle exec` (@sol, #2102)
28
+ - `gem` generates gemspecs that block double-requires
29
+ - `gem` generates gemspecs that admit they depend on rake
23
30
 
24
31
  ## 1.2.3 (Nov 29, 2012)
25
32
 
@@ -0,0 +1,97 @@
1
+
2
+ Great to have you here! Here are a few ways you can help out with [Bundler](http://github.com/carlhuda/bundler)!
3
+
4
+ # Learn & listen
5
+
6
+ You can start learning about Bundler by reading [the documentation](http://gembundler.com). The best place to start learning about why Bundler exists and what it does is the [Understanding Bundler](http://gembundler.com/v1.2/rationale.html) page. Once you've read that, you can check out discussions about Bundler on the [Bundler mailing list](https://groups.google.com/forum/ruby-bundler) and in the [Bundler IRC channel](irc://irc.freenode.net/#bundler), which is #bundler on Freenode.
7
+
8
+ ## Core Team
9
+
10
+ The Bundler core team consists of André Arko ([@indirect](http://github.com/indirect)) and Terence Lee ([@hone](http://github.com/hone)), with support and advice from original Bundler author Yehuda Katz ([@wycats](http://github.com/wycats)).
11
+
12
+ # Adding new features
13
+
14
+ When adding a new feature to Bundler, please follow these steps:
15
+
16
+ 1. [Create an issue](https://github.com/carlhuda/bundler/issues/new) to discuss your feature.
17
+ 2. Base your commits on the master branch, since we follow [SemVer](http://semver.com) and don't add new features to old releases.
18
+ 3. Commit the code and at least one test covering your changes to a feature branch in your fork.
19
+ 4. Put a line in the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md) summarizing your changes under the next release under the "Features" heading.
20
+ 5. Send us a [pull request](https://help.github.com/articles/using-pull-requests) from your feature branch.
21
+
22
+ If you don't hear back immediately, don’t get discouraged! We all have day jobs, but we respond to most tickets within a day or two.
23
+
24
+ # Bug triage
25
+
26
+ Triage is the work of processing tickets that have been opened into actionable issues, feature requests, or bug reports. That includes verifying bugs, categorizing the ticket, and ensuring there's enough information to reproduce the bug for anyone who wants to try to fix it.
27
+
28
+ We've created an [issues guide](https://github.com/carlhuda/bundler/blob/master/ISSUES.md) to walk Bundler users through the process of troubleshooting issues and reporting bugs.
29
+
30
+ If you'd like to help, awesome! You can [report a new bug](https://github.com/carlhuda/bundler/issues/new) or browse our [existing open tickets](https://github.com/carlhuda/bundler/issues).
31
+
32
+ Not every ticket will point to a bug in Bundler's code, but open tickets usually mean that there is something we could improve to help that user. Sometimes that means writing additional documentation, sometimes that means making error messages clearer, and sometimes that means explaining to a user that they need to install git to use git gems.
33
+
34
+ When you're looking at a ticket, here are the main questions to ask:
35
+
36
+ * Can I reproduce this bug myself?
37
+ * Are the steps to reproduce clearly stated in the ticket?
38
+ * Which versions of Bundler (1.1.x, 1.2.x, git, etc.) manifest this bug?
39
+ * Which operating systems (OS X, Windows, Ubuntu, CentOS, etc.) manifest this bug?
40
+ * Which rubies (MRI, JRuby, Rubinius, etc.) and which versions (1.8.7, 1.9.3, etc.) have this bug?
41
+
42
+ If you can't reproduce an issue, chances are good that the bug has been fixed (hurrah!). That's a good time to post to the ticket explaining what you did and how it worked.
43
+
44
+ If you can reproduce an issue, you're well on your way to fixing it. :) Fixing issues is similar to adding new features:
45
+
46
+ 1. Discuss the fix on the existing issue. Coordinating with everyone else saves duplicate work and serves as a great way to get suggestions and ideas if you need any.
47
+ 2. Base your commits on the correct branch. Bugfixes for 1.x versions of Bundler should be based on the matching 1-x-stable branch.
48
+ 3. Commit the code and at least one test covering your changes to a named branch in your fork.
49
+ 4. Put a line in the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md) summarizing your changes under the next release under the “Bugfixes” heading.
50
+ 5. Send us a [pull request](https://help.github.com/articles/using-pull-requests) from your bugfix branch.
51
+
52
+ Finally, the ticket may be a duplicate of another older ticket. If you notice a ticket is a duplicate, simply comment on the ticket noting the original ticket’s number. For example, you could say “This is a duplicate of issue #42, and can be closed”.
53
+
54
+
55
+ # Beta testing
56
+
57
+ Early releases require heavy testing, especially across various system setups. We :heart: testers, and are big fans of anyone who can run `gem install bundler --pre` and try out upcoming releases in their development and staging environments.
58
+
59
+ As of September 3 2012, there is no current prerelease or beta version of Bundler. That said, you are always welcome to try checking out master and building a gem yourself if you want to try out the latest changes.
60
+
61
+
62
+ # Translations
63
+
64
+ We don't currently have any translations, but please reach out to us if you would like to help get this going.
65
+
66
+
67
+ # Documentation
68
+
69
+ Code needs explanation, and sometimes those who know the code well have trouble explaining it to someone just getting into it. Because of that, we welcome documentation suggestions and patches from everyone, especially if they are brand new to using Bundler.
70
+
71
+ Bundler has two main sources of documentation: the built-in help (including usage information and man pages) and the [Bundler documentation site](http://gembundler.com).
72
+
73
+ If you’d like to submit a patch to the man pages, follow the steps for adding a feature above. All of the man pages are located in the `man` directory. Just use the “Documentation” heading when you describe what you did in the changelog.
74
+
75
+ If you have a suggestion or proposed change for [gembundler.com](http://gembundler.com), please open an issue or send a pull request to the [bundler-site](http://github.com/carlhuda/bundler-site) repository.
76
+
77
+
78
+ # Community
79
+
80
+ Community is an important part of all we do. If you’d like to be part of the Bundler community, you can jump right in and start helping make Bundler better for everyone who uses it.
81
+
82
+ It would be tremendously helpful to have more people answering questions about Bundler (and often simply about Rubygems or Ruby itself) in our [issue tracker](https://github.com/carlhuda/bundler/issues) or on [Stack Overflow](http://stackoverflow.com/questions/tagged/bundler).
83
+
84
+ Additional documentation and explanation is always helpful, too. If you have any suggestions for the Bundler website [gembundler.com](http://www.gembundler.com), we would absolutely love it if you opened an issue or pull request on the [bundler-site repository](http://github.com/carlhuda/bundler-site).
85
+
86
+ Finally, sharing your experiences and discoveries by writing them up is a valuable way to help others who have similar problems or experiences in the future. You can write a blog post, create an example and commit it to Github, take screenshots, or make videos.
87
+
88
+ Examples of how Bundler is used help everyone, and we’ve discovered that people already use it in ways that we never imagined when we were writing it. If you’re still not sure what to write about, there are also several projects doing interesting things based on Bundler. They could probably use publicity too.
89
+
90
+ If you let someone on the core team know you wrote about Bundler, we will add your post to the list of Bundler resources on the Github project wiki.
91
+
92
+
93
+ # Your first bugfix
94
+
95
+ If you’re interested in contributing to Bundler, that’s awesome! We’d love your help.
96
+
97
+ If you have any questions after reading this page, please feel free to contact either [@indirect](http://github.com/indirect) or [@hone](http://github.com/hone). They are both happy to provide help working through your first bugfix or thinking through the problem you’re trying to resolve.
data/README.md CHANGED
@@ -18,9 +18,11 @@ For help with common problems, see [ISSUES](https://github.com/carlhuda/bundler/
18
18
 
19
19
  ### Development
20
20
 
21
- To see what has changed in recent versions of bundler, see the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
21
+ To see what has changed in recent versions of Bundler, see the [CHANGELOG](https://github.com/carlhuda/bundler/blob/master/CHANGELOG.md).
22
22
 
23
- The `master` branch contains our current progress towards version 1.1. Because of that, please submit bugfix pull requests against the `1-0-stable` branch.
23
+ The `master` branch contains our current progress towards version 1.3.
24
+ Please submit pull requests with bugfixes to the stable branch for
25
+ version you would like to fix.
24
26
 
25
27
  ### Upgrading from Bundler 0.8 to 0.9 and above
26
28
 
data/Rakefile CHANGED
@@ -1,23 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.unshift File.expand_path("../lib", __FILE__)
3
- require 'bundler/gem_tasks'
4
3
  require 'rubygems'
4
+ require 'bundler/gem_tasks'
5
5
  require 'shellwords'
6
- require 'benchmark'
7
-
8
- # Benchmark task execution
9
- module Rake
10
- class Task
11
- alias_method :real_invoke, :invoke
12
-
13
- def invoke(*args)
14
- time = Benchmark.measure(@name) do
15
- real_invoke(*args)
16
- end
17
- puts "#{@name} ran for #{time}"
18
- end
19
- end
20
- end
21
6
 
22
7
  task :release => ["man:clean", "man:build"]
23
8
 
@@ -28,31 +13,15 @@ rescue
28
13
  false
29
14
  end
30
15
 
16
+ def sudo_task(task)
17
+ system("sudo -E rake #{task}")
18
+ end
19
+
31
20
  namespace :spec do
32
21
  desc "Ensure spec dependencies are installed"
33
22
  task :deps do
34
- gem_cmd = "#{Gem.ruby} -S gem"
35
- {"rspec" => "~> 2.11", "ronn" => "~> 0.7.3"}.each do |name, version|
36
- sh "#{gem_cmd} list #{name} -i -v '#{version}' || #{gem_cmd} install #{name} -v '#{version}' --no-ri --no-rdoc"
37
- end
38
- end
39
-
40
- namespace :travis do
41
- task :deps do
42
- # Give the travis user a name so that git won't fatally error
43
- system("sudo sed -i 's/1000::/1000:Travis:/g' /etc/passwd")
44
- # Strip secure_path so that RVM paths transmit through sudo -E
45
- system("sudo sed -i '/secure_path/d' /etc/sudoers")
46
- # Install groff for the ronn gem
47
- system("sudo apt-get install groff -y")
48
- # Recompile ruby-head, because the VM version is quite old
49
- if ENV['RUBY_VERSION'] == 'ruby-head'
50
- system("rvm reinstall ruby-head")
51
- system("ruby --version")
52
- end
53
- # Install the other gem deps, etc.
54
- Rake::Task["spec:deps"].invoke
55
- end
23
+ sh "#{Gem.ruby} -S gem list ronn | (grep 'ronn' 1> /dev/null) || #{Gem.ruby} -S gem install ronn --no-ri --no-rdoc"
24
+ sh "#{Gem.ruby} -S gem list rspec | (grep 'rspec (2.' 1> /dev/null) || #{Gem.ruby} -S gem install rspec --no-ri --no-rdoc"
56
25
  end
57
26
  end
58
27
 
@@ -95,7 +64,7 @@ begin
95
64
  namespace :rubygems do
96
65
  # Rubygems specs by version
97
66
  rubyopt = ENV["RUBYOPT"]
98
- %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.24).each do |rg|
67
+ %w(master v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.24 master).each do |rg|
99
68
  desc "Run specs with Rubygems #{rg}"
100
69
  RSpec::Core::RakeTask.new(rg) do |t|
101
70
  t.rspec_opts = %w(-fs --color)
@@ -116,15 +85,12 @@ begin
116
85
 
117
86
  Dir.chdir("tmp/rubygems") do
118
87
  system("git remote update")
119
- if rg == "master"
120
- system("git checkout origin/master")
121
- else
122
- system("git checkout #{rg}")
123
- end
124
- hash = `git rev-parse HEAD`.chomp
88
+ system("git checkout #{rg}")
89
+ system("git pull origin master") if rg == "master"
90
+ hash = `git rev-parse HEAD`.strip
125
91
  end
126
92
 
127
- puts "Checked out rubygems '#{rg}' at #{hash}"
93
+ puts "Running bundler specs against rubygems '#{rg}' at #{hash}"
128
94
  ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems/lib")} #{rubyopt}"
129
95
  puts "RUBYOPT=#{ENV['RUBYOPT']}"
130
96
  end
@@ -149,7 +115,8 @@ begin
149
115
 
150
116
  desc "Run the tests on Travis CI against a rubygem version (using ENV['RGV'])"
151
117
  task :travis do
152
- rg = ENV['RGV'] || 'v1.8.24'
118
+ ENV['TRACE'] = 'true' # print debug info when an exception comes up
119
+ rg = ENV['RGV'] || 'master'
153
120
 
154
121
  puts "\n\e[1;33m[Travis CI] Running bundler specs against rubygems #{rg}\e[m\n\n"
155
122
  specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
@@ -157,25 +124,16 @@ begin
157
124
  Rake::Task["spec:rubygems:#{rg}"].reenable
158
125
 
159
126
  puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
160
- sudos = system("sudo -E rake spec:rubygems:#{rg}:sudo")
161
- # clean up by chowning the newly root-owned tmp directory back to the travis user
162
- system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")
127
+ sudos = sudo_task "spec:rubygems:#{rg}:sudo"
128
+ chown = system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")
163
129
 
164
130
  Rake::Task["spec:rubygems:#{rg}"].reenable
165
131
 
166
132
  puts "\n\e[1;33m[Travis CI] Running bundler real world specs against rubygems #{rg}\e[m\n\n"
167
133
  realworld = safe_task { Rake::Task["spec:rubygems:#{rg}:realworld"].invoke }
168
134
 
169
- {"specs" => specs, "sudo" => sudos, "realworld" => realworld}.each do |name, passed|
170
- if passed
171
- puts "\e[0;32m[Travis CI] #{name} passed\e[m"
172
- else
173
- puts "\e[0;31m[Travis CI] #{name} failed\e[m"
174
- end
175
- end
176
-
177
135
  unless specs && sudos && realworld
178
- fail "Spec run failed, please review the log for more information"
136
+ fail "Bundler tests failed, please review the log for more information"
179
137
  end
180
138
  end
181
139
  end
@@ -8,6 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.name = "bundler"
9
9
  s.version = Bundler::VERSION
10
10
  s.platform = Gem::Platform::RUBY
11
+ s.license = "MIT"
11
12
  s.authors = ["André Arko", "Terence Lee", "Carl Lerche", "Yehuda Katz"]
12
13
  s.email = ["andre@arko.net"]
13
14
  s.homepage = "http://gembundler.com"
@@ -19,7 +20,7 @@ Gem::Specification.new do |s|
19
20
  s.rubyforge_project = "bundler"
20
21
 
21
22
  s.add_development_dependency "ronn"
22
- s.add_development_dependency "rspec", "~> 2.0"
23
+ s.add_development_dependency "rspec", "~> 2.11"
23
24
 
24
25
  # Man files are required because they are ignored by git
25
26
  man_files = Dir.glob("lib/bundler/man/**/*")
@@ -2,7 +2,6 @@ require 'rbconfig'
2
2
  require 'fileutils'
3
3
  require 'pathname'
4
4
  require 'bundler/gem_path_manipulation'
5
- require 'bundler/psyched_yaml'
6
5
  require 'bundler/rubygems_ext'
7
6
  require 'bundler/rubygems_integration'
8
7
  require 'bundler/version'
@@ -14,6 +13,7 @@ module Bundler
14
13
  autoload :Definition, 'bundler/definition'
15
14
  autoload :Dependency, 'bundler/dependency'
16
15
  autoload :DepProxy, 'bundler/dep_proxy'
16
+ autoload :Deprecate, 'bundler/deprecate'
17
17
  autoload :Dsl, 'bundler/dsl'
18
18
  autoload :EndpointSpecification, 'bundler/endpoint_specification'
19
19
  autoload :Environment, 'bundler/environment'
@@ -24,6 +24,7 @@ module Bundler
24
24
  autoload :Graph, 'bundler/graph'
25
25
  autoload :Index, 'bundler/index'
26
26
  autoload :Installer, 'bundler/installer'
27
+ autoload :Injector, 'bundler/injector'
27
28
  autoload :LazySpecification, 'bundler/lazy_specification'
28
29
  autoload :LockfileParser, 'bundler/lockfile_parser'
29
30
  autoload :MatchPlatform, 'bundler/match_platform'
@@ -45,20 +46,20 @@ module Bundler
45
46
  end
46
47
  end
47
48
 
48
- class GemfileNotFound < BundlerError; status_code(10) ; end
49
- class GemNotFound < BundlerError; status_code(7) ; end
50
- class GemfileError < BundlerError; status_code(4) ; end
51
- class InstallError < BundlerError; status_code(5) ; end
52
- class InstallHookError < BundlerError; status_code(6) ; end
53
- class PathError < BundlerError; status_code(13) ; end
54
- class GitError < BundlerError; status_code(11) ; end
55
- class DeprecatedError < BundlerError; status_code(12) ; end
56
- class GemspecError < BundlerError; status_code(14) ; end
57
- class DslError < BundlerError; status_code(15) ; end
58
- class ProductionError < BundlerError; status_code(16) ; end
59
- class InvalidOption < DslError ; end
60
- class HTTPError < BundlerError; status_code(17) ; end
61
- class RubyVersionMismatch < BundlerError; status_code(18) ; end
49
+ class GemfileNotFound < BundlerError; status_code(10) ; end
50
+ class GemNotFound < BundlerError; status_code(7) ; end
51
+ class GemfileError < BundlerError; status_code(4) ; end
52
+ class InstallError < BundlerError; status_code(5) ; end
53
+ class InstallHookError < BundlerError; status_code(6) ; end
54
+ class PathError < BundlerError; status_code(13) ; end
55
+ class GitError < BundlerError; status_code(11) ; end
56
+ class DeprecatedError < BundlerError; status_code(12) ; end
57
+ class GemspecError < BundlerError; status_code(14) ; end
58
+ class DslError < BundlerError; status_code(15) ; end
59
+ class ProductionError < BundlerError; status_code(16) ; end
60
+ class InvalidOption < DslError ; end
61
+ class HTTPError < BundlerError; status_code(17) ; end
62
+ class RubyVersionMismatch < BundlerError; status_code(18) ; end
62
63
 
63
64
 
64
65
  WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!
@@ -99,9 +100,9 @@ module Bundler
99
100
  def bin_path
100
101
  @bin_path ||= begin
101
102
  path = settings[:bin] || "bin"
102
- path = Pathname.new(path).expand_path(root).expand_path
103
+ path = Pathname.new(path).expand_path(root)
103
104
  FileUtils.mkdir_p(path)
104
- path
105
+ Pathname.new(path).expand_path
105
106
  end
106
107
  end
107
108
 
@@ -290,11 +291,12 @@ module Bundler
290
291
  # Eval the gemspec from its parent directory
291
292
  Dir.chdir(path.dirname.to_s) do
292
293
  contents = File.read(path.basename.to_s)
293
-
294
- if contents[0..2] == "---" # YAML header
294
+ if contents =~ /\A---/ # try YAML
295
295
  begin
296
296
  Gem::Specification.from_yaml(contents)
297
- rescue ArgumentError, YamlSyntaxError, Gem::EndOfYAMLException, Gem::Exception
297
+ # Raises ArgumentError if the file is not valid YAML (on syck)
298
+ # Psych raises a Psych::SyntaxError
299
+ rescue YamlSyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
298
300
  eval_gemspec(path, contents)
299
301
  end
300
302
  else
@@ -326,6 +328,7 @@ module Bundler
326
328
 
327
329
  def configure_gem_home_and_path
328
330
  blank_home = ENV['GEM_HOME'].nil? || ENV['GEM_HOME'].empty?
331
+
329
332
  if settings[:disable_shared_gems]
330
333
  ENV['GEM_PATH'] = ''
331
334
  configure_gem_home