rest_framework 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/views/rest_framework/_route.html.erb +9 -0
- data/app/views/rest_framework/_routes.html.erb +3 -11
- data/lib/rest_framework/utils.rb +4 -3
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e654cef83c3cf4505697e0417d637489a248b691ca157100b6a12dc3e0f3f9e
|
4
|
+
data.tar.gz: b656446d2fd724e2b91708e4df6248cd5e6676a311e8cd23d76f07951758bffd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a9ee1d172c5e33813352b2190f2f38540226d93d84bf77cca34fab326231f6215a702c66e3965f5239d652e35eeb36a7286210826608e11ab9a35c8edf65704
|
7
|
+
data.tar.gz: e132e15651e2c9fd0cd9d1338ec2c5a795d369a6a001c2e4a957c7912dfd5539ea940945ea48c011e1c4be6e3b1feaf55b63934fdff5608135c2ac089fd83486
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
@@ -10,11 +10,7 @@
|
|
10
10
|
<%# Render first group of routes directly. %>
|
11
11
|
<tbody>
|
12
12
|
<% @route_groups.values[0].each do |route| %>
|
13
|
-
|
14
|
-
<td><%= route[:path] %></td>
|
15
|
-
<td><%= route[:verb] %></td>
|
16
|
-
<td><%= route[:controller] %>#<%= route[:action] %></td>
|
17
|
-
</tr>
|
13
|
+
<%= render partial: "rest_framework/route", locals: {route: route} %>
|
18
14
|
<% end %>
|
19
15
|
</tbody>
|
20
16
|
<%# Render any other groups under dropdowns. %>
|
@@ -22,13 +18,9 @@
|
|
22
18
|
<tr data-bs-toggle="collapse" data-bs-target="#route-group-<%= index %>" class="rrf-route-group-header">
|
23
19
|
<td colspan="3" class="text-center user-select-none"><%= name %></td>
|
24
20
|
</tr>
|
25
|
-
<tbody id="route-group-<%= index %>" class="collapse"
|
21
|
+
<tbody id="route-group-<%= index %>" class="collapse">
|
26
22
|
<% route_group.each do |route| %>
|
27
|
-
|
28
|
-
<td><%= route[:path] %></td>
|
29
|
-
<td><%= route[:verb] %></td>
|
30
|
-
<td><%= route[:controller] %>#<%= route[:action] %></td>
|
31
|
-
</tr>
|
23
|
+
<%= render partial: "rest_framework/route", locals: {route: route} %>
|
32
24
|
<% end %>
|
33
25
|
</tbody>
|
34
26
|
<% end %>
|
data/lib/rest_framework/utils.rb
CHANGED
@@ -52,9 +52,10 @@ module RESTFramework::Utils
|
|
52
52
|
{
|
53
53
|
verb: r.verb,
|
54
54
|
path: r.path.spec.to_s,
|
55
|
-
action: r.defaults[:action],
|
56
|
-
controller: r.defaults[:controller],
|
57
|
-
subdomain: r.defaults[:subdomain],
|
55
|
+
action: r.defaults[:action].presence,
|
56
|
+
controller: r.defaults[:controller].presence,
|
57
|
+
subdomain: r.defaults[:subdomain].presence,
|
58
|
+
route_app: r.app&.app&.inspect&.presence,
|
58
59
|
}
|
59
60
|
}.select { |r|
|
60
61
|
r[:subdomain] == current_subdomain && r[:path].start_with?(current_pattern)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory N. Schmit
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- VERSION
|
37
37
|
- app/views/layouts/rest_framework.html.erb
|
38
38
|
- app/views/rest_framework/_head.html.erb
|
39
|
+
- app/views/rest_framework/_route.html.erb
|
39
40
|
- app/views/rest_framework/_routes.html.erb
|
40
41
|
- lib/rest_framework.rb
|
41
42
|
- lib/rest_framework/controller_mixins.rb
|