api_recipes 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2907dfb08e44c983cfb1ae3c6140fe2eb4b7d42
4
- data.tar.gz: 641e4b43bcdf705e9466055412d9cb84634ae296
3
+ metadata.gz: 3e51bb662fb7526bfd6a5db1a3d771110758fbd9
4
+ data.tar.gz: 3c62a1746c5515bb0e3299d1d0f1efc979a73298
5
5
  SHA512:
6
- metadata.gz: '095ba234b89e29e56e2087de1fafe02aabac486ab7a9ef99461c97c54d7312c867cb1576e40e8e6b8c692bd2a68836dda5588fb4d332913342fac1522e3f2ec2'
7
- data.tar.gz: 6179b7188c284ab6adf470feb16a5150fd351f166d3b6eeca12b53809f8ed87f09240e3a9d0e008ce2dc834feb471fe3591c6dfd903762c622ec867710999eb2
6
+ metadata.gz: ae65171f89100ad4baf04ec597ee72df43628b8a120ab4fc198719c985ec485f1f59b14c0af837ab53a106d6270973b8088a8a78410177ee743a5fe3b542d747
7
+ data.tar.gz: 990495700f223638046c1840b3036d67fd607b926fdf1018943455e9fa58631406f4a545a31b493ac49a0624b9547c88ac02ef5153702d40efeaa861de16a566
@@ -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 route_attributes
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)
@@ -1,3 +1,3 @@
1
1
  module ApiRecipes
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato