From 8bc6d892b3b812d2773e17d13675792df76f181a Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 28 Sep 2026 16:40:54 +1300 Subject: [PATCH 1/2] Modernize code. --- .github/workflows/documentation-coverage.yaml | 3 +- .github/workflows/documentation.yaml | 7 +-- .github/workflows/rubocop.yaml | 2 +- .github/workflows/test-coverage.yaml | 8 ++-- .github/workflows/test-external.yaml | 2 +- .github/workflows/test.yaml | 2 +- .gitignore | 3 +- bake.rb | 3 +- config/external.yaml | 5 ++ fiber-profiler.gemspec | 4 +- gems.rb | 3 +- lib/fiber/profiler/thread_local.rb | 2 +- lib/fiber/profiler/version.rb | 2 +- readme.md | 18 +++---- release.cert | 48 ++++++++++--------- 15 files changed, 64 insertions(+), 48 deletions(-) create mode 100644 config/external.yaml diff --git a/.github/workflows/documentation-coverage.yaml b/.github/workflows/documentation-coverage.yaml index f6d11c3..6d06003 100644 --- a/.github/workflows/documentation-coverage.yaml +++ b/.github/workflows/documentation-coverage.yaml @@ -7,13 +7,14 @@ permissions: env: COVERAGE: PartialSummary + BUNDLE_WITH: maintenance jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ruby diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index bfb7b97..a6013fc 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: permissions: @@ -24,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: @@ -39,7 +40,7 @@ jobs: run: bundle exec bake utopia:project:static --force no - name: Upload documentation artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v5 with: path: docs @@ -54,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/rubocop.yaml b/.github/workflows/rubocop.yaml index da60e9e..03e44d5 100644 --- a/.github/workflows/rubocop.yaml +++ b/.github/workflows/rubocop.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ruby diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 5798e84..f13cdac 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -23,7 +23,7 @@ jobs: - ruby steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} @@ -33,7 +33,7 @@ jobs: timeout-minutes: 5 run: bundle exec bake test - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v7 with: include-hidden-files: true if-no-files-found: error @@ -45,13 +45,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ruby bundler-cache: true - - uses: actions/download-artifact@v6 + - uses: actions/download-artifact@v8 - name: Validate coverage timeout-minutes: 5 diff --git a/.github/workflows/test-external.yaml b/.github/workflows/test-external.yaml index 9ec63e2..1f32c7a 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -22,7 +22,7 @@ jobs: - "4.0" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e91d97c..32501fa 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -36,7 +36,7 @@ jobs: experimental: true steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} diff --git a/.gitignore b/.gitignore index aef2ecb..353f3df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /agents.md -/.context +/.agents/ /.bundle +/vendor/bundle /pkg /gems.locked /.covered.db diff --git a/bake.rb b/bake.rb index b3d94ea..fb930ea 100644 --- a/bake.rb +++ b/bake.rb @@ -27,10 +27,11 @@ def before_test self.build end -# Update the project documentation with the new version number. +# Update copyrights and project documentation for the new version. # # @parameter version [String] The new version number. def after_gem_release_version_increment(version) + context["modernize:license"].call context["releases:update"].call(version) context["utopia:project:update"].call end diff --git a/config/external.yaml b/config/external.yaml new file mode 100644 index 0000000..73b07a0 --- /dev/null +++ b/config/external.yaml @@ -0,0 +1,5 @@ +async: + url: https://github.com/socketry/async + command: bundle exec sus + extra: + - $LOAD_PATH << ::File.expand_path("../../ext", __dir__) diff --git a/fiber-profiler.gemspec b/fiber-profiler.gemspec index 0e412cc..34a491d 100644 --- a/fiber-profiler.gemspec +++ b/fiber-profiler.gemspec @@ -16,11 +16,13 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/socketry/fiber-profiler" spec.metadata = { + "bug_tracker_uri" => "https://github.com/socketry/fiber-profiler/issues", + "changelog_uri" => "https://github.com/socketry/fiber-profiler/blob/main/releases.md", "documentation_uri" => "https://socketry.github.io/fiber-profiler/", "source_code_uri" => "https://github.com/socketry/fiber-profiler.git", } - spec.files = Dir["{bake,context,ext,lib}/**/*", "*.md", "release.cert", base: __dir__] + spec.files = Dir["{bake,context,ext,lib}/**/*", "*.md", base: __dir__] spec.require_paths = ["lib"] spec.extensions = ["ext/extconf.rb"] diff --git a/gems.rb b/gems.rb index 7763b0f..456c2f0 100644 --- a/gems.rb +++ b/gems.rb @@ -15,13 +15,14 @@ gem "bake-modernize" gem "bake-releases" + gem "decode" + gem "utopia-project" end group :test do gem "sus" gem "covered" - gem "decode" gem "rubocop" gem "rubocop-md" diff --git a/lib/fiber/profiler/thread_local.rb b/lib/fiber/profiler/thread_local.rb index 4e7908d..0d7d666 100644 --- a/lib/fiber/profiler/thread_local.rb +++ b/lib/fiber/profiler/thread_local.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2025-2026, by Samuel Williams. +# Copyright, 2026, by Samuel Williams. require_relative "fork_handler" diff --git a/lib/fiber/profiler/version.rb b/lib/fiber/profiler/version.rb index 83a98f3..9324d5a 100644 --- a/lib/fiber/profiler/version.rb +++ b/lib/fiber/profiler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2025, by Samuel Williams. +# Copyright, 2025-2026, by Samuel Williams. # @namespace class Fiber diff --git a/readme.md b/readme.md index 876bbc8..0a34399 100644 --- a/readme.md +++ b/readme.md @@ -42,29 +42,29 @@ Please see the [project releases](https://socketry.github.io/fiber-profiler/rele We welcome contributions to this project. -1. Fork it. +1. Fork the repository. 2. Create your feature branch (`git checkout -b my-new-feature`). -3. Commit your changes (`git commit -am 'Add some feature'`). +3. Commit your changes (`git commit -am 'Add some feature.'`). 4. Push to the branch (`git push origin my-new-feature`). -5. Create new Pull Request. +5. Create a new pull request. ### Running Tests To run the test suite: -``` shell -bundle exec sus +``` bash +$ bundle exec sus ``` ### Making Releases -To prepare a release branch and open a pull request from an up-to-date `main`: +To make a new release: -``` shell -bundle exec bake gem:github:release:patch # or minor or major +``` bash +$ bundle exec bake gem:github:release:patch # or minor or major ``` -After the release PR is merged, GitHub Actions automatically publishes the verified gem through the `rubygems` environment. See [bake-gem-github](https://github.com/socketry/bake-gem-github) for setup, remote releases, and recovery. +See [bake-gem-github](https://github.com/socketry/bake-gem-github) for setup and release instructions. ### Developer Certificate of Origin diff --git a/release.cert b/release.cert index d88bb2f..d98e595 100644 --- a/release.cert +++ b/release.cert @@ -1,24 +1,28 @@ -----BEGIN CERTIFICATE----- -MIIEFDCCAnygAwIBAgIBATANBgkqhkiG9w0BAQsFADAwMREwDwYDVQQKDAhTb2Nr -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3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM +zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW +xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O +BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs +aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs +aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE +cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl +xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/ +c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp +8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws +JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP +eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt +Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8 +voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg= -----END CERTIFICATE----- From c193e2df21ee53d15c8d57e35535c991694119e6 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Mon, 28 Sep 2026 16:43:27 +1300 Subject: [PATCH 2/2] Remove jruby and truffleruby. --- .github/workflows/test.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 32501fa..964a4bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,12 +25,6 @@ jobs: experimental: [false] include: - - os: ubuntu - ruby: truffleruby - experimental: true - - os: ubuntu - ruby: jruby - experimental: true - os: ubuntu ruby: head experimental: true