Skip to content

Commit 8cee065

Browse files
committed
upgrade ruby
1 parent 04d0dd3 commit 8cee065

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/ruby.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
ruby-version: ['2.6', '2.7', '3.0']
25+
ruby-version: ['3.0', '3.1', '3.2']
2626

2727
steps:
2828
- uses: actions/checkout@v3

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AllCops:
66
NewCops: enable
77
Exclude:
88
- spec/**/*
9-
TargetRubyVersion: 2.6
9+
TargetRubyVersion: 3.2
1010

1111
Metrics/ClassLength:
1212
Max: 150

grape-jsonapi.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
1717
gem.version = Grape::Jsonapi::VERSION
1818
gem.licenses = ['MIT']
1919

20-
gem.required_ruby_version = '>= 2.6.0'
20+
gem.required_ruby_version = '>= 3.2.0'
2121

2222
gem.add_dependency 'grape'
2323
gem.add_dependency 'jsonapi-serializer'

lib/grape_jsonapi/parser.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def default_schema_object
4747

4848
def enrich_with_attributes(schema)
4949
attributes_hash.each do |attribute, type|
50-
schema[:data][:properties][:attributes][:properties][attribute] = { type: type }
50+
schema[:data][:properties][:attributes][:properties][attribute] = { type: }
5151
example_method = "#{type}_example"
5252
unless respond_to?(example_method, true)
5353
puts "WARN unexpected type encountered, missing #{example_method} --use string example instead"
@@ -144,7 +144,7 @@ def relationships_example(relationship_data)
144144

145145
data = [data] if relationship_data[:relationship_type] == :has_many
146146

147-
{ data: data }
147+
{ data: }
148148
end
149149

150150
def integer_example

0 commit comments

Comments
 (0)