diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..46f1c90 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "rubocop-lts" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..502c2a0 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main, "*-stable" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main, "*-stable" ] + schedule: + - cron: '35 1 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'ruby' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # 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 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..5344a4e --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,120 @@ +name: Test Coverage + +env: + K_SOUP_COV_MIN_BRANCH: 80 + K_SOUP_COV_MIN_LINE: 91 + K_SOUP_COV_MIN_HARD: true + K_SOUP_COV_DO: true + K_SOUP_COV_COMMAND_NAME: "RSpec Coverage" + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +permissions: + contents: read + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + # Coverage + - ruby: "3.4" + appraisal: "coverage" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + steps: + - uses: amancevice/setup-code-climate@v2 + name: CodeClimate Install + if: ${{ github.event_name != 'pull_request' }} + with: + cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }} + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: "${{ matrix.ruby }}" + rubygems: "${{ matrix.rubygems }}" + bundler: "${{ matrix.bundler }}" + bundler-cache: false + + - name: CodeClimate Pre-build Notification + run: cc-test-reporter before-build + if: ${{ github.event_name != 'pull_request' }} + continue-on-error: ${{ matrix.experimental != 'false' }} + + # This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the root Gemfile at all. + - name: Bundle for Appraisal ${{ matrix.appraisal }} + run: bundle + - name: Install Appraisal ${{ matrix.appraisal }} dependencies + run: bundle exec appraisal ${{ matrix.appraisal }} bundle + - name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} + + - name: CodeClimate Post-build Notification + run: cc-test-reporter after-build + if: ${{ github.event_name != 'pull_request' }} + continue-on-error: ${{ matrix.experimental != 'false' }} + + - name: Code Coverage Summary Report + uses: irongut/CodeCoverageSummary@v1.3.0 + if: ${{ github.event_name == 'pull_request' }} + with: + filename: ./coverage/coverage.xml + badge: true + fail_below_min: true + format: markdown + hide_branch_rate: false + hide_complexity: true + indicators: true + output: both + thresholds: '69 80' + continue-on-error: ${{ matrix.experimental != 'false' }} + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: ${{ github.event_name == 'pull_request' }} + with: + recreate: true + path: code-coverage-results.md + continue-on-error: ${{ matrix.experimental != 'false' }} + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: ${{ matrix.experimental != 'false' }} + + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..0d4a013 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v4 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/heads.yml b/.github/workflows/heads.yml new file mode 100644 index 0000000..32b30a3 --- /dev/null +++ b/.github/workflows/heads.yml @@ -0,0 +1,82 @@ +name: Heads Compat Matrix + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +permissions: + contents: read + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + strategy: + fail-fast: true + matrix: + include: + # ruby-head + - ruby: "ruby-head" + appraisal: "ruby-head" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # truffleruby-head + - ruby: "truffleruby-head" + appraisal: "truffleruby-head" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # jruby-head + - ruby: "jruby-head" + appraisal: "jruby-head" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + # This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the root Gemfile at all. + - name: Bundle for Appraisal ${{ matrix.appraisal }} + run: bundle + - name: Install Appraisal ${{ matrix.appraisal }} dependencies + run: bundle exec appraisal ${{ matrix.appraisal }} bundle + - name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/legacy.yml b/.github/workflows/legacy.yml new file mode 100644 index 0000000..3285654 --- /dev/null +++ b/.github/workflows/legacy.yml @@ -0,0 +1,66 @@ +name: Legacy Compat (EOL, Ruby 3.0) Matrix + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +permissions: + contents: read + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + include: + # Ruby 3.0 + - ruby: "3.0" + appraisal: "ruby-3-0" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: '3.5.23' + bundler: '2.5.23' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + # This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the root Gemfile at all. + - name: Bundle for Appraisal ${{ matrix.appraisal }} + run: bundle + - name: Install Appraisal ${{ matrix.appraisal }} dependencies + run: bundle exec appraisal ${{ matrix.appraisal }} bundle + - name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..3c529aa --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,50 @@ +name: Ruby - Style + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + +jobs: + rubocop: + name: RuboCop + strategy: + fail-fast: false + matrix: + include: + # Style + - ruby: "3.4" + appraisal: "style" + exec_cmd: "rake rubocop_gradual:check" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + # This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the root Gemfile at all. + - name: Bundle for Appraisal ${{ matrix.appraisal }} + run: bundle + - name: Install Appraisal ${{ matrix.appraisal }} dependencies + run: bundle exec appraisal ${{ matrix.appraisal }} bundle + - name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/supported.yml b/.github/workflows/supported.yml new file mode 100644 index 0000000..d7ba6e8 --- /dev/null +++ b/.github/workflows/supported.yml @@ -0,0 +1,89 @@ +name: Supported Compat Matrix + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +permissions: + contents: read + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + strategy: + matrix: + include: + # Ruby 3.1 + - ruby: "3.1" + appraisal: "ruby-3-1" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # Ruby 3.2 + - ruby: "3.2" + appraisal: "ruby-3-2" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # Ruby 3.3 + - ruby: "3.3" + appraisal: "ruby-3-3" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + # Ruby 3.4 + - ruby: "3.4" + appraisal: "ruby-3-4" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: latest + bundler: latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + # This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the root Gemfile at all. + - name: Bundle for Appraisal ${{ matrix.appraisal }} + run: bundle + - name: Install Appraisal ${{ matrix.appraisal }} dependencies + run: bundle exec appraisal ${{ matrix.appraisal }} bundle + - name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.github/workflows/tag_and_release.yml b/.github/workflows/tag_and_release.yml index 9d0264a..11eff4c 100644 --- a/.github/workflows/tag_and_release.yml +++ b/.github/workflows/tag_and_release.yml @@ -20,7 +20,7 @@ jobs: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e552093..4f56ce7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,8 @@ name: Tests on: pull_request: + branches: + - '!*' # Ignore this workflow; Remove workflow once done pulling in upstream PRs permissions: contents: read diff --git a/.github/workflows/unsupported.yml b/.github/workflows/unsupported.yml new file mode 100644 index 0000000..f7a9720 --- /dev/null +++ b/.github/workflows/unsupported.yml @@ -0,0 +1,66 @@ +name: Unsupported Compat (EOL, Ruby 2.6, 2.7) Matrix + +env: + K_SOUP_COV_DO: false + +on: + push: + branches: + - 'main' + tags: + - '!*' # Do not execute on tags + pull_request: + branches: + - '*' + # Allow manually triggering the workflow. + workflow_dispatch: + +permissions: + contents: read + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }} + if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')" + env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile + continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + include: + # Ruby 2.7 + - ruby: "2.7" + appraisal: "ruby-2-7" + exec_cmd: "turbo_tests -n4" + gemfile: "Appraisal.root" + rubygems: '3.4.22' + bundler: '2.4.22' + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby & RubyGems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.rubygems }} + bundler: ${{ matrix.bundler }} + bundler-cache: false + # This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root) + # We need to do this first to get appraisal installed. + # NOTE: This does not use the root Gemfile at all. + - name: Bundle for Appraisal ${{ matrix.appraisal }} + run: bundle + - name: Install Appraisal ${{ matrix.appraisal }} dependencies + run: bundle exec appraisal ${{ matrix.appraisal }} bundle + - name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }} + run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }} diff --git a/.gitignore b/.gitignore index 2a71158..2fde0d5 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,7 @@ tags # End of https://www.toptal.com/developers/gitignore/api/macos,vim +# Appraisals Bundles (only commit the coverage, audit, and style lockfiles) +gemfiles/ruby_*.gemfile.lock +gemfiles/*_head.gemfile.lock +Appraisal.root.gemfile.lock \ No newline at end of file diff --git a/Appraisal.root.gemfile b/Appraisal.root.gemfile new file mode 100644 index 0000000..1d6ae79 --- /dev/null +++ b/Appraisal.root.gemfile @@ -0,0 +1,16 @@ +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } + +# Allow usage of eval_gemfile inside our Appraisal definitions +# Solution is based on this comment: +# https://github.com/thoughtbot/appraisal/issues/154#issuecomment-493804217 +# (and fixed to work in 2025) +eval_gemfile "appraisal-hack.gemfile" + +source "https://rubygems.org" + +# Appraisal Root Gemfile is for running appraisal to generate the Appraisal Gemfiles +# in gemfiles/*gemfile. It is not loaded on CI. +# On CI we only run it for the Appraisal-based builds. +# We do not load the standard Gemfile, as it is tailored for local development. + +gemspec diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..4bd1503 --- /dev/null +++ b/Appraisals @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +appraise "ruby-2-7" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" +end + +appraise "ruby-3-0" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" +end + +appraise "ruby-3-1" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" +end + +appraise "ruby-3-2" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" +end + +appraise "ruby-3-3" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" +end + +appraise "ruby-3-4" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" +end + +# Only run security audit on latest Ruby version +appraise "audit" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" + eval_gemfile "modular/audit.gemfile" +end + +# Only run coverage on latest Ruby version +appraise "coverage" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" + eval_gemfile "modular/coverage.gemfile" +end + +# Only run linter on latest Ruby version (but, in support of oldest supported Ruby version) +appraise "style" do + gem "mutex_m", "~> 0.2" + gem "stringio", "~> 3.0" + eval_gemfile "modular/style.gemfile" +end + +appraise "ruby-head" do + gem "mutex_m", ">= 0.2" + gem "stringio", ">= 3.0" +end + +appraise "truffleruby-head" do + gem "mutex_m", ">= 0.2" + gem "stringio", ">= 3.0" +end + +appraise "jruby-head" do + gem "mutex_m", ">= 0.2" + gem "stringio", ">= 3.0" +end diff --git a/Gemfile b/Gemfile index 3085f59..ca045ea 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,18 @@ source "https://rubygems.org" +# Security Audit +if RUBY_VERSION >= "3" + # Note: Audit fails on Ruby 2.7 because nokogiri has dropped support for Ruby < 3 + # See: https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-r95h-9x8f-r3f7 + # We can't add upgraded nokogiri here unless we are developing on Ruby 3+ + eval_gemfile "gemfiles/modular/audit.gemfile" +end + +# Code Coverage +eval_gemfile "gemfiles/modular/coverage.gemfile" + +# Linting +eval_gemfile "gemfiles/modular/style.gemfile" + # Specify your gem's dependencies in turbo_tests.gemspec gemspec - -gem "rake", "~> 13.0" diff --git a/Gemfile.lock b/Gemfile.lock index 897849f..0999021 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,24 +8,51 @@ PATH GEM remote: https://rubygems.org/ specs: + ansi (1.5.0) appraisal (2.5.0) bundler rake thor (>= 0.14.0) + ast (2.4.2) + bundler-audit (0.9.2) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) coderay (1.1.3) diff-lcs (1.5.1) + diffy (3.4.3) + docile (1.4.1) + json (2.9.1) + kettle-soup-cover (1.0.4) + simplecov (~> 0.22) + simplecov-cobertura (~> 2.1) + simplecov-console (~> 0.9, >= 0.9.1) + simplecov-html (~> 0.12) + simplecov-lcov (~> 0.8) + simplecov-rcov (~> 0.3, >= 0.3.3) + simplecov_json_formatter (~> 0.1, >= 0.1.4) + version_gem (~> 1.1, >= 1.1.4) + language_server-protocol (3.17.0.3) + lint_roller (1.1.0) method_source (1.1.0) parallel (1.26.3) parallel_tests (4.9.0) parallel + parser (3.3.6.0) + ast (~> 2.4.1) + racc pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) + racc (1.8.1) + rainbow (3.1.1) rake (13.2.1) + regexp_parser (2.10.0) + rexml (3.4.0) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) + rspec-block_is_expected (1.0.6) rspec-core (3.13.2) rspec-support (~> 3.13.0) rspec-expectations (3.13.3) @@ -35,15 +62,106 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.2) + rubocop (1.69.2) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-gradual (0.3.6) + diff-lcs (>= 1.2.0, < 2.0) + diffy (~> 3.0) + parallel (~> 1.10) + rainbow (>= 2.2.2, < 4.0) + rubocop (~> 1.0) + rubocop-lts (18.2.1) + rubocop-ruby2_7 (>= 2.0.4, < 3) + standard-rubocop-lts (>= 1.0.3, < 3) + version_gem (>= 1.1.2, < 3) + rubocop-md (1.2.4) + rubocop (>= 1.45) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + rubocop-performance (1.23.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (3.3.0) + rubocop (~> 1.61) + rubocop-ruby2_7 (2.0.6) + rubocop-gradual (~> 0.3, >= 0.3.1) + rubocop-md (~> 1.2) + rubocop-rake (~> 0.6) + rubocop-shopify (~> 2.14) + rubocop-thread_safety (~> 0.5, >= 0.5.1) + standard-rubocop-lts (~> 1.0, >= 1.0.7) + version_gem (>= 1.1.3, < 3) + rubocop-shopify (2.15.1) + rubocop (~> 1.51) + rubocop-thread_safety (0.6.0) + rubocop (>= 1.48.1) + ruby-progressbar (1.13.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-console (0.9.2) + ansi + simplecov + terminal-table + simplecov-html (0.13.1) + simplecov-lcov (0.8.0) + simplecov-rcov (0.3.7) + simplecov (>= 0.4.1) + simplecov_json_formatter (0.1.4) + standard (1.43.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.69.1) + standard-custom (~> 1.0.0) + standard-performance (~> 1.6) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.6.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.23.0) + standard-rubocop-lts (1.0.10) + rspec-block_is_expected (~> 1.0, >= 1.0.5) + standard (>= 1.35.1, < 2) + standard-custom (>= 1.0.2, < 2) + standard-performance (>= 1.3.1, < 2) + version_gem (>= 1.1.4, < 3) + terminal-table (1.6.0) thor (1.3.2) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + version_gem (1.1.4) PLATFORMS ruby DEPENDENCIES appraisal (~> 2.5) + bundler-audit (~> 0.9.2) + kettle-soup-cover (~> 1.0, >= 1.0.4) pry (~> 0.14) rake (~> 13.0) + rubocop-lts (~> 18.2, >= 18.2.1) + rubocop-packaging (~> 0.5, >= 0.5.2) + rubocop-rspec (~> 3.2) + standard (>= 1.35.1, != 1.42.0, != 1.41.1) turbo_tests! BUNDLED WITH diff --git a/README.md b/README.md index f5a285a..4c805b2 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,15 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). +### Appraisals + +From time to time the appraisal gemfiles in `gemfiles/` will need to be updated. +They are created and updated with the command: + +```shell +BUNDLE_GEMFILE=Appraisal.root.gemfile appraisal update +``` + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/serpapi/turbo_tests. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/serpapi/turbo_tests/blob/master/CODE_OF_CONDUCT.md). diff --git a/Rakefile b/Rakefile index dbd59ee..c656deb 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,61 @@ -require "bundler/setup" +# frozen_string_literal: true + require "bundler/gem_tasks" -require "rspec/core/rake_task" -RSpec::Core::RakeTask.new(:spec) +begin + require "rspec/core/rake_task" + + RSpec::Core::RakeTask.new(:spec) +rescue LoadError + task(:spec) do + warn("RSpec is disabled") + end +end + +desc "alias test task to spec" +task test: :spec + +begin + require "reek/rake/task" + Reek::Rake::Task.new do |t| + t.fail_on_error = true + t.verbose = false + t.source_files = "{spec,spec_ignored,spec_orms,lib}/**/*.rb" + end +rescue LoadError + task(:reek) do + warn("reek is disabled") + end +end + +begin + require "yard-junk/rake" + + YardJunk::Rake.define_task +rescue LoadError + task("yard:junk") do + warn("yard:junk is disabled") + end +end + +begin + require "yard" + + YARD::Rake::YardocTask.new(:yard) +rescue LoadError + task(:yard) do + warn("yard is disabled") + end +end + +begin + require "rubocop/lts" + Rubocop::Lts.install_tasks +rescue LoadError + task(:rubocop_gradual) do + warn("RuboCop (Gradual) is disabled") + end +end -task default: :spec +# These tests do not require any services to be running, so this is what we run as default +task default: %i[spec rubocop_gradual:autocorrect yard yard:junk] diff --git a/appraisal-hack.gemfile b/appraisal-hack.gemfile new file mode 100644 index 0000000..b487778 --- /dev/null +++ b/appraisal-hack.gemfile @@ -0,0 +1,40 @@ +# NOTE: There are two identical copies of this file to make this hack work. +# +# Solution is based on this comment: +# https://github.com/thoughtbot/appraisal/issues/154#issuecomment-493804217 +# (and fixed to work in 2025) +# NOTE: We have two copies of this file due to the inability to specify a reliable path, +# that works across varying invocations as indicated in that same comment. +# See: https://github.com/thoughtbot/appraisal/issues/154#issuecomment-2571386411 + +require "appraisal/bundler_dsl" + +if Appraisal::BundlerDSL::PARTS.include?("eval_gemfile") + # When the hack is already active, this code path is run within appraisal, + # so we can't really tell the difference between already hacked, + # and new version of appraisal has added the feature +else + require "appraisal/appraisal" + + Appraisal::Appraisal.class_eval do + def eval_gemfile(*args) + gemfile.eval_gemfile(*args) + end + end + + Appraisal::BundlerDSL.class_eval do + def eval_gemfile(path, contents = nil) + (@eval_gemfile ||= []) << [path, contents] + end + + private + + def eval_gemfile_entry + @eval_gemfile.map { |(p, c)| "eval_gemfile(#{p.inspect}#{", #{c.inspect}" if c})" } * "\n\n" + end + + alias_method :eval_gemfile_entry_for_dup, :eval_gemfile_entry + + self::PARTS << "eval_gemfile" + end +end diff --git a/gemfiles/appraisal-hack.gemfile b/gemfiles/appraisal-hack.gemfile new file mode 100644 index 0000000..b487778 --- /dev/null +++ b/gemfiles/appraisal-hack.gemfile @@ -0,0 +1,40 @@ +# NOTE: There are two identical copies of this file to make this hack work. +# +# Solution is based on this comment: +# https://github.com/thoughtbot/appraisal/issues/154#issuecomment-493804217 +# (and fixed to work in 2025) +# NOTE: We have two copies of this file due to the inability to specify a reliable path, +# that works across varying invocations as indicated in that same comment. +# See: https://github.com/thoughtbot/appraisal/issues/154#issuecomment-2571386411 + +require "appraisal/bundler_dsl" + +if Appraisal::BundlerDSL::PARTS.include?("eval_gemfile") + # When the hack is already active, this code path is run within appraisal, + # so we can't really tell the difference between already hacked, + # and new version of appraisal has added the feature +else + require "appraisal/appraisal" + + Appraisal::Appraisal.class_eval do + def eval_gemfile(*args) + gemfile.eval_gemfile(*args) + end + end + + Appraisal::BundlerDSL.class_eval do + def eval_gemfile(path, contents = nil) + (@eval_gemfile ||= []) << [path, contents] + end + + private + + def eval_gemfile_entry + @eval_gemfile.map { |(p, c)| "eval_gemfile(#{p.inspect}#{", #{c.inspect}" if c})" } * "\n\n" + end + + alias_method :eval_gemfile_entry_for_dup, :eval_gemfile_entry + + self::PARTS << "eval_gemfile" + end +end diff --git a/gemfiles/audit.gemfile b/gemfiles/audit.gemfile new file mode 100644 index 0000000..82f8f72 --- /dev/null +++ b/gemfiles/audit.gemfile @@ -0,0 +1,12 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") + +eval_gemfile("modular/audit.gemfile") diff --git a/gemfiles/audit.gemfile.lock b/gemfiles/audit.gemfile.lock new file mode 100644 index 0000000..8206e3e --- /dev/null +++ b/gemfiles/audit.gemfile.lock @@ -0,0 +1,65 @@ +PATH + remote: .. + specs: + turbo_tests (2.2.4) + parallel_tests (>= 3.3.0, < 5) + rspec (>= 3.10) + +GEM + remote: https://rubygems.org/ + specs: + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + bundler-audit (0.9.2) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) + coderay (1.1.3) + diff-lcs (1.5.1) + method_source (1.1.0) + mutex_m (0.3.0) + parallel (1.26.3) + parallel_tests (4.9.0) + parallel + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + rake (13.2.1) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.2) + stringio (3.1.2) + thor (1.3.2) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + appraisal (~> 2.5) + bundler-audit (~> 0.9.2) + mutex_m (~> 0.2) + pry (~> 0.14) + rake (~> 13.0) + stringio (~> 3.0) + turbo_tests! + +BUNDLED WITH + 2.6.2 diff --git a/gemfiles/coverage.gemfile b/gemfiles/coverage.gemfile new file mode 100644 index 0000000..2ef804c --- /dev/null +++ b/gemfiles/coverage.gemfile @@ -0,0 +1,12 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") + +eval_gemfile("modular/coverage.gemfile") diff --git a/gemfiles/coverage.gemfile.lock b/gemfiles/coverage.gemfile.lock new file mode 100644 index 0000000..16b3902 --- /dev/null +++ b/gemfiles/coverage.gemfile.lock @@ -0,0 +1,88 @@ +PATH + remote: .. + specs: + turbo_tests (2.2.4) + parallel_tests (>= 3.3.0, < 5) + rspec (>= 3.10) + +GEM + remote: https://rubygems.org/ + specs: + ansi (1.5.0) + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + coderay (1.1.3) + diff-lcs (1.5.1) + docile (1.4.1) + kettle-soup-cover (1.0.4) + simplecov (~> 0.22) + simplecov-cobertura (~> 2.1) + simplecov-console (~> 0.9, >= 0.9.1) + simplecov-html (~> 0.12) + simplecov-lcov (~> 0.8) + simplecov-rcov (~> 0.3, >= 0.3.3) + simplecov_json_formatter (~> 0.1, >= 0.1.4) + version_gem (~> 1.1, >= 1.1.4) + method_source (1.1.0) + mutex_m (0.3.0) + parallel (1.26.3) + parallel_tests (4.9.0) + parallel + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + rake (13.2.1) + rexml (3.4.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.2) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-cobertura (2.1.0) + rexml + simplecov (~> 0.19) + simplecov-console (0.9.2) + ansi + simplecov + terminal-table + simplecov-html (0.13.1) + simplecov-lcov (0.8.0) + simplecov-rcov (0.3.7) + simplecov (>= 0.4.1) + simplecov_json_formatter (0.1.4) + stringio (3.1.2) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.3.2) + unicode-display_width (2.6.0) + version_gem (1.1.4) + +PLATFORMS + arm64-darwin-24 + ruby + +DEPENDENCIES + appraisal (~> 2.5) + kettle-soup-cover (~> 1.0, >= 1.0.4) + mutex_m (~> 0.2) + pry (~> 0.14) + rake (~> 13.0) + stringio (~> 3.0) + turbo_tests! + +BUNDLED WITH + 2.6.2 diff --git a/gemfiles/jruby_head.gemfile b/gemfiles/jruby_head.gemfile new file mode 100644 index 0000000..288e442 --- /dev/null +++ b/gemfiles/jruby_head.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", ">= 0.2" +gem "stringio", ">= 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/modular/audit.gemfile b/gemfiles/modular/audit.gemfile new file mode 100644 index 0000000..e5cc919 --- /dev/null +++ b/gemfiles/modular/audit.gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +# Many gems are dropping support for Ruby < 3, +# so we only want to run our security audit in CI on Ruby 3+ +gem "bundler-audit", "~> 0.9.2" diff --git a/gemfiles/modular/coverage.gemfile b/gemfiles/modular/coverage.gemfile new file mode 100644 index 0000000..c7756b9 --- /dev/null +++ b/gemfiles/modular/coverage.gemfile @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +# We run code coverage on the latest version of Ruby only. + +# Coverage +gem "kettle-soup-cover", "~> 1.0", ">= 1.0.4" diff --git a/gemfiles/modular/style.gemfile b/gemfiles/modular/style.gemfile new file mode 100644 index 0000000..41e075a --- /dev/null +++ b/gemfiles/modular/style.gemfile @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +# We run rubocop on the latest version of Ruby, +# but in support of the oldest supported version of Ruby + +gem "rubocop-lts", "~> 18.2", ">= 18.2.1" # For Ruby 2.7+ +gem "rubocop-packaging", "~> 0.5", ">= 0.5.2" +gem "rubocop-rspec", "~> 3.2" +gem "standard", ">= 1.35.1", "!= 1.41.1", "!= 1.42.0" diff --git a/gemfiles/ruby_2_7.gemfile b/gemfiles/ruby_2_7.gemfile new file mode 100644 index 0000000..4c02229 --- /dev/null +++ b/gemfiles/ruby_2_7.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/ruby_3_0.gemfile b/gemfiles/ruby_3_0.gemfile new file mode 100644 index 0000000..4c02229 --- /dev/null +++ b/gemfiles/ruby_3_0.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/ruby_3_1.gemfile b/gemfiles/ruby_3_1.gemfile new file mode 100644 index 0000000..4c02229 --- /dev/null +++ b/gemfiles/ruby_3_1.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/ruby_3_2.gemfile b/gemfiles/ruby_3_2.gemfile new file mode 100644 index 0000000..4c02229 --- /dev/null +++ b/gemfiles/ruby_3_2.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/ruby_3_3.gemfile b/gemfiles/ruby_3_3.gemfile new file mode 100644 index 0000000..4c02229 --- /dev/null +++ b/gemfiles/ruby_3_3.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/ruby_3_4.gemfile b/gemfiles/ruby_3_4.gemfile new file mode 100644 index 0000000..4c02229 --- /dev/null +++ b/gemfiles/ruby_3_4.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/ruby_head.gemfile b/gemfiles/ruby_head.gemfile new file mode 100644 index 0000000..288e442 --- /dev/null +++ b/gemfiles/ruby_head.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", ">= 0.2" +gem "stringio", ">= 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/gemfiles/style.gemfile b/gemfiles/style.gemfile new file mode 100644 index 0000000..277ed3b --- /dev/null +++ b/gemfiles/style.gemfile @@ -0,0 +1,12 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", "~> 0.2" +gem "stringio", "~> 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") + +eval_gemfile("modular/style.gemfile") diff --git a/gemfiles/style.gemfile.lock b/gemfiles/style.gemfile.lock new file mode 100644 index 0000000..82306a0 --- /dev/null +++ b/gemfiles/style.gemfile.lock @@ -0,0 +1,139 @@ +PATH + remote: .. + specs: + turbo_tests (2.2.4) + parallel_tests (>= 3.3.0, < 5) + rspec (>= 3.10) + +GEM + remote: https://rubygems.org/ + specs: + appraisal (2.5.0) + bundler + rake + thor (>= 0.14.0) + ast (2.4.2) + coderay (1.1.3) + diff-lcs (1.5.1) + diffy (3.4.3) + json (2.9.1) + language_server-protocol (3.17.0.3) + lint_roller (1.1.0) + method_source (1.1.0) + mutex_m (0.3.0) + parallel (1.26.3) + parallel_tests (4.9.0) + parallel + parser (3.3.6.0) + ast (~> 2.4.1) + racc + pry (0.15.2) + coderay (~> 1.1) + method_source (~> 1.0) + racc (1.8.1) + rainbow (3.1.1) + rake (13.2.1) + regexp_parser (2.10.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-block_is_expected (1.0.6) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.2) + rubocop (1.69.2) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-gradual (0.3.6) + diff-lcs (>= 1.2.0, < 2.0) + diffy (~> 3.0) + parallel (~> 1.10) + rainbow (>= 2.2.2, < 4.0) + rubocop (~> 1.0) + rubocop-lts (18.2.1) + rubocop-ruby2_7 (>= 2.0.4, < 3) + standard-rubocop-lts (>= 1.0.3, < 3) + version_gem (>= 1.1.2, < 3) + rubocop-md (1.2.4) + rubocop (>= 1.45) + rubocop-packaging (0.5.2) + rubocop (>= 1.33, < 2.0) + rubocop-performance (1.23.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (3.3.0) + rubocop (~> 1.61) + rubocop-ruby2_7 (2.0.6) + rubocop-gradual (~> 0.3, >= 0.3.1) + rubocop-md (~> 1.2) + rubocop-rake (~> 0.6) + rubocop-shopify (~> 2.14) + rubocop-thread_safety (~> 0.5, >= 0.5.1) + standard-rubocop-lts (~> 1.0, >= 1.0.7) + version_gem (>= 1.1.3, < 3) + rubocop-shopify (2.15.1) + rubocop (~> 1.51) + rubocop-thread_safety (0.6.0) + rubocop (>= 1.48.1) + ruby-progressbar (1.13.0) + standard (1.43.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.69.1) + standard-custom (~> 1.0.0) + standard-performance (~> 1.6) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.6.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.23.0) + standard-rubocop-lts (1.0.10) + rspec-block_is_expected (~> 1.0, >= 1.0.5) + standard (>= 1.35.1, < 2) + standard-custom (>= 1.0.2, < 2) + standard-performance (>= 1.3.1, < 2) + version_gem (>= 1.1.4, < 3) + stringio (3.1.2) + thor (1.3.2) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + version_gem (1.1.4) + +PLATFORMS + arm64-darwin-24 + ruby + +DEPENDENCIES + appraisal (~> 2.5) + mutex_m (~> 0.2) + pry (~> 0.14) + rake (~> 13.0) + rubocop-lts (~> 18.2, >= 18.2.1) + rubocop-packaging (~> 0.5, >= 0.5.2) + rubocop-rspec (~> 3.2) + standard (>= 1.35.1, != 1.42.0, != 1.41.1) + stringio (~> 3.0) + turbo_tests! + +BUNDLED WITH + 2.6.2 diff --git a/gemfiles/truffleruby_head.gemfile b/gemfiles/truffleruby_head.gemfile new file mode 100644 index 0000000..288e442 --- /dev/null +++ b/gemfiles/truffleruby_head.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "mutex_m", ">= 0.2" +gem "stringio", ">= 3.0" + +gemspec path: "../" + +eval_gemfile("appraisal-hack.gemfile") diff --git a/turbo_tests.gemspec b/turbo_tests.gemspec index cb0fd36..fe90512 100644 --- a/turbo_tests.gemspec +++ b/turbo_tests.gemspec @@ -22,8 +22,9 @@ Gem::Specification.new do |spec| spec.add_dependency "rspec", ">= 3.10" spec.add_dependency "parallel_tests", ">= 3.3.0", "< 5" - spec.add_development_dependency("appraisal", "~> 2.5") + spec.add_development_dependency "appraisal", "~> 2.5" spec.add_development_dependency "pry", "~> 0.14" + spec.add_development_dependency "rake", "~> 13.0" # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git.