rest_framework 0.4.0 → 0.4.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
  SHA256:
3
- metadata.gz: bd9117c7f8ec6e09424fd35946ede97fe1173cc010d77ef5da97328f1f5a555a
4
- data.tar.gz: cd79a9d89862fdb60f14d6a17c03f9447d639ff794b0869e4cb8149c84755d4d
3
+ metadata.gz: 1e654cef83c3cf4505697e0417d637489a248b691ca157100b6a12dc3e0f3f9e
4
+ data.tar.gz: b656446d2fd724e2b91708e4df6248cd5e6676a311e8cd23d76f07951758bffd
5
5
  SHA512:
6
- metadata.gz: d3958f44f171649a7f2d4a92aa8d21b8375bb18532ca53af723cb64cc6f3bdbe0842784fc4dcb5a3ac715327731f030437c37cec7cb10604a8f44b5f260f49c7
7
- data.tar.gz: 7fda99d8ef74d689091b0ab971d1256bcef1c745f696a7a2af0a93c37aaebfd05abbfd111ec676d6d2c9ee104764d83cf3c994b7fa33f5a2411d57f181c5a121
6
+ metadata.gz: 3a9ee1d172c5e33813352b2190f2f38540226d93d84bf77cca34fab326231f6215a702c66e3965f5239d652e35eeb36a7286210826608e11ab9a35c8edf65704
7
+ data.tar.gz: e132e15651e2c9fd0cd9d1338ec2c5a795d369a6a001c2e4a957c7912dfd5539ea940945ea48c011e1c4be6e3b1feaf55b63934fdff5608135c2ac089fd83486
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -0,0 +1,9 @@
1
+ <tr>
2
+ <td><%= route[:path] %></td>
3
+ <td><%= route[:verb] %></td>
4
+ <% if route[:controller] && route[:action] %>
5
+ <td><%= route[:controller] %>#<%= route[:action] %></td>
6
+ <% else %>
7
+ <td><%= route[:route_app] %></td>
8
+ <% end %>
9
+ </tr>
@@ -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
- <tr>
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" style="padding: 0">
21
+ <tbody id="route-group-<%= index %>" class="collapse">
26
22
  <% route_group.each do |route| %>
27
- <tr>
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 %>
@@ -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.0
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