summaryrefslogtreecommitdiff
path: root/spec/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Fixed typoSHIBATA Hiroshi2018-11-011-1/+1
|
* Backport from ruby coreSHIBATA Hiroshi2018-11-013-7/+8
|
* Added ruby_core filtering condition with some examples.SHIBATA Hiroshi2018-10-202-8/+8
| | | | The ruby core repository couldn't invoke its examples.
* Use helper method instead of hard-code path.SHIBATA Hiroshi2018-10-161-2/+2
|
* Merge #6706Bundlerbot2018-09-241-8/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6706: Clean up some specs r=colby-swandale a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that some specs could be more readable and clean. ### What was your diagnosis of the problem? My diagnosis was that some stuff could be more explicit, some TODO's could be removed because they're already fixed, and there should not be typos. ### What is your fix for the problem, implemented in this PR? My fix is to make the obvious changes to fix what I diagnosed. ### Why did you choose this fix out of the possible options? I chose this fix because it makes the specs clear, in my opinion. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
| * Fix typoclean_up_some_specsDavid Rodríguez2018-09-231-1/+1
| |
| * Fix TODO noteDavid Rodríguez2018-09-231-3/+0
| |
| * Remove unnecessary requireDavid Rodríguez2018-09-231-1/+1
| |
| * Remove unnecessary commentDavid Rodríguez2018-09-231-1/+0
| | | | | | | | | | There's nothing particular about this spec that needs a comment over the other specs in this same context.
| * Move require to a better place for readabilityDavid Rodríguez2018-09-231-2/+1
| | | | | | | | And because the other specs don't need it.
* | Friendlier solution for a problematic specfix_local_spec_failureDavid Rodríguez2018-09-171-1/+5
| |
* | Move common stuff to inside letDavid Rodríguez2018-09-171-3/+3
| |
* | Modify env only in subprocessDavid Rodríguez2018-09-171-3/+1
| |
* | Improve specDavid Rodríguez2018-09-171-8/+1
|/ | | | There's an option to explicitly not pass lib to the LOAD_PATH.
* Fix typos detected by github.com/client9/misspellKazuhiro Sera2018-08-091-1/+1
|
* Auto merge of #6502 - ojab:1-16-stable, r=indirectThe Bundler Bot2018-07-101-0/+44
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use realpath in clean_load_path see #6465, basically we're not rejecting `bundler_lib` because we have symlink there and real path in `$LOAD_PATH` ``` $ irb 2.5.1 :001 > require 'bundler/setup' # what happens next will shock you From: /real_path/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.2/lib/bundler/shared_helpers.rb @ line 339 Bundler::SharedHelpers#clean_load_path: 330: def clean_load_path 331: # handle 1.9 where system gems are always on the load path 332: return unless defined?(::Gem) 333: 334: bundler_lib = bundler_ruby_lib 335: 336: loaded_gem_paths = Bundler.rubygems.loaded_gem_paths 337: 338: binding.pry => 339: $LOAD_PATH.reject! do |p| 340: path = File.expand_path(p) 341: path = File.realpath(path) if File.exist?(path) 342: next if path.start_with?(bundler_lib) 343: loaded_gem_paths.delete(p) 344: end 345: $LOAD_PATH.uniq! 346: end [1] pry(#<Bundler::Runtime>)> bundler_lib => "/real_path/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.2/lib" [2] pry(#<Bundler::Runtime>)> loaded_gem_paths => ["/symlinked_path/.rvm/gems/ruby-2.5.1@global/gems/did_you_mean-1.2.0/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.2/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/byebug-10.0.2/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/extensions/x86_64-linux/2.5.0/byebug-10.0.2", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/coderay-1.1.2/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/method_source-0.9.0/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/pry-0.11.3/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/pry-byebug-3.6.0/lib", "/real_path/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/fileutils-1.0.2/lib", "/real_path/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/psych-3.0.2/lib", "/real_path/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0/psych-3.0.2"] ```
| * Use realpath in clean_load_pathojab2018-05-031-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | what happens next will shock you: ``` From: /real_path/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.2/lib/bundler/shared_helpers.rb @ line 339 Bundler::SharedHelpers#clean_load_path: 330: def clean_load_path 331: # handle 1.9 where system gems are always on the load path 332: return unless defined?(::Gem) 333: 334: bundler_lib = bundler_ruby_lib 335: 336: loaded_gem_paths = Bundler.rubygems.loaded_gem_paths 337: 338: binding.pry => 339: $LOAD_PATH.reject! do |p| 340: path = File.expand_path(p) 341: path = File.realpath(path) if File.exist?(path) 342: next if path.start_with?(bundler_lib) 343: loaded_gem_paths.delete(p) 344: end 345: $LOAD_PATH.uniq! 346: end [1] pry(#<Bundler::Runtime>)> bundler_lib => "/real_path/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.2/lib" [2] pry(#<Bundler::Runtime>)> loaded_gem_paths => ["/symlinked_path/.rvm/gems/ruby-2.5.1@global/gems/did_you_mean-1.2.0/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.2/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/byebug-10.0.2/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/extensions/x86_64-linux/2.5.0/byebug-10.0.2", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/coderay-1.1.2/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/method_source-0.9.0/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/pry-0.11.3/lib", "/symlinked_path/.rvm/gems/ruby-2.5.1/gems/pry-byebug-3.6.0/lib", "/real_path/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/fileutils-1.0.2/lib", "/real_path/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/psych-3.0.2/lib", "/real_path/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0/psych-3.0.2"] ``` basically we're not rejecting `bundler_lib` because symlink there and real path in $LOAD_PATH Fixes #6465
* | Move normalize methods to helper methods from rspec example files.SHIBATA Hiroshi2018-06-151-2/+1
| |
* | Modify localhost variable when defining URI::File. It will be provided from ↵SHIBATA Hiroshi2018-06-151-0/+1
|/ | | | Ruby 2.6.
* [Definition] Gracefully handle when the lockfile is missing specs needed to ↵Samuel Giddins2018-02-031-0/+32
| | | | run on the current platform
* Merge tag 'v1.16.1'Samuel Giddins2017-12-274-26/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Version 1.16.1 # gpg: Signature made Fri Dec 22 01:46:37 2017 +07 # gpg: using ? key C3DA1D6CEFC720FA # gpg: Can't check signature: unknown pubkey algorithm # Conflicts: # lib/bundler/version.rb # spec/commands/exec_spec.rb # spec/realworld/double_check_spec.rb # spec/runtime/with_clean_env_spec.rb # spec/spec_helper.rb
| * Added workarounds for Travis specific issues.SHIBATA Hiroshi2017-12-212-5/+3
| |
| * Try to get specs passing on old RubyGemsSamuel Giddins2017-12-214-22/+35
| |
| * Auto merge of #6201 - jetthoughts:binstub-use-gemfile-from-env, r=indirectThe Bundler Bot2017-12-111-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup custom Gemfile path before loading bundler for binstubs ### What was the end-user problem that led to this PR? While you have several gemfiles: `Gemfile` and `Gemfile.tools`. and generates binstubs for gems from second gemfile: `BUNDLE_GEMFILE=Gemfile.tools bundle binstubs rubocop` when you invoke those bin `bin/rubocop` then you see error like: ```bash /usr/local/opt/rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/rubygems_integration.rb:458:in `block in replace_bin_path': can't find executable rubocop for gem rubocop. rubocop is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception) from /usr/local/opt/rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/rubygems_integration.rb:489:in `block in replace_bin_path' from bin/rubocop:21:in `<main>' ``` ### What was your diagnosis of the problem? When you have generated `bin/bundler` by rails or by `bundler` it has setup of `BUNDLE_GEMFILE` by default as `Gemfile` or by gemfile which has been setup on `bundle binstub bundler`. So your binstub for rubocop could not change it. ### What is your fix for the problem, implemented in this PR? I propose to use`BUNDLE_GEMFILE` from gem's binstub over bundler's binstub version ### Why did you choose this fix out of the possible options? This was default behavior before #5878 introduced. Just added some fix to related PR.
| * Auto merge of #6188 - bundler:indirect/fix-6072, r=indirectThe Bundler Bot2017-12-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | Stop overriding specs during double-checks This fixes my test-case reproduction of #6072. I’m pretty sure it’s because the double-check was overriding the locally installed index specs with specs fetched from the RubyGems API, causing Bundler to conclude that the gems aren’t installed, even though they are. @deivid-rodriguez @y-yagi can you verify that this patch fixes the issues with `inline` that you were seeing?
| * Auto merge of #6007 - hsbt:use-halper-methods-for-path, r=segiddinsThe Bundler Bot2017-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Use helper methods for relative path references in the specs Ruby core needs to change `Spec::Path.root` and gemspec, bin, spec directories structure. 1. I changed spec directory from `spec` to `spec/bundler` because ruby core has rubyspec files under the `spec/rubyspec`. 2. I changed gemspec location to `bundler.gemspec` to `lib/bundler.gemspec`. ref. https://bugs.ruby-lang.org/issues/12733#note-15 This pull request make we can modify root, gemspec path to flexible locations. After merging this pull request, I will add directory structure of ruby core repository to only `spec/support/path.rb`
| * Fixed failing examples with Ruby 2.5.SHIBATA Hiroshi2017-12-111-2/+2
| | | | | | | | | | It's introduced by URI::Generic channges. https://github.com/ruby/ruby/commit/ed48bfa5e8770a345424abd7f24f94ea9bbf5973
* | Auto merge of #6201 - jetthoughts:binstub-use-gemfile-from-env, r=indirectThe Bundler Bot2017-12-051-0/+29
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup custom Gemfile path before loading bundler for binstubs ### What was the end-user problem that led to this PR? While you have several gemfiles: `Gemfile` and `Gemfile.tools`. and generates binstubs for gems from second gemfile: `BUNDLE_GEMFILE=Gemfile.tools bundle binstubs rubocop` when you invoke those bin `bin/rubocop` then you see error like: ```bash /usr/local/opt/rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/rubygems_integration.rb:458:in `block in replace_bin_path': can't find executable rubocop for gem rubocop. rubocop is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception) from /usr/local/opt/rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/lib/bundler/rubygems_integration.rb:489:in `block in replace_bin_path' from bin/rubocop:21:in `<main>' ``` ### What was your diagnosis of the problem? When you have generated `bin/bundler` by rails or by `bundler` it has setup of `BUNDLE_GEMFILE` by default as `Gemfile` or by gemfile which has been setup on `bundle binstub bundler`. So your binstub for rubocop could not change it. ### What is your fix for the problem, implemented in this PR? I propose to use`BUNDLE_GEMFILE` from gem's binstub over bundler's binstub version ### Why did you choose this fix out of the possible options? This was default behavior before #5878 introduced. Just added some fix to related PR.
| * | Setup Gemfile path before loading bundler in order to use original GemfilePaul Nikitochkin2017-12-021-0/+29
| | |
* | | remove duplicate gem creationAndre Arko2017-11-261-4/+0
|/ /
* | improve rubocop_todo.ymlKeiji Yoshimi2017-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Style/EmptyLinesAroundExceptionHandlingKeywords - Style/SpaceAroundOperators - Style/SpaceInsideBlockBraces - Lint/DuplicateMethods - Lint/Void - Style/IfUnlessModifier - Style/MixinGrouping - Style/NestedParenthesizedCalls - Style/OrAssignment - Style/RedundantParentheses - Style/TernaryParentheses
* | Remove `File.expand_path` when it given Pathname objectSHIBATA Hiroshi2017-09-071-1/+1
| |
* | Removed Spec::Path, Because it's included on rspec contexts of bundlerSHIBATA Hiroshi2017-09-071-1/+1
| |
* | Use Pathname#join instead of string interpolationSHIBATA Hiroshi2017-09-071-1/+1
| |
* | To use helper methods for relative path references.SHIBATA Hiroshi2017-09-061-1/+1
|/ | | | | | | | Ruby core needs to change `Spec::Path.root` and gemspec, bin, spec directories structure. * Added Spec::Path.bin, gemspec, spec methods. * Replace Spec::Path methods from relative references like "../../..".
* fix tests/functionality breaking with new deprecation errorseg-deprecations-hard-error-in-2Colby Swandale2017-08-201-6/+8
|
* Always bundle exec to Gem.ruby in the specsSamuel Giddins2017-08-171-9/+9
|
* Auto merge of #5860 - bundler:seg-validate-settings, r=segiddinsThe Bundler Bot2017-07-254-22/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the notion of settings validation & default install to ./.bundle Thanks so much for the contribution! To make reviewing this PR a bit easier, please fill out answers to the following questions. ### What was the end-user problem that led to this PR? The problem was... ### What was your diagnosis of the problem? My diagnosis was... ### What is your fix for the problem, implemented in this PR? My fix... ### Why did you choose this fix out of the possible options? I chose this fix because...
| * Untangle the system gem path and the default bundle path in the specsSamuel Giddins2017-07-244-22/+17
| |
* | Handle when Bundler is only available on the load pathSamuel Giddins2017-07-211-3/+3
|/
* Use the create_file helper in the specs for its mkpathSamuel Giddins2017-07-191-3/+1
|
* Remove several CLI flags that need to be set via config in Bundler 2Samuel Giddins2017-07-191-13/+28
|
* Set forgotten command line options via config in 2.0Samuel Giddins2017-07-192-7/+7
|
* [Settings] Stop remembering CLI options in Bundler 2Samuel Giddins2017-07-191-3/+3
|
* Auto merge of #5838 - bundler:seg-make-gem-private, r=indirectThe Bundler Bot2017-07-081-1/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make Bundler.setup not make Kernel#gem public in Bundler 2 ### What was the end-user problem that led to this PR? The problem was Bundler 1 accidentally made `Kernel#gem` public, even though RubyGems declares it as private. Oops. We tried to make it private in 1.13, it broke stuff, so we added in a hack to keep it public. ### What was your diagnosis of the problem? My diagnosis was we could delete that hack in 2.0. ### What is your fix for the problem, implemented in this PR? My fix implements a feature flag that skips making `Kernel#gem` public, and adds regression tests for `gem` or `require` accidentally being made public.
| * Make Bundler.setup not make Kernel#gem public in Bundler 2seg-make-gem-privateSamuel Giddins2017-07-071-1/+35
| |
* | Auto merge of #5837 - bundler:seg-default-gem-activation-spec-hack, r=segiddinsThe Bundler Bot2017-07-081-10/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve logging in default gem activation specs ### What was the end-user problem that led to this PR? The problem was those specs were failing on CI and I couldn't figure out why. ### What was your diagnosis of the problem? My diagnosis was we needed the hack loaded before all bundler code. ### What is your fix for the problem, implemented in this PR? My fix gets the hack loaded in via an `-r` switch set in `RUBYOPT` ### Why did you choose this fix out of the possible options? I chose this fix because it will make spec failures more informative.
| * | Improve logging in default gem activation specsseg-default-gem-activation-spec-hackSamuel Giddins2017-07-071-10/+14
| |/
* | [Inline] Work when BUNDLE_BIN is setseg-inline-bundle-binSamuel Giddins2017-07-071-0/+15
|/
* Update specs for the specific platform being added to the lockfileSamuel Giddins2017-07-051-2/+2
| | | | Also ensure the resolver processes specs in the correct order for error messages