kettle-dev 1.2.3 → 2.0.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +176 -3
- data/CITATION.cff +2 -2
- data/CONTRIBUTING.md +11 -17
- data/README.md +390 -319
- data/exe/kettle-dev-setup +12 -63
- data/exe/kettle-gh-release +82 -0
- data/lib/kettle/dev/gem_spec_reader.rb +2 -2
- data/lib/kettle/dev/open_collective_config.rb +12 -0
- data/lib/kettle/dev/rakelib/yard.rake +15 -0
- data/lib/kettle/dev/tasks/ci_task.rb +4 -4
- data/lib/kettle/dev/version.rb +1 -1
- data/lib/kettle/dev.rb +4 -12
- data/sig/kettle/dev/source_merger.rbs +40 -56
- data.tar.gz.sig +0 -0
- metadata +15 -144
- metadata.gz.sig +0 -0
- data/.aiignore.example +0 -19
- data/.devcontainer/apt-install/devcontainer-feature.json +0 -9
- data/.devcontainer/apt-install/install.sh +0 -11
- data/.devcontainer/devcontainer.json +0 -28
- data/.env.local.example +0 -31
- data/.envrc +0 -47
- data/.envrc.example +0 -51
- data/.envrc.no-osc.example +0 -51
- data/.git-hooks/commit-msg +0 -54
- data/.git-hooks/commit-subjects-goalie.txt +0 -8
- data/.git-hooks/footer-template.erb.txt +0 -16
- data/.git-hooks/prepare-commit-msg +0 -8
- data/.github/.codecov.yml.example +0 -14
- data/.github/FUNDING.yml +0 -13
- data/.github/FUNDING.yml.no-osc.example +0 -13
- data/.github/dependabot.yml +0 -13
- data/.github/workflows/ancient.yml +0 -83
- data/.github/workflows/ancient.yml.example +0 -81
- data/.github/workflows/auto-assign.yml +0 -21
- data/.github/workflows/codeql-analysis.yml +0 -70
- data/.github/workflows/coverage.yml +0 -127
- data/.github/workflows/coverage.yml.example +0 -127
- data/.github/workflows/current.yml +0 -116
- data/.github/workflows/current.yml.example +0 -115
- data/.github/workflows/dep-heads.yml +0 -117
- data/.github/workflows/dependency-review.yml +0 -20
- data/.github/workflows/discord-notifier.yml.example +0 -39
- data/.github/workflows/heads.yml +0 -117
- data/.github/workflows/heads.yml.example +0 -116
- data/.github/workflows/jruby.yml +0 -82
- data/.github/workflows/jruby.yml.example +0 -72
- data/.github/workflows/legacy.yml +0 -76
- data/.github/workflows/license-eye.yml +0 -40
- data/.github/workflows/locked_deps.yml +0 -85
- data/.github/workflows/opencollective.yml +0 -40
- data/.github/workflows/style.yml +0 -67
- data/.github/workflows/supported.yml +0 -75
- data/.github/workflows/truffle.yml +0 -99
- data/.github/workflows/unlocked_deps.yml +0 -84
- data/.github/workflows/unsupported.yml +0 -76
- data/.gitignore +0 -50
- data/.gitlab-ci.yml.example +0 -134
- data/.idea/.gitignore +0 -45
- data/.junie/guidelines-rbs.md +0 -49
- data/.junie/guidelines.md +0 -141
- data/.junie/guidelines.md.example +0 -140
- data/.licenserc.yaml +0 -7
- data/.opencollective.yml +0 -3
- data/.opencollective.yml.example +0 -3
- data/.qlty/qlty.toml +0 -79
- data/.rspec +0 -9
- data/.rubocop.yml +0 -13
- data/.rubocop_rspec.yml +0 -33
- data/.simplecov +0 -16
- data/.simplecov.example +0 -11
- data/.tool-versions +0 -1
- data/.yardignore +0 -13
- data/.yardopts +0 -14
- data/Appraisal.root.gemfile +0 -10
- data/Appraisals +0 -151
- data/Appraisals.example +0 -102
- data/CHANGELOG.md.example +0 -47
- data/CONTRIBUTING.md.example +0 -227
- data/FUNDING.md.no-osc.example +0 -63
- data/Gemfile +0 -40
- data/Gemfile.example +0 -34
- data/README.md.example +0 -570
- data/README.md.no-osc.example +0 -536
- data/Rakefile.example +0 -68
- data/gemfiles/modular/coverage.gemfile +0 -6
- data/gemfiles/modular/debug.gemfile +0 -13
- data/gemfiles/modular/documentation.gemfile +0 -14
- data/gemfiles/modular/erb/r2/v3.0.gemfile +0 -1
- data/gemfiles/modular/erb/r2.3/default.gemfile +0 -6
- data/gemfiles/modular/erb/r2.6/v2.2.gemfile +0 -3
- data/gemfiles/modular/erb/r3/v5.0.gemfile +0 -1
- data/gemfiles/modular/erb/r3.1/v4.0.gemfile +0 -2
- data/gemfiles/modular/erb/vHEAD.gemfile +0 -2
- data/gemfiles/modular/injected.gemfile +0 -60
- data/gemfiles/modular/mutex_m/r2/v0.3.gemfile +0 -2
- data/gemfiles/modular/mutex_m/r2.4/v0.1.gemfile +0 -3
- data/gemfiles/modular/mutex_m/r3/v0.3.gemfile +0 -2
- data/gemfiles/modular/mutex_m/vHEAD.gemfile +0 -2
- data/gemfiles/modular/optional.gemfile +0 -8
- data/gemfiles/modular/optional.gemfile.example +0 -5
- data/gemfiles/modular/runtime_heads.gemfile +0 -10
- data/gemfiles/modular/runtime_heads.gemfile.example +0 -8
- data/gemfiles/modular/stringio/r2/v3.0.gemfile +0 -5
- data/gemfiles/modular/stringio/r2.4/v0.0.2.gemfile +0 -4
- data/gemfiles/modular/stringio/r3/v3.0.gemfile +0 -5
- data/gemfiles/modular/stringio/vHEAD.gemfile +0 -2
- data/gemfiles/modular/style.gemfile +0 -25
- data/gemfiles/modular/style.gemfile.example +0 -25
- data/gemfiles/modular/templating.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2.3/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2.4/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2.6/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r3/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r3.1/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/vHEAD.gemfile +0 -3
- data/gemfiles/modular/x_std_libs.gemfile +0 -2
- data/kettle-dev.gemspec.example +0 -154
- data/lib/kettle/dev/modular_gemfiles.rb +0 -119
- data/lib/kettle/dev/prism_appraisals.rb +0 -351
- data/lib/kettle/dev/prism_gemfile.rb +0 -177
- data/lib/kettle/dev/prism_gemspec.rb +0 -284
- data/lib/kettle/dev/prism_utils.rb +0 -201
- data/lib/kettle/dev/rakelib/install.rake +0 -10
- data/lib/kettle/dev/rakelib/template.rake +0 -10
- data/lib/kettle/dev/setup_cli.rb +0 -403
- data/lib/kettle/dev/source_merger.rb +0 -622
- data/lib/kettle/dev/tasks/install_task.rb +0 -553
- data/lib/kettle/dev/tasks/template_task.rb +0 -975
- data/lib/kettle/dev/template_helpers.rb +0 -685
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Ex-Standard Library gems
|
|
2
|
-
gem "irb", "~> 1.15", ">= 1.15.2" # removed from stdlib in 3.5
|
|
3
|
-
|
|
4
|
-
platform :mri do
|
|
5
|
-
# Debugging - Ensure ENV["DEBUG"] == "true" to use debuggers within spec suite
|
|
6
|
-
# Use binding.break, binding.b, or debugger in code
|
|
7
|
-
gem "debug", ">= 1.1" # ruby >= 2.7
|
|
8
|
-
|
|
9
|
-
# Dev Console - Binding.pry - Irb replacement
|
|
10
|
-
# gem "pry", "~> 0.14" # ruby >= 2.0
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
gem "gem_bench", "~> 2.0", ">= 2.0.5"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Documentation
|
|
4
|
-
gem "kramdown", "~> 2.5", ">= 2.5.1", require: false # Ruby >= 2.5
|
|
5
|
-
gem "kramdown-parser-gfm", "~> 1.1", require: false # Ruby >= 2.3
|
|
6
|
-
gem "yard", "~> 0.9", ">= 0.9.37", require: false
|
|
7
|
-
gem "yaml-converter", "~> 0.1", require: false # Ruby >= 3.2
|
|
8
|
-
gem "yard-yaml", "~> 0.1", require: false # Ruby >= 3.2
|
|
9
|
-
gem "yard-fence", "~> 0.8", require: false # Ruby >= 3.2
|
|
10
|
-
gem "yard-junk", "~> 0.0", ">= 0.0.10", github: "pboling/yard-junk", branch: "next", require: false
|
|
11
|
-
gem "yard-relative_markdown_links", "~> 0.6", require: false
|
|
12
|
-
|
|
13
|
-
# Std Lib extractions
|
|
14
|
-
gem "rdoc", "~> 6.11", require: false
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
gem "erb", "~> 3.0" # ruby >= 2.7.0
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# The cake is a lie.
|
|
2
|
-
# erb v2.2, the oldest release, was never compatible with Ruby 2.3.
|
|
3
|
-
# In addition, erb does not follow SemVer, and old rubies get dropped in a patch.
|
|
4
|
-
# This means we have no choice but to use the erb that shipped with Ruby 2.3
|
|
5
|
-
# /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)
|
|
6
|
-
# gem "erb", ">= 2.2" # ruby >= 2.3.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
gem "erb", "~> 5.0" # ruby >= 3.2.0
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# NOTE: It is preferable to list development dependencies in the gemspec due to increased
|
|
2
|
-
# visibility and discoverability on the gem server.
|
|
3
|
-
# However, this gem sits underneath all my other gems, and also "depends on" many of them.
|
|
4
|
-
# So instead of depending on them directly it injects them into the other gem's gemspec on install.
|
|
5
|
-
# This gem, and its injected dev dependencies, will install on Ruby down to 2.3.x.
|
|
6
|
-
# This gem does not inject runtime dependencies.
|
|
7
|
-
# Thus, dev dependencies injected into gemspecs must have
|
|
8
|
-
#
|
|
9
|
-
# required_ruby_version ">= 2.3" (or lower)
|
|
10
|
-
#
|
|
11
|
-
# Development dependencies that require strictly newer Ruby versions should be in a "gemfile",
|
|
12
|
-
# and preferably a modular one (see gemfiles/modular/*.gemfile).
|
|
13
|
-
|
|
14
|
-
# Security
|
|
15
|
-
gem "bundler-audit", "~> 0.9.2" # ruby >= 2.0.0
|
|
16
|
-
|
|
17
|
-
# Tasks
|
|
18
|
-
gem "rake", "~> 13.0" # ruby >= 2.2.0
|
|
19
|
-
|
|
20
|
-
# Debugging
|
|
21
|
-
gem "require_bench", "~> 1.0", ">= 1.0.4" # ruby >= 2.2.0
|
|
22
|
-
|
|
23
|
-
# Testing
|
|
24
|
-
gem "appraisal2", "~> 3.0" # ruby >= 1.8.7, for testing against multiple versions of dependencies
|
|
25
|
-
gem "kettle-test", "~> 1.0" # ruby >= 2.3
|
|
26
|
-
gem "rspec-pending_for" # ruby >= 2.3, used to skip specs on incompatible Rubies
|
|
27
|
-
|
|
28
|
-
# Releasing
|
|
29
|
-
gem "ruby-progressbar", "~> 1.13" # ruby >= 0
|
|
30
|
-
gem "stone_checksums", "~> 1.0", ">= 1.0.2" # ruby >= 2.2.0
|
|
31
|
-
|
|
32
|
-
# Git integration (optional)
|
|
33
|
-
# The 'git' gem is optional; kettle-dev falls back to shelling out to `git` if it is not present.
|
|
34
|
-
# The current release of the git gem depends on activesupport, which makes it too heavy to depend on directly
|
|
35
|
-
# Compatibility with the git gem is tested via appraisals instead.
|
|
36
|
-
# gem("git", ">= 1.19.1") # ruby >= 2.3
|
|
37
|
-
|
|
38
|
-
# Development tasks
|
|
39
|
-
gem "gitmoji-regex", "~> 1.0", ">= 1.0.3" # ruby >= 2.3.0
|
|
40
|
-
|
|
41
|
-
# The cake is a lie. erb v2.2, the oldest release, was never compatible with Ruby 2.3.
|
|
42
|
-
# This means we have no choice but to use the erb that shipped with Ruby 2.3
|
|
43
|
-
# /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)
|
|
44
|
-
# gem "erb", ">= 2.2" # ruby >= 2.3.0, not SemVer, old rubies get dropped in a patch.
|
|
45
|
-
|
|
46
|
-
# HTTP recording for deterministic specs
|
|
47
|
-
# It seems that somehow just having a newer version of appraisal installed breaks
|
|
48
|
-
# Ruby 2.3 and 2.4 even if their bundle specifies an older version,
|
|
49
|
-
# and as a result it can only be a dependency in the appraisals.
|
|
50
|
-
# | An error occurred while loading spec_helper.
|
|
51
|
-
# | Failure/Error: require "vcr"
|
|
52
|
-
# |
|
|
53
|
-
# | NoMethodError:
|
|
54
|
-
# | undefined method `delete_prefix' for "CONTENT_LENGTH":String
|
|
55
|
-
# | # ./spec/config/vcr.rb:3:in `require'
|
|
56
|
-
# | # ./spec/config/vcr.rb:3:in `<top (required)>'
|
|
57
|
-
# | # ./spec/spec_helper.rb:8:in `require_relative'
|
|
58
|
-
# | # ./spec/spec_helper.rb:8:in `<top (required)>'
|
|
59
|
-
# gem "vcr", ">= 4" # 6.0 claims to support ruby >= 2.3, but fails on ruby 2.4
|
|
60
|
-
# gem "webmock", ">= 3" # Last version to support ruby >= 2.3
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Optional dependencies are not depended on directly, but may be used if present.
|
|
2
|
-
# git gem is not a direct dependency for two reasons:
|
|
3
|
-
# 1. it is incompatible with Truffleruby v23
|
|
4
|
-
# 2. it depends on activesupport, which is too heavy
|
|
5
|
-
gem "git", ">= 1.19.1" # ruby >= 2.3
|
|
6
|
-
|
|
7
|
-
# URL parsing with Unicode support (falls back to URI if not available)
|
|
8
|
-
gem "addressable", ">= 2.8", "< 3" # ruby >= 2.2
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Test against HEAD of runtime dependencies so we can proactively file bugs
|
|
4
|
-
|
|
5
|
-
# Ruby >= 2.2
|
|
6
|
-
gem "version_gem", github: "ruby-oauth/version_gem", branch: "main"
|
|
7
|
-
|
|
8
|
-
eval_gemfile("x_std_libs/vHEAD.gemfile")
|
|
9
|
-
|
|
10
|
-
eval_gemfile("recording/vHEAD.gemfile")
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# We run rubocop on the latest version of Ruby,
|
|
4
|
-
# but in support of the oldest supported version of Ruby
|
|
5
|
-
|
|
6
|
-
gem "reek", "~> 6.5"
|
|
7
|
-
# gem "rubocop", "~> 1.80", ">= 1.80.2" # constrained by standard
|
|
8
|
-
gem "rubocop-packaging", "~> 0.6", ">= 0.6.0"
|
|
9
|
-
gem "standard", ">= 1.50"
|
|
10
|
-
gem "rubocop-on-rbs", "~> 1.8" # ruby >= 3.1.0
|
|
11
|
-
|
|
12
|
-
# Std Lib extractions
|
|
13
|
-
gem "benchmark", "~> 0.4", ">= 0.4.1" # Removed from Std Lib in Ruby 3.5
|
|
14
|
-
|
|
15
|
-
if ENV.fetch("RUBOCOP_LTS_LOCAL", "false").casecmp("true").zero?
|
|
16
|
-
home = ENV["HOME"]
|
|
17
|
-
gem "rubocop-lts", path: "#{home}/src/rubocop-lts/rubocop-lts"
|
|
18
|
-
gem "rubocop-lts-rspec", path: "#{home}/src/rubocop-lts/rubocop-lts-rspec"
|
|
19
|
-
gem "rubocop-ruby2_3", path: "#{home}/src/rubocop-lts/rubocop-ruby2_3"
|
|
20
|
-
gem "standard-rubocop-lts", path: "#{home}/src/rubocop-lts/standard-rubocop-lts"
|
|
21
|
-
else
|
|
22
|
-
gem "rubocop-lts", "~> 10.0"
|
|
23
|
-
gem "rubocop-ruby2_3", "~> 2.0"
|
|
24
|
-
gem "rubocop-rspec", "~> 3.6"
|
|
25
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# We run rubocop on the latest version of Ruby,
|
|
4
|
-
# but in support of the oldest supported version of Ruby
|
|
5
|
-
|
|
6
|
-
gem "reek", "~> 6.5"
|
|
7
|
-
# gem "rubocop", "~> 1.73", ">= 1.73.2" # constrained by standard
|
|
8
|
-
gem "rubocop-packaging", "~> 0.6", ">= 0.6.0"
|
|
9
|
-
gem "standard", ">= 1.50"
|
|
10
|
-
gem "rubocop-on-rbs", "~> 1.8" # ruby >= 3.1.0
|
|
11
|
-
|
|
12
|
-
# Std Lib extractions
|
|
13
|
-
gem "benchmark", "~> 0.4", ">= 0.4.1" # Removed from Std Lib in Ruby 3.5
|
|
14
|
-
|
|
15
|
-
if ENV.fetch("RUBOCOP_LTS_LOCAL", "false").casecmp("true").zero?
|
|
16
|
-
home = ENV["HOME"] || Dir.home
|
|
17
|
-
gem "rubocop-lts", path: "#{home}/src/rubocop-lts/rubocop-lts"
|
|
18
|
-
gem "rubocop-lts-rspec", path: "#{home}/src/rubocop-lts/rubocop-lts-rspec"
|
|
19
|
-
gem "{RUBOCOP|RUBY|GEM}", path: "#{home}/src/rubocop-lts/{RUBOCOP|RUBY|GEM}"
|
|
20
|
-
gem "standard-rubocop-lts", path: "#{home}/src/rubocop-lts/standard-rubocop-lts"
|
|
21
|
-
else
|
|
22
|
-
gem "rubocop-lts", "{RUBOCOP|LTS|CONSTRAINT}"
|
|
23
|
-
gem "{RUBOCOP|RUBY|GEM}"
|
|
24
|
-
gem "rubocop-rspec", "~> 3.6"
|
|
25
|
-
end
|
data/kettle-dev.gemspec.example
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
gem_version =
|
|
5
|
-
if RUBY_VERSION >= "3.1" # rubocop:disable Gemspec/RubyVersionGlobalsUsage
|
|
6
|
-
# Loading Version into an anonymous module allows version.rb to get code coverage from SimpleCov!
|
|
7
|
-
# See: https://github.com/simplecov-ruby/simplecov/issues/557#issuecomment-2630782358
|
|
8
|
-
# See: https://github.com/panorama-ed/memo_wise/pull/397
|
|
9
|
-
Module.new.tap { |mod| Kernel.load("#{__dir__}/lib/kettle/dev/version.rb", mod) }::Kettle::Dev::Version::VERSION
|
|
10
|
-
else
|
|
11
|
-
# NOTE: Use __FILE__ or __dir__ until removal of Ruby 1.x support
|
|
12
|
-
# __dir__ introduced in Ruby 1.9.1
|
|
13
|
-
# lib = File.expand_path("../lib", __FILE__)
|
|
14
|
-
lib = File.expand_path("lib", __dir__)
|
|
15
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
16
|
-
require "kettle/dev/version"
|
|
17
|
-
Kettle::Dev::Version::VERSION
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
Gem::Specification.new do |spec|
|
|
21
|
-
spec.name = "kettle-dev"
|
|
22
|
-
spec.version = gem_version
|
|
23
|
-
spec.authors = ["Peter H. Boling"]
|
|
24
|
-
spec.email = ["floss@galtzo.com"]
|
|
25
|
-
|
|
26
|
-
spec.summary = "🍲 "
|
|
27
|
-
spec.description = "🍲 "
|
|
28
|
-
spec.homepage = "https://github.com/kettle-rb/kettle-dev"
|
|
29
|
-
spec.licenses = ["MIT"]
|
|
30
|
-
spec.required_ruby_version = ">= 2.3.0"
|
|
31
|
-
|
|
32
|
-
# Linux distros often package gems and securely certify them independent
|
|
33
|
-
# of the official RubyGem certification process. Allowed via ENV["SKIP_GEM_SIGNING"]
|
|
34
|
-
# Ref: https://gitlab.com/ruby-oauth/version_gem/-/issues/3
|
|
35
|
-
# Hence, only enable signing if `SKIP_GEM_SIGNING` is not set in ENV.
|
|
36
|
-
# See CONTRIBUTING.md
|
|
37
|
-
unless ENV.include?("SKIP_GEM_SIGNING")
|
|
38
|
-
user_cert = "certs/#{ENV.fetch("GEM_CERT_USER", ENV["USER"])}.pem"
|
|
39
|
-
cert_file_path = File.join(__dir__, user_cert)
|
|
40
|
-
cert_chain = cert_file_path.split(",")
|
|
41
|
-
cert_chain.select! { |fp| File.exist?(fp) }
|
|
42
|
-
if cert_file_path && cert_chain.any?
|
|
43
|
-
spec.cert_chain = cert_chain
|
|
44
|
-
if $PROGRAM_NAME.end_with?("gem") && ARGV[0] == "build"
|
|
45
|
-
spec.signing_key = File.join(Gem.user_home, ".ssh", "gem-private_key.pem")
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
spec.metadata["homepage_uri"] = "https://#{spec.name.tr("_", "-")}.galtzo.com/"
|
|
51
|
-
spec.metadata["source_code_uri"] = "#{spec.homepage}/tree/v#{spec.version}"
|
|
52
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md"
|
|
53
|
-
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
|
|
54
|
-
spec.metadata["documentation_uri"] = "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}"
|
|
55
|
-
spec.metadata["funding_uri"] = "https://github.com/sponsors/pboling"
|
|
56
|
-
spec.metadata["wiki_uri"] = "#{spec.homepage}/wiki"
|
|
57
|
-
spec.metadata["news_uri"] = "https://www.railsbling.com/tags/#{spec.name}"
|
|
58
|
-
spec.metadata["discord_uri"] = "https://discord.gg/3qme4XHNKN"
|
|
59
|
-
spec.metadata["rubygems_mfa_required"] = "true"
|
|
60
|
-
|
|
61
|
-
# Specify which files are part of the released package.
|
|
62
|
-
spec.files = Dir[
|
|
63
|
-
# Code / tasks / data (NOTE: exe/ is specified via spec.bindir and spec.executables below)
|
|
64
|
-
"lib/**/*.rb",
|
|
65
|
-
"lib/**/*.rake",
|
|
66
|
-
# Signatures
|
|
67
|
-
"sig/**/*.rbs",
|
|
68
|
-
]
|
|
69
|
-
|
|
70
|
-
# Automatically included with gem package, no need to list again in files.
|
|
71
|
-
spec.extra_rdoc_files = Dir[
|
|
72
|
-
# Files (alphabetical)
|
|
73
|
-
"CHANGELOG.md",
|
|
74
|
-
"CITATION.cff",
|
|
75
|
-
"CODE_OF_CONDUCT.md",
|
|
76
|
-
"CONTRIBUTING.md",
|
|
77
|
-
"FUNDING.md",
|
|
78
|
-
"LICENSE.txt",
|
|
79
|
-
"README.md",
|
|
80
|
-
"REEK",
|
|
81
|
-
"RUBOCOP.md",
|
|
82
|
-
"SECURITY.md",
|
|
83
|
-
]
|
|
84
|
-
spec.rdoc_options += [
|
|
85
|
-
"--title",
|
|
86
|
-
"#{spec.name} - #{spec.summary}",
|
|
87
|
-
"--main",
|
|
88
|
-
"README.md",
|
|
89
|
-
"--exclude",
|
|
90
|
-
"^sig/",
|
|
91
|
-
"--line-numbers",
|
|
92
|
-
"--inline-source",
|
|
93
|
-
"--quiet",
|
|
94
|
-
]
|
|
95
|
-
spec.require_paths = ["lib"]
|
|
96
|
-
spec.bindir = "exe"
|
|
97
|
-
# Listed files are the relative paths from bindir above.
|
|
98
|
-
spec.executables = []
|
|
99
|
-
|
|
100
|
-
# Utilities
|
|
101
|
-
spec.add_dependency("version_gem", "~> 1.1", ">= 1.1.9") # ruby >= 2.2.0
|
|
102
|
-
|
|
103
|
-
# NOTE: It is preferable to list development dependencies in the gemspec due to increased
|
|
104
|
-
# visibility and discoverability.
|
|
105
|
-
# However, development dependencies in gemspec will install on
|
|
106
|
-
# all versions of Ruby that will run in CI.
|
|
107
|
-
# This gem, and its gemspec runtime dependencies, will install on Ruby down to {K_D_MIN_RUBY}.
|
|
108
|
-
# This gem, and its gemspec development dependencies, will install on Ruby down to {K_D_MIN_DEV_RUBY}.
|
|
109
|
-
# Thus, dev dependencies in gemspec must have
|
|
110
|
-
#
|
|
111
|
-
# required_ruby_version ">= {K_D_MIN_DEV_RUBY}" (or lower)
|
|
112
|
-
#
|
|
113
|
-
# Development dependencies that require strictly newer Ruby versions should be in a "gemfile",
|
|
114
|
-
# and preferably a modular one (see gemfiles/modular/*.gemfile).
|
|
115
|
-
|
|
116
|
-
# Dev, Test, & Release Tasks
|
|
117
|
-
spec.add_development_dependency("{KETTLE|DEV|GEM}", "~> 1.2") # ruby >= 2.3.0
|
|
118
|
-
|
|
119
|
-
# Security
|
|
120
|
-
spec.add_development_dependency("bundler-audit", "~> 0.9.3") # ruby >= 2.0.0
|
|
121
|
-
|
|
122
|
-
# Tasks
|
|
123
|
-
spec.add_development_dependency("rake", "~> 13.0") # ruby >= 2.2.0
|
|
124
|
-
|
|
125
|
-
# Debugging
|
|
126
|
-
spec.add_development_dependency("require_bench", "~> 1.0", ">= 1.0.4") # ruby >= 2.2.0
|
|
127
|
-
|
|
128
|
-
# Testing
|
|
129
|
-
spec.add_development_dependency("appraisal2", "~> 3.0") # ruby >= 1.8.7, for testing against multiple versions of dependencies
|
|
130
|
-
spec.add_development_dependency("kettle-test", "~> 1.0", ">= 1.0.6") # ruby >= 2.3
|
|
131
|
-
|
|
132
|
-
# Releasing
|
|
133
|
-
spec.add_development_dependency("ruby-progressbar", "~> 1.13") # ruby >= 0
|
|
134
|
-
spec.add_development_dependency("stone_checksums", "~> 1.0", ">= 1.0.3") # ruby >= 2.2.0
|
|
135
|
-
|
|
136
|
-
# Git integration (optional)
|
|
137
|
-
# The 'git' gem is optional; kettle-dev falls back to shelling out to `git` if it is not present.
|
|
138
|
-
# The current release of the git gem depends on activesupport, which makes it too heavy to depend on directly
|
|
139
|
-
# spec.add_dependency("git", ">= 1.19.1") # ruby >= 2.3
|
|
140
|
-
|
|
141
|
-
# Development tasks
|
|
142
|
-
# The cake is a lie. erb v2.2, the oldest release, was never compatible with Ruby 2.3.
|
|
143
|
-
# This means we have no choice but to use the erb that shipped with Ruby 2.3
|
|
144
|
-
# /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)
|
|
145
|
-
# spec.add_development_dependency("erb", ">= 2.2") # ruby >= 2.3.0, not SemVer, old rubies get dropped in a patch.
|
|
146
|
-
spec.add_development_dependency("gitmoji-regex", "~> 1.0", ">= 1.0.3") # ruby >= 2.3.0
|
|
147
|
-
|
|
148
|
-
# HTTP recording for deterministic specs
|
|
149
|
-
# In Ruby 3.5 (HEAD) the CGI library has been pared down, so we also need to depend on gem "cgi" for ruby@head
|
|
150
|
-
# This is done in the "head" appraisal.
|
|
151
|
-
# See: https://github.com/vcr/vcr/issues/1057
|
|
152
|
-
# spec.add_development_dependency("vcr", ">= 4") # 6.0 claims to support ruby >= 2.3, but fails on ruby 2.4
|
|
153
|
-
# spec.add_development_dependency("webmock", ">= 3") # Last version to support ruby >= 2.3
|
|
154
|
-
end
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Kettle
|
|
4
|
-
module Dev
|
|
5
|
-
# Utilities for copying modular Gemfiles and related directories
|
|
6
|
-
# in a DRY fashion. Used by both the template rake task and the
|
|
7
|
-
# setup CLI to ensure gemfiles/modular/* are present before use.
|
|
8
|
-
module ModularGemfiles
|
|
9
|
-
MODULAR_GEMFILE_DIR = "gemfiles/modular"
|
|
10
|
-
|
|
11
|
-
module_function
|
|
12
|
-
|
|
13
|
-
# Copy the modular gemfiles and nested directories from the gem
|
|
14
|
-
# checkout into the target project, prompting where appropriate
|
|
15
|
-
# via the provided helpers.
|
|
16
|
-
#
|
|
17
|
-
# @param helpers [Kettle::Dev::TemplateHelpers] helper API
|
|
18
|
-
# @param project_root [String] destination project root
|
|
19
|
-
# @param gem_checkout_root [String] kettle-dev checkout root (source)
|
|
20
|
-
# @param min_ruby [Gem::Version, nil] minimum Ruby version (for style.gemfile tuning)
|
|
21
|
-
# @return [void]
|
|
22
|
-
def sync!(helpers:, project_root:, gem_checkout_root:, min_ruby: nil)
|
|
23
|
-
# 4a) gemfiles/modular/*.gemfile except style.gemfile (handled below)
|
|
24
|
-
# Note: `injected.gemfile` is only intended for testing this gem, and isn't even actively used there. It is not part of the template.
|
|
25
|
-
# Note: `style.gemfile` is handled separately below.
|
|
26
|
-
modular_gemfiles = %w[
|
|
27
|
-
coverage
|
|
28
|
-
debug
|
|
29
|
-
documentation
|
|
30
|
-
optional
|
|
31
|
-
runtime_heads
|
|
32
|
-
templating
|
|
33
|
-
x_std_libs
|
|
34
|
-
]
|
|
35
|
-
modular_gemfiles.each do |base|
|
|
36
|
-
modular_gemfile = "#{base}.gemfile"
|
|
37
|
-
src = helpers.prefer_example(File.join(gem_checkout_root, MODULAR_GEMFILE_DIR, modular_gemfile))
|
|
38
|
-
dest = File.join(project_root, MODULAR_GEMFILE_DIR, modular_gemfile)
|
|
39
|
-
helpers.copy_file_with_prompt(src, dest, allow_create: true, allow_replace: true) do |content|
|
|
40
|
-
# Use apply_strategy for proper AST-based merging with Prism
|
|
41
|
-
helpers.apply_strategy(content, dest)
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# 4b) gemfiles/modular/style.gemfile with dynamic rubocop constraints
|
|
46
|
-
modular_gemfile = "style.gemfile"
|
|
47
|
-
src = helpers.prefer_example(File.join(gem_checkout_root, MODULAR_GEMFILE_DIR, modular_gemfile))
|
|
48
|
-
dest = File.join(project_root, MODULAR_GEMFILE_DIR, modular_gemfile)
|
|
49
|
-
if File.basename(src).sub(/\.example\z/, "") == "style.gemfile"
|
|
50
|
-
helpers.copy_file_with_prompt(src, dest, allow_create: true, allow_replace: true) do |content|
|
|
51
|
-
# Adjust rubocop-lts constraint based on min_ruby
|
|
52
|
-
version_map = [
|
|
53
|
-
[Gem::Version.new("1.8"), "~> 0.1"],
|
|
54
|
-
[Gem::Version.new("1.9"), "~> 2.0"],
|
|
55
|
-
[Gem::Version.new("2.0"), "~> 4.0"],
|
|
56
|
-
[Gem::Version.new("2.1"), "~> 6.0"],
|
|
57
|
-
[Gem::Version.new("2.2"), "~> 8.0"],
|
|
58
|
-
[Gem::Version.new("2.3"), "~> 10.0"],
|
|
59
|
-
[Gem::Version.new("2.4"), "~> 12.0"],
|
|
60
|
-
[Gem::Version.new("2.5"), "~> 14.0"],
|
|
61
|
-
[Gem::Version.new("2.6"), "~> 16.0"],
|
|
62
|
-
[Gem::Version.new("2.7"), "~> 18.0"],
|
|
63
|
-
[Gem::Version.new("3.0"), "~> 20.0"],
|
|
64
|
-
[Gem::Version.new("3.1"), "~> 22.0"],
|
|
65
|
-
[Gem::Version.new("3.2"), "~> 24.0"],
|
|
66
|
-
[Gem::Version.new("3.3"), "~> 26.0"],
|
|
67
|
-
[Gem::Version.new("3.4"), "~> 28.0"],
|
|
68
|
-
]
|
|
69
|
-
new_constraint = nil
|
|
70
|
-
rubocop_ruby_gem_version = nil
|
|
71
|
-
ruby1_8 = version_map.first
|
|
72
|
-
begin
|
|
73
|
-
if min_ruby
|
|
74
|
-
version_map.reverse_each do |min, req|
|
|
75
|
-
if min_ruby >= min
|
|
76
|
-
new_constraint = req
|
|
77
|
-
rubocop_ruby_gem_version = min.segments.join("_")
|
|
78
|
-
break
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
if !new_constraint || !rubocop_ruby_gem_version
|
|
83
|
-
# A gem with no declared minimum ruby is effectively >= 1.8.7
|
|
84
|
-
new_constraint = ruby1_8[1]
|
|
85
|
-
rubocop_ruby_gem_version = ruby1_8[0].segments.join("_")
|
|
86
|
-
end
|
|
87
|
-
rescue StandardError => e
|
|
88
|
-
Kettle::Dev.debug_error(e, __method__) if defined?(Kettle::Dev.debug_error)
|
|
89
|
-
# ignore, use default
|
|
90
|
-
ensure
|
|
91
|
-
new_constraint ||= ruby1_8[1]
|
|
92
|
-
rubocop_ruby_gem_version ||= ruby1_8[0].segments.join("_")
|
|
93
|
-
end
|
|
94
|
-
if new_constraint && rubocop_ruby_gem_version
|
|
95
|
-
token = "{RUBOCOP|LTS|CONSTRAINT}"
|
|
96
|
-
content.gsub!(token, new_constraint) if content.include?(token)
|
|
97
|
-
token = "{RUBOCOP|RUBY|GEM}"
|
|
98
|
-
content.gsub!(token, "rubocop-ruby#{rubocop_ruby_gem_version}") if content.include?(token)
|
|
99
|
-
end
|
|
100
|
-
# Use apply_strategy for proper AST-based merging with Prism
|
|
101
|
-
helpers.apply_strategy(content, dest)
|
|
102
|
-
end
|
|
103
|
-
else
|
|
104
|
-
helpers.copy_file_with_prompt(src, dest, allow_create: true, allow_replace: true) do |content|
|
|
105
|
-
# Use apply_strategy for proper AST-based merging with Prism
|
|
106
|
-
helpers.apply_strategy(content, dest)
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# 4c) Copy modular directories with nested/versioned files
|
|
111
|
-
%w[erb mutex_m stringio x_std_libs].each do |dir|
|
|
112
|
-
src_dir = File.join(gem_checkout_root, MODULAR_GEMFILE_DIR, dir)
|
|
113
|
-
dest_dir = File.join(project_root, MODULAR_GEMFILE_DIR, dir)
|
|
114
|
-
helpers.copy_dir_with_prompt(src_dir, dest_dir)
|
|
115
|
-
end
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
end
|
|
119
|
-
end
|