File tree 2 files changed +4
-1
lines changed 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ group :development, :test do
37
37
unless ENV [ 'MODEL_PARSER' ] == 'grape-swagger-entity'
38
38
gem 'grape-swagger-entity' , git : 'https://github.com/ruby-grape/grape-swagger-entity'
39
39
end
40
+
41
+ # Conditionally load 'ostruct' only if Ruby >= 3.5.0
42
+ gem 'ostruct' if Gem ::Version . new ( RUBY_VERSION ) >= Gem ::Version . new ( '3.5.0' )
40
43
end
41
44
42
45
group :test do
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def content_types_for(target_class)
12
12
if content_types . empty?
13
13
formats = [ target_class . format , target_class . default_format ] . compact . uniq
14
14
formats = GrapeSwagger ::FORMATTER_DEFAULTS . keys if formats . empty?
15
- content_types = GrapeSwagger ::CONTENT_TYPE_DEFAULTS . select do |content_type , _mime_type |
15
+ content_types = GrapeSwagger ::CONTENT_TYPE_DEFAULTS . select do |content_type , _mime_type | # rubocop:disable Style/HashSlice
16
16
formats . include? content_type
17
17
end . values
18
18
end
You can’t perform that action at this time.
0 commit comments