File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
lib/onebusaway_sdk/internal Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -600,11 +600,13 @@ class << self
600
600
#
601
601
# @return [Object]
602
602
def encode_content ( headers , body )
603
+ # rubocop:disable Style/CaseEquality
604
+ # rubocop:disable Layout/LineLength
603
605
content_type = headers [ "content-type" ]
604
606
case [ content_type , body ]
605
607
in [ OnebusawaySDK ::Internal ::Util ::JSON_CONTENT , Hash | Array | -> { primitive? ( _1 ) } ]
606
608
[ headers , JSON . generate ( body ) ]
607
- in [ OnebusawaySDK ::Internal ::Util ::JSONL_CONTENT , Enumerable ] unless body . is_a? ( OnebusawaySDK ::Internal ::Type ::FileInput )
609
+ in [ OnebusawaySDK ::Internal ::Util ::JSONL_CONTENT , Enumerable ] unless OnebusawaySDK ::Internal ::Type ::FileInput === body
608
610
[ headers , body . lazy . map { JSON . generate ( _1 ) } ]
609
611
in [ %r{^multipart/form-data} , Hash | OnebusawaySDK ::Internal ::Type ::FileInput ]
610
612
boundary , strio = encode_multipart_streaming ( body )
@@ -619,6 +621,8 @@ def encode_content(headers, body)
619
621
else
620
622
[ headers , body ]
621
623
end
624
+ # rubocop:enable Layout/LineLength
625
+ # rubocop:enable Style/CaseEquality
622
626
end
623
627
624
628
# @api private
You can’t perform that action at this time.
0 commit comments