Skip to content

Commit dcdae69

Browse files
committed
JRuby 19 mode support
1 parent d5c5772 commit dcdae69

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ matrix:
99
- rvm: 2.1
1010
- rvm: ruby-head
1111
- rvm: jruby-head
12-
- rvm: jruby-20mode
12+
- rvm: jruby-19mode
1313
- rvm: rbx-2
1414
allow_failures:
1515
- rvm: ruby-head

lib/grape-swagger/representable/parser.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def parse_representer_property(property)
2020
documentation = property[:documentation] ? property[:documentation].dup : {}
2121

2222
if property[:decorator] && property[:nested]
23-
representer_mapping(property[:decorator], documentation, is_a_collection: is_a_collection, nested: property[:nested])
23+
representer_mapping(property[:decorator], documentation, is_a_collection, false, property[:nested])
2424
elsif property[:decorator]
25-
representer_mapping(property[:decorator], documentation, is_a_collection: is_a_collection, is_a_decorator: true)
25+
representer_mapping(property[:decorator], documentation, is_a_collection, true)
2626
elsif property[:nested]
27-
representer_mapping(property[:nested], documentation, is_a_collection: is_a_collection)
27+
representer_mapping(property[:nested], documentation, is_a_collection)
2828
else
2929
memo = {
3030
description: documentation[:desc] || ''
@@ -52,7 +52,7 @@ def parse_representer_property(property)
5252
end
5353
end
5454

55-
def representer_mapping(representer, documentation, is_a_collection: false, is_a_decorator: false, nested: nil)
55+
def representer_mapping(representer, documentation, is_a_collection = false, is_a_decorator = false, nested = nil)
5656
if nested.nil? && is_a_decorator
5757
name = endpoint.send(:expose_params_from_model, representer)
5858

0 commit comments

Comments
 (0)