diff --git a/.github/workflows/rake.yml b/.github/workflows/rake.yml new file mode 100644 index 0000000..9a6f9b2 --- /dev/null +++ b/.github/workflows/rake.yml @@ -0,0 +1,18 @@ +# Auto-generated by Cimas: Do not edit it manually! +# See https://github.com/metanorma/cimas +name: rake + +on: + push: + branches: [ master, main ] + tags: [ v* ] + pull_request: + +permissions: + contents: write + +jobs: + rake: + uses: metanorma/ci/.github/workflows/generic-rake.yml@main + secrets: + pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d02aff..878f433 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,17 @@ on: repository_dispatch: types: [ do-release ] +# Least-privilege ceiling for the called rubygems-release.yml: its release job +# needs contents:write (git tag push) and id-token:write (OIDC Trusted Publishing). +permissions: + contents: write + id-token: write + jobs: release: uses: metanorma/ci/.github/workflows/rubygems-release.yml@main with: next_version: ${{ github.event.inputs.next_version }} - release_command: | - bundle install - bundle exec rake release secrets: rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }} pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} diff --git a/.rubocop.yml b/.rubocop.yml index 7ee1ffb..372b21e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,18 +2,30 @@ # See https://github.com/metanorma/cimas inherit_from: - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml + # .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins: + # if listed before oss-guides, the shared config's stricter Metrics/ + # (MethodLength, BlockLength, etc.) rules override the todo's per-file + # grandfathering, and the todo becomes inert on those cops. Empirically + # verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses + # remained; moved last, cleared. Every gem in the metanorma-org fleet + # already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06, + # 54/54 have it), so this reference is safe to emit unconditionally. - .rubocop_todo.yml -inherit_mode: - merge: - - Exclude - -# local repo-specific modifications -# ... +# Rubocop plugins enabled centrally so every metanorma-org gem picks them up +# on cimas sync — best practice belongs at the shared-template layer, not +# per-repo. Per ronaldtse feedback on metanorma/ci#332. plugins: - rubocop-rspec - rubocop-performance - rubocop-rake +# local repo-specific modifications +# ... + AllCops: - TargetRubyVersion: 3.0 + # 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum + # Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before + # this commit — 3.4 was above the org's stated minimum and would have + # applied Rubocop rules that fail-close on gems still targeting 3.3. + TargetRubyVersion: 3.3 diff --git a/metanorma-plugin-lutaml.gemspec b/metanorma-plugin-lutaml.gemspec index 2c81ec1..1c3e72c 100644 --- a/metanorma-plugin-lutaml.gemspec +++ b/metanorma-plugin-lutaml.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.required_ruby_version = ">= 3.0.0" # rubocop:disable Gemspec/RequiredRubyVersion + spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0") spec.add_dependency "asciidoctor" spec.add_dependency "coradoc", "~> 1.1.8"