semverify 0.3.0 → 0.3.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +10 -0
- data/CHANGELOG.md +17 -0
- data/README.md +40 -11
- data/lib/semverify/command_line.rb +17 -17
- data/lib/semverify/version.rb +1 -1
- data/semverify.gemspec +43 -7
- metadata +49 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70523fa457e6370bd31c6e0ac31d47c7a145670e3d3c3a521161aa4f931df504
|
4
|
+
data.tar.gz: 3f8b105ee8359ecd413ae649f5571d471f7abfcd466fe2a4b4114ca02f76da9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1edf2e300a7b7121cadefcacf8bcc0ec37ff2c8ad91042524c96e28204eaf3f696a5a6b736c3c33cedaf9108e20667d278d5eb55c09278f58cc4181014166f1
|
7
|
+
data.tar.gz: cf5ea76b244214a159036db34b0e0f4b1234acb5dcb49d50c52d115bf9867bc325ffaac056debf222e11821df3003366f1e952d8897af9a3efa25110140e6c0d
|
data/.rubocop.yml
CHANGED
@@ -9,6 +9,9 @@ AllCops:
|
|
9
9
|
# your project supports:
|
10
10
|
TargetRubyVersion: 3.0
|
11
11
|
|
12
|
+
Gemspec/DevelopmentDependencies:
|
13
|
+
EnforcedStyle: gemspec
|
14
|
+
|
12
15
|
# The default max line length is 80 characters
|
13
16
|
Layout/LineLength:
|
14
17
|
Max: 120
|
@@ -20,7 +23,14 @@ Metrics/BlockLength:
|
|
20
23
|
- "spec/**/*_spec.rb"
|
21
24
|
- "*.gemspec"
|
22
25
|
|
26
|
+
Metrics/ModuleLength:
|
27
|
+
CountAsOne: ['hash']
|
28
|
+
|
23
29
|
# When writing minitest tests, it is very hard to limit test class length:
|
24
30
|
Metrics/ClassLength:
|
31
|
+
CountAsOne: ['hash']
|
25
32
|
Exclude:
|
26
33
|
- "test/**/*_test.rb"
|
34
|
+
|
35
|
+
Style/AsciiComments:
|
36
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
## v0.3.2 (2024-01-11)
|
2
|
+
|
3
|
+
[Full Changelog](https://github.com/main-branch/semverify/compare/v0.3.1..v0.3.2)
|
4
|
+
|
5
|
+
Changes since v0.3.1:
|
6
|
+
|
7
|
+
* 91c3780 Update README and gemspec introduction text (#19)
|
8
|
+
|
9
|
+
## v0.3.1 (2024-01-05)
|
10
|
+
|
11
|
+
[Full Changelog](https://github.com/main-branch/semverify/compare/v0.3.0..v0.3.1)
|
12
|
+
|
13
|
+
Changes since v0.3.0:
|
14
|
+
|
15
|
+
* 51f649f Add Ruby 3.3 to CI build (#17)
|
16
|
+
* 3255436 Update rubocop configuration for new Rubocop changes (#15)
|
17
|
+
|
1
18
|
## v0.3.0 (2023-03-19)
|
2
19
|
|
3
20
|
[Full Changelog](https://github.com/main-branch/semverify/compare/v0.2.0..v0.3.0)
|
data/README.md
CHANGED
@@ -7,30 +7,59 @@
|
|
7
7
|
[](https://codeclimate.com/github/main-branch/semverify/maintainability)
|
8
8
|
[](https://codeclimate.com/github/main-branch/semverify/test_coverage)
|
9
9
|
|
10
|
-
|
10
|
+
Parse, compare, and increment RubyGem versions.
|
11
11
|
|
12
|
-
|
12
|
+
This gem installs the `semverify` CLI tool to display and increment a gem's version
|
13
|
+
based on SemVer rules. This tool can replace the `bump` command from the
|
14
|
+
[bump gem](https://rubygems.org/gems/bump/) for incrementing gem version strings.
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
This gem also provides the `Semverify::Semver` class which knows how to parse,
|
17
|
+
validate, and compare [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html) version
|
18
|
+
strings.
|
19
|
+
|
20
|
+
Both the CLI tool and the library code support prerelease versions and versions
|
21
|
+
with build metadata.
|
22
|
+
|
23
|
+
Example CLI commands:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
# Increment the gem version
|
27
|
+
semverify {next-major|next-minor|next-patch} [--pre [--pretype=TYPE]] [--build=METADATA] [--dryrun]
|
28
|
+
semverify next-pre [--pretype=TYPE] [--build=METADATA] [--dryrun]
|
29
|
+
semverify next-release [--build=METADATA] [--dryrun]
|
30
|
+
|
31
|
+
# Command to display the current gem version
|
32
|
+
semverify current
|
33
|
+
|
34
|
+
# Display the gem version file
|
35
|
+
semverify file
|
36
|
+
|
37
|
+
# Validate that a version conforms to SemVer 2.0.0
|
38
|
+
semverify validate VERSION
|
39
|
+
|
40
|
+
# Get more detailed help for each command listed above
|
41
|
+
semverify help [COMMAND]
|
42
|
+
```
|
43
|
+
|
44
|
+
* [Installation](#installation)
|
45
|
+
* [Command Line Usage](#command-line-usage)
|
46
|
+
* [Library Usage](#library-usage)
|
47
|
+
* [Development](#development)
|
48
|
+
* [Contributing](#contributing)
|
49
|
+
* [License](#license)
|
21
50
|
|
22
51
|
## Installation
|
23
52
|
|
24
53
|
Install the gem and add to the application's Gemfile by executing:
|
25
54
|
|
26
55
|
```shell
|
27
|
-
bundle add
|
56
|
+
bundle add semverify
|
28
57
|
```
|
29
58
|
|
30
59
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
31
60
|
|
32
61
|
```shell
|
33
|
-
gem install
|
62
|
+
gem install semverify
|
34
63
|
```
|
35
64
|
|
36
65
|
## Command Line Usage
|
@@ -85,7 +85,7 @@ module Semverify
|
|
85
85
|
--pre can be used to specify that the version should be incremented AND
|
86
86
|
given a pre-release part. For instance:
|
87
87
|
|
88
|
-
|
88
|
+
$ semverify next-major --pre
|
89
89
|
|
90
90
|
increments '1.2.3' to '2.0.0-pre.1'.
|
91
91
|
|
@@ -93,7 +93,7 @@ module Semverify
|
|
93
93
|
--pre to specify a different pre-release type such as alpha, beta, rc, etc.
|
94
94
|
For instance:
|
95
95
|
|
96
|
-
|
96
|
+
$ semverify next-major --pre --pre-type=alpha
|
97
97
|
|
98
98
|
increments '1.2.3' to '2.0.0-alpha.1'.
|
99
99
|
|
@@ -144,7 +144,7 @@ module Semverify
|
|
144
144
|
--pre can be used to specify that the version should be incremented AND
|
145
145
|
given a pre-release part. For instance:
|
146
146
|
|
147
|
-
|
147
|
+
$ semverify next-minor --pre
|
148
148
|
|
149
149
|
increments '1.2.3' to '2.0.0-pre.1'.
|
150
150
|
|
@@ -152,7 +152,7 @@ module Semverify
|
|
152
152
|
--pre to specify a different pre-release type such as alpha, beta, rc, etc.
|
153
153
|
For instance:
|
154
154
|
|
155
|
-
|
155
|
+
$ semverify next-patch --pre --pre-type=alpha
|
156
156
|
|
157
157
|
increments '1.2.3' to '1.2.4-alpha.1'.
|
158
158
|
|
@@ -203,7 +203,7 @@ module Semverify
|
|
203
203
|
--pre can be used to specify that the version should be incremented AND
|
204
204
|
given a pre-release part. For instance:
|
205
205
|
|
206
|
-
|
206
|
+
$ semverify next-patch --pre
|
207
207
|
|
208
208
|
increments '1.2.3' to '1.2.4-pre.1'.
|
209
209
|
|
@@ -211,7 +211,7 @@ module Semverify
|
|
211
211
|
--pre to specify a different pre-release type such as alpha, beta, rc, etc.
|
212
212
|
For instance:
|
213
213
|
|
214
|
-
|
214
|
+
$ semverify next-patch --pre --pre-type=alpha
|
215
215
|
|
216
216
|
increments '1.2.3' to '1.2.4-alpha.1'.
|
217
217
|
|
@@ -260,7 +260,7 @@ module Semverify
|
|
260
260
|
|
261
261
|
By default, the existing pre-release type is preserved. For instance:
|
262
262
|
|
263
|
-
|
263
|
+
$ semverify next-pre
|
264
264
|
|
265
265
|
Increments 1.2.3-alpha.1 to 1.2.3-alpha.2.
|
266
266
|
|
@@ -270,16 +270,16 @@ module Semverify
|
|
270
270
|
|
271
271
|
For example, if the version starts as 1.2.3-alpha.4, then:
|
272
272
|
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
273
|
+
$ semverify current
|
274
|
+
1.2.3-alpha.4
|
275
|
+
$ semver next-pre --pre-type=beta
|
276
|
+
1.2.3-beta.1
|
277
|
+
$ semver next-pre --pre-type=beta
|
278
|
+
1.2.3-beta.2
|
279
|
+
$ semver next-pre --pre-type=rc
|
280
|
+
1.2.3-rc.1
|
281
|
+
$ semverify next-release
|
282
|
+
1.2.3
|
283
283
|
|
284
284
|
The command fails if the existing pre-release type is not lexically less than or
|
285
285
|
equal to TYPE. For example, it the current version is '1.2.3-beta.1' and the TYPE
|
data/lib/semverify/version.rb
CHANGED
data/semverify.gemspec
CHANGED
@@ -8,8 +8,43 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['James Couball']
|
9
9
|
spec.email = ['jcouball@yahoo.com']
|
10
10
|
|
11
|
-
spec.summary = 'A Gem to parse and compare
|
12
|
-
spec.description =
|
11
|
+
spec.summary = 'A Gem to parse and compare SemVer versions AND increment versions for Ruby Gems'
|
12
|
+
spec.description = <<~DESC
|
13
|
+
Parse, compare, and increment RubyGem versions.
|
14
|
+
|
15
|
+
This gem installs the `semverify` CLI tool to display and increment a gem's version
|
16
|
+
based on SemVer rules. This tool can replace the `bump` command from the
|
17
|
+
[bump gem](https://rubygems.org/gems/bump/) for incrementing gem version strings.
|
18
|
+
|
19
|
+
This gem also provides the `Semverify::Semver` class which knows how to parse,
|
20
|
+
validate, and compare [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html) version
|
21
|
+
strings.
|
22
|
+
|
23
|
+
Both the CLI tool and the library code support prerelease versions and versions
|
24
|
+
with build metadata.
|
25
|
+
|
26
|
+
Example CLI commands:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
# Increment the gem version
|
30
|
+
semverify {next-major|next-minor|next-patch} [--pre [--pretype=TYPE]] [--build=METADATA] [--dryrun]
|
31
|
+
semverify next-pre [--pretype=TYPE] [--build=METADATA] [--dryrun]
|
32
|
+
semverify next-release [--build=METADATA] [--dryrun]
|
33
|
+
|
34
|
+
# Command to display the current gem version
|
35
|
+
semverify current
|
36
|
+
|
37
|
+
# Display the gem version file
|
38
|
+
semverify file
|
39
|
+
|
40
|
+
# Validate that a version conforms to SemVer 2.0.0
|
41
|
+
semverify validate VERSION
|
42
|
+
|
43
|
+
# Get more detailed help for each command listed above
|
44
|
+
semverify help [COMMAND]
|
45
|
+
```
|
46
|
+
DESC
|
47
|
+
|
13
48
|
spec.homepage = 'http://github.com/main-branch/semverify'
|
14
49
|
spec.license = 'MIT'
|
15
50
|
spec.required_ruby_version = '>= 3.0.0'
|
@@ -18,7 +53,8 @@ Gem::Specification.new do |spec|
|
|
18
53
|
|
19
54
|
spec.metadata['homepage_uri'] = spec.homepage
|
20
55
|
spec.metadata['source_code_uri'] = spec.homepage
|
21
|
-
spec.metadata['changelog_uri'] =
|
56
|
+
spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
|
57
|
+
spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}"
|
22
58
|
|
23
59
|
# Specify which files should be added to the gem when it is released.
|
24
60
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -31,13 +67,13 @@ Gem::Specification.new do |spec|
|
|
31
67
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
68
|
spec.require_paths = ['lib']
|
33
69
|
|
34
|
-
spec.add_runtime_dependency 'thor', '~> 1.
|
70
|
+
spec.add_runtime_dependency 'thor', '~> 1.3'
|
35
71
|
|
36
72
|
spec.add_development_dependency 'bundler-audit', '~> 0.9'
|
37
|
-
spec.add_development_dependency 'create_github_release', '~> 1.
|
38
|
-
spec.add_development_dependency 'rake', '~> 13.
|
73
|
+
spec.add_development_dependency 'create_github_release', '~> 1.3'
|
74
|
+
spec.add_development_dependency 'rake', '~> 13.1'
|
39
75
|
spec.add_development_dependency 'rspec', '~> 3.12'
|
40
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
76
|
+
spec.add_development_dependency 'rubocop', '~> 1.59'
|
41
77
|
spec.add_development_dependency 'simplecov', '~> 0.22'
|
42
78
|
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
43
79
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semverify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Couball
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler-audit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '13.
|
61
|
+
version: '13.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '13.
|
68
|
+
version: '13.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.59'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.59'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,8 +170,40 @@ dependencies:
|
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0.9'
|
173
|
-
description:
|
174
|
-
|
173
|
+
description: |
|
174
|
+
Parse, compare, and increment RubyGem versions.
|
175
|
+
|
176
|
+
This gem installs the `semverify` CLI tool to display and increment a gem's version
|
177
|
+
based on SemVer rules. This tool can replace the `bump` command from the
|
178
|
+
[bump gem](https://rubygems.org/gems/bump/) for incrementing gem version strings.
|
179
|
+
|
180
|
+
This gem also provides the `Semverify::Semver` class which knows how to parse,
|
181
|
+
validate, and compare [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html) version
|
182
|
+
strings.
|
183
|
+
|
184
|
+
Both the CLI tool and the library code support prerelease versions and versions
|
185
|
+
with build metadata.
|
186
|
+
|
187
|
+
Example CLI commands:
|
188
|
+
|
189
|
+
```bash
|
190
|
+
# Increment the gem version
|
191
|
+
semverify {next-major|next-minor|next-patch} [--pre [--pretype=TYPE]] [--build=METADATA] [--dryrun]
|
192
|
+
semverify next-pre [--pretype=TYPE] [--build=METADATA] [--dryrun]
|
193
|
+
semverify next-release [--build=METADATA] [--dryrun]
|
194
|
+
|
195
|
+
# Command to display the current gem version
|
196
|
+
semverify current
|
197
|
+
|
198
|
+
# Display the gem version file
|
199
|
+
semverify file
|
200
|
+
|
201
|
+
# Validate that a version conforms to SemVer 2.0.0
|
202
|
+
semverify validate VERSION
|
203
|
+
|
204
|
+
# Get more detailed help for each command listed above
|
205
|
+
semverify help [COMMAND]
|
206
|
+
```
|
175
207
|
email:
|
176
208
|
- jcouball@yahoo.com
|
177
209
|
executables:
|
@@ -211,7 +243,8 @@ metadata:
|
|
211
243
|
allowed_push_host: https://rubygems.org
|
212
244
|
homepage_uri: http://github.com/main-branch/semverify
|
213
245
|
source_code_uri: http://github.com/main-branch/semverify
|
214
|
-
changelog_uri: https://rubydoc.info/gems/semverify/file/CHANGELOG.md
|
246
|
+
changelog_uri: https://rubydoc.info/gems/semverify/0.3.2/file/CHANGELOG.md
|
247
|
+
documentation_uri: https://rubydoc.info/gems/semverify/0.3.2
|
215
248
|
rubygems_mfa_required: 'true'
|
216
249
|
post_install_message:
|
217
250
|
rdoc_options: []
|
@@ -228,8 +261,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
261
|
- !ruby/object:Gem::Version
|
229
262
|
version: '0'
|
230
263
|
requirements: []
|
231
|
-
rubygems_version: 3.
|
264
|
+
rubygems_version: 3.5.3
|
232
265
|
signing_key:
|
233
266
|
specification_version: 4
|
234
|
-
summary: A Gem to parse and compare
|
267
|
+
summary: A Gem to parse and compare SemVer versions AND increment versions for Ruby
|
268
|
+
Gems
|
235
269
|
test_files: []
|