b30f968c11494437845b3bb550db9bbd3a98fe7f
[packages/gem2rpm.git] / style.patch
1 --- gem2rpm-0.9.2/lib/gem2rpm/helpers.rb~       2013-04-29 23:19:15.000000000 +0300
2 +++ gem2rpm-0.9.2/lib/gem2rpm/helpers.rb        2013-04-29 23:24:07.509077652 +0300
3 @@ -24,7 +24,7 @@
4      # '<' pair.
5      def self.expand_pessimistic_requirement(requirement)
6        next_version = Gem::Version.create(requirement.last).bump
7 -      return ['=>', requirement.last], ['<', next_version]
8 +      return ['>=', requirement.last], ['<', next_version]
9      end
10  
11      # Expands the not equal version operator '!=' into equivalent '<' and
12 --- gem2rpm-0.9.2/test/test_helpers.rb~ 2013-04-23 10:58:32.000000000 +0300
13 +++ gem2rpm-0.9.2/test/test_helpers.rb  2013-04-29 23:51:55.467457420 +0300
14 @@ -19,12 +19,12 @@
15  
16    def test_first_level_pessimistic_version_constraint
17      r = Gem::Requirement.new(["~> 1.2"])
18 -    assert_equal(["=> 1.2", "< 2"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
19 +    assert_equal([">= 1.2", "< 2"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
20    end
21  
22    def test_second_level_pessimistic_version_constraint
23      r = Gem::Requirement.new(["~> 1.2.3"])
24 -    assert_equal(["=> 1.2.3", "< 1.3"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
25 +    assert_equal([">= 1.2.3", "< 1.3"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
26    end
27  
28    def test_pessimistic_version_constraint_with_trailing_text
29 @@ -32,13 +32,13 @@
30      gem_version = Gem::Version.create(Gem::RubyGemsVersion)
31      if gem_version >= Gem::Version.create("1.3.2")
32        r = Gem::Requirement.new(["~> 1.2.3.beta.8"])
33 -      assert_equal(["=> 1.2.3.beta.8", "< 1.3"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
34 +      assert_equal([">= 1.2.3.beta.8", "< 1.3"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
35      end
36    end
37  
38    def test_second_level_pessimistic_version_constraint_with_two_digit_version
39      r = Gem::Requirement.new(["~> 1.12.3"])
40 -    assert_equal(["=> 1.12.3", "< 1.13"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
41 +    assert_equal([">= 1.12.3", "< 1.13"], Gem2Rpm::Helpers.requirement_versions_to_rpm(r))
42    end
43  
44    def test_first_level_not_equal_version_constraint
This page took 0.024863 seconds and 2 git commands to generate.