From 40e62bfccc11db2a6ca3d19c3931aa5514d13f3b Mon Sep 17 00:00:00 2001 From: Eric Proulx Date: Wed, 3 Jan 2024 22:54:58 +0100 Subject: [PATCH] Add ruby 3.3 to edge and test flows (#2397) * Add ruby 3.3 to edge and test flows Update actions/checkout to v4 Remove a spec not related to endpoint method missing * Add CHANGELOG.md entry * Revert docker-compose --- .github/workflows/danger.yml | 2 +- .github/workflows/edge.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- CHANGELOG.md | 3 ++- docker-compose.yml | 2 +- spec/grape/endpoint_spec.rb | 11 ----------- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index dffe84d15a..5e99cbf53b 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -6,7 +6,7 @@ jobs: danger: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 100 - name: Set up Ruby diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index bea28ef249..c617da14e1 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -6,14 +6,14 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', '3.2', ruby-head, truffleruby-head, jruby-head] + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', ruby-head, truffleruby-head, jruby-head] gemfile: [rails_edge, rack_edge, rack_3_0] runs-on: ubuntu-latest continue-on-error: true env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index daf28bdd62..c3201f44a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,12 @@ jobs: name: RuboCop runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.3 bundler-cache: true rubygems: latest @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', '3.2'] + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] gemfile: [rack_2_0, rack_3_0, rails_6_0, rails_6_1, rails_7_0, rails_7_1] include: - ruby: '2.7' @@ -36,7 +36,7 @@ jobs: env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index fe97db2ec0..57237c82c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * [#2390](https://github.com/ruby-grape/grape/pull/2390): Drop support for Ruby 2.6 and Rails 5 - [@ericproulx](https://github.com/ericproulx). * [#2393](https://github.com/ruby-grape/grape/pull/2393): Optimize AttributeTranslator - [@ericproulx](https://github.com/ericproulx). * [#2395](https://github.com/ruby-grape/grape/pull/2395): Set `max-age` to 0 when `cookies.delete` - [@ericproulx](https://github.com/ericproulx). +* [#2397](https://github.com/ruby-grape/grape/pull/2397): Add support for ruby 3.3 - [@ericproulx](https://github.com/ericproulx). * [#2399](https://github.com/ruby-grape/grape/pull/2399): Update `rubocop` to 1.59.0, `rubocop-performance` to 1.20.1 and `rubocop-rspec` to 2.25.0 - [@ericproulx](https://github.com/ericproulx). * Your contribution here. @@ -63,7 +64,7 @@ #### Features -* [#2288](https://github.com/ruby-grape/grape/pull/2288): Droped support for Ruby 2.5 - [@ericproulx](https://github.com/ericproulx). +* [#2288](https://github.com/ruby-grape/grape/pull/2288): Dropped support for Ruby 2.5 - [@ericproulx](https://github.com/ericproulx). * [#2288](https://github.com/ruby-grape/grape/pull/2288): Updated rubocop to 1.41.0 - [@ericproulx](https://github.com/ericproulx). * [#2296](https://github.com/ruby-grape/grape/pull/2296): Fix cops and enables some - [@ericproulx](https://github.com/ericproulx). * [#2302](https://github.com/ruby-grape/grape/pull/2302): Rack < 3 and update rack-test - [@ericproulx](https://github.com/ericproulx). diff --git a/docker-compose.yml b/docker-compose.yml index 0f83ee0174..2b293708b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,4 +14,4 @@ services: tty: true volumes: - .:/var/grape - - gems:/usr/local/bundle \ No newline at end of file + - gems:/usr/local/bundle diff --git a/spec/grape/endpoint_spec.rb b/spec/grape/endpoint_spec.rb index 14d99c6277..46a17a2b77 100644 --- a/spec/grape/endpoint_spec.rb +++ b/spec/grape/endpoint_spec.rb @@ -694,17 +694,6 @@ def app end.to raise_error(NoMethodError, %r{^undefined method `undefined_helper' for # in `/hey' endpoint}) end end - - context 'when performing an undefined method of an instance inside the API' do - it 'raises NoMethodError but stripping the internals of the Object class' do - subject.get('/hey') do - Object.new.x - end - expect do - get '/hey' - end.to raise_error(NoMethodError, /^undefined method `x' for #$/) - end - end end it 'does not persist params between calls' do