gem-release 2.0.0.rc.1 → 2.0.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -5
- data/lib/gem/release/cmds/bump.rb +1 -1
- data/lib/gem/release/version.rb +1 -1
- data/lib/gem/release/version/number.rb +12 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d01b331c4b3cdce9d3464a76d0a4340e19e91e7
|
4
|
+
data.tar.gz: 5ff68a222cea0f340527134339fb4e2db272ab1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5783af584722603f72e354a8391f5b7df243ef4a5a1e4f5bb518e90157e54138d5c393918f97ec5fc22c2fd199d074f9da8a4e69bdc1a65f2e6de8fc304d8ddb
|
7
|
+
data.tar.gz: 0c43e69387894f86c47e588269c95f61e7b478df799bfb7f5721bdd07bc00092a0dfc51dc5989dae79c6a4dde11aaddafb1c4eb3384c02f423564f95a4b7118d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# gem release [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.
|
1
|
+
# gem release [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.svg)](http://travis-ci.org/svenfuchs/gem-release)
|
2
2
|
|
3
3
|
This gem plugin aims at making gem development easier by automating repetitive work based on conventions, configuration, and templates.
|
4
4
|
|
@@ -8,9 +8,9 @@ It adds the commands `bootstrap`, `gemspec`, `bump`, `tag` and a `release` to th
|
|
8
8
|
| ---------------------- | ------------ |
|
9
9
|
| Gem name | gem-release |
|
10
10
|
| License | [MIT](https://github.com/svenfuchs/gem-release/blob/master/LICENSE.md) |
|
11
|
-
| Version | [![Gem Version](https://badge.fury.io/rb/gem-release.
|
12
|
-
| Continuous integration | [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.
|
13
|
-
| Test coverage | [![Coverage Status](https://coveralls.io/repos/svenfuchs/gem-release/badge.
|
11
|
+
| Version | [![Gem Version](https://badge.fury.io/rb/gem-release.svg)](http://badge.fury.io/rb/gem-release) |
|
12
|
+
| Continuous integration | [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.svg?branch=master)](https://travis-ci.org/svenfuchs/gem-release) |
|
13
|
+
| Test coverage | [![Coverage Status](https://coveralls.io/repos/svenfuchs/gem-release/badge.svg)](https://coveralls.io/r/svenfuchs/gem-release) |
|
14
14
|
| Documentation | [Documentation](http://rdoc.info/github/svenfuchs/gem-release/frames) |
|
15
15
|
| Credits | [Contributors](https://github.com/svenfuchs/gem-release/graphs/contributors) |
|
16
16
|
|
@@ -219,7 +219,7 @@ major # Bump to the next major level (e.g. 0.0.1 to 1.0.0)
|
|
219
219
|
minor # Bump to the next minor level (e.g. 0.0.1 to 0.1.0)
|
220
220
|
patch # Bump to the next patch level (e.g. 0.0.1 to 0.0.2)
|
221
221
|
pre|rc|etc # Bump to the next pre-release level (e.g. 0.0.1 to
|
222
|
-
# 0.1.0
|
222
|
+
# 0.1.0-pre.1, 1.0.0-pre.1 to 1.0.0-pre.2)
|
223
223
|
```
|
224
224
|
|
225
225
|
When searching for the version file for a gem named `gem-name`: the
|
data/lib/gem/release/version.rb
CHANGED
@@ -2,14 +2,16 @@ module Gem
|
|
2
2
|
module Release
|
3
3
|
module Version
|
4
4
|
class Number < Struct.new(:number, :target)
|
5
|
-
NUMBER = /^(\d+)\.?(\d+)?\.?(\d+)
|
5
|
+
NUMBER = /^(\d+)\.?(\d+)?\.?(\d+)?(\-|\.)?(\w+)?\.?(\d+)?$/
|
6
6
|
|
7
7
|
STAGES = %i(alpha beta pre rc)
|
8
8
|
|
9
9
|
def bump
|
10
10
|
return target if specific?
|
11
11
|
validate_stage
|
12
|
-
[major, minor, patch
|
12
|
+
parts = [[major, minor, patch].compact.join('.')]
|
13
|
+
parts << [stage, num].join('.') if stage
|
14
|
+
parts.join(stage_delim)
|
13
15
|
end
|
14
16
|
|
15
17
|
private
|
@@ -42,9 +44,13 @@ module Gem
|
|
42
44
|
target unless to_release?
|
43
45
|
end
|
44
46
|
|
47
|
+
def stage_delim
|
48
|
+
parts[3] || '-'
|
49
|
+
end
|
50
|
+
|
45
51
|
def num
|
46
52
|
return if to_release?
|
47
|
-
same_stage? ? parts[
|
53
|
+
same_stage? ? parts[5].to_i + 1 : 1
|
48
54
|
end
|
49
55
|
|
50
56
|
def to?(*targets)
|
@@ -72,7 +78,7 @@ module Gem
|
|
72
78
|
end
|
73
79
|
|
74
80
|
def from_stage
|
75
|
-
parts[
|
81
|
+
parts[4]
|
76
82
|
end
|
77
83
|
|
78
84
|
def target
|
@@ -87,7 +93,8 @@ module Gem
|
|
87
93
|
|
88
94
|
def parts
|
89
95
|
@parts ||= matches.compact.map(&:to_i).tap do |parts|
|
90
|
-
parts[3] = matches[3]
|
96
|
+
parts[3] = matches[3]
|
97
|
+
parts[4] = matches[4].to_sym if matches[4]
|
91
98
|
end
|
92
99
|
end
|
93
100
|
|