rubygems-update 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rubygems-update might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/History.txt +9 -1
- data/lib/rubygems.rb +6 -6
- data/lib/rubygems/gem_path_searcher.rb +7 -22
- data/lib/rubygems/version.rb +1 -1
- data/test/test_gem_version.rb +8 -6
- metadata +5 -5
- metadata.gz.sig +0 -0
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/History.txt
    CHANGED
    
    | @@ -1,4 +1,12 @@ | |
| 1 | 
            -
            === 1.4. | 
| 1 | 
            +
            === 1.4.2 / 2011-01-06
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Bug fixes:
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * Gem::Versions: "1.b1" != "1.b.1", but "1.b1" eql? "1.b.1". Fixes gem indexing.
         | 
| 6 | 
            +
            * Fixed Gem.find_files.
         | 
| 7 | 
            +
            * Removed otherwise unused #find_all_dot_rb. Only 6 days old and hella buggy.
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            === 1.4.1 / 2010-12-31
         | 
| 2 10 |  | 
| 3 11 | 
             
            Since apparently nobody reads my emails, blog posts or the README:
         | 
| 4 12 |  | 
    
        data/lib/rubygems.rb
    CHANGED
    
    | @@ -100,7 +100,7 @@ require 'thread' # HACK: remove me for 1.5 - this is here just for rails | |
| 100 100 | 
             
            # -The RubyGems Team
         | 
| 101 101 |  | 
| 102 102 | 
             
            module Gem
         | 
| 103 | 
            -
              RubyGemsVersion = VERSION = '1.4. | 
| 103 | 
            +
              RubyGemsVersion = VERSION = '1.4.2'
         | 
| 104 104 |  | 
| 105 105 | 
             
              ##
         | 
| 106 106 | 
             
              # Raised when RubyGems is unable to load or activate a gem.  Contains the
         | 
| @@ -468,7 +468,7 @@ module Gem | |
| 468 468 | 
             
              end
         | 
| 469 469 |  | 
| 470 470 | 
             
              ##
         | 
| 471 | 
            -
              # Returns a list of paths matching + | 
| 471 | 
            +
              # Returns a list of paths matching +glob+ that can be used by a gem to pick
         | 
| 472 472 | 
             
              # up features from other gems.  For example:
         | 
| 473 473 | 
             
              #
         | 
| 474 474 | 
             
              #   Gem.find_files('rdoc/discover').each do |path| load path end
         | 
| @@ -479,12 +479,12 @@ module Gem | |
| 479 479 | 
             
              # Note that find_files will return all files even if they are from different
         | 
| 480 480 | 
             
              # versions of the same gem.
         | 
