Skip to content

Commit 11c49f7

Browse files
committed
🎨 Updated gem template w/ kettle-dev v1.1.1
1 parent 727343c commit 11c49f7

File tree

4 files changed

+101
-44
lines changed

4 files changed

+101
-44
lines changed

.gitlab-ci.yml

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,63 @@
1212
#include:
1313
# - template: Security/SAST.gitlab-ci.yml
1414

15+
default:
16+
image: ruby
17+
1518
variables:
19+
BUNDLE_INSTALL_FLAGS: "--quiet --jobs=$(nproc) --retry=3"
20+
BUNDLE_FROZEN: "false" # No lockfile!
21+
BUNDLE_GEMFILE: Appraisal.root.gemfile
1622
K_SOUP_COV_DEBUG: true
1723
K_SOUP_COV_DO: true
1824
K_SOUP_COV_HARD: true
1925
K_SOUP_COV_MIN_BRANCH: 100
2026
K_SOUP_COV_MIN_LINE: 100
2127
K_SOUP_COV_VERBOSE: true
22-
K_SOUP_COV_FORMATTERS: "html,rcov,lcov,json,tty"
28+
K_SOUP_COV_FORMATTERS: "tty"
2329
K_SOUP_COV_MULTI_FORMATTERS: true
2430
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
2531

26-
default:
27-
image: ruby:3.4.3
32+
workflow:
33+
rules:
34+
# For merge requests, create a pipeline.
35+
- if: '$CI_MERGE_REQUEST_IID'
36+
# For the ` main ` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
37+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
38+
# For tags, create a pipeline.
39+
- if: '$CI_COMMIT_TAG'
2840

29-
before_script:
30-
- gem update --silent --system
41+
.current_ruby_template: &current_ruby_template
42+
image: ruby:${RUBY_VERSION}
43+
stage: test
44+
script:
45+
# || true so we don't fail here, because it'll probably work even if the gem update fails
46+
- gem update --system > /dev/null 2>&1 || true
3147
- mkdir -p vendor/bundle
3248
- bundle config set path 'vendor/bundle'
3349
- chmod +t -R vendor/bundle
3450
- chmod o-w -R vendor/bundle
35-
- bundle install --jobs 4 --retry 3
51+
# Setup appraisal2
52+
- bundle install
53+
# Bundle a specific appraisal
54+
- bundle exec appraisal unlocked_deps bundle install
55+
# Light smoke test
56+
- bundle exec appraisal unlocked_deps bin/rake --tasks
57+
# Run tests, skipping those that won't work in CI
58+
- >
59+
bundle exec appraisal unlocked_deps \
60+
bin/rspec spec \
61+
--tag \~ci_skip \
62+
--format progress \
63+
--format RspecJunitFormatter
3664
37-
run_tests:
38-
script:
39-
- bundle exec rake
65+
cache:
66+
key: ${CI_JOB_IMAGE}
67+
paths:
68+
- vendor/ruby
69+
70+
current-ruby:
71+
<<: *current_ruby_template
72+
parallel:
73+
matrix:
74+
- RUBY_VERSION: ["3.2", "3.3", "3.4"]

