diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 07b38878..d4ce1b2d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,18 +25,18 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8f3b3ba..c1420471 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: release: if: github.repository == 'sporkmonger/addressable' - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: id-token: write # for trusted publishing steps: @@ -19,7 +19,7 @@ jobs: - name: Install libidn run: sudo apt-get install libidn11-dev - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67d6da8d..f0c591f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,13 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.7] + ruby: [ruby] idna_mode: [native, pure] - os: [ubuntu-22.04] + os: [ubuntu-latest] env: IDNA_MODE: ${{ matrix.idna_mode }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install libidn run: sudo apt-get install libidn11-dev @@ -45,8 +45,8 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.7] - os: [ubuntu-22.04] + ruby: [ruby] + os: [ubuntu-latest] env: BUNDLE_WITHOUT: development COVERALLS_SERVICE_NAME: github @@ -54,7 +54,7 @@ jobs: COVERALLS_DEBUG: true CI_BUILD_NUMBER: ${{ github.run_id }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install libidn run: sudo apt-get install libidn11-dev @@ -88,32 +88,33 @@ jobs: - 3.1 - 3.2 - 3.3 - - jruby-9.1 - - jruby-9.2 - - jruby-9.3 + - 3.4 - jruby-9.4 - - truffleruby-22.2 - - truffleruby-22.3 + - jruby-10.0 + - truffleruby-24 + - truffleruby-25 os: - - ubuntu-22.04 + - ubuntu-24.04 gemfile: - Gemfile include: - - { os: ubuntu-22.04, ruby: 2.7, gemfile: gemfiles/public_suffix_2.rb } - - { os: ubuntu-22.04, ruby: 2.7, gemfile: gemfiles/public_suffix_3.rb } - - { os: ubuntu-22.04, ruby: 2.7, gemfile: gemfiles/public_suffix_4.rb } + - { os: ubuntu-24.04, ruby: 2.7, gemfile: gemfiles/public_suffix_2.rb } + - { os: ubuntu-24.04, ruby: 2.7, gemfile: gemfiles/public_suffix_3.rb } + - { os: ubuntu-24.04, ruby: 2.7, gemfile: gemfiles/public_suffix_4.rb } + - { os: ubuntu-24.04, ruby: 3.1, gemfile: gemfiles/public_suffix_5.rb } # Ubuntu - - { os: ubuntu-22.04, ruby: 3.1 } + - { os: ubuntu-22.04, ruby: ruby } # macOS - - { os: macos-13, ruby: 3.1 } + - { os: macos-14, ruby: ruby } # arm64 + - { os: macos-15, ruby: ruby } # arm64 + - { os: macos-15-intel, ruby: ruby } # EoL August 2027 (https://github.com/actions/runner-images/issues/13046) # Windows - - { os: windows-2019, ruby: 3.1 } - - { os: windows-2022, ruby: 3.1 } - - { os: windows-2022, ruby: jruby-9.3 } + - { os: windows-2022, ruby: ruby } + - { os: windows-2022, ruby: jruby } # allowed to fail - - { os: ubuntu-22.04, ruby: head, gemfile: Gemfile, allow-failure: true } - - { os: ubuntu-22.04, ruby: jruby-head, gemfile: Gemfile, allow-failure: true } - - { os: ubuntu-22.04, ruby: truffleruby-head, gemfile: Gemfile, allow-failure: true } + - { os: ubuntu-24.04, ruby: head, gemfile: Gemfile, allow-failure: true } + - { os: ubuntu-24.04, ruby: jruby-head, gemfile: Gemfile, allow-failure: true } + - { os: ubuntu-24.04, ruby: truffleruby-head, gemfile: Gemfile, allow-failure: true } env: BUNDLE_GEMFILE: ${{ matrix.gemfile }} BUNDLE_WITHOUT: development:coverage @@ -122,7 +123,7 @@ jobs: # https://github.com/jruby/jruby/issues/7182#issuecomment-1112953015 JAVA_OPTS: -Djdk.io.File.enableADS=true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install libidn (Ubuntu) if: startsWith(matrix.os, 'ubuntu') diff --git a/gemfiles/public_suffix_5.rb b/gemfiles/public_suffix_5.rb new file mode 100644 index 00000000..bf8db849 --- /dev/null +++ b/gemfiles/public_suffix_5.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# Assumes this gemfile is used from the project root +eval_gemfile "../Gemfile" + +gem "public_suffix", "~> 5.0" diff --git a/spec/addressable/uri_spec.rb b/spec/addressable/uri_spec.rb index 07818490..68ee3031 100644 --- a/spec/addressable/uri_spec.rb +++ b/spec/addressable/uri_spec.rb @@ -6816,9 +6816,10 @@ def to_str describe Addressable::URI, "when initialized in a non-main `Ractor`" do it "should have the same value as if used in the main `Ractor`" do pending("Ruby 3.0+ for `Ractor` support") unless defined?(Ractor) + value_method = RUBY_VERSION >= "3.5.0" ? :value : :take # see https://github.com/ruby/ruby/pull/13445 main = Addressable::URI.parse("http://example.com") expect( - Ractor.new { Addressable::URI.parse("http://example.com") }.take + Ractor.new { Addressable::URI.parse("http://example.com") }.public_send(value_method) ).to eq(main) end end diff --git a/tasks/profile.rake b/tasks/profile.rake index b697d489..60d7a666 100644 --- a/tasks/profile.rake +++ b/tasks/profile.rake @@ -20,7 +20,7 @@ namespace :profile do puts "\n\n" if ENV["CI"] - report.pretty_print(print_options) + report.pretty_print(**print_options) else t_allocated = report.scale_bytes(report.total_allocated_memsize) t_retained = report.scale_bytes(report.total_retained_memsize)