lib/bundler/source.rb in bundler-1.1.pre.2 vs lib/bundler/source.rb in bundler-1.1.pre.3

- old
+ new

@@ -76,10 +76,22 @@ s = Bundler.rubygems.spec_from_gem(path) spec.__swap__(s) end end + def outdated(spec) + installed_spec = installed_specs[spec.name] + installed_spec = installed_spec.first + + if installed_spec && spec.version == installed_spec.version + Bundler.ui.debug "Up to date: #{spec.name} (#{installed_spec.version}) " + return + end + + Bundler.ui.info "#{spec.name} (#{spec.version} > #{installed_spec.version}) " + end + def install(spec) path = cached_gem(spec) if installed_specs[spec].any? Bundler.ui.info "Using #{spec.name} (#{spec.version}) " @@ -102,11 +114,11 @@ if Bundler.requires_sudo? sudo "mkdir -p #{Bundler.rubygems.gem_dir}/gems #{Bundler.rubygems.gem_dir}/specifications" sudo "cp -R #{Bundler.tmp}/gems/#{spec.full_name} #{Bundler.rubygems.gem_dir}/gems/" sudo "cp -R #{Bundler.tmp}/specifications/#{spec.full_name}.gemspec #{Bundler.rubygems.gem_dir}/specifications/" spec.executables.each do |exe| - sudo "mkdir -p #{Bundler.rubygems.bindir}" + sudo "mkdir -p #{Bundler.rubygems.gem_bindir}" sudo "cp -R #{Bundler.tmp}/bin/#{exe} #{Bundler.rubygems.gem_bindir}" end end spec.loaded_from = "#{Bundler.rubygems.gem_dir}/specifications/#{spec.full_name}.gemspec" @@ -177,10 +189,11 @@ bundler = Gem::Specification.new do |s| s.name = 'bundler' s.version = VERSION s.platform = Gem::Platform::RUBY s.source = self + s.authors = ["bundler team"] s.loaded_from = File.expand_path("..", __FILE__) end idx << bundler end idx @@ -340,9 +353,10 @@ s.source = self s.version = Gem::Version.new(@version) s.platform = Gem::Platform::RUBY s.summary = "Fake gemspec for #{@name}" s.relative_loaded_from = "#{@name}.gemspec" + s.authors = ["no one"] if expanded_path.join("bin").exist? binaries = expanded_path.join("bin").children binaries.reject!{|p| File.directory?(p) } s.executables = binaries.map{|c| c.basename.to_s } end