| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| | |
Remove excessive periods from DSL error messages
Apparently, a period is already added when interpolating those messages,
some lines below.
|
| |
| |
| |
| |
| | |
Apparently, a period is already added when interpolating those messages,
some lines below.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Remove `autoload :Specification`
This constant isn't defined anymore
|
| | |
| | |
| | |
| | |
| | | |
- This class was removed in 2010 but the autoload was neglected 64b8b5
- Closes #4050
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Add more `Env` tests
|
| |/ / |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/ |
|
| | |
|
| |
| |
| |
| | |
this speeds up these tests by a huge amount, since we stop downloading
and installing a crapton of gems live over the internet
|
|/ |
|
|\
| |
| |
| |
| | |
Fix Style/SpaceInsideStringInterpolation
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Show ruby engine and version
instead of a static string.
|
| | | |
|
| | |
| | |
| | |
| | | |
Outdent access modifiers like private
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | | |
include 'pkg/' in rake/clean's CLOBBER array
closes #3676
|
| | |
| | |
| | |
| | |
| | |
| | | |
rake's built-in clean and clobber tasks are now included
test that 'pkg' is added to CLOBBER filelist
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix Style/TrailingUnderscoreVariable
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
runtime: avoid cleaning up extensions directory
|
|/ / |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| |\
| | |
| | |
| | | |
github.com:simplybusiness/bundler into error_on_missing_dependency
|
| | |
| | |
| | |
| | | |
Also forces all installs through the parallel_installer to ensure consistency.
|
|/ /
| |
| |
| | |
Also forces all installs through the parallel_installer to ensure consistency.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Cherry-picked from #4019.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| | |
We also want to display helpful error messages for paths,
not just files.
|
|\ \
| |/
|/|
| |
| |
| | |
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).
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
```
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
```
|
|\ \
| | |
| | | |
Integrate new wording from version 1.2.0 of Code of Covenant
|
|/ /
| |
| |
| |
| | |
Reference:
http://contributor-covenant.org/version/1/2/0/code_of_conduct.md
|