oxymoron 1.2.2 → 1.2.3

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: 8119cd4d547f83f84a340d7f6150ddbf5350da01
4
- data.tar.gz: 088882a2391f2e6d2f6678241c742a31a2053ba1
3
+ metadata.gz: ad55c7d9848c07706d76cf7c2ef5f64ee75ad5f4
4
+ data.tar.gz: 9d166ae09f3f7be98ae01c7f4feb1ef42e44c805
5
5
  SHA512:
6
- metadata.gz: 7ced3e8974dcfe72ed8483609e434a93a43bd9d8c50d304a67869857a433856fb42402c42335a5320d9d313f8112535f3255c29481f60ff07832e800e9a9f045
7
- data.tar.gz: e3b240de66b38cc77fd172858fca191b51f08c5bce835c8ab1ae7cec994fcbc66994fa341c46b99701c77d91fa3f43cd0b224522bc4af1c7dd0d7a17e0d6dd60
6
+ metadata.gz: fa49ec124dd938983c644be711c312cba78a17a9c0f795c60817a0dc76834362e2b61b9c7fa4863c76f6f60f282cdfd472529f94ce728f5dd3c29413640664d3
7
+ data.tar.gz: 47a5d85b9dd750e4f9b739104e0b753bc7197056c4973f99662d92fae828a2e5e4721aa7cce58ee151a43c218e899773f006f881f65710d8f89d62b433f300a0
@@ -1,3 +1,3 @@
1
1
  module Oxymoron
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
data/lib/oxymoron.rb CHANGED
@@ -17,7 +17,7 @@ module Oxymoron
17
17
 
18
18
  @app_routes.each do |route|
19
19
  set_routes route
20
- set_states route
20
+ set_states(route) unless route.defaults[:skip_state]
21
21
  set_resources route
22
22
  end
23
23
  end
@@ -85,17 +85,15 @@ module Oxymoron
85
85
 
86
86
  if route_by_controller = @app_routes_by_controller[route.defaults[:controller]]
87
87
  @app_routes_by_controller[route.defaults[:controller]].each do |route|
88
- unless route.defaults[:skip_state]
89
- base_path = path.gsub(/:(\w)+/, '').gsub(/\(.*$/, '').gsub('//', '/')
90
- current_route_path = route.path.spec.to_s.gsub(/:(\w)+/, '').gsub(/\(.*$/, '').gsub('//', '/')
91
-
92
- if (current_route_path.start_with?(base_path))
93
- for_hash[route.defaults[:action]] ||= {
94
- url: route.path.spec.to_s.gsub('(.:format)', '.json'),
95
- isArray: route.defaults[:is_array],
96
- method: /GET|POST|PUT|PATCH|DELETE/.match(route.verb.to_s).to_s
97
- }
98
- end
88
+ base_path = path.gsub(/:(\w)+/, '').gsub(/\(.*$/, '').gsub('//', '/')
89
+ current_route_path = route.path.spec.to_s.gsub(/:(\w)+/, '').gsub(/\(.*$/, '').gsub('//', '/')
90
+
91
+ if (current_route_path.start_with?(base_path))
92
+ for_hash[route.defaults[:action]] ||= {
93
+ url: route.path.spec.to_s.gsub('(.:format)', '.json'),
94
+ isArray: route.defaults[:is_array],
95
+ method: /GET|POST|PUT|PATCH|DELETE/.match(route.verb.to_s).to_s
96
+ }
99
97
  end
100
98
 
101
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oxymoron
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kononenko Paul