oxymoron 1.2.1 → 1.2.2
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 +4 -4
- data/lib/oxymoron/version.rb +1 -1
- data/lib/oxymoron.rb +11 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8119cd4d547f83f84a340d7f6150ddbf5350da01
|
4
|
+
data.tar.gz: 088882a2391f2e6d2f6678241c742a31a2053ba1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ced3e8974dcfe72ed8483609e434a93a43bd9d8c50d304a67869857a433856fb42402c42335a5320d9d313f8112535f3255c29481f60ff07832e800e9a9f045
|
7
|
+
data.tar.gz: e3b240de66b38cc77fd172858fca191b51f08c5bce835c8ab1ae7cec994fcbc66994fa341c46b99701c77d91fa3f43cd0b224522bc4af1c7dd0d7a17e0d6dd60
|
data/lib/oxymoron/version.rb
CHANGED
data/lib/oxymoron.rb
CHANGED
@@ -85,16 +85,17 @@ 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
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
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
|
98
99
|
end
|
99
100
|
|
100
101
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxymoron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kononenko Paul
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -960,7 +960,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
960
960
|
version: '0'
|
961
961
|
requirements: []
|
962
962
|
rubyforge_project:
|
963
|
-
rubygems_version: 2.
|
963
|
+
rubygems_version: 2.4.5.1
|
964
964
|
signing_key:
|
965
965
|
specification_version: 4
|
966
966
|
summary: It's using AngularJS and Rails >= 4.2
|