CHANGELOG.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Please file a bug if you notice a violation of semantic versioning.
8484
- More documentation, and yard task for documentation (@pboling)
8585
- Documentation of Ruby version and SemVer support (@pboling)
8686
### Fixed
87-
- [#3](https://gitlab.com/oauth-xx/version_gem/-/issues/3) - Allow packaging without signing (@pboling)
87+
- [#3](https://gitlab.com/ruby-oauth/version_gem/-/issues/3) - Allow packaging without signing (@pboling)
8888
- to support secure linux distros which have alternate means of signing packages within their package managers
8989
- Code coverage tracking (@pboling)
9090
- Documentation of usage in gemspec via `Kernel.load` (@pboling)
@@ -163,28 +163,28 @@ Please file a bug if you notice a violation of semantic versioning.
163163
### Added
164164
- Initial release, with basic version parsing API (@pboling)
165165

166-
[Unreleased]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.8...main
167-
[1.1.8]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.7...v1.1.8
168-
[1.1.8t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.8
169-
[1.1.7]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.6...v1.1.7
170-
[1.1.7t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.7
171-
[1.1.6]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.5...v1.1.6
172-
[1.1.6t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.6
173-
[1.1.5]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.4...v1.1.5
174-
[1.1.5t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.5
175-
[1.1.4]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.3...v1.1.4
176-
[1.1.4t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.4
177-
[1.1.3]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.2...v1.1.3
178-
[1.1.3t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.3
179-
[1.1.2]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.1...v1.1.2
180-
[1.1.2t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.2
181-
[1.1.1]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.1.0...v1.1.1
182-
[1.1.1t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.1
183-
[1.1.0]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.0.2...v1.1.0
184-
[1.1.0t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.1.0
185-
[1.0.2]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.0.1...v1.0.2
186-
[1.0.2t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.0.2
187-
[1.0.1]: https://gitlab.com/oauth-xx/version_gem/-/compare/v1.0.0...v1.0.1
188-
[1.0.1t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.0.1
189-
[1.0.0]: https://gitlab.com/oauth-xx/version_gem/-/compare/a3055964517c159bf214712940982034b75264be...v1.0.0
190-
[1.0.0t]: https://gitlab.com/oauth-xx/version_gem/-/tags/v1.0.0
166+
[Unreleased]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.8...main
167+
[1.1.8]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.7...v1.1.8
168+
[1.1.8t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.8
169+
[1.1.7]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.6...v1.1.7
170+
[1.1.7t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.7
171+
[1.1.6]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.5...v1.1.6
172+
[1.1.6t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.6
173+
[1.1.5]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.4...v1.1.5
174+
[1.1.5t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.5
175+
[1.1.4]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.3...v1.1.4
176+
[1.1.4t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.4
177+
[1.1.3]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.2...v1.1.3
178+
[1.1.3t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.3
179+
[1.1.2]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.1...v1.1.2
180+
[1.1.2t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.2
181+
[1.1.1]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.1.0...v1.1.1
182+
[1.1.1t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.1
183+
[1.1.0]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.0.2...v1.1.0
184+
[1.1.0t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.1.0
185+
[1.0.2]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.0.1...v1.0.2
186+
[1.0.2t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.0.2
187+
[1.0.1]: https://gitlab.com/ruby-oauth/version_gem/-/compare/v1.0.0...v1.0.1
188+
[1.0.1t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.0.1
189+
[1.0.0]: https://gitlab.com/ruby-oauth/version_gem/-/compare/a3055964517c159bf214712940982034b75264be...v1.0.0
190+
[1.0.0t]: https://gitlab.com/ruby-oauth/version_gem/-/tags/v1.0.0

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This project should be a safe, welcoming space for collaboration, so contributor
55
the [code of conduct][🤝conduct].
66

77
To submit a patch, please fork the project, create a patch with tests, and send a pull request.
8-
Post a message to the [google group][⛳mail-list] if you want to.
98

109
Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
1110

@@ -147,7 +146,9 @@ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in th
147146

148147
#### Automated process
149148

150-
Run `bundle exec kettle-release`.
149+
1. Update version.rb to contian the correct version-to-be-released.
150+
2. Run `bundle exec kettle-changelog`.
151+
3. Run `bundle exec kettle-release`.
151152

152153
#### Manual process
153154

@@ -176,7 +177,6 @@ Run `bundle exec kettle-release`.
176177
13. Run `bundle exec rake release` which will create a git tag for the version,
177178
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
178179

179-
[⛳mail-list]: http://groups.google.com/group/oauth-ruby
180180
[📜src-gl]: https://gitlab.com/ruby-oauth/version_gem/
181181
[📜src-cb]: https://codeberg.org/ruby-oauth/version_gem
182182
[📜src-gh]: https://github.com/ruby-oauth/version_gem

version_gem.gemspec

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,28 +113,50 @@ Gem::Specification.new do |spec|
113113

114114
# Dev, Test, & Release Tasks
115115
spec.add_development_dependency("kettle-dev", "~> 1.1", ">= 1.1.1") # ruby >= 2.3.0
116+
117+
# Security
116118
spec.add_development_dependency("bundler-audit", "~> 0.9.2") # ruby >= 2.0.0
117119

120+
# Tasks
118121
spec.add_development_dependency("rake", "~> 13.0") # ruby >= 2.2.0
119122

123+
# Debugging
120124
spec.add_development_dependency("require_bench", "~> 1.0", ">= 1.0.4") # ruby >= 2.2.0
121125

126+
# Testing
122127
spec.add_development_dependency("appraisal2", "~> 3.0") # ruby >= 1.8.7, for testing against multiple versions of dependencies
123-
124128
spec.add_development_dependency("kettle-test", "~> 1.0") # ruby >= 2.3
125-
126129
spec.add_development_dependency("rspec-pending_for") # ruby >= 2.3, used to skip specs on incompatible Rubies
127130

131+
# Releasing
128132
spec.add_development_dependency("ruby-progressbar", "~> 1.13") # ruby >= 0
129-
130133
spec.add_development_dependency("stone_checksums", "~> 1.0", ">= 1.0.2") # ruby >= 2.2.0
131134

132-
# spec.add_development_dependency("erb", ">= 2.2") # ruby >= 2.3.0, not SemVer, old rubies get dropped in a patch.
135+
# Git integration (optional)
136+
# The 'git' gem is optional; version_gem falls back to shelling out to `git` if it is not present.
137+
# The current release of the git gem depends on activesupport, which makes it too heavy to depend on directly
138+
# spec.add_dependency("git", ">= 1.19.1") # ruby >= 2.3
133139

140+
# Development tasks
141+
# The cake is a lie. erb v2.2, the oldest release on RubyGems.org, was never compatible with Ruby 2.3.
142+
# This means we have no choice but to use the erb that shipped with Ruby 2.3
143+
# /opt/hostedtoolcache/Ruby/2.3.8/x64/lib/ruby/gems/2.3.0/gems/erb-2.2.2/lib/erb.rb:670:in `prepare_trim_mode': undefined method `match?' for "-":String (NoMethodError)
144+
# spec.add_development_dependency("erb", ">= 2.2") # ruby >= 2.3.0, not SemVer, old rubies get dropped in a patch.
134145
spec.add_development_dependency("gitmoji-regex", "~> 1.0", ">= 1.0.3") # ruby >= 2.3.0
135146

147+
# HTTP recording for deterministic specs
148+
# It seems that somehow just having a newer version of appraisal installed breaks
149+
# Ruby 2.3 and 2.4 even if their bundle specifies an older version,
150+
# and as a result it can only be a dependency in the appraisals.
151+
# | An error occurred while loading spec_helper.
152+
# | Failure/Error: require "vcr"
153+
# |
154+
# | NoMethodError:
155+
# | undefined method `delete_prefix' for "CONTENT_LENGTH":String
156+
# | # ./spec/config/vcr.rb:3:in `require'
157+
# | # ./spec/config/vcr.rb:3:in `<top (required)>'
158+
# | # ./spec/spec_helper.rb:8:in `require_relative'
159+
# | # ./spec/spec_helper.rb:8:in `<top (required)>'
136160
# spec.add_development_dependency("vcr", ">= 4") # 6.0 claims to support ruby >= 2.3, but fails on ruby 2.4
137-
138161
# spec.add_development_dependency("webmock", ">= 3") # Last version to support ruby >= 2.3
139-
140162
end

0 commit comments

Comments
 (0)