rest_framework 0.9.4 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +130 -0
  4. data/VERSION +1 -1
  5. data/app/views/layouts/rest_framework.html.erb +9 -183
  6. data/app/views/rest_framework/_breadcrumbs.html.erb +27 -0
  7. data/app/views/rest_framework/_head.html.erb +348 -190
  8. data/app/views/rest_framework/_header.html.erb +15 -0
  9. data/app/views/rest_framework/_heading.html.erb +10 -0
  10. data/app/views/rest_framework/_payloads.html.erb +36 -0
  11. data/app/views/rest_framework/_request_metadata.html.erb +16 -0
  12. data/app/views/rest_framework/_routes_and_forms.html.erb +52 -0
  13. data/app/views/rest_framework/head/_external.html.erb +7 -2
  14. data/app/views/rest_framework/header/_mode.html.erb +14 -0
  15. data/app/views/rest_framework/heading/_actions.html.erb +9 -0
  16. data/app/views/rest_framework/{_routes.html.erb → routes_and_forms/_routes.html.erb} +2 -2
  17. data/lib/rest_framework/controller_mixins/base.rb +11 -12
  18. data/lib/rest_framework/engine.rb +5 -3
  19. data/lib/rest_framework/filters/ransack.rb +6 -6
  20. data/lib/rest_framework/version.rb +0 -6
  21. data/lib/rest_framework.rb +25 -13
  22. data/vendor/assets/javascripts/rest_framework/external.min.js +1256 -0
  23. data/vendor/assets/stylesheets/rest_framework/{bootstrap-icons.css → external.min.css} +415 -1
  24. data/vendor/assets/stylesheets/rest_framework/{highlight-a11y-dark.css → highlight-a11y-dark.min.css} +1 -1
  25. data/vendor/assets/stylesheets/rest_framework/{highlight-a11y-light.css → highlight-a11y-light.min.css} +1 -1
  26. metadata +18 -35
  27. data/README.md +0 -1
  28. data/app/views/rest_framework/head/_shared.html +0 -164
  29. data/docs/CNAME +0 -1
  30. data/docs/Gemfile +0 -5
  31. data/docs/Gemfile.lock +0 -264
  32. data/docs/_config.yml +0 -19
  33. data/docs/_guide/1_routers.md +0 -110
  34. data/docs/_guide/2_controllers.md +0 -342
  35. data/docs/_guide/3_serializers.md +0 -60
  36. data/docs/_guide/4_filtering_and_ordering.md +0 -41
  37. data/docs/_guide/5_pagination.md +0 -21
  38. data/docs/_includes/anchor_headings.html +0 -144
  39. data/docs/_includes/external.html +0 -9
  40. data/docs/_includes/head.html +0 -155
  41. data/docs/_includes/header.html +0 -58
  42. data/docs/_includes/shared.html +0 -164
  43. data/docs/_layouts/default.html +0 -11
  44. data/docs/assets/images/favicon.ico +0 -0
  45. data/docs/index.md +0 -133
  46. data/vendor/assets/javascripts/rest_framework/bootstrap.js +0 -7
  47. data/vendor/assets/javascripts/rest_framework/highlight-json.js +0 -7
  48. data/vendor/assets/javascripts/rest_framework/highlight-xml.js +0 -29
  49. data/vendor/assets/javascripts/rest_framework/highlight.js +0 -1202
  50. data/vendor/assets/javascripts/rest_framework/neatjson.js +0 -8
  51. data/vendor/assets/javascripts/rest_framework/trix.js +0 -6
  52. data/vendor/assets/stylesheets/rest_framework/bootstrap.css +0 -6
  53. data/vendor/assets/stylesheets/rest_framework/trix.css +0 -410
  54. /data/app/views/rest_framework/{_html_form.html.erb → routes_and_forms/_html_form.html.erb} +0 -0
  55. /data/app/views/rest_framework/{_raw_form.html.erb → routes_and_forms/_raw_form.html.erb} +0 -0
  56. /data/app/views/rest_framework/{_route.html.erb → routes_and_forms/routes/_route.html.erb} +0 -0
