spec/support/versioned_helpers.rb in grape-0.6.0 vs spec/support/versioned_helpers.rb in grape-0.6.1
- old
+ new
@@ -24,28 +24,27 @@
when :param
{} # no-op
when :header
{
'HTTP_ACCEPT' => [
- "application/vnd.#{options[:vendor]}-#{options[:version]}",
+ "application/vnd.#{options[:vendor] }-#{options[:version] }",
options[:format]
- ].compact.join("+")
+ ].compact.join("+")
}
when :accept_version_header
{
- 'HTTP_ACCEPT_VERSION' => "#{options[:version]}"
+ 'HTTP_ACCEPT_VERSION' => "#{options[:version] }"
}
else
raise ArgumentError.new("unknown versioning strategy: #{options[:using]}")
end
end
def versioned_get(path, version_name, version_options = {})
- path = versioned_path(version_options.merge(:version => version_name, :path => path))
- headers = versioned_headers(version_options.merge(:version => version_name))
+ path = versioned_path(version_options.merge(version: version_name, path: path))
+ headers = versioned_headers(version_options.merge(version: version_name))
params = {}
if version_options[:using] == :param
params = { version_options[:parameter] => version_name }
end
get path, params, headers
end
-