version_bumper 0.2.0 → 0.3.0

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.
@@ -25,7 +25,7 @@ module Bumper
25
25
  version = @v[part] = @v[part].succ
26
26
 
27
27
  return version if part == :build
28
- @v[:build] = '0'
28
+ @v[:build] = '0' if @v[:build]
29
29
  return version if part == :revision
30
30
  @v[:revision] = 0
31
31
  return version if part == :minor
@@ -46,4 +46,10 @@ class TestVersionBumper < MiniTest::Unit::TestCase
46
46
  assert_equal '0', v.build
47
47
  assert_equal '2.0.0.0', v.to_s
48
48
  end
49
+
50
+ def test_that_bumping_major_without_build_does_not_add_build
51
+ v = Bumper::Version.new('0.0.0')
52
+ v.bump_major
53
+ assert_equal '1.0.0', v.to_s
54
+ end
49
55
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: version_bumper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dotan Nahum
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-16 00:00:00 +02:00
18
+ date: 2011-02-17 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
OSZAR »