semverrb 0.1.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.
- checksums.yaml +7 -0
- data/.github/workflows/gem-push.yml +46 -0
- data/.gitignore +18 -0
- data/.rspec +3 -0
- data/.rubocop.yml +28 -0
- data/CHANGELOG.txt +0 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +58 -0
- data/LICENSE.txt +21 -0
- data/README.md +113 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/semver +0 -0
- data/bin/setup +8 -0
- data/lib/semver/cli.rb +149 -0
- data/lib/semver/version.rb +5 -0
- data/lib/semver/version_parser.rb +27 -0
- data/lib/semver.rb +9 -0
- data/semverrb.gemspec +29 -0
- metadata +61 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eb686be329e56bd75507313253c5e11584792c3b1bc6bacc39ea6c529153007a
|
4
|
+
data.tar.gz: 7741fbd23e81b218f0fbf3a9a7ad500d2f3d59daafdd07fe1fa264abe4861e62
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e7397e8cc29fc7499d2c403ccc991e2b4c0261de3bb302db4c8999791ad442e48811d14871e8778718ac49432ea46b1f69871d33b4ffe8dd4a2f70492d71da61
|
7
|
+
data.tar.gz: 55a75538bea9117625760de1013f6163881920b5fcf7473a99b53196c856b2ff790fbd765944776b5694c29130b9ae22895b7172e83db973c9dbc797d4c66645
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# name: Publish Ruby Gem
|
2
|
+
|
3
|
+
# on:
|
4
|
+
# push:
|
5
|
+
# branches:
|
6
|
+
# - main
|
7
|
+
|
8
|
+
# jobs:
|
9
|
+
# build:
|
10
|
+
# name: Build + Publish
|
11
|
+
# runs-on: ubuntu-latest
|
12
|
+
# permissions:
|
13
|
+
# contents: read
|
14
|
+
# packages: write
|
15
|
+
|
16
|
+
# steps:
|
17
|
+
# - name: Checkout Code
|
18
|
+
# uses: actions/checkout@v4
|
19
|
+
|
20
|
+
# - name: Set up Ruby 3.2.6
|
21
|
+
# uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
22
|
+
# with:
|
23
|
+
# ruby-version: 3.2.6
|
24
|
+
|
25
|
+
# - name: Publish to GitHub Packages
|
26
|
+
# run: |
|
27
|
+
# mkdir -p $HOME/.gem
|
28
|
+
# touch $HOME/.gem/credentials
|
29
|
+
# chmod 0600 $HOME/.gem/credentials
|
30
|
+
# printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
31
|
+
# gem build *.gemspec
|
32
|
+
# gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
33
|
+
# env:
|
34
|
+
# GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
35
|
+
# OWNER: ${{ github.repository_owner }}
|
36
|
+
|
37
|
+
# - name: Publish to RubyGems.org
|
38
|
+
# run: |
|
39
|
+
# mkdir -p $HOME/.gem
|
40
|
+
# touch $HOME/.gem/credentials
|
41
|
+
# chmod 0600 $HOME/.gem/credentials
|
42
|
+
# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
43
|
+
# gem build *.gemspec
|
44
|
+
# gem push *.gem
|
45
|
+
# env:
|
46
|
+
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
Style/StringLiterals:
|
2
|
+
Enabled: true
|
3
|
+
EnforcedStyle: double_quotes
|
4
|
+
|
5
|
+
Style/StringLiteralsInInterpolation:
|
6
|
+
Enabled: true
|
7
|
+
EnforcedStyle: double_quotes
|
8
|
+
|
9
|
+
Layout/LineLength:
|
10
|
+
Max: 160
|
11
|
+
|
12
|
+
Metrics/ClassLength:
|
13
|
+
Max: 120
|
14
|
+
|
15
|
+
Style/Documentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Metrics/AbcSize:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Metrics/MethodLength:
|
22
|
+
Enabled: false
|
23
|
+
Max: 18
|
24
|
+
|
25
|
+
AllCops:
|
26
|
+
NewCops: disable
|
27
|
+
TargetRubyVersion: 3.0
|
28
|
+
SuggestExtensions: false
|
data/CHANGELOG.txt
ADDED
File without changes
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
semverrb (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.5.1)
|
11
|
+
parallel (1.26.3)
|
12
|
+
parser (3.3.6.0)
|
13
|
+
ast (~> 2.4.1)
|
14
|
+
racc
|
15
|
+
racc (1.8.1)
|
16
|
+
rainbow (3.1.1)
|
17
|
+
rake (13.2.1)
|
18
|
+
regexp_parser (2.9.3)
|
19
|
+
rexml (3.4.0)
|
20
|
+
rspec (3.13.0)
|
21
|
+
rspec-core (~> 3.13.0)
|
22
|
+
rspec-expectations (~> 3.13.0)
|
23
|
+
rspec-mocks (~> 3.13.0)
|
24
|
+
rspec-core (3.13.2)
|
25
|
+
rspec-support (~> 3.13.0)
|
26
|
+
rspec-expectations (3.13.3)
|
27
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
+
rspec-support (~> 3.13.0)
|
29
|
+
rspec-mocks (3.13.2)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.13.0)
|
32
|
+
rspec-support (3.13.2)
|
33
|
+
rubocop (0.93.1)
|
34
|
+
parallel (~> 1.10)
|
35
|
+
parser (>= 2.7.1.5)
|
36
|
+
rainbow (>= 2.2.2, < 4.0)
|
37
|
+
regexp_parser (>= 1.8)
|
38
|
+
rexml
|
39
|
+
rubocop-ast (>= 0.6.0)
|
40
|
+
ruby-progressbar (~> 1.7)
|
41
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
42
|
+
rubocop-ast (1.37.0)
|
43
|
+
parser (>= 3.3.1.0)
|
44
|
+
ruby-progressbar (1.13.0)
|
45
|
+
unicode-display_width (1.8.0)
|
46
|
+
|
47
|
+
PLATFORMS
|
48
|
+
arm64-darwin-22
|
49
|
+
arm64-darwin-24
|
50
|
+
|
51
|
+
DEPENDENCIES
|
52
|
+
rake (~> 13.0)
|
53
|
+
rspec (~> 3.0)
|
54
|
+
rubocop (~> 0.80)
|
55
|
+
semverrb!
|
56
|
+
|
57
|
+
BUNDLED WITH
|
58
|
+
2.6.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
# Semver (Semantic Versioning)
|
2
|
+
|
3
|
+
`semverrb` is a lightweight and intuitive CLI tool to help you manage **semantic versioning** for your projects. It simplifies version management by automating version bumps (`major`, `minor`, `patch`, or `prerelease`) and supports multiple formats including **plain text**, **JSON**, and **YAML**.
|
4
|
+
|
5
|
+
`semverrb` follows the Semantic Versioning 2.0.0 standard:
|
6
|
+
|
7
|
+
1. Versions are in the format MAJOR.MINOR.PATCH.
|
8
|
+
- Increment MAJOR when making incompatible API changes.
|
9
|
+
- Increment MINOR when adding functionality in a backward-compatible manner.
|
10
|
+
- Increment PATCH for backward-compatible bug fixes.
|
11
|
+
2. Prerelease identifiers (e.g., -alpha, -beta) and build metadata (e.g., +build.1) are supported.
|
12
|
+
|
13
|
+
Learn more about Semantic Versioning at https://semver.org.
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Add this line to your application's Gemfile:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
gem 'semverrb'
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
$ bundle install
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
$ gem install semverrb
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
### Show the Current Version
|
33
|
+
|
34
|
+
To display the current version from your VERSION file (default is plain text):
|
35
|
+
|
36
|
+
```
|
37
|
+
semver current
|
38
|
+
```
|
39
|
+
You can also specify the format explicitly:
|
40
|
+
|
41
|
+
```
|
42
|
+
semver current --format json
|
43
|
+
semver current --format yaml
|
44
|
+
```
|
45
|
+
|
46
|
+
### Bump the Version
|
47
|
+
|
48
|
+
Available Bump Types
|
49
|
+
|
50
|
+
- major: Increment the major version (e.g., 1.2.3 → 2.0.0).
|
51
|
+
- minor: Increment the minor version (e.g., 1.2.3 → 1.3.0).
|
52
|
+
- patch: Increment the patch version (e.g., 1.2.3 → 1.2.4).
|
53
|
+
- prerelease: Add a pre-release identifier (e.g., 1.2.3 → 1.2.3-alpha).
|
54
|
+
|
55
|
+
Example Commands
|
56
|
+
|
57
|
+
```
|
58
|
+
# Bump the patch version (default format: plain text)
|
59
|
+
semver bump patch
|
60
|
+
```
|
61
|
+
|
62
|
+
```
|
63
|
+
# Bump the minor version in JSON format
|
64
|
+
semver bump minor --format json
|
65
|
+
```
|
66
|
+
```
|
67
|
+
# Bump the major version in YAML format
|
68
|
+
semver bump major --format yaml
|
69
|
+
```
|
70
|
+
```
|
71
|
+
# Add a prerelease identifier (e.g., alpha, beta, rc)
|
72
|
+
semver bump prerelease --prerelease alpha
|
73
|
+
```
|
74
|
+
|
75
|
+
### Supported Formats
|
76
|
+
|
77
|
+
The semverrb gem supports managing version numbers in multiple formats:
|
78
|
+
|
79
|
+
- Plain Text (Default):
|
80
|
+
|
81
|
+
```
|
82
|
+
1.2.3
|
83
|
+
```
|
84
|
+
|
85
|
+
- JSON:
|
86
|
+
|
87
|
+
```json
|
88
|
+
{
|
89
|
+
"version": "1.2.3"
|
90
|
+
}
|
91
|
+
```
|
92
|
+
|
93
|
+
- YAML:
|
94
|
+
|
95
|
+
```yaml
|
96
|
+
version: 1.2.3
|
97
|
+
```
|
98
|
+
|
99
|
+
Specify the format with the `--format` flag, and the gem will read/write the version file accordingly.
|
100
|
+
|
101
|
+
## Development
|
102
|
+
|
103
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
104
|
+
|
105
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
106
|
+
|
107
|
+
## Contributing
|
108
|
+
|
109
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/semverrb.
|
110
|
+
|
111
|
+
## License
|
112
|
+
|
113
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "semverrb"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/semver
ADDED
File without changes
|
data/bin/setup
ADDED
data/lib/semver/cli.rb
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "version_parser"
|
4
|
+
require "octokit"
|
5
|
+
|
6
|
+
module Semver
|
7
|
+
class CLI < Thor
|
8
|
+
VERSION_FILE = "VERSION"
|
9
|
+
|
10
|
+
desc "current", "Displays the current semantic version"
|
11
|
+
option :format, type: :string, default: "plain", enum: %w[plain json yaml], desc: "Specify the version format"
|
12
|
+
def current
|
13
|
+
version = read_version(options[:format])
|
14
|
+
puts "Current version: #{version}"
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "bump [major|minor|patch|prerelease]", "Bumps the semantic version"
|
18
|
+
option :format, type: :string, default: "plain", enum: %w[plain json yaml], desc: "Specify the version format"
|
19
|
+
option :prerelease, type: :string, desc: "Specify a prerelease identifier (e.g., alpha, beta)"
|
20
|
+
option :github_release_notes, type: :boolean, default: false, desc: "Create GitHub release notes"
|
21
|
+
def bump(type)
|
22
|
+
current_version = read_version(options[:format])
|
23
|
+
version = VersionParser.new(current_version)
|
24
|
+
|
25
|
+
case type
|
26
|
+
when "major"
|
27
|
+
version = bump_major(version)
|
28
|
+
when "minor"
|
29
|
+
version = bump_minor(version)
|
30
|
+
when "patch"
|
31
|
+
version = bump_patch(version)
|
32
|
+
when "prerelease"
|
33
|
+
prerelease = options[:prerelease] || "alpha"
|
34
|
+
version = bump_prerelease(version, prerelease)
|
35
|
+
else
|
36
|
+
puts "Invalid type. Use 'major', 'minor', 'patch', or 'prerelease'."
|
37
|
+
return
|
38
|
+
end
|
39
|
+
|
40
|
+
write_version(version.to_s, options[:format])
|
41
|
+
update_version_rb(version.to_s)
|
42
|
+
|
43
|
+
puts "Version bumped to: #{version}"
|
44
|
+
|
45
|
+
return unless options[:github_release_notes]
|
46
|
+
|
47
|
+
create_github_release(version.to_s)
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def read_version(format)
|
53
|
+
case format
|
54
|
+
when "plain"
|
55
|
+
File.exist?(VERSION_FILE) ? File.read(VERSION_FILE).strip : "0.0.0"
|
56
|
+
when "json"
|
57
|
+
require "json"
|
58
|
+
JSON.parse(File.read(VERSION_FILE))["version"]
|
59
|
+
when "yaml"
|
60
|
+
require "yaml"
|
61
|
+
YAML.safe_load(File.read(VERSION_FILE))["version"]
|
62
|
+
else
|
63
|
+
raise ArgumentError, "Unsupported format: #{format}"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def write_version(version, format)
|
68
|
+
case format
|
69
|
+
when "plain"
|
70
|
+
File.write(VERSION_FILE, version)
|
71
|
+
when "json"
|
72
|
+
require "json"
|
73
|
+
File.write(VERSION_FILE, JSON.pretty_generate({ "version" => version }))
|
74
|
+
when "yaml"
|
75
|
+
require "yaml"
|
76
|
+
File.write(VERSION_FILE, { "version" => version }.to_yaml)
|
77
|
+
else
|
78
|
+
raise ArgumentError, "Unsupported format: #{format}"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def update_version_rb(new_version)
|
83
|
+
version_rb_path = find_version_rb
|
84
|
+
if version_rb_path
|
85
|
+
content = File.read(version_rb_path)
|
86
|
+
updated_content = content.gsub(/VERSION = ["']\d+\.\d+\.\d+["']/, "VERSION = \"#{new_version}\"")
|
87
|
+
File.write(version_rb_path, updated_content)
|
88
|
+
puts "Updated #{version_rb_path} to version #{new_version}"
|
89
|
+
else
|
90
|
+
puts "Warning: version.rb file not found. Skipping update."
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def find_version_rb
|
95
|
+
gemspec = Dir["*.gemspec"].first
|
96
|
+
return nil unless gemspec
|
97
|
+
|
98
|
+
gem_name = File.basename(gemspec, ".gemspec")
|
99
|
+
version_rb = File.join("lib", gem_name, "version.rb")
|
100
|
+
|
101
|
+
File.exist?(version_rb) ? version_rb : nil
|
102
|
+
end
|
103
|
+
|
104
|
+
def bump_major(version)
|
105
|
+
VersionParser.new("#{version.major + 1}.0.0")
|
106
|
+
end
|
107
|
+
|
108
|
+
def bump_minor(version)
|
109
|
+
VersionParser.new("#{version.major}.#{version.minor + 1}.0")
|
110
|
+
end
|
111
|
+
|
112
|
+
def bump_patch(version)
|
113
|
+
VersionParser.new("#{version.major}.#{version.minor}.#{version.patch + 1}")
|
114
|
+
end
|
115
|
+
|
116
|
+
def bump_prerelease(version, prerelease)
|
117
|
+
VersionParser.new("#{version.major}.#{version.minor}.#{version.patch}-#{prerelease}")
|
118
|
+
end
|
119
|
+
|
120
|
+
def create_github_release(version)
|
121
|
+
github_token = ENV["GITHUB_TOKEN"]
|
122
|
+
repo = ENV["GITHUB_REPO"]
|
123
|
+
|
124
|
+
unless github_token && repo
|
125
|
+
config = load_config
|
126
|
+
github_token ||= config["github_token"]
|
127
|
+
repo ||= config["github_repo"]
|
128
|
+
end
|
129
|
+
|
130
|
+
unless github_token && repo
|
131
|
+
puts "Error: GitHub token and repository must be set in environment variables or config file."
|
132
|
+
return
|
133
|
+
end
|
134
|
+
|
135
|
+
client = Octokit::Client.new(access_token: github_token)
|
136
|
+
|
137
|
+
client.create_release(
|
138
|
+
repo,
|
139
|
+
"v#{version}",
|
140
|
+
name: "Release #{version}",
|
141
|
+
body: "Release notes for version #{version}",
|
142
|
+
draft: false,
|
143
|
+
prerelease: false
|
144
|
+
)
|
145
|
+
|
146
|
+
puts "GitHub release created for version #{version}"
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Semver
|
4
|
+
class VersionParser
|
5
|
+
SEMVER_REGEX = /\A(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?:-(?<prerelease>[0-9A-Za-z\.-]+))?(?:\+(?<buildmetadata>[0-9A-Za-z\.-]+))?\z/.freeze
|
6
|
+
|
7
|
+
attr_reader :major, :minor, :patch, :prerelease, :buildmetadata
|
8
|
+
|
9
|
+
def initialize(version_string)
|
10
|
+
match = version_string.match(SEMVER_REGEX)
|
11
|
+
raise ArgumentError, "Invalid semantic version: #{version_string}" unless match
|
12
|
+
|
13
|
+
@major = match[:major].to_i
|
14
|
+
@minor = match[:minor].to_i
|
15
|
+
@patch = match[:patch].to_i
|
16
|
+
@prerelease = match[:prerelease]
|
17
|
+
@buildmetadata = match[:buildmetadata]
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_s
|
21
|
+
version = "#{major}.#{minor}.#{patch}"
|
22
|
+
version += "-#{prerelease}" if prerelease
|
23
|
+
version += "+#{buildmetadata}" if buildmetadata
|
24
|
+
version
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/semver.rb
ADDED
data/semverrb.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/semver/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "semverrb"
|
7
|
+
spec.version = Semver::VERSION
|
8
|
+
spec.authors = ["Chris Davis"]
|
9
|
+
spec.email = ["chrisdavis179@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Semantic Versioning for Ruby"
|
12
|
+
spec.description = "Semantic Versioning for Ruby"
|
13
|
+
spec.homepage = "https://github.com/thecdavis/semverrb"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0")
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
19
|
+
spec.metadata["changelog_uri"] = "#{spec.homepage}/CHANGELOG.txt"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: semverrb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Davis
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
11
|
+
dependencies: []
|
12
|
+
description: Semantic Versioning for Ruby
|
13
|
+
email:
|
14
|
+
- chrisdavis179@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- ".github/workflows/gem-push.yml"
|
20
|
+
- ".gitignore"
|
21
|
+
- ".rspec"
|
22
|
+
- ".rubocop.yml"
|
23
|
+
- CHANGELOG.txt
|
24
|
+
- Gemfile
|
25
|
+
- Gemfile.lock
|
26
|
+
- LICENSE.txt
|
27
|
+
- README.md
|
28
|
+
- Rakefile
|
29
|
+
- bin/console
|
30
|
+
- bin/semver
|
31
|
+
- bin/setup
|
32
|
+
- lib/semver.rb
|
33
|
+
- lib/semver/cli.rb
|
34
|
+
- lib/semver/version.rb
|
35
|
+
- lib/semver/version_parser.rb
|
36
|
+
- semverrb.gemspec
|
37
|
+
homepage: https://github.com/thecdavis/semverrb
|
38
|
+
licenses:
|
39
|
+
- MIT
|
40
|
+
metadata:
|
41
|
+
homepage_uri: https://github.com/thecdavis/semverrb
|
42
|
+
source_code_uri: https://github.com/thecdavis/semverrb
|
43
|
+
changelog_uri: https://github.com/thecdavis/semverrb/CHANGELOG.txt
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '3.0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubygems_version: 3.6.2
|
59
|
+
specification_version: 4
|
60
|
+
summary: Semantic Versioning for Ruby
|
61
|
+
test_files: []
|