summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [Index] Handle when comparing against an index with no gemspecseg-dir-no-gemspecSamuel Giddins2015-10-162-1/+19
|
* Auto merge of #4052 - bundler:excessive-dots, r=segiddinsHomu2015-10-131-6/+6
|\ | | | | | | | | | | | | Remove excessive periods from DSL error messages Apparently, a period is already added when interpolating those messages, some lines below.
| * Remove excessive periods from DSL error messagesexcessive-dotsAgis Anastasopoulos2015-10-121-6/+6
| | | | | | | | | | Apparently, a period is already added when interpolating those messages, some lines below.
* | Auto merge of #4051 - backus:fix/autoloading-nonexistant-constant, r=segiddinsHomu2015-10-121-1/+0
|\ \ | | | | | | | | | | | | | | | Remove `autoload :Specification` This constant isn't defined anymore
| * | Remove `autoload :Specification`John Backus2015-10-111-1/+0
| | | | | | | | | | | | | | | - This class was removed in 2010 but the autoload was neglected 64b8b5 - Closes #4050
* | | Auto merge of #4047 - A5308Y:master, r=indirectHomu2015-10-121-58/+70
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring config.rb My main goal was to show the structure of the run method: 1. Guard Clauses 2. Message to user 3. Save new settings and to separate the message texts from the rest of the logic. So the class and methods are easier to understand read. While doing that I reduced the complexity of the run method by extracting methods. This should improve the Code Climate rating of Bundler::CLI::Config substantially.
| * | Refactoring config.rbAndreas Hellwig2015-10-101-58/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My main goal was to show the structure of the run method: 1. Guard Clauses 2. Message to user 3. Save new settings and to separate the message texts from the rest of the logic. So the class and methods are easier to understand read. While doing that I reduced the complexity of the run method by extracting methods. This should improve the Code Climate rating of Bundler::CLI::Config substantially.
* | | Auto merge of #4049 - bundler:more-env-specs, r=segiddinsHomu2015-10-121-3/+46
|\ \ \ | | | | | | | | | | | | | | | | Add more `Env` tests
| * | | Add more `Env` testsmore-env-specsAgis Anastasopoulos2015-10-111-3/+46
| |/ /
* | | Auto merge of #4039 - Zorbash:typo-gem-helper, r=segiddinsHomu2015-10-101-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | Add missing backtick in Bundler::GemHelper#sh Since across the codebase and documentation shell commands are displayed wrapped in backticks, the command included in the error output of Bundler::GemHelper#sh should also be displayed in the same format.
| * | Add missing backtick in Bundler::GemHelper#shDimitris Zorbas2015-10-061-1/+1
| |/ | | | | | | | | | | Since across the codebase and documentation shell commands are displayed wrapped in backticks, the command included in the error output of Bundler::GemHelper#sh should also be displayed in the same format.
* | Auto merge of #4038 - Sirupsen:test-ext-fix, r=indirectHomu2015-10-071-0/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | clean: add test for not removing git extensions artifacts Unfortunately https://github.com/bundler/bundler/pull/4030 was merged before I had a chance to write a test. I confirmed that the test did not pass before my patch. Any ETA of 1.10.7 which includes #4030? :heart: @indirect @segiddins @andremedeiros @skottler
| * | clean: add test for not removing git extensions artifactsSimon Eskildsen2015-10-061-0/+22
| |/
* | appease rubocopAndre Arko2015-10-061-1/+1
| |
* | update edge cases to only lock if possibleAndre Arko2015-10-062-17/+27
| | | | | | | | this speeds up these tests by a huge amount, since we stop downloading and installing a crapton of gems live over the internet
* | force a rack-cache version that works on ruby 1.9Andre Arko2015-10-061-0/+2
|/
* Auto merge of #4032 - esasse:rubocop-fix, r=indirectHomu2015-10-053-9/+4
|\ | | | | | | | | Fix Style/SpaceInsideStringInterpolation
| * Fix Style/SpaceInsideStringInterpolationErick Sasse2015-10-033-9/+4
| |
* | Auto merge of #4033 - bundler:bundle-env-gemspecs, r=segiddinsHomu2015-10-054-2/+47
|\ \ | | | | | | | | | | | | | | | | | | | | | Also print gemspecs in `bundle env` This change has the nice side-effect that `bundle env` will throw an error for Gemfiles with invalid DSLs. Closes https://trello.com/c/QOX9jyYN.
| * | Also print gemspecs in `bundle env`bundle-env-gemspecsAgis Anastasopoulos2015-10-054-2/+47
| |/ | | | | | | | | | | | | This change has the nice side-effect that `bundle env` will throw an error for Gemfiles with invalid DSLs. Closes https://trello.com/c/QOX9jyYN.
* | Auto merge of #4017 - A5308Y:master, r=segiddinsHomu2015-10-052-39/+50
|\ \ | | | | | | | | | | | | | | | Show ruby engine and version instead of a static string.
| * | There's no flat_map in 1.8.7Andreas Hellwig2015-10-031-2/+2
| | |
| * | Rubocop adjustmentAndreas Hellwig2015-09-301-1/+1
| | | | | | | | | | | | Outdent access modifiers like private
| * | Extract class StandaloneAndreas Hellwig2015-09-302-39/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wanted to fix some minor Rubocop issues and got confused by '#{ruby_engine}/#{ruby_version}'. I managed to confuse two other people working on bundler as well, so I decided to refactor the part around it. I wanted to encapsulate the file creation, so it's (even) more obvious from the context that another ruby file is created. So having an uninterpolated string with interpolation syntax in it isn't so unusual. To be extra sure I added a comment here as Rubocop might lead others to the same spot. I found that Standalone works quite well as its own object. While extracting the class I shortened some expressions and extracted methods that made sense as a unit to me. I ended up with a generate method that only deals with file output. What I think might be controversial: * The tendency to use methods instead of variables for small things like version_dir and bundler_path: I think it's easier to understand because methdos are "read_only", while values of variables might change during code execution. * Array(spec.require_paths) instead of "next if spec.require_paths.nil? # builtin gems". We lose the comment here, but I thought Array was more concise and that the information about the type of gems isn't crucial here. * flat_map { map { ... } } instead of "collecting" in paths My perspective is that paths is the result of a transformation of @specs and that's best expressed by using map. It's also shorter.
* | | Auto merge of #4022 - jasonkarns:rake-clobber, r=segiddinsHomu2015-10-052-0/+10
|\ \ \ | |_|/ |/| | | | | | | | | | | include 'pkg/' in rake/clean's CLOBBER array closes #3676
| * | include 'pkg/' in rake/clean's CLOBBER arrayJason Karns2015-09-302-0/+10
| | | | | | | | | | | | | | | | | | rake's built-in clean and clobber tasks are now included test that 'pkg' is added to CLOBBER filelist
* | | Auto merge of #4027 - esasse:rubocop-fix, r=segiddinsHomu2015-10-042-5/+3
|\ \ \ | | | | | | | | | | | | | | | | Fix Style/TrailingUnderscoreVariable
| * | | Moves TrailingUnderscoreVariable to main rubocop fileErick Sasse2015-10-032-5/+3
|/ / /
* | | Auto merge of #4031 - Zorbash:binstubs-description, r=segiddinsHomu2015-10-041-1/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update binstubs command description for multiple gems The current long description or the `binstubs` command does not provide any hint that it can accept multiple gems as arguments and generate binstubs for all of them. This PR enhances the description using similar phrasing for usage with multiple gem arguments, to the `outdated` command.
| * | | Update binstubs command description for multiple gemsDimitris Zorbas2015-10-031-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The current long description or the `binstubs` command does not provide any hint that it can accept multiple gems as arguments and generate binstubs for all of them. This commit enhances the description using similar phrasing for usage with multiple gem arguments, to the `outdated` command.
* | | Merge pull request #4030 from Sirupsen/dont-clean-extensionsAndré Medeiros2015-10-031-1/+1
|\ \ \ | |/ / |/| | runtime: avoid cleaning up extensions directory
| * | runtime: avoid cleaning up extensions directorySimon Eskildsen2015-10-031-1/+1
|/ /
* | Auto merge of #4020 - simplybusiness:error_on_missing_dependency, r=segiddinsHomu2015-09-303-22/+33
|\ \ | |/ |/| | | | | | | | | | | | | | | Error on missing dependency - partial fix for #3692 (alternative) This pull request implements the strategy suggested in the comments for https://github.com/bundler/bundler/pull/4012, namely to raise an error when dependencies are not present (due to a corrupted `Gemfile.lock`). This also removes the `install_sequentially` option. I wasn't totally sure about the error message formatting.
| * Change error type to LockfileErrorLukas Oberhuber2015-09-292-2/+2
| |
| * remove newline from error message.Lukas Oberhuber2015-09-292-2/+2
| |
| * Fix rubocop offenseLukas Oberhuber2015-09-291-1/+0
| |
| * Merge branch 'error_on_missing_dependency' of ↵Lukas Oberhuber2015-09-290-0/+0
| |\ | | | | | | | | | github.com:simplybusiness/bundler into error_on_missing_dependency
| | * Raises an error if there are missing dependenciesLukas Oberhuber2015-09-283-22/+34
| | | | | | | | | | | | Also forces all installs through the parallel_installer to ensure consistency.
| * | Raises an error if there are missing dependenciesLukas Oberhuber2015-09-293-22/+34
|/ / | | | | | | Also forces all installs through the parallel_installer to ensure consistency.
* | Auto merge of #4016 - agis-:friendly-permission-errors, r=segiddinsHomu2015-09-2811-29/+97
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Friendly filesystem permission errors This introduces `SharedHelpers#filesystem_access` which can wrap any piece of code that makes a modification to the file system (eg. creating a directory). Doing so, results in user-friendly errors instead of the original ones (ie `Errno:EACCES`). In the future we could (and probably should) handle more error types within `#filesystem_access`. Closes #4009. Closes #3988. https://trello.com/c/OicgrmDd/102-improve-permissions-error-messages.
| * | Add test case for friendly permission errorsRobin Böning2015-09-271-0/+18
| | | | | | | | | | | | Cherry-picked from #4019.
| * | Wrap filesystem operations with #filesystem_accessAgis Anastasopoulos2015-09-279-23/+49
| | |
| * | Introduce SharedHelpers#filesystem_accessAgis Anastasopoulos2015-09-271-0/+24
| | |
| * | Make PermissionError more genericAgis Anastasopoulos2015-09-271-6/+6
|/ / | | | | | | | | We also want to display helpful error messages for paths, not just files.
* | Auto merge of #4018 - philnash:removing_duplication, r=segiddinsHomu2015-09-271-36/+23
|\ \ | |/ |/| | | | | | | Removes duplication from bundle clean command I was not feeling inspired, but I do like to delete code! Here's a small simplification as reported [in Code Climate](https://codeclimate.com/github/bundler/bundler/Bundler::Runtime).
| * Removes duplication from bundle clean commandPhil Nash2015-09-261-36/+23
|/
* Auto merge of #3997 - jrafanie:less_strings_index_search, r=segiddinsHomu2015-09-251-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate the "ruby" and "\0" Strings once. Index#search is called many times so this change is worth it. With a single gem in your Gemfile, this change drops the string allocations by nearly 30,000. Script: ```ruby require 'allocation_tracer' ObjectSpace::AllocationTracer.setup(%i{path line type}) result = ObjectSpace::AllocationTracer.trace do begin require 'bundler/inline' rescue LoadError => e $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' raise e end gemfile(true) do source 'https://rubygems.org' gem 'benchmark-ips' end end result.sort_by{|k, v| k}.each{|k, v| puts ([v[0]]+k).join("\t") } ``` **String allocations before**: ``` $ruby benchmark_allocations.rb | grep T_STRING | sort -nr | head -n 10 65461 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb 54 T_STRING 64982 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 163 T_STRING 29986 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 71 T_STRING 22142 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/spec_set.rb 111 T_STRING 20457 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 225 T_STRING 5280 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 87 T_STRING 4848 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/requirement.rb 92 T_STRING 4708 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/lockfile_parser.rb 54 T_STRING 4608 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 282 T_STRING 4561 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 19 T_STRING ``` **String allocations after**: ``` $ ruby benchmark_allocations.rb | grep T_STRING | sort -nr | head -n 10 65479 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb 54 T_STRING 64143 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 163 T_STRING 22142 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/spec_set.rb 111 T_STRING 20407 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 225 T_STRING 5280 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 90 T_STRING 4916 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/requirement.rb 92 T_STRING 4730 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/lockfile_parser.rb 54 T_STRING 4608 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 282 T_STRING 4561 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 22 T_STRING 3334 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/spec_set.rb 134 T_STRING ```
| * Allocate the "ruby" and "\0" Strings once.Joe Rafaniello2015-09-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Index#search is called many times so this change is worth it. With a single gem in your Gemfile, this change drops the string allocations by nearly 30,000. Script: ```ruby require 'allocation_tracer' ObjectSpace::AllocationTracer.setup(%i{path line type}) result = ObjectSpace::AllocationTracer.trace do begin require 'bundler/inline' rescue LoadError => e $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' raise e end gemfile(true) do source 'https://rubygems.org' gem 'benchmark-ips' end end result.sort_by{|k, v| k}.each{|k, v| puts ([v[0]]+k).join("\t") } ``` **String allocations before**: ``` $ruby benchmark_allocations.rb | grep T_STRING | sort -nr | head -n 10 65461 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb 54 T_STRING 64982 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 163 T_STRING 29986 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 71 T_STRING 22142 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/spec_set.rb 111 T_STRING 20457 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 225 T_STRING 5280 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 87 T_STRING 4848 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/requirement.rb 92 T_STRING 4708 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/lockfile_parser.rb 54 T_STRING 4608 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 282 T_STRING 4561 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 19 T_STRING ``` **String allocations after**: ``` $ ruby benchmark_allocations.rb | grep T_STRING | sort -nr | head -n 10 65479 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb 54 T_STRING 64143 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 163 T_STRING 22142 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/spec_set.rb 111 T_STRING 20407 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 225 T_STRING 5280 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 90 T_STRING 4916 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/requirement.rb 92 T_STRING 4730 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/lockfile_parser.rb 54 T_STRING 4608 /Users/joerafaniello/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/version.rb 282 T_STRING 4561 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/index.rb 22 T_STRING 3334 /Users/joerafaniello/.gem/ruby/2.2.3/gems/bundler-1.10.6/lib/bundler/spec_set.rb 134 T_STRING ```
* | Merge pull request #4010 from heliocola/updated-cocAndré Arko2015-09-221-3/+3
|\ \ | | | | | | Integrate new wording from version 1.2.0 of Code of Covenant
| * | Integrate new wording from version 1.2.0 of Code of CovenantHelio Rodrigues2015-09-211-3/+3
|/ / | | | | | | | | Reference: http://contributor-covenant.org/version/1/2/0/code_of_conduct.md