version_boss 0.1.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afacba1102b1a2c3121168da6d563fe07fa20bf819d816dc6c5a6ad5ed6a9e76
4
- data.tar.gz: 2dec6257f24013a38fcc27d13cc9e9b41d5149c5f4dbf0a5df095a38dfb3682b
3
+ metadata.gz: 7f7984c59cd458be133c9688471edf381fb621b03ace259f16e41e049196eadf
4
+ data.tar.gz: 21155aea33ed629e422789ec01ca7bda16d5b771c8766d3954d2b95546ef72c8
5
5
  SHA512:
6
- metadata.gz: ecca5ca9fa2f05359ce747ec54fbba9d1b6e89fa9803593628e9fbf26fa2d61ee7a06bfaefc56dd3995c2df6966eb2417111a00e555910f55e78d4c420c4eefc
7
- data.tar.gz: 0ad28ede7cb492243f39413d4b9e373315604d37ecbaeb221f5f3df308670c24355450dcb74f26c500bad354b32919cbb0dfd87dec1cf717eb91ef285fa55fb9
6
+ metadata.gz: 53984fb1eb41b686e3c733225d326a5382ea21f14148a95a0e8bf4977e17ea05e0ba0bcab18c6997fb1e4e25cf97eec9c173510213dac8200e0711c3cb20b62c
7
+ data.tar.gz: 2be4baa6042c6d1444af73b629acd72bbd1dcbfb88c86395a4d977db0a11def1ccddb05fc6382941ea07646542e1598bd1e850a17ea77166a3ee98c57bf8603c
data/.commitlintrc.yml ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ extends: '@commitlint/config-conventional'
3
+
4
+ rules:
5
+ # See: https://commitlint.js.org/reference/rules.html
6
+ #
7
+ # Rules are made up by a name and a configuration array. The configuration array contains:
8
+ #
9
+ # * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if violated
10
+ # * Applicability [always|never]: never inverts the rule
11
+ # * Value: value to use for this rule
12
+ #
13
+ # Run `npx commitlint --print-config` to see the current setting for all rules.
14
+ #
15
+ body-leading-blank: [2, 'always']
16
+ footer-leading-blank: [2, 'always']
data/.husky/commit-msg ADDED
@@ -0,0 +1 @@
1
+ npx --no-install commitlint --edit "$1"
data/.markdownlint.yml ADDED
@@ -0,0 +1,25 @@
1
+ default: true
2
+
3
+ # Unordered list indentation
4
+ MD007: { indent: 2 }
5
+
6
+ # Line length
7
+ MD013: { line_length: 90, tables: false, code_blocks: false }
8
+
9
+ # Heading duplication is allowed for non-sibling headings
10
+ MD024: { siblings_only: true }
11
+
12
+ # Do not allow the specified trailing punctuation in a header
13
+ MD026: { punctuation: '.,;:' }
14
+
15
+ # Order list items must have a prefix that increases in numerical order
16
+ MD029: { style: 'ordered' }
17
+
18
+ # Lists do not need to be surrounded by blank lines
19
+ MD032: false
20
+
21
+ # Allow raw HTML in Markdown
22
+ MD033: false
23
+
24
+ # Allow emphasis to be used instead of a heading
25
+ MD036: false
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.2.1"
3
+ }
data/.rubocop.yml CHANGED
@@ -1,36 +1,7 @@
1
- AllCops:
2
- NewCops: enable
3
- # Output extra information for each offense to make it easier to diagnose:
4
- DisplayCopNames: true
5
- DisplayStyleGuide: true
6
- ExtraDetails: true
7
- SuggestExtensions: false
8
- # RuboCop enforces rules depending on the oldest version of Ruby which
9
- # your project supports:
10
- TargetRubyVersion: 3.0
11
-
12
- Gemspec/DevelopmentDependencies:
13
- EnforcedStyle: gemspec
14
-
15
- # The default max line length is 80 characters
16
- Layout/LineLength:
17
- Max: 120
18
-
19
- # The DSL for RSpec and the gemspec file make it very hard to limit block length:
20
- Metrics/BlockLength:
21
- Exclude:
22
- - "spec/spec_helper.rb"
23
- - "spec/**/*_spec.rb"
24
- - "*.gemspec"
1
+ inherit_gem:
2
+ main_branch_shared_rubocop_config: config/rubocop.yml
25
3
 
