Skip to content

Commit a022a6d

Browse files
authored
Adds ruby 3.2 to test matrix. (#374)
1 parent 6eac458 commit a022a6d

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v3
1919
- uses: ruby/setup-ruby@v1
2020
with:
21-
ruby-version: '3.1'
21+
ruby-version: '3.2'
2222
bundler-cache: true
2323
- name: Run rubocop
2424
run: bundle exec rubocop --parallel --format progress
@@ -28,7 +28,7 @@ jobs:
2828
needs: ['rubocop']
2929
strategy:
3030
matrix:
31-
ruby-version: ['2.7', '3.0', '3.1', 'head', jruby, truffleruby]
31+
ruby-version: ['3.0', '3.1', '3.2', 'head']
3232
steps:
3333
- name: Check out branch
3434
uses: actions/checkout@v3

.rubocop.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ AllCops:
55
- vendor/**/*
66
- example/**/*
77
NewCops: enable
8-
TargetRubyVersion: 3.1
8+
TargetRubyVersion: 3.2
99
SuggestExtensions: false
1010

1111
# Layout stuff
@@ -38,7 +38,7 @@ Lint/ConstantDefinitionInBlock:
3838
#
3939
Metrics/AbcSize:
4040
Max: 25
41-
IgnoredMethods:
41+
AllowedMethods:
4242
# from lib/grape_entity/exposure/nesting_exposure.rb
4343
- 'normalized_exposures'
4444

@@ -59,7 +59,7 @@ Metrics/MethodLength:
5959

6060
Metrics/PerceivedComplexity:
6161
Max: 11
62-
IgnoredMethods:
62+
AllowedMethods:
6363
# from lib/grape_entity/entity.rb
6464
- 'expose'
6565
- 'merge_options'

Gemfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ source 'http://rubygems.org'
55
gemspec
66

77
group :development, :test do
8-
gem 'rubocop', '~> 1.0', require: false
8+
gem 'bundler'
9+
gem 'maruku'
10+
gem 'pry' unless RUBY_PLATFORM.eql?('java') || RUBY_ENGINE.eql?('rbx')
11+
gem 'pry-byebug' unless RUBY_PLATFORM.eql?('java') || RUBY_ENGINE.eql?('rbx')
12+
gem 'rack-test'
13+
gem 'rake'
14+
gem 'rspec', '~> 3.9'
15+
gem 'rubocop', '~> 1.0'
16+
gem 'yard'
917
end
1018

1119
group :test do

grape-entity.gemspec

+1-10
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,12 @@ Gem::Specification.new do |s|
1414
s.description = 'Extracted from Grape, A Ruby framework for rapid API development with great conventions.'
1515
s.license = 'MIT'
1616

17-
s.required_ruby_version = '>= 2.5'
17+
s.required_ruby_version = '>= 2.7'
1818

1919
s.add_runtime_dependency 'activesupport', '>= 3.0.0'
2020
# FIXME: remove dependecy
2121
s.add_runtime_dependency 'multi_json', '>= 1.3.2'
2222

23-
s.add_development_dependency 'bundler'
24-
s.add_development_dependency 'maruku'
25-
s.add_development_dependency 'pry' unless RUBY_PLATFORM.eql?('java') || RUBY_ENGINE.eql?('rbx')
26-
s.add_development_dependency 'pry-byebug' unless RUBY_PLATFORM.eql?('java') || RUBY_ENGINE.eql?('rbx')
27-
s.add_development_dependency 'rack-test'
28-
s.add_development_dependency 'rake'
29-
s.add_development_dependency 'rspec', '~> 3.9'
30-
s.add_development_dependency 'yard'
31-
3223
s.files = `git ls-files`.split("\n")
3324
s.test_files = `git ls-files -- {test,spec}/*`.split("\n")
3425
s.require_paths = ['lib']

lib/grape_entity/entity.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require 'multi_json'
4-
require 'set'
54

65
module Grape
76
# An Entity is a lightweight structure that allows you to easily

spec/grape_entity/entity_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030

3131
it 'makes sure that :format_with as a proc cannot be used with a block' do
3232
# rubocop:disable Style/BlockDelimiters
33+
# rubocop:disable Lint/Debugger
3334
expect { subject.expose :name, format_with: proc {} do p 'hi' end }.to raise_error ArgumentError
35+
# rubocop:enable Lint/Debugger
3436
# rubocop:enable Style/BlockDelimiters
3537
end
3638

0 commit comments

Comments
 (0)