api_recipes 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_recipes/resource.rb +2 -5
- data/lib/api_recipes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e51bb662fb7526bfd6a5db1a3d771110758fbd9
|
4
|
+
data.tar.gz: 3c62a1746c5515bb0e3299d1d0f1efc979a73298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae65171f89100ad4baf04ec597ee72df43628b8a120ab4fc198719c985ec485f1f59b14c0af837ab53a106d6270973b8088a8a78410177ee743a5fe3b542d747
|
7
|
+
data.tar.gz: 990495700f223638046c1840b3036d67fd607b926fdf1018943455e9fa58631406f4a545a31b493ac49a0624b9547c88ac02ef5153702d40efeaa861de16a566
|
data/lib/api_recipes/resource.rb
CHANGED
@@ -85,9 +85,6 @@ module ApiRecipes
|
|
85
85
|
# e.g. webapp.alarms.index
|
86
86
|
def generate_routes
|
87
87
|
@routes.each do |route, attrs|
|
88
|
-
if attrs.is_a? Hash
|
89
|
-
attrs.deep_symbolize_keys!
|
90
|
-
end
|
91
88
|
if route.eql? @name
|
92
89
|
raise RouteNameClashError.new(route, @name)
|
93
90
|
end
|
@@ -146,8 +143,8 @@ module ApiRecipes
|
|
146
143
|
unless route_attributes
|
147
144
|
route_attributes = {}
|
148
145
|
end
|
149
|
-
# Merge route attributes with defaults
|
150
|
-
route_attributes = Settings::DEFAULT_ROUTE_ATTRIBUTES.merge
|
146
|
+
# Merge route attributes with defaults and deep clone route attributes
|
147
|
+
route_attributes = Marshal.load(Marshal.dump(Settings::DEFAULT_ROUTE_ATTRIBUTES.merge(route_attributes).deep_symbolize_keys))
|
151
148
|
|
152
149
|
params = pars.extract_options!
|
153
150
|
path, residual_params = build_path(route, route_attributes, params)
|
data/lib/api_recipes/version.rb
CHANGED