| 481 481 |  | 
| 482 | 
            -
              def self.find_files( | 
| 482 | 
            +
              def self.find_files(glob, check_load_path=true)
         | 
| 483 483 | 
             
                files = []
         | 
| 484 484 |  | 
| 485 485 | 
             
                if check_load_path
         | 
| 486 486 | 
             
                  $LOAD_PATH.each do |load_path|
         | 
| 487 | 
            -
                    globbed = Dir["#{File.expand_path  | 
| 487 | 
            +
                    globbed = Dir["#{File.expand_path glob, load_path}#{Gem.suffix_pattern}"]
         | 
| 488 488 |  | 
| 489 489 | 
             
                    globbed.each do |load_path_file|
         | 
| 490 490 | 
             
                      files << load_path_file if File.file?(load_path_file.untaint)
         | 
| @@ -492,10 +492,10 @@ module Gem | |
| 492 492 | 
             
                  end
         | 
| 493 493 | 
             
                end
         | 
| 494 494 |  | 
| 495 | 
            -
                specs = searcher. | 
| 495 | 
            +
                specs = searcher.find_all glob
         | 
| 496 496 |  | 
| 497 497 | 
             
                specs.each do |spec|
         | 
| 498 | 
            -
                  files.concat searcher.matching_files(spec,  | 
| 498 | 
            +
                  files.concat searcher.matching_files(spec, glob)
         | 
| 499 499 | 
             
                end
         | 
| 500 500 |  | 
| 501 501 | 
             
                # $LOAD_PATH might contain duplicate entries or reference
         | 
| @@ -22,7 +22,7 @@ class Gem::GemPathSearcher | |
| 22 22 | 
             
              end
         | 
| 23 23 |  | 
| 24 24 | 
             
              ##
         | 
| 25 | 
            -
              # Look in all the installed gems until a matching  | 
| 25 | 
            +
              # Look in all the installed gems until a matching +glob+ is found.
         | 
| 26 26 | 
             
              # Return the _gemspec_ of the gem where it was found.  If no match
         | 
| 27 27 | 
             
              # is found, return nil.
         | 
| 28 28 | 
             
              #
         | 
| @@ -41,33 +41,18 @@ class Gem::GemPathSearcher | |
| 41 41 | 
             
              # This method doesn't care about the full filename that matches;
         | 
| 42 42 | 
             
              # only that there is a match.
         | 
| 43 43 |  | 
| 44 | 
            -
              def find( | 
| 45 | 
            -
                @gemspecs.find do |spec| | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
              ##
         | 
| 49 | 
            -
              # Works like #find, but finds all gemspecs matching +path+.
         | 
| 50 | 
            -
             | 
| 51 | 
            -
              def find_all(path)
         | 
| 52 | 
            -
                @gemspecs.select do |spec|
         | 
| 53 | 
            -
                  matching_file? spec, path
         | 
| 44 | 
            +
              def find(glob)
         | 
| 45 | 
            +
                @gemspecs.find do |spec|
         | 
| 46 | 
            +
                  matching_file? spec, glob
         | 
| 54 47 | 
             
                end
         | 
| 55 48 | 
             
              end
         | 
| 56 49 |  | 
| 57 50 | 
             
              ##
         | 
| 58 | 
            -
              #  | 
| 59 | 
            -
              # Only files in the gemspec's require paths are considered.
         | 
| 60 | 
            -
             | 
| 61 | 
            -
              def find_all_dot_rb(path)
         | 
| 62 | 
            -
                rb_path = "#{path}.rb"
         | 
| 51 | 
            +
              # Works like #find, but finds all gemspecs matching +glob+.
         | 
| 63 52 |  | 
| 53 | 
            +
              def find_all(glob)
         | 
| 64 54 | 
             
                @gemspecs.select do |spec|
         | 
| 65 | 
            -
                   | 
| 66 | 
            -
                  next false unless rp
         | 
| 67 | 
            -
             | 
| 68 | 
            -
                  rp.find do |lib|
         | 
| 69 | 
            -
                    spec.files.include? File.join(lib, rb_path)
         | 
| 70 | 
            -
                  end
         | 
| 55 | 
            +
                  matching_file? spec, glob
         | 
| 71 56 | 
             
                end
         | 
| 72 57 | 
             
              end
         | 
| 73 58 |  | 
    
        data/lib/rubygems/version.rb
    CHANGED
    
    | @@ -211,7 +211,7 @@ class Gem::Version | |
| 211 211 | 
             
              # same precision. Version "1.0" is not the same as version "1".
         | 
| 212 212 |  | 
| 213 213 | 
             
              def eql? other
         | 
| 214 | 
            -
                self.class === other and  | 
| 214 | 
            +
                self.class === other and @version == other.version
         | 
| 215 215 | 
             
              end
         | 
| 216 216 |  | 
| 217 217 | 
             
              def hash # :nodoc:
         | 
    
        data/test/test_gem_version.rb
    CHANGED
    
    | @@ -36,14 +36,16 @@ class TestGemVersion < RubyGemTestCase | |
| 36 36 | 
             
              end
         | 
| 37 37 |  | 
| 38 38 | 
             
              def test_eql_eh
         | 
| 39 | 
            -
                assert_version_eql "1.2", | 
| 40 | 
            -
                refute_version_eql "1.2", | 
| 41 | 
            -
                refute_version_eql "1.2", | 
| 39 | 
            +
                assert_version_eql "1.2",    "1.2"
         | 
| 40 | 
            +
                refute_version_eql "1.2",    "1.2.0"
         | 
| 41 | 
            +
                refute_version_eql "1.2",    "1.3"
         | 
| 42 | 
            +
                refute_version_eql "1.2.b1", "1.2.b.1"
         | 
| 42 43 | 
             
              end
         | 
| 43 44 |  | 
| 44 | 
            -
              def  | 
| 45 | 
            -
                assert_version_equal "1.2", | 
| 46 | 
            -
                refute_version_equal "1.2", | 
| 45 | 
            +
              def test_equals2
         | 
| 46 | 
            +
                assert_version_equal "1.2",    "1.2"
         | 
| 47 | 
            +
                refute_version_equal "1.2",    "1.3"
         | 
| 48 | 
            +
                assert_version_equal "1.2.b1", "1.2.b.1"
         | 
| 47 49 | 
             
              end
         | 
| 48 50 |  | 
| 49 51 | 
             
              # REVISIT: consider removing as too impl-bound
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: rubygems-update
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 3
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 1
         | 
| 8 8 | 
             
              - 4
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 1.4. | 
| 9 | 
            +
              - 2
         | 
| 10 | 
            +
              version: 1.4.2
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Jim Weirich
         | 
| @@ -38,7 +38,7 @@ cert_chain: | |
| 38 38 | 
             
              x52qPcexcYZR7w==
         | 
| 39 39 | 
             
              -----END CERTIFICATE-----
         | 
| 40 40 |  | 
| 41 | 
            -
            date:  | 
| 41 | 
            +
            date: 2011-01-06 00:00:00 -08:00
         | 
| 42 42 | 
             
            default_executable: 
         | 
| 43 43 | 
             
            dependencies: []
         | 
| 44 44 |  | 
| @@ -289,7 +289,7 @@ post_install_message: | |
| 289 289 | 
             
            rdoc_options: 
         | 
| 290 290 | 
             
            - --main
         | 
| 291 291 | 
             
            - README.rdoc
         | 
| 292 | 
            -
            - --title=RubyGems 1.4. | 
| 292 | 
            +
            - --title=RubyGems 1.4.2 Documentation
         | 
| 293 293 | 
             
            require_paths: 
         | 
| 294 294 | 
             
            - hide_lib_for_update
         | 
| 295 295 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |