test/support/responses.rb in excon-hypermedia-0.5.3 vs test/support/responses.rb in excon-hypermedia-0.6.0

- old
+ new

@@ -1,17 +1,17 @@ # frozen_string_literal: true -# rubocop:disable Metrics/MethodLength + # rubocop:disable Metrics/ModuleLength # :no-doc: module Test # :no-doc: module Response module_function def api_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/api.json" }, @@ -19,15 +19,15 @@ "href": "http://localhost:8000/product/{uid}", "templated": true } } } - EOF + JSON end def bicycle_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/product/bicycle" }, @@ -56,30 +56,30 @@ "_embedded": { "pump": #{pump_body}, "wheels": [#{front_wheel_body}, #{rear_wheel_body}] } } - EOF + JSON end def handlebar_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/product/handlebar" } }, "material": "Carbon fiber", "reach": "75mm", "bend": "compact" } - EOF + JSON end def pump_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/product/pump" }, @@ -93,50 +93,52 @@ "_embedded": { "parts": #{parts_body} } } - EOF + JSON end def parts_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/product/pump/parts" } }, "count": 47 } - EOF + JSON end def rear_wheel_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/product/bicycle/wheels/rear" } }, "position": "rear", "lacing_pattern": "Radial" } - EOF + JSON end def front_wheel_body - <<-EOF + <<-JSON { "_links": { "self": { "href": "http://localhost:8000/product/bicycle/wheels/front" } }, "position": "front", "lacing_pattern": "Radial/2-Cross" } - EOF + JSON end end end + +# rubocop:enable Metrics/ModuleLength