@@ -4,4 +4,4 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p
4
4
  Maintainer: @ericwbailey
5
5
 
6
6
  Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css
7
- */.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}
7
+ */.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}
@@ -4,4 +4,4 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p
4
4
  Maintainer: @ericwbailey
5
5
 
6
6
  Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css
7
- */.hljs{background:#fefefe;color:#545454}.hljs-comment,.hljs-quote{color:#696969}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d91e18}.hljs-attribute,.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#aa5d00}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:green}.hljs-section,.hljs-title{color:#007faa}.hljs-keyword,.hljs-selector-tag{color:#7928a1}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}
7
+ */.hljs{background:#fefefe;color:#545454}.hljs-comment,.hljs-quote{color:#696969}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d91e18}.hljs-attribute,.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#aa5d00}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:green}.hljs-section,.hljs-title{color:#007faa}.hljs-keyword,.hljs-selector-tag{color:#7928a1}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory N. Schmit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-22 00:00:00.000000000 Z
11
+ date: 2023-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -35,30 +35,20 @@ files:
35
35
  - README.md
36
36
  - VERSION
37
37
  - app/views/layouts/rest_framework.html.erb
38
+ - app/views/rest_framework/_breadcrumbs.html.erb
38
39
  - app/views/rest_framework/_head.html.erb
39
- - app/views/rest_framework/_html_form.html.erb
40
- - app/views/rest_framework/_raw_form.html.erb
41
- - app/views/rest_framework/_route.html.erb
42
- - app/views/rest_framework/_routes.html.erb
40
+ - app/views/rest_framework/_header.html.erb
41
+ - app/views/rest_framework/_heading.html.erb
42
+ - app/views/rest_framework/_payloads.html.erb
43
+ - app/views/rest_framework/_request_metadata.html.erb
44
+ - app/views/rest_framework/_routes_and_forms.html.erb
43
45
  - app/views/rest_framework/head/_external.html.erb
44
- - app/views/rest_framework/head/_shared.html
45
- - docs/CNAME
46
- - docs/Gemfile
47
- - docs/Gemfile.lock
48
- - docs/_config.yml
49
- - docs/_guide/1_routers.md
50
- - docs/_guide/2_controllers.md
51
- - docs/_guide/3_serializers.md
52
- - docs/_guide/4_filtering_and_ordering.md
53
- - docs/_guide/5_pagination.md
54
- - docs/_includes/anchor_headings.html
55
- - docs/_includes/external.html
56
- - docs/_includes/head.html
57
- - docs/_includes/header.html
58
- - docs/_includes/shared.html
59
- - docs/_layouts/default.html
60
- - docs/assets/images/favicon.ico
61
- - docs/index.md
46
+ - app/views/rest_framework/header/_mode.html.erb
47
+ - app/views/rest_framework/heading/_actions.html.erb
48
+ - app/views/rest_framework/routes_and_forms/_html_form.html.erb
49
+ - app/views/rest_framework/routes_and_forms/_raw_form.html.erb
50
+ - app/views/rest_framework/routes_and_forms/_routes.html.erb
51
+ - app/views/rest_framework/routes_and_forms/routes/_route.html.erb
62
52
  - lib/rest_framework.rb
63
53
  - lib/rest_framework/controller_mixins.rb
64
54
  - lib/rest_framework/controller_mixins/base.rb
@@ -79,17 +69,10 @@ files:
79
69
  - lib/rest_framework/serializers.rb
80
70
  - lib/rest_framework/utils.rb
81
71
  - lib/rest_framework/version.rb
82
- - vendor/assets/javascripts/rest_framework/bootstrap.js
83
- - vendor/assets/javascripts/rest_framework/highlight-json.js
84
- - vendor/assets/javascripts/rest_framework/highlight-xml.js
85
- - vendor/assets/javascripts/rest_framework/highlight.js
86
- - vendor/assets/javascripts/rest_framework/neatjson.js
87
- - vendor/assets/javascripts/rest_framework/trix.js
88
- - vendor/assets/stylesheets/rest_framework/bootstrap-icons.css
89
- - vendor/assets/stylesheets/rest_framework/bootstrap.css
90
- - vendor/assets/stylesheets/rest_framework/highlight-a11y-dark.css
91
- - vendor/assets/stylesheets/rest_framework/highlight-a11y-light.css
92
- - vendor/assets/stylesheets/rest_framework/trix.css
72
+ - vendor/assets/javascripts/rest_framework/external.min.js
73
+ - vendor/assets/stylesheets/rest_framework/external.min.css
74
+ - vendor/assets/stylesheets/rest_framework/highlight-a11y-dark.min.css
75
+ - vendor/assets/stylesheets/rest_framework/highlight-a11y-light.min.css
93
76
  homepage: https://rails-rest-framework.com
94
77
  licenses:
95
78
  - MIT
data/README.md DELETED
@@ -1 +0,0 @@
1
- docs/index.md
@@ -1,164 +0,0 @@
1
- <!--
2
- AUTOGENERATED
3
- Updates must be written to `shared.{css,js}` and synced with `rake maintain_assets`.
4
- -->
5
- <style>
6
- :root {
7
- --rrf-red: #900;
8
- --rrf-red-hover: #5f0c0c;
9
- --rrf-light-red: #db2525;
10
- --rrf-light-red-hover: #b80404;
11
- }
12
- #rrfAccentBar {
13
- background-color: var(--rrf-red);
14
- height: .3em;
15
- }
16
- header nav { background-color: black; }
17
-
18
- /* Header adjustments. */
19
- h1 { font-size: 2rem; }
20
- h2 { font-size: 1.7rem; }
21
- h3 { font-size: 1.5rem; }
22
- h4 { font-size: 1.3rem; }
23
- h5 { font-size: 1.1rem; }
24
- h6 { font-size: 1rem; }
25
- h1, h2, h3, h4, h5, h6 {
26
- color: var(--rrf-red);
27
- }
28
- html[data-bs-theme="dark"] h1,
29
- html[data-bs-theme="dark"] h2,
30
- html[data-bs-theme="dark"] h3,
31
- html[data-bs-theme="dark"] h4,
32
- html[data-bs-theme="dark"] h5,
33
- html[data-bs-theme="dark"] h6 {
34
- color: var(--rrf-light-red);
35
- }
36
-
37
- /* Improve code and code blocks. */
38
- pre code, .trix-content pre {
39
- display: block;
40
- overflow-x: auto;
41
- padding: .5em !important;
42
- }
43
- code, .trix-content pre {
44
- --bs-code-color: black;
45
- background-color: #eee !important;
46
- border: 1px solid #aaa;
47
- border-radius: 3px;
48
- padding: .1em .3em;
49
- }
50
- html[data-bs-theme="dark"] code, html[data-bs-theme="dark"] .trix-content pre {
51
- --bs-code-color: white;
52
- background-color: #2b2b2b !important;
53
- }
54
-
55
- /* Anchors */
56
- a:not(.nav-link) {
57
- text-decoration: none;
58
- color: var(--rrf-red);
59
- }
60
- a:hover:not(.nav-link) {
61
- text-decoration: underline;
62
- color: var(--rrf-red-hover);
63
- }
64
- html[data-bs-theme="dark"] a:not(.nav-link) { color: var(--rrf-light-red); }
65
- html[data-bs-theme="dark"] a:hover:not(.nav-link) { color: var(--rrf-light-red-hover); }
66
-
67
- </style>
68
- <script>
69
- ;(() => {
70
- // Get the real mode from a selected mode. Anything other than "light" or "dark" is treated as
71
- // "system" mode.
72
- const rrfGetRealMode = (selectedMode) => {
73
- if (selectedMode === "light" || selectedMode === "dark") {
74
- return selectedMode
75
- }
76
-
77
- if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
78
- return "dark"
79
- }
80
-
81
- return "light"
82
- }
83
-
84
- // Set the mode, given a "selected" mode.
85
- const rrfSetSelectedMode = (selectedMode) => {
86
- // Anything except "light" or "dark" is casted to "system".
87
- if (selectedMode !== "light" && selectedMode !== "dark") {
88
- selectedMode = "system"
89
- }
90
-
91
- // Store selected mode in `localStorage`.
92
- localStorage.setItem("rrfMode", selectedMode)
93
-
94
- // Set the mode selector to the selected mode.
95
- const modeComponent = document.getElementById("rrfModeComponent")
96
- if (modeComponent) {
97
- let labelHTML
98
- modeComponent.querySelectorAll("button[data-rrf-mode-value]").forEach((el) => {
99
- if (el.getAttribute("data-rrf-mode-value") === selectedMode) {
100
- el.classList.add("active")
101
- labelHTML = el.querySelector("i").outerHTML.replace("ms-2", "me-1")
102
- } else {
103
- el.classList.remove("active")
104
- }
105
- })
106
- modeComponent.querySelector("button[data-bs-toggle]").innerHTML = labelHTML
107
- }
108
-
109
- // Get the real mode to use.
110
- realMode = rrfGetRealMode(selectedMode)
111
-
112
- // Set the `realMode` effects.
113
- if (realMode === "light") {
114
- document.querySelectorAll(".rrf-light-mode").forEach((el) => {
115
- el.disabled = false
116
- })
117
- document.querySelectorAll(".rrf-dark-mode").forEach((el) => {
118
- el.disabled = true
119
- })
120
- document.querySelectorAll(".rrf-mode").forEach((el) => {
121
- el.setAttribute("data-bs-theme", "light")
122
- })
123
- } else if (realMode === "dark") {
124
- document.querySelectorAll(".rrf-light-mode").forEach((el) => {
125
- el.disabled = true
126
- })
127
- document.querySelectorAll(".rrf-dark-mode").forEach((el) => {
128
- el.disabled = false
129
- })
130
- document.querySelectorAll(".rrf-mode").forEach((el) => {
131
- el.setAttribute("data-bs-theme", "dark")
132
- })
133
- } else {
134
- console.log(`RRF: Unknown mode: ${mode}`)
135
- }
136
- }
137
-
138
- // Initialize dark/light mode before page fully loads to prevent flash.
139
- rrfSetSelectedMode(localStorage.getItem("rrfMode"))
140
-
141
- // Initialize dark/light mode after page load (mostly so mode component is updated).
142
- document.addEventListener("DOMContentLoaded", (event) => {
143
- rrfSetSelectedMode(localStorage.getItem("rrfMode"))
144
-
145
- // Also set up mode selector.
146
- document.querySelectorAll("#rrfModeComponent button[data-rrf-mode-value]").forEach((el) => {
147
- el.addEventListener("click", (event) => {
148
- rrfSetSelectedMode(event.target.getAttribute("data-rrf-mode-value"))
149
- })
150
- })
151
- })
152
-
153
- // Handle case where user changes system theme.
154
- if (window.matchMedia) {
155
- window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
156
- const selectedMode = localStorage.getItem("rrfMode")
157
- if (selectedMode !== "light" && selectedMode !== "dark") {
158
- rrfSetSelectedMode("system")
159
- }
160
- })
161
- }
162
- })()
163
-
164
- </script>
data/docs/CNAME DELETED
@@ -1 +0,0 @@
1
- rails-rest-framework.com
data/docs/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "github-pages"
4
- gem "yard"
5
- gem "webrick"
data/docs/Gemfile.lock DELETED
@@ -1,264 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- activesupport (7.0.5)
5
- concurrent-ruby (~> 1.0, >= 1.0.2)
6
- i18n (>= 1.6, < 2)
7
- minitest (>= 5.1)
8
- tzinfo (~> 2.0)
9
- addressable (2.8.4)
10
- public_suffix (>= 2.0.2, < 6.0)
11
- coffee-script (2.4.1)
12
- coffee-script-source
13
- execjs
14
- coffee-script-source (1.11.1)
15
- colorator (1.1.0)
16
- commonmarker (0.23.9)
17
- concurrent-ruby (1.2.2)
18
- dnsruby (1.70.0)
19
- simpleidn (~> 0.2.1)
20
- em-websocket (0.5.3)
21
- eventmachine (>= 0.12.9)
22
- http_parser.rb (~> 0)
23
- ethon (0.16.0)
24
- ffi (>= 1.15.0)
25
- eventmachine (1.2.7)
26
- execjs (2.8.1)
27
- faraday (2.7.6)
28
- faraday-net_http (>= 2.0, < 3.1)
29
- ruby2_keywords (>= 0.0.4)
30
- faraday-net_http (3.0.2)
31
- ffi (1.15.5)
32
- forwardable-extended (2.6.0)
33
- gemoji (3.0.1)
34
- github-pages (228)
35
- github-pages-health-check (= 1.17.9)
36
- jekyll (= 3.9.3)
37
- jekyll-avatar (= 0.7.0)
38
- jekyll-coffeescript (= 1.1.1)
39
- jekyll-commonmark-ghpages (= 0.4.0)
40
- jekyll-default-layout (= 0.1.4)
41
- jekyll-feed (= 0.15.1)
42
- jekyll-gist (= 1.5.0)
43
- jekyll-github-metadata (= 2.13.0)
44
- jekyll-include-cache (= 0.2.1)
45
- jekyll-mentions (= 1.6.0)
46
- jekyll-optional-front-matter (= 0.3.2)
47
- jekyll-paginate (= 1.1.0)
48
- jekyll-readme-index (= 0.3.0)
49
- jekyll-redirect-from (= 0.16.0)
50
- jekyll-relative-links (= 0.6.1)
51
- jekyll-remote-theme (= 0.4.3)
52
- jekyll-sass-converter (= 1.5.2)
53
- jekyll-seo-tag (= 2.8.0)
54
- jekyll-sitemap (= 1.4.0)
55
- jekyll-swiss (= 1.0.0)
56
- jekyll-theme-architect (= 0.2.0)
57
- jekyll-theme-cayman (= 0.2.0)
58
- jekyll-theme-dinky (= 0.2.0)
59
- jekyll-theme-hacker (= 0.2.0)
60
- jekyll-theme-leap-day (= 0.2.0)
61
- jekyll-theme-merlot (= 0.2.0)
62
- jekyll-theme-midnight (= 0.2.0)
63
- jekyll-theme-minimal (= 0.2.0)
64
- jekyll-theme-modernist (= 0.2.0)
65
- jekyll-theme-primer (= 0.6.0)
66
- jekyll-theme-slate (= 0.2.0)
67
- jekyll-theme-tactile (= 0.2.0)
68
- jekyll-theme-time-machine (= 0.2.0)
69
- jekyll-titles-from-headings (= 0.5.3)
70
- jemoji (= 0.12.0)
71
- kramdown (= 2.3.2)
72
- kramdown-parser-gfm (= 1.1.0)
73
- liquid (= 4.0.4)
74
- mercenary (~> 0.3)
75
- minima (= 2.5.1)
76
- nokogiri (>= 1.13.6, < 2.0)
77
- rouge (= 3.26.0)
78
- terminal-table (~> 1.4)
79
- github-pages-health-check (1.17.9)
80
- addressable (~> 2.3)
81
- dnsruby (~> 1.60)
82
- octokit (~> 4.0)
83
- public_suffix (>= 3.0, < 5.0)
84
- typhoeus (~> 1.3)
85
- html-pipeline (2.14.3)
86
- activesupport (>= 2)
87
- nokogiri (>= 1.4)
88
- http_parser.rb (0.8.0)
89
- i18n (1.14.1)
90
- concurrent-ruby (~> 1.0)
91
- jekyll (3.9.3)
92
- addressable (~> 2.4)
93
- colorator (~> 1.0)
94
- em-websocket (~> 0.5)
95
- i18n (>= 0.7, < 2)
96
- jekyll-sass-converter (~> 1.0)
97
- jekyll-watch (~> 2.0)
98
- kramdown (>= 1.17, < 3)
99
- liquid (~> 4.0)
100
- mercenary (~> 0.3.3)
101
- pathutil (~> 0.9)
102
- rouge (>= 1.7, < 4)
103
- safe_yaml (~> 1.0)
104
- jekyll-avatar (0.7.0)
105
- jekyll (>= 3.0, < 5.0)
106
- jekyll-coffeescript (1.1.1)
107
- coffee-script (~> 2.2)
108
- coffee-script-source (~> 1.11.1)
109
- jekyll-commonmark (1.4.0)
110
- commonmarker (~> 0.22)
111
- jekyll-commonmark-ghpages (0.4.0)
112
- commonmarker (~> 0.23.7)
113
- jekyll (~> 3.9.0)
114
- jekyll-commonmark (~> 1.4.0)
115
- rouge (>= 2.0, < 5.0)
116
- jekyll-default-layout (0.1.4)
117
- jekyll (~> 3.0)
118
- jekyll-feed (0.15.1)
119
- jekyll (>= 3.7, < 5.0)
120
- jekyll-gist (1.5.0)
121
- octokit (~> 4.2)
122
- jekyll-github-metadata (2.13.0)
123
- jekyll (>= 3.4, < 5.0)
124
- octokit (~> 4.0, != 4.4.0)
125
- jekyll-include-cache (0.2.1)
126
- jekyll (>= 3.7, < 5.0)
127
- jekyll-mentions (1.6.0)
128
- html-pipeline (~> 2.3)
129
- jekyll (>= 3.7, < 5.0)
130
- jekyll-optional-front-matter (0.3.2)
131
- jekyll (>= 3.0, < 5.0)
132
- jekyll-paginate (1.1.0)
133
- jekyll-readme-index (0.3.0)
134
- jekyll (>= 3.0, < 5.0)
135
- jekyll-redirect-from (0.16.0)
136
- jekyll (>= 3.3, < 5.0)
137
- jekyll-relative-links (0.6.1)
138
- jekyll (>= 3.3, < 5.0)
139
- jekyll-remote-theme (0.4.3)
140
- addressable (~> 2.0)
141
- jekyll (>= 3.5, < 5.0)
142
- jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
143
- rubyzip (>= 1.3.0, < 3.0)
144
- jekyll-sass-converter (1.5.2)
145
- sass (~> 3.4)
146
- jekyll-seo-tag (2.8.0)
147
- jekyll (>= 3.8, < 5.0)
148
- jekyll-sitemap (1.4.0)
149
- jekyll (>= 3.7, < 5.0)
150
- jekyll-swiss (1.0.0)
151
- jekyll-theme-architect (0.2.0)
152
- jekyll (> 3.5, < 5.0)
153
- jekyll-seo-tag (~> 2.0)
154
- jekyll-theme-cayman (0.2.0)
155
- jekyll (> 3.5, < 5.0)
156
- jekyll-seo-tag (~> 2.0)
157
- jekyll-theme-dinky (0.2.0)
158
- jekyll (> 3.5, < 5.0)
159
- jekyll-seo-tag (~> 2.0)
160
- jekyll-theme-hacker (0.2.0)
161
- jekyll (> 3.5, < 5.0)
162
- jekyll-seo-tag (~> 2.0)
163
- jekyll-theme-leap-day (0.2.0)
164
- jekyll (> 3.5, < 5.0)
165
- jekyll-seo-tag (~> 2.0)
166
- jekyll-theme-merlot (0.2.0)
167
- jekyll (> 3.5, < 5.0)
168
- jekyll-seo-tag (~> 2.0)
169
- jekyll-theme-midnight (0.2.0)
170
- jekyll (> 3.5, < 5.0)
171
- jekyll-seo-tag (~> 2.0)
172
- jekyll-theme-minimal (0.2.0)
173
- jekyll (> 3.5, < 5.0)
174
- jekyll-seo-tag (~> 2.0)
175
- jekyll-theme-modernist (0.2.0)
176
- jekyll (> 3.5, < 5.0)
177
- jekyll-seo-tag (~> 2.0)
178
- jekyll-theme-primer (0.6.0)
179
- jekyll (> 3.5, < 5.0)
180
- jekyll-github-metadata (~> 2.9)
181
- jekyll-seo-tag (~> 2.0)
182
- jekyll-theme-slate (0.2.0)
183
- jekyll (> 3.5, < 5.0)
184
- jekyll-seo-tag (~> 2.0)
185
- jekyll-theme-tactile (0.2.0)
186
- jekyll (> 3.5, < 5.0)
187
- jekyll-seo-tag (~> 2.0)
188
- jekyll-theme-time-machine (0.2.0)
189
- jekyll (> 3.5, < 5.0)
190
- jekyll-seo-tag (~> 2.0)
191
- jekyll-titles-from-headings (0.5.3)
192
- jekyll (>= 3.3, < 5.0)
193
- jekyll-watch (2.2.1)
194
- listen (~> 3.0)
195
- jemoji (0.12.0)
196
- gemoji (~> 3.0)
197
- html-pipeline (~> 2.2)
198
- jekyll (>= 3.0, < 5.0)
199
- kramdown (2.3.2)
200
- rexml
201
- kramdown-parser-gfm (1.1.0)
202
- kramdown (~> 2.0)
203
- liquid (4.0.4)
204
- listen (3.8.0)
205
- rb-fsevent (~> 0.10, >= 0.10.3)
206
- rb-inotify (~> 0.9, >= 0.9.10)
207
- mercenary (0.3.6)
208
- mini_portile2 (2.8.2)
209
- minima (2.5.1)
210
- jekyll (>= 3.5, < 5.0)
211
- jekyll-feed (~> 0.9)
212
- jekyll-seo-tag (~> 2.1)
213
- minitest (5.18.0)
214
- nokogiri (1.15.2)
215
- mini_portile2 (~> 2.8.2)
216
- racc (~> 1.4)
217
- octokit (4.25.1)
218
- faraday (>= 1, < 3)
219
- sawyer (~> 0.9)
220
- pathutil (0.16.2)
221
- forwardable-extended (~> 2.6)
222
- public_suffix (4.0.7)
223
- racc (1.7.0)
224
- rb-fsevent (0.11.2)
225
- rb-inotify (0.10.1)
226
- ffi (~> 1.0)
227
- rexml (3.2.5)
228
- rouge (3.26.0)
229
- ruby2_keywords (0.0.5)
230
- rubyzip (2.3.2)
231
- safe_yaml (1.0.5)
232
- sass (3.7.4)
233
- sass-listen (~> 4.0.0)
234
- sass-listen (4.0.0)
235
- rb-fsevent (~> 0.9, >= 0.9.4)
236
- rb-inotify (~> 0.9, >= 0.9.7)
237
- sawyer (0.9.2)
238
- addressable (>= 2.3.5)
239
- faraday (>= 0.17.3, < 3)
240
- simpleidn (0.2.1)
241
- unf (~> 0.1.4)
242
- terminal-table (1.8.0)
243
- unicode-display_width (~> 1.1, >= 1.1.1)
244
- typhoeus (1.4.0)
245
- ethon (>= 0.9.0)
246
- tzinfo (2.0.6)
247
- concurrent-ruby (~> 1.0)
248
- unf (0.1.4)
249
- unf_ext
250
- unf_ext (0.0.8.2)
251
- unicode-display_width (1.8.0)
252
- webrick (1.8.1)
253
- yard (0.9.34)
254
-
255
- PLATFORMS
256
- ruby
257
-
258
- DEPENDENCIES
259
- github-pages
260
- webrick
261
- yard
262
-
263
- BUNDLED WITH
264
- 2.2.33
data/docs/_config.yml DELETED
@@ -1,19 +0,0 @@
1
- title: Rails REST Framework
2
- email: schmitgreg@gmail.com
3
- description: Rails REST Framework helps you build awesome Web APIs in Ruby on Rails.
4
- url: "https://rails-rest-framework.com"
5
- collections:
6
- guide:
7
- output: true
8
- permalink: /:collection/:slug/
9
-
10
- # Build settings.
11
- markdown: kramdown
12
- highlighter: none
13
-
14
- defaults:
15
- - scope:
16
- # All files.
17
- path: ""
18
- values:
19
- layout: default
@@ -1,110 +0,0 @@
1
- ---
2
- layout: default
3
- title: Routers
4
- position: 1
5
- slug: routers
6
- ---
7
- # Routers
8
-
9
- You can route RESTful controllers with the normal utilities that Rails provides. However, the REST
10
- framework also provides some helpers to route controllers using attributes of the controllers
11
- themselves.
12
-
13
- ## Routing the API Root
14
-
15
- Your API root should probably have some content describing how one can authenticate with the API,
16
- and what sub-controllers exist in the API. The API root can also be a great place to put singleton
17
- actions on your API, if needed.
18
-
19
- There are two common ways for an API root to be implemented.
20
-
21
- ### Inherited API Root
22
-
23
- You likely have an API controller that your other controllers inherit from, like this:
24
-
25
- ```shell
26
- app/controllers/
27
- ├── api
28
- │   ├── groups_controller.rb
29
- │   ├── movies_controller.rb
30
- │ ├── marbles_controller.rb
31
- │ └── users_controller.rb
32
- ├── api_controller.rb
33
- └── application_controller.rb
34
- ```
35
-
36
- If your controllers in the `api` directory inherit from `ApiController` and you want root actions on
37
- `ApiController`, then you would setup your root route in the top-level namespace, like this:
38
-
39
- ```ruby
40
- Rails.application.routes.draw do
41
- rest_root :api
42
- namespace :api do
43
- ...
44
- end
45
- end
46
- ```
47
-
48
- However, note that actions defined on `ApiController` are defined on all sub-controllers, so if
49
- you're using `match` rules to route controllers, then this may lead to undesired behavior.
50
-
51
- ### Dedicated API Root
52
-
53
- A better way might be to dedicate a controller for the API root, which would prevent actions and
54
- properties defined on the root API from propagating to the rest of the namespace through
55
- inheritance. You would add a `RootController` so your directory would look like this:
56
-
57
- ```shell
58
- app/controllers/
59
- ├── api
60
- │   ├── groups_controller.rb
61
- │   ├── movies_controller.rb
62
- │   ├── root_controller.rb
63
- │ ├── marbles_controller.rb
64
- │ └── users_controller.rb
65
- ├── api_controller.rb
66
- └── application_controller.rb
67
- ```
68
-
69
- Now you can route the root in the `:api` namespace, like this:
70
-
71
- ```ruby
72
- Rails.application.routes.draw do
73
- namespace :api do
74
- rest_root # By default this will find and route `Api::RootController`.
75
- ...
76
- end
77
- end
78
- ```
79
-
80
- ## Resourceful Routing
81
-
82
- The REST Framework provides resourceful routers `rest_resource` and `rest_resources`, analogous to
83
- Rails' `resource` and `resources`. These routers will inspect their corresponding controllers and
84
- route `extra_actions` (aliased with `extra_collection_actions`) and `extra_member_actions`
85
- automatically.
86
-
87
- ```ruby
88
- Rails.application.routes.draw do
89
- namespace :api do
90
- rest_root
91
- rest_resource :user
92
- rest_resources :movies
93
- end
94
- end
95
- ```
96
-
97
- ## Non-resourceful Routing
98
-
99
- The `rest_route` non-resourceful router does not route the standard resource routes (`index`,
100
- `create`, `show`, `list`, `update`, `delete`). Any actions must be defined as `extra_actions` on the
101
- controller.
102
-
103
- ```ruby
104
- Rails.application.routes.draw do
105
- namespace :api do
106
- rest_root
107
- rest_route :network
108
- end
109
- end
110
- ```