lib/rubygems/dependent.rb in gem-dependent-0.1.5 vs lib/rubygems/dependent.rb in gem-dependent-0.1.6

- old
+ new

@@ -17,17 +17,17 @@ if options[:fetch_limit] specs_and_sources = specs_and_sources.first(options[:fetch_limit]) end if options[:progress] - puts "Downloading specs for #{specs_and_sources.size} gems" + $stderr.puts "Downloading specs for #{specs_and_sources.size} gems" end gems_and_dependencies = fetch_all_dependencies(specs_and_sources, options) do print_dot if options[:progress] end - print "\n" if options[:progress] + $stderr.print "\n" if options[:progress] select_dependent(gems_and_dependencies, gem) end private @@ -59,22 +59,22 @@ [name, matching_dependencies] end.compact end def self.print_dot - print '.' - $stdout.flush if rand(20) == 0 # make progress visible + $stderr.print '.' + $stderr.flush if rand(20) == 0 # make progress visible end def self.all_specs_and_sources fetcher = Gem::SpecFetcher.fetcher all = true matching_platform = false prerelease = false matcher = Gem::Dependency.new(//, Gem::Requirement.default) # any name, any version specs_and_sources = fetcher.find_matching matcher, all, matching_platform, prerelease - uniq_by(specs_and_sources){|a| a.first.first } + uniq_by(specs_and_sources){|a| a.first.first } end # get unique elements from an array (last found is used) # http://drawohara.com/post/146659159/ruby-enumerable-uniq-by def self.uniq_by(array, &block) @@ -102,6 +102,6 @@ Gem.sources = old end end end end -end \ No newline at end of file +end