26
- Metrics/ModuleLength:
27
- CountAsOne: ['hash']
28
-
29
- # When writing minitest tests, it is very hard to limit test class length:
30
- Metrics/ClassLength:
31
- CountAsOne: ['hash']
32
- Exclude:
33
- - "test/**/*_test.rb"
34
-
35
- Style/AsciiComments:
36
- Enabled: false
4
+ AllCops:
5
+ # Pin this project to Ruby 3.1 in case the shared config above is upgraded to 3.2
6
+ # or later.
7
+ TargetRubyVersion: 3.1
data/.yardopts CHANGED
@@ -3,4 +3,4 @@
3
3
  --markup-provider=redcarpet
4
4
  --markup markdown
5
5
  - CHANGELOG.md
6
- - LICENSE.txt
6
+ - LICENSE.txt
data/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ ## v0.2.0 (2024-10-10)
2
+
3
+ [Full Changelog](https://github.com/main-branch/version_boss/compare/v0.1.0..v0.2.0)
4
+
5
+ Changes since v0.1.0:
6
+
7
+ * 777871d chore: update create_github_release dependency
8
+ * 8225040 build: remove semver pr label check
9
+ * 3853ff7 build: enforce conventional commit message formatting
10
+ * 3c08516 Clarify gem description and installation instructions
11
+ * 012f717 Add TargetRubyVersion in .rubocop.yml
12
+ * 4065647 Use shared Rubocop config
13
+ * 1dc115f Update copyright notice in this project
14
+ * 4a3f092 Update links in gemspec
15
+ * a4475f2 Add Slack badge for this project in README
16
+ * 28234d4 Update “Build Status” link the README
17
+ * e5b59d7 Standardize YARD and Markdown Lint configurations
18
+ * aa5851a Set JRuby —debug option when running tests in GitHub Actions workflows
19
+ * 3869e9c Integrate SimpleCov::RSpec into the project
20
+ * 4fe44a8 Use latest version of create_github_release
21
+ * a6ae0af Update continuous integration and experimental ruby builds
22
+ * 44ea99f Enforce the use of semver tags on PRs
23
+ * baabc32 Auto correct new rubocop offenses
24
+ * 8f74384 Release v0.1.0
25
+
26
+ ## [0.2.1](https://github.com/main-branch/version_boss/compare/v0.2.0...v0.2.1) (2025-04-16)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * Automate commit-to-publish workflow ([be256ae](https://github.com/main-branch/version_boss/commit/be256ae4dfdf051fcaaf760113011859806a6ccb))
32
+
1
33
  ## v0.1.0 (2024-05-07)
2
34
 
3
35
  [Full Changelog](https://github.com/main-branch/version_boss/compare/26b5491..v0.1.0)
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 James Couball
3
+ Copyright (c) 2024 James Couball
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,16 +1,17 @@
1
- # Version Boss
1
+ # The `version_boss` gem
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/version_boss.svg)](https://badge.fury.io/rb/version_boss)
4
4
  [![Documentation](https://img.shields.io/badge/Documentation-Latest-green)](https://rubydoc.info/gems/version_boss/)
5
5
  [![Change Log](https://img.shields.io/badge/CHANGELOG-Latest-green)](https://rubydoc.info/gems/version_boss/file/CHANGELOG.md)
6
- [![Build Status](https://github.com/main-branch/version_boss/workflows/CI%20Build/badge.svg?branch=main)](https://github.com/main-branch/version_boss/actions?query=workflow%3ACI%20Build)
7
- [![Maintainability](https://api.codeclimate.com/v1/badges/44a42ed085fe162e5dff/maintainability)](https://codeclimate.com/github/main-branch/version_boss/maintainability)
8
- [![Test Coverage](https://api.codeclimate.com/v1/badges/44a42ed085fe162e5dff/test_coverage)](https://codeclimate.com/github/main-branch/version_boss/test_coverage)
6
+ [![Build Status](https://github.com/main-branch/version_boss/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/main-branch/version_boss/actions/workflows/continuous-integration.yml)
7
+ [![Conventional
8
+ Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
9
+ [![Slack](https://img.shields.io/badge/slack-main--branch/version__boss-yellow.svg?logo=slack)](https://main-branch.slack.com/archives/C07MCMDBJLX)
9
10
 
10
- Parse, compare, and increment Gem and Semver versions.
11
+ Parse, compare, and increment Gem and [SemVer](https://semver.org) versions.
11
12
 
12
- This gem installs the `gem-version-boss` CLI tool to display and increment a gem's version
13
- based on SemVer rules.
13
+ This gem installs the `gem-version-boss` command-line tool to display and increment a
14
+ gem's version based on [Semantic Versioning](https://semver.org) rules.
14
15
 
15
16
  `gem-version-boss` can replace the `bump` command from the [bump
16
17
  gem](https://rubygems.org/gems/bump/) for incrementing gem version strings.
@@ -18,10 +19,8 @@ gem](https://rubygems.org/gems/bump/) for incrementing gem version strings.
18
19
  How `gem-version-boss` differs from `bump`:
19
20
 
20
21
  * `gem-version-boss` can manage pre-release versions
21
- * `bump` can commit and tag the version file changes it makes. There is no plan to
22
- add this functionality to `gem-version-boss`.
23
- * `bump` can update the version in extra files you to specify extra files to
24
- increment the version in
22
+ * `gem-version-boss` can not commit or tag the version file changes it makes
23
+ * `gem-version-boss` can not update multiple files at a time
25
24
 
26
25
  Example CLI commands:
27
26
 
@@ -37,7 +36,7 @@ gem-version-boss current
37
36
  # Display the gem version file
38
37
  gem-version-boss file
39
38
 
40
- # Validate that a version conforms to SemVer 2.0.0
39
+ # Validate that a version is valid
41
40
  gem-version-boss validate VERSION
42
41
 
43
42
  # Get more detailed help for each command listed above
@@ -46,27 +45,40 @@ gem-version-boss help [COMMAND]
46
45
 
47
46
  * [Installation](#installation)
48
47
  * [Command Line](#command-line)
49
- * [Usage](#usage)
50
- * [Examples](#examples)
48
+ * [Usage](#usage)
49
+ * [Examples](#examples)
51
50
  * [Library Usage](#library-usage)
52
- * [VersionBoss::Gem classes](#versionbossgem-classes)
53
- * [VersionBoss::Semver classes](#versionbosssemver-classes)
51
+ * [VersionBoss::Gem classes](#versionbossgem-classes)
52
+ * [VersionBoss::Semver classes](#versionbosssemver-classes)
54
53
  * [Development](#development)
55
54
  * [Contributing](#contributing)
55
+ * [Commit message guidelines](#commit-message-guidelines)
56
+ * [Pull request guidelines](#pull-request-guidelines)
56
57
  * [License](#license)
57
58
 
58
59
  ## Installation
59
60
 
60
- Install the gem and add to the application's Gemfile by executing:
61
+ To install the gem, add to the following line to your application's gemspec OR
62
+ Gemfile:
61
63
 
62
- ```shell
63
- bundle add version_boss
64
+ gemspec:
65
+
66
+ ```ruby
67
+ spec.add_development_dependency "version_boss", '~> 0.1'
68
+ ```
69
+
70
+ Gemfile:
71
+
72
+ ```ruby
73
+ gem "version_boss", "~> 0.1", groups: [:development, :test]
64
74
  ```
65
75
 
76
+ and then run `bundle install`.
77
+
66
78
  If bundler is not being used to manage dependencies, install the gem by executing:
67
79
 
68
80
  ```shell
69
- gem install version_boss --group=development
81
+ gem install version_boss
70
82
  ```
71
83
 
72
84
  ## Command Line
@@ -121,34 +133,38 @@ Description:
121
133
 
122
134
  ### Examples
123
135
 
136
+ Assuming the gem version starts at 1.2.3:
137
+
124
138
  ```shell
125
- gem-version-boss current # 0.1.0
139
+ $ gem-version-boss current
140
+ 1.2.3
126
141
 
127
- gem-version-boss validate 1.0.0 # exitcode=0
128
- gem-version-boss validate bad_version # exitcode=1
142
+ $ gem-version-boss next-patch
143
+ 1.2.4
129
144
 
130
- gem-version-boss next-patch # 0.1.0 -> 0.1.1
131
- gem-version-boss next-minor # 0.1.1 -> 0.2.0
132
- gem-version-boss next-major # 0.2.0 -> 1.0.0
145
+ $ gem-version-boss next-minor
146
+ 1.3.0
133
147
 
134
- # Pre-release with default pre-release type
135
- gem-version-boss next-major --pre # 0.1.1 -> 1.0.0.pre1
148
+ $ gem-version-boss next-major
149
+ 2.0.0
136
150
 
137
- # Pre-release with non-default pre-release type
138
- gem-version-boss next-major --pre --pre-type=alpha # 0.1.1 -> 2.0.0-alpha1
151
+ # Create a pre-release version for the next major version
152
+ $ gem-version-boss next-major --pre --pre-type=alpha
153
+ 3.0.0.alpha1
139
154
 
140
- # Increment pre-release
141
- gem-version-boss next-pre # 1.0.0-alpha1 -> 1.0.0-alpha2
155
+ # Increment the pre-release version
156
+ $ gem-version-boss next-pre
157
+ 3.0.0.alpha2
142
158
 
143
- # Change the pre-release type
144
- gem-version-boss pre --pre-type=beta # 1.0.0-alpha2 -> 1.0.0-beta1
159
+ # Change the pre-release type to "beta"
160
+ $ gem-version-boss next-pre --pre-type=beta
161
+ 3.0.0.beta1
145
162
 
146
- # Create release from pre-release
147
- gem-version-boss release # 1.0.0-beta1 -> 1.0.0
163
+ # Create a release version from the pre-release version
164
+ $ gem-version-boss next-release
165
+ 3.0.0
148
166
  ```
149
167
 
150
- This gem also provides the following classes:
151
-
152
168
  ## Library Usage
153
169
 
154
170
  [Detailed API documenation](https://rubydoc.info/gems/version_boss/) is hosted on
@@ -159,7 +175,9 @@ The main classes are:
159
175
  ### VersionBoss::Gem classes
160
176
 
161
177
  * **VersionBoss::Gem::Version** knows how to parse, validate, and compare [Ruby Gem
162
- version strings](https://guides.rubygems.org/patterns/#semantic-versioning).
178
+ version strings](https://guides.rubygems.org/patterns/#semantic-versioning) which
179
+ may include [prerelease
180
+ versions](https://guides.rubygems.org/patterns/#prerelease-gems).
163
181
 
164
182
  * **VersionBoss::Gem::IncrementableVersion** knows how to increment Ruby Gem version
165
183
  strings according to SemVer rules.
@@ -193,6 +211,31 @@ commits and the created tag, and push the `.gem` file to
193
211
  Bug reports and pull requests are welcome on GitHub at
194
212
  https://github.com/main-branch/version_boss.
195
213
 
214
+ ### Commit message guidelines
215
+
216
+ All commit messages must follow the [Conventional Commits
217
+ standard](https://www.conventionalcommits.org/en/v1.0.0/). This helps us maintain a
218
+ clear and structured commit history, automate versioning, and generate changelogs
219
+ effectively.
220
+
221
+ To ensure compliance, this project includes:
222
+
223
+ * A git commit-msg hook that validates your commit messages before they are accepted.
224
+
225
+ To activate the hook, you must have node installed and run `npm install`.
226
+
227
+ * A GitHub Actions workflow that will enforce the Conventional Commit standard as
228
+ part of the continuous integration pipeline.
229
+
230
+ Any commit message that does not conform to the Conventional Commits standard will
231
+ cause the workflow to fail and not allow the PR to be merged.
232
+
233
+ ### Pull request guidelines
234
+
235
+ All pull requests must be merged using rebase merges. This ensures that commit
236
+ messages from the feature branch are preserved in the release branch, keeping the
237
+ history clean and meaningful.
238
+
196
239
  ## License
197
240
 
198
241
  The gem is available as open source under the terms of the [MIT
data/Rakefile CHANGED
@@ -25,6 +25,13 @@ rescue Bundler::BundlerError => e
25
25
  exit e.status_code
26
26
  end
27
27
 
28
+ # Make it so that calling `rake release` just calls `rake release:rubygems_push` to
29
+ # avoid creating and pushing a new tag.
30
+
31
+ Rake::Task['release'].clear
32
+ desc 'Customized release task to avoid creating a new tag'
33
+ task release: 'release:rubygem_push'
34
+
28
35
  CLEAN << 'pkg'
29
36
  CLEAN << 'Gemfile.lock'
30
37
 
@@ -49,14 +56,9 @@ CLEAN << 'rspec-report.xml'
49
56
 
50
57
  require 'rubocop/rake_task'
51
58
 
52
- RuboCop::RakeTask.new do |t|
53
- t.options = %w[
54
- --format progress
55
- --format json --out rubocop-report.json
56
- ]
57
- end
59
+ RuboCop::RakeTask.new
58
60
 
59
- CLEAN << 'rubocop-report.json'
61
+ # YARD
60
62
 
61
63
  unless RUBY_PLATFORM == 'java'
62
64
  # yard:build
@@ -31,14 +31,7 @@ module VersionBoss
31
31
  # @return [Boolean] true if the version string is a valid semver and meets the conditions above
32
32
  #
33
33
  def valid?
34
- super && (
35
- pre_release.empty? ||
36
- (
37
- pre_release_identifiers.size == 2 &&
38
- pre_type.is_a?(String) &&
39
- pre_number.is_a?(Integer)
40
- )
41
- )
34
+ super && (pre_release.empty? || (pre_release_identifiers.size == 2 && pre_number.is_a?(Integer)))
42
35
  end
43
36
 
44
37
  # The default pre-release identifier
@@ -194,9 +187,11 @@ module VersionBoss
194
187
  def assert_pre_type_is_valid(pre_type)
195
188
  return if self.pre_type <= pre_type
196
189
 
190
+ # :nocov: JRuby coverage does not report this line correctly
197
191
  message = 'Cannot increment the pre-release identifier ' \
198
192
  "from '#{self.pre_type}' to '#{pre_type}' " \
199
193
  "because '#{self.pre_type}' is lexically less than '#{pre_type}'"
194
+ # :nocov:
200
195
 
201
196
  raise VersionBoss::Error, message
202
197
  end
@@ -26,8 +26,9 @@ module VersionBoss
26
26
  # @api private
27
27
  #
28
28
  def initialize(path, content_before, version, content_after)
29
- raise VersionBoss::Error, 'version must be an IncrementableVersion' unless
30
- version.is_a?(VersionBoss::Gem::IncrementableVersion)
29
+ unless version.is_a?(VersionBoss::Gem::IncrementableVersion)
30
+ raise VersionBoss::Error, 'version must be an IncrementableVersion'
31
+ end
31
32
 
32
33
  @path = path
33
34
  @content_before = content_before
@@ -92,8 +93,9 @@ module VersionBoss
92
93
  # @api public
93
94
  #
94
95
  def version=(new_version)
95
- raise VersionBoss::Error, 'new_version must be an IncrementableVersion' unless
96
- new_version.is_a?(VersionBoss::Gem::IncrementableVersion)
96
+ unless new_version.is_a?(VersionBoss::Gem::IncrementableVersion)
97
+ raise VersionBoss::Error, 'new_version must be an IncrementableVersion'
98
+ end
97
99
 
98
100
  @version = version
99
101
  File.write(path, content_before + new_version.to_s + content_after)
@@ -18,7 +18,9 @@ module VersionBoss
18
18
  # @return [VersionBoss::Gem::VersionFile, nil] the version file or nil if no version file was found
19
19
  #
20
20
  def self.find
21
+ # :nocov: JRuby does not mark the following line as covered
21
22
  Dir[glob].filter_map do |path|
23
+ # :nocov:
22
24
  if (match = File.read(path).match(content_regexp))
23
25
  version = VersionBoss::Gem::IncrementableVersion.new(match[:version])
24
26
  VersionBoss::Gem::VersionFile.new(path, match[:content_before], version, match[:content_after])
@@ -11,6 +11,8 @@ module VersionBoss
11
11
  # @api public
12
12
  #
13
13
  class Gemspec < Base
14
+ # :nocov: JRuby does not mark the line with VersionBoss::Gem::REGEXP.source as covered
15
+
14
16
  # The regexp to find the version and surrounding content within the gemspec
15
17
  VERSION_REGEXP = /
16
18
  \A
@@ -18,11 +20,13 @@ module VersionBoss
18
20
  .*
19
21
  \.version\s*=\s*(?<quote>['"])
20
22
  )
21
- (?<version>#{REGEXP.source})
23
+ (?<version>#{VersionBoss::Gem::REGEXP.source})
22
24
  (?<content_after>\k<quote>.*)
23
25
  \z
24
26
  /xm
25
27
 
28
+ # :nocov:
29
+
26
30
  private
27
31
 
28
32
  # The version file regexp
@@ -10,6 +10,8 @@ module VersionBoss
10
10
  # @api public
11
11
  #
12
12
  class Version < Base
13
+ # :nocov: JRuby does not mark the line with VersionBoss::Gem::REGEXP.source as covered
14
+
13
15
  # The regexp to find the version and surrounding content within the version file
14
16
  VERSION_REGEXP = /
15
17
  \A
@@ -19,6 +21,8 @@ module VersionBoss
19
21
  \z
20
22
  /x
21
23
 
24
+ # :nocov:
25
+
22
26
  private
23
27
 
24
28
  # The version file regexp
@@ -10,6 +10,8 @@ module VersionBoss
10
10
  # @api public
11
11
  #
12
12
  class VersionRb < Base
13
+ # :nocov: JRuby does not mark the line with VersionBoss::Gem::REGEXP.source as covered
14
+
13
15
  # The regexp to find the version and surrounding content within the version.rb file
14
16
  VERSION_REGEXP = /
15
17
  \A
@@ -22,6 +24,8 @@ module VersionBoss
22
24
  \z
23
25
  /xm
24
26
 
27
+ # :nocov:
28
+
25
29
  private
26
30
 
27
31
  # The version file regexp
@@ -27,18 +27,12 @@ module VersionBoss
27
27
  # IncrementableVersion.new('1.2.3-alpha').valid? # => raise VersionBoss::Error
28
28
  # IncrementableVersion.new('1.2.3-alpha.1.2').valid? # => raise VersionBoss::Error
29
29
  # IncrementableVersion.new('1.2.3-alpha.one').valid? # => raise VersionBoss::Error
30
+ # IncrementableVersion.new('').valid? # => raise VersionBoss::Error
30
31
  #
31
32
  # @return [Boolean] true if the version string is a valid semver and meets the conditions above
32
33
  #
33
34
  def valid?
34
- super && (
35
- pre_release.empty? ||
36
- (
37
- pre_release_identifiers.size == 2 &&
38
- pre_type.is_a?(String) &&
39
- pre_number.is_a?(Integer)
40
- )
41
- )
35
+ super && (pre_release.empty? || (pre_release_identifiers.size == 2 && pre_number.is_a?(Integer)))
42
36
  end
43
37
 
44
38
  # The default pre-release identifier
@@ -170,9 +164,11 @@ module VersionBoss
170
164
  def assert_pre_type_is_valid(pre_type)
171
165
  return if self.pre_type <= pre_type
172
166
 
167
+ # :nocov: JRuby coverage does not report this line correctly
173
168
  message = 'Cannot increment the pre-release identifier ' \
174
169
  "from '#{self.pre_type}' to '#{pre_type}' " \
175
170
  "because '#{self.pre_type}' is lexically less than '#{pre_type}'"
171
+ # :nocov:
176
172
 
177
173
  raise VersionBoss::Error, message
178
174
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module VersionBoss
4
4
  # The current version of this gem
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.1'
6
6
  end
data/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "devDependencies": {
3
+ "@commitlint/cli": "^19.5.0",
4
+ "@commitlint/config-conventional": "^19.5.0",
5
+ "husky": "^9.1.0"
6
+ },
7
+ "scripts": {
8
+ "postinstall": "husky",
9
+ "prepare": "husky"
10
+ }
11
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "bootstrap-sha": "2ec865239fefdd45f0b447a9aac0088bd3404300",
3
+ "packages": {
4
+ ".": {
5
+ "release-type": "ruby",
6
+ "package-name": "version_boss",
7
+ "changelog-path": "CHANGELOG.md",
8
+ "version-file": "lib/version_boss/version.rb",
9
+ "bump-minor-pre-major": true,
10
+ "bump-patch-for-minor-pre-major": true,
11
+ "draft": false,
12
+ "prerelease": false,
13
+ "include-component-in-tag": false
14
+ }
15
+ },
16
+ "plugins": [
17
+ {
18
+ "type": "sentence-case"
19
+ }
20
+ ],
21
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
22
+ }
data/version_boss.gemspec CHANGED
@@ -14,16 +14,17 @@ Gem::Specification.new do |spec|
14
14
  command or the 'VersionBoss::Gem::Version' class.
15
15
  DESC
16
16
 
17
- spec.homepage = 'http://github.com/main-branch/version_boss'
18
17
  spec.license = 'MIT'
19
- spec.required_ruby_version = '>= 3.0.0'
18
+ spec.required_ruby_version = '>= 3.1.0'
20
19
 
21
20
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
22
21
 
22
+ # Project links
23
+ spec.homepage = "https://github.com/main-branch/#{spec.name}"
23
24
  spec.metadata['homepage_uri'] = spec.homepage
24
25
  spec.metadata['source_code_uri'] = spec.homepage
25
- spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
26
26
  spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}"
27
+ spec.metadata['changelog_uri'] = "https://rubydoc.info/gems/#{spec.name}/#{spec.version}/file/CHANGELOG.md"
27
28
 
28
29
  # Specify which files should be added to the gem when it is released.
29
30
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -35,16 +36,22 @@ Gem::Specification.new do |spec|
35
36
  spec.bindir = 'exe'
36
37
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
37
38
  spec.require_paths = ['lib']
39
+ spec.requirements = [
40
+ 'Platform: Mac, Linux, or Windows',
41
+ 'Ruby: MRI 3.1 or later, TruffleRuby 24 or later, or JRuby 9.4 or later'
42
+ ]
38
43
 
39
- spec.add_runtime_dependency 'thor', '~> 1.3'
44
+ spec.add_dependency 'thor', '~> 1.3'
40
45
 
41
46
  spec.add_development_dependency 'bundler-audit', '~> 0.9'
42
- spec.add_development_dependency 'create_github_release', '~> 1.3'
47
+ spec.add_development_dependency 'create_github_release', '~> 2.1'
48
+ spec.add_development_dependency 'main_branch_shared_rubocop_config', '~> 0.1'
43
49
  spec.add_development_dependency 'rake', '~> 13.1'
44
50
  spec.add_development_dependency 'rspec', '~> 3.12'
45
51
  spec.add_development_dependency 'rubocop', '~> 1.59'
46
52
  spec.add_development_dependency 'simplecov', '~> 0.22'
47
53
  spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
54
+ spec.add_development_dependency 'simplecov-rspec', '~> 0.2'
48
55
 
49
56
  unless RUBY_PLATFORM == 'java'
50
57
  spec.add_development_dependency 'redcarpet', '~> 3.6'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: version_boss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Couball
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-05-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: thor
@@ -44,14 +43,28 @@ dependencies:
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: '1.3'
46
+ version: '2.1'
48
47
  type: :development
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
- version: '1.3'
53
+ version: '2.1'
54
+ - !ruby/object:Gem::Dependency
55
+ name: main_branch_shared_rubocop_config
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.1'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.1'
55
68
  - !ruby/object:Gem::Dependency
56
69
  name: rake
57
70
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +135,20 @@ dependencies:
122
135
  - - "~>"
123
136
  - !ruby/object:Gem::Version
124
137
  version: '0.8'
138
+ - !ruby/object:Gem::Dependency
139
+ name: simplecov-rspec
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '0.2'
145
+ type: :development
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '0.2'
125
152
  - !ruby/object:Gem::Dependency
126
153
  name: redcarpet
127
154
  requirement: !ruby/object:Gem::Requirement
@@ -180,6 +207,10 @@ executables:
180
207
  extensions: []
181
208
  extra_rdoc_files: []
182
209
  files:
210
+ - ".commitlintrc.yml"
211
+ - ".husky/commit-msg"
212
+ - ".markdownlint.yml"
213
+ - ".release-please-manifest.json"
183
214
  - ".rspec"
184
215
  - ".rubocop.yml"
185
216
  - ".yardopts"
@@ -209,18 +240,19 @@ files:
209
240
  - lib/version_boss/semver/regexp.rb
210
241
  - lib/version_boss/semver/version.rb
211
242
  - lib/version_boss/version.rb
243
+ - package.json
244
+ - release-please-config.json
212
245
  - version_boss.gemspec
213
- homepage: http://github.com/main-branch/version_boss
246
+ homepage: https://github.com/main-branch/version_boss
214
247
  licenses:
215
248
  - MIT
216
249
  metadata:
217
250
  allowed_push_host: https://rubygems.org
218
- homepage_uri: http://github.com/main-branch/version_boss
219
- source_code_uri: http://github.com/main-branch/version_boss
220
- changelog_uri: https://rubydoc.info/gems/version_boss/0.1.0/file/CHANGELOG.md
221
- documentation_uri: https://rubydoc.info/gems/version_boss/0.1.0
251
+ homepage_uri: https://github.com/main-branch/version_boss
252
+ source_code_uri: https://github.com/main-branch/version_boss
253
+ documentation_uri: https://rubydoc.info/gems/version_boss/0.2.1
254
+ changelog_uri: https://rubydoc.info/gems/version_boss/0.2.1/file/CHANGELOG.md
222
255
  rubygems_mfa_required: 'true'
223
- post_install_message:
224
256
  rdoc_options: []
225
257
  require_paths:
226
258
  - lib
@@ -228,15 +260,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
260
  requirements:
229
261
  - - ">="
230
262
  - !ruby/object:Gem::Version
231
- version: 3.0.0
263
+ version: 3.1.0
232
264
  required_rubygems_version: !ruby/object:Gem::Requirement
233
265
  requirements:
234
266
  - - ">="
235
267
  - !ruby/object:Gem::Version
236
268
  version: '0'
237
- requirements: []
238
- rubygems_version: 3.5.9
239
- signing_key:
269
+ requirements:
270
+ - 'Platform: Mac, Linux, or Windows'
271
+ - 'Ruby: MRI 3.1 or later, TruffleRuby 24 or later, or JRuby 9.4 or later'
272
+ rubygems_version: 3.6.7
240
273
  specification_version: 4
241
274
  summary: A Gem to parse and compare SemVer versions AND increment versions for Ruby
242
275
  Gems