lib/bundler/source.rb in bundler-1.0.11 vs lib/bundler/source.rb in bundler-1.0.12
- old
+ new
@@ -321,11 +321,11 @@
end
alias == eql?
def name
- File.basename(@path.to_s)
+ File.basename(path.expand_path(Bundler.root).to_s)
end
def load_spec_files
index = Index.new
@@ -348,12 +348,13 @@
s.version = Gem::Version.new(@version)
s.platform = Gem::Platform::RUBY
s.summary = "Fake gemspec for #{@name}"
s.relative_loaded_from = "#{@name}.gemspec"
if expanded_path.join("bin").exist?
- binaries = expanded_path.join("bin").children.map{|c| c.basename.to_s }
- s.executables = binaries
+ binaries = expanded_path.join("bin").children
+ binaries.reject!{|p| File.directory?(p) }
+ s.executables = binaries.map{|c| c.basename.to_s }
end
end
end
else
raise PathError, "The path `#{expanded_path}` does not exist."
@@ -557,12 +558,11 @@
def git(command)
if allow_git_ops?
out = %x{git #{command}}
if $?.exitstatus != 0
- msg = "Git error: " +
- "command `git #{command}` in directory #{Dir.pwd} has failed.\n" +
- "Cannot complete bundling."
+ msg = "Git error: command `git #{command}` in directory #{Dir.pwd} has failed."
+ msg << "\nIf this error persists you could try removing the cache directory '#{cache_path}'" if cached?
raise GitError, msg
end
out
else
raise GitError, "Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, " \