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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 195c4cc3e957a72b5fd32d7b8988d4fb58afc373
4
- data.tar.gz: 88be1c1f3b825670de7da30c65f19244494e625a
3
+ metadata.gz: 6d01b331c4b3cdce9d3464a76d0a4340e19e91e7
4
+ data.tar.gz: 5ff68a222cea0f340527134339fb4e2db272ab1a
5
5
  SHA512:
6
- metadata.gz: 871a21b9858931a0b7b2c374eb553a5a70f61e3d6b26055b7975ade21e20ea36d597a28083073bab27128297b1b39dd9cae79cf080f0eeb2877be831d6f03694
7
- data.tar.gz: 24d5cbd92af1a4726328750b880d9871379891935667184b6638de34b6ef0e1aad020be8d87bbdf2c3cf13a2c3badc79bfdfa4f2d52d90eff07957b4dfcfd54b
6
+ metadata.gz: 5783af584722603f72e354a8391f5b7df243ef4a5a1e4f5bb518e90157e54138d5c393918f97ec5fc22c2fd199d074f9da8a4e69bdc1a65f2e6de8fc304d8ddb
7
+ data.tar.gz: 0c43e69387894f86c47e588269c95f61e7b478df799bfb7f5721bdd07bc00092a0dfc51dc5989dae79c6a4dde11aaddafb1c4eb3384c02f423564f95a4b7118d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gem-release (2.0.0.dev.5)
4
+ gem-release (2.0.0.rc.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # gem release [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.png)](http://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.png)](http://badge.fury.io/rb/gem-release) |
12
- | Continuous integration | [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.png?branch=master)](https://travis-ci.org/svenfuchs/gem-release) |
13
- | Test coverage | [![Coverage Status](https://coveralls.io/repos/svenfuchs/gem-release/badge.png)](https://coveralls.io/r/svenfuchs/gem-release) |
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.pre.1, 1.0.0.pre.1 to 1.0.0.pre.2)
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
@@ -112,7 +112,7 @@ module Gem
112
112
  opts[:recurse] = value
113
113
  end
114
114
 
115
- opt '--file', descr(:file) do |value|
115
+ opt '--file FILE', descr(:file) do |value|
116
116
  opts[:file] = value
117
117
  end
118
118
 
@@ -1,5 +1,5 @@
1
1
  module Gem
2
2
  module Release
3
- VERSION = '2.0.0.rc.1'
3
+ VERSION = '2.0.0.rc.2'
4
4
  end
5
5
  end
@@ -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+)?\.?(\w+)?\.?(\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, stage, num].compact.join('.')
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[4].to_i + 1 : 1
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[3]
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].to_sym if 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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc.1
4
+ version: 2.0.0.rc.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs