diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/gem.rb | 4 | ||||
-rw-r--r-- | lib/bundler/cli/init.rb | 6 | ||||
-rw-r--r-- | lib/bundler/inline.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index cbbaa277..89058ca6 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -10,7 +10,7 @@ module Bundler @thor = thor @name = @gem_name - @target = Pathname.pwd.join(gem_name) + @target = SharedHelpers.pwd.join(gem_name) validate_ext_name if options[:ext] end @@ -134,7 +134,7 @@ module Bundler private def resolve_name(name) - Pathname.pwd.join(name).basename.to_s + SharedHelpers.pwd.join(name).basename.to_s end def ask_and_set(key, header, message) diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb index d6b2e742..fbf17424 100644 --- a/lib/bundler/cli/init.rb +++ b/lib/bundler/cli/init.rb @@ -7,7 +7,7 @@ module Bundler def run if File.exist?("Gemfile") - Bundler.ui.error "Gemfile already exists at #{Dir.pwd}/Gemfile" + Bundler.ui.error "Gemfile already exists at #{SharedHelpers.pwd}/Gemfile" exit 1 end @@ -18,13 +18,13 @@ module Bundler exit 1 end spec = Gem::Specification.load(gemspec) - puts "Writing new Gemfile to #{Dir.pwd}/Gemfile" + puts "Writing new Gemfile to #{SharedHelpers.pwd}/Gemfile" File.open('Gemfile', 'wb') do |file| file << "# Generated from #{gemspec}\n" file << spec.to_gemfile end else - puts "Writing new Gemfile to #{Dir.pwd}/Gemfile" + puts "Writing new Gemfile to #{SharedHelpers.pwd}/Gemfile" FileUtils.cp(File.expand_path('../../templates/Gemfile', __FILE__), 'Gemfile') end end diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb index 99ee98db..81cab198 100644 --- a/lib/bundler/inline.rb +++ b/lib/bundler/inline.rb @@ -31,7 +31,7 @@ def gemfile(install = false, &gemfile) require 'bundler' old_root = Bundler.method(:root) def Bundler.root - Pathname.pwd.expand_path + SharedHelpers.pwd.expand_path end ENV['BUNDLE_GEMFILE'] ||= 'Gemfile' diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb index 89c784e0..6d2cec09 100644 --- a/lib/bundler/source/git/git_proxy.rb +++ b/lib/bundler/source/git/git_proxy.rb @@ -21,7 +21,7 @@ module Bundler class GitCommandError < GitError def initialize(command, path = nil) - msg = "Git error: command `git #{command}` in directory #{Dir.pwd} has failed." + msg = "Git error: command `git #{command}` in directory #{SharedHelpers.pwd} has failed." msg << "\nIf this error persists you could try removing the cache directory '#{path}'" if path && path.exist? super msg end |