Skip to content

Commit

Permalink
Fixed bug in gem --search and --list output (reported by Gavin). Fixe…
Browse files Browse the repository at this point in the history
…d small bug in --alien, but this needs to be explored more deeply.

Updated Release info.


git-svn-id: http://rubygems.rubyforge.org/svn/trunk@288 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information
chadfowler committed Jun 8, 2004
1 parent 67ceb86 commit 07ae4fd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
16 changes: 16 additions & 0 deletions rubygems/Releases
@@ -1,3 +1,19 @@
Release 0.6.0: Jun 8, 2004
* Collapse output of --search and --list (and gem_server) operations so
that each gem is listed only once, with each of its versions listed
on the same line.

* bin/gem: new --upgrade-all option allows one to upgrade every
installed gem

* new #required_ruby_version attribute added to gem specification for
specifying a dependency on which version of ruby the gem needs.
Format it accepts is the same as the Gem::Version::Requirement
format:
spec.required_ruby_version = "> 1.8.0"

* --install-stub defaults to true, so library stubs are created

Release 0.5.0: Jun 6, 2004
* Jim added the ability to specify version constraints to avoid API incompatibilities. This has been the subject of much debate for the past couple of months, with many ideas and code contributed by Eivind Eklund and Mauricio Fernandez. The following set of assertions shows how it works:
assert_inadequate("1.3", ">* 1.4")
Expand Down
9 changes: 9 additions & 0 deletions rubygems/bin/gem
Expand Up @@ -768,6 +768,15 @@ class RubyGemsFacade
end

def _display_gem(gem_name, list_of_matching)
seen_versions = []
list_of_matching.delete_if {|item|
if(seen_versions.member?(item.version)) then
true
else
seen_versions << item.version
false
end
}
print gem_name, " ("
print(list_of_matching.map{|gem| gem.version.to_s}.join(", "))
puts ")"
Expand Down
2 changes: 1 addition & 1 deletion rubygems/lib/rubygems.rb
Expand Up @@ -66,7 +66,7 @@ module Gem

class Exception < ::Exception; end

RubyGemsVersion = "0.5"
RubyGemsVersion = "0.6"
DIRECTORIES = ['cache', 'doc', 'gems', 'specifications']

@@cache = nil
Expand Down
2 changes: 1 addition & 1 deletion rubygems/lib/rubygems/validator.rb
Expand Up @@ -27,8 +27,8 @@ def verify_gem_file(gem_path)
begin
File.open(gem_path, 'rb') do |file|
gem_data = file.read
verify_gem(gem_data)
end
verify_gem(gem_data)
rescue Errno::ENOENT
raise Gem::VerificationError.new("Missing gem file #{gem_path}")
end
Expand Down

0 comments on commit 07ae4fd

Please sign in to comment.