diff options
author | Michael Pitman <michaelp@ibglobalweb.com> | 2017-08-30 13:09:01 +1000 |
---|---|---|
committer | Michael Pitman <michaelp@ibglobalweb.com> | 2017-08-30 13:09:01 +1000 |
commit | 17e9a37c1a79d9c3220a90e36f5f32dc61c69245 (patch) | |
tree | 238d9ffc7673f193c534e89efbc39de5a6a31a24 /lib/bundler | |
parent | 22752b09366973ab9a05343aae7be9fb1bc14109 (diff) | |
download | bundler-17e9a37c1a79d9c3220a90e36f5f32dc61c69245.tar.gz |
Move the path_separator logic into the appropriate RubygemsIntegration classes
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 8 | ||||
-rw-r--r-- | lib/bundler/shared_helpers.rb | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 6f8a7608b0..1185625e03 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -208,6 +208,10 @@ module Bundler Gem.bin_path(gem, bin, ver) end + def path_separator + File::PATH_SEPARATOR + end + def preserve_paths # this is a no-op outside of RubyGems 1.8 yield @@ -788,6 +792,10 @@ module Bundler def install_with_build_args(args) yield end + + def path_separator + Gem.path_separator + end end # RubyGems 2.1.0 diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 7a8dda6e60..a18966b324 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -221,7 +221,7 @@ module Bundler private def validate_bundle_path - path_separator = Gem.respond_to?(:path_separator) ? Gem.path_separator : File::PATH_SEPARATOR + path_separator = Bundler.rubygems.path_separator return unless Bundler.bundle_path.to_s.split(path_separator).size > 1 message = "Your bundle path contains text matching #{path_separator.inspect}, " \ "which is the path separator for your system. Bundler cannot " \ |