xing-framework 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/default_configuration/base_app/backend/config/initializers/session_store.rb +1 -1
  3. data/default_configuration/base_app/backend/static-app.ru +1 -1
  4. data/default_configuration/base_app/frontend/npm-shrinkwrap.json +2042 -885
  5. data/default_configuration/base_app/frontend/package.json +1 -1
  6. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +2 -2
  7. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +3 -3
  8. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +6 -6
  9. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +4 -4
  10. data/default_configuration/base_app/frontend/src/app/inner.tpl.html +8 -8
  11. data/default_configuration/base_app/frontend/src/app/root.tpl.html +1 -1
  12. data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +3 -3
  13. data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +1 -1
  14. data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +1 -1
  15. data/default_configuration/base_app/frontend/src/common/config.js +2 -2
  16. data/default_configuration/base_app/frontend/src/index.html +1 -1
  17. data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +1 -1
  18. data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +1 -1
  19. data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +2 -2
  20. data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +1 -1
  21. data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +1 -1
  22. data/default_configuration/base_app/static-app.ru +1 -1
  23. metadata +2 -47
  24. data/default_configuration/base_app/API_DOC/README +0 -23
  25. data/default_configuration/base_app/API_DOC/admin-menus +0 -167
  26. data/default_configuration/base_app/API_DOC/admin-pages +0 -173
  27. data/default_configuration/base_app/API_DOC/content-block +0 -10
  28. data/default_configuration/base_app/API_DOC/navigation +0 -54
  29. data/default_configuration/base_app/API_DOC/page +0 -38
  30. data/default_configuration/base_app/backend/README +0 -12
  31. data/default_configuration/base_app/backend/public/index.html +0 -0
  32. data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +0 -15
  33. data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +0 -15
  34. data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +0 -15
  35. data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +0 -15
  36. data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +0 -15
  37. data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +0 -15
  38. data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +0 -15
  39. data/default_configuration/base_app/dummy-api/admin/menus.json +0 -23
  40. data/default_configuration/base_app/dummy-api/admin/menus/1.json +0 -118
  41. data/default_configuration/base_app/dummy-api/admin/menus/2.json +0 -8
  42. data/default_configuration/base_app/dummy-api/admin/pages.json +0 -105
  43. data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +0 -45
  44. data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +0 -36
  45. data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +0 -36
  46. data/default_configuration/base_app/dummy-api/admin/pages/home.json +0 -36
  47. data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +0 -18
  48. data/default_configuration/base_app/dummy-api/admin/pages/links.json +0 -36
  49. data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +0 -54
  50. data/default_configuration/base_app/dummy-api/homepage.json +0 -14
  51. data/default_configuration/base_app/dummy-api/navigation/main.json +0 -119
  52. data/default_configuration/base_app/dummy-api/pages/about_us.json +0 -41
  53. data/default_configuration/base_app/dummy-api/pages/contact_us.json +0 -32
  54. data/default_configuration/base_app/dummy-api/pages/gallery.json +0 -32
  55. data/default_configuration/base_app/dummy-api/pages/home.json +0 -32
  56. data/default_configuration/base_app/dummy-api/pages/homepage.json +0 -14
  57. data/default_configuration/base_app/dummy-api/pages/links.json +0 -32
  58. data/default_configuration/base_app/dummy-api/pages/newsletter.json +0 -50
  59. data/default_configuration/base_app/frontend/CHANGELOG.md +0 -125
  60. data/default_configuration/base_app/frontend/LICENSE +0 -19
  61. data/default_configuration/base_app/frontend/README.md +0 -5
  62. data/default_configuration/base_app/frontend/bin/index.html +0 -0
  63. data/default_configuration/base_app/frontend/changelog.tpl +0 -23
  64. data/default_configuration/base_app/frontend/src/README.md +0 -48
  65. data/default_configuration/base_app/frontend/src/app/README.md +0 -68
  66. data/default_configuration/base_app/frontend/src/assets/README.md +0 -4
  67. data/default_configuration/base_app/frontend/src/common/README.md +0 -19
  68. data/default_configuration/base_app/frontend/tools.md +0 -223
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "LRD-CMS2",
2
+ "name": "XING-BASE",
3
3
  "version": "0.0.1",
4
4
  "repository": "git@git.lrdesign.com:lrd/cms2.git",
5
5
  "author": "Logical Reality Design",
@@ -3,13 +3,13 @@
3
3
  <p>Enter your email address below to receive a new confirmation email.</p>
4
4
 
5
5
  <form id='passwords-request-form'>
6
- <div class='lrd-form-row'>
6
+ <div class='xng-form-row'>
7
7
  <label for="email">Email:</label>
8
8
  <input name="email" ng-model="passwordRequest.email" placeholder="Email" />
9
9
  <span class='comment'></span>
10
10
  </div>
11
11
 
12
- <div class='lrd-form-row'>
12
+ <div class='xng-form-row'>
13
13
  <button type="submit" ng-click="passwordRequestSubmit()" class="call-to-action">Send password reset instructions</button>
14
14
  </div>
15
15
 
@@ -2,19 +2,19 @@
2
2
 
3
3
  <form id='passwords-update-form'>
4
4
 
5
- <div class='lrd-form-row'>
5
+ <div class='xng-form-row'>
6
6
  <label for="password">New Password:</label>
7
7
  <input type="password" name="password" ng-model="passwordUpdate.password" placeholder="New Password" />
8
8
  <span class='comment'></span>
9
9
  </div>
10
10
 
11
- <div class='lrd-form-row'>
11
+ <div class='xng-form-row'>
12
12
  <label for="password-confirmation">Confirm New Password:</label>
13
13
  <input type="password" name="password-confirmation" ng-model="passwordUpdate.passwordConfirmation" placeholder="New Password" />
14
14
  <span class='comment'></span>
15
15
  </div>
16
16
 
17
- <div class='lrd-form-row'>
17
+ <div class='xng-form-row'>
18
18
  <button type="submit" ng-click="passwordUpdateSubmit()" class='call-to-action'>Update Password</button>
19
19
  </div>
20
20
 
@@ -2,35 +2,35 @@
2
2
 
3
3
  <form id='registrations-form'>
4
4
 
5
- <div class='lrd-form-row'>
5
+ <div class='xng-form-row'>
6
6
  <label for="email">Email:</label>
7
7
  <input name="email" ng-model="registration.email" placeholder="Email" />
8
8
  <span class='comment'></span>
9
9
  </div>
10
10
 
11
- <div class='lrd-form-row'>
11
+ <div class='xng-form-row'>
12
12
  <label for="email-confirmation">Email Confirmation:</label>
13
13
  <input name="email-confirmation" ng-model="registration.emailConfirmation" placeholder="Email Confirmation" />
14
14
  <span class='comment'></span>
15
15
  </div>
16
16
 
17
- <div class='lrd-form-row'>
17
+ <div class='xng-form-row'>
18
18
  <label for="password">Password:</label>
19
19
  <input type="password" name="password" ng-model="registration.password" placeholder="Password" />
20
20
  <span class='comment'></span>
21
21
  </div>
22
22
 
23
- <div class='lrd-form-row'>
23
+ <div class='xng-form-row'>
24
24
  <label for="password-confirmation">Password Confirmation:</label>
25
25
  <input type="password" name="password-confirmation" ng-model="registration.passwordConfirmation" placeholder="Password Confirmation" />
26
26
  <span class='comment'></span>
27
27
  </div>
28
28
 
29
- <div class='lrd-form-row'>
29
+ <div class='xng-form-row'>
30
30
  <button type="submit" ng-click="registrationSubmit()" class='call-to-action'>Sign Up</button>
31
31
  </div>
32
32
 
33
- <div class='lrd-form-row'>
33
+ <div class='xng-form-row'>
34
34
  <a ui-sref='root.inner.sessions' class='input-like'>Already have an account?</a>
35
35
  </div>
36
36
 
@@ -1,23 +1,23 @@
1
1
  <h1>Sign In</h1>
2
2
 
3
3
  <form id='sessions-form'>
4
- <div class='lrd-form-row'>
4
+ <div class='xng-form-row'>
5
5
  <label for="{{authKey}}">{{humanAuthKey}}:</label>
6
6
  <input name="{{authKey}}" ng-model="session[authKey]" placeholder="{{humanAuthKey}}" required />
7
7
  <span class='messages'></span>
8
8
  </div>
9
9
 
10
- <div class='lrd-form-row'>
10
+ <div class='xng-form-row'>
11
11
  <label for="password">Password:</label>
12
12
  <input type="password" name="password" ng-model="session.password" placeholder="Password" required />
13
13
  <span class='messages'></span>
14
14
  </div>
15
15
 
16
- <div class='lrd-form-row'>
16
+ <div class='xng-form-row'>
17
17
  <button type="submit" ng-click="sessionSubmit()" class="call-to-action">Sign In</button>
18
18
  </div>
19
19
 
20
- <div class='lrd-form-row'>
20
+ <div class='xng-form-row'>
21
21
  <div ng-if="passwordShow" class='input-like'>
22
22
  <a ui-sref='root.inner.passwordsRequest'>Forgot your password?</a>
23
23
  </div>
@@ -1,16 +1,16 @@
1
- <lrd-responsive-menu>
2
- <lrd-navbar id="main_nav" menu="mainMenu">
3
- </lrd-navbar>
4
- <lrd-session-links>
5
- </lrd-session-links>
6
- </lrd-responsive-menu>
1
+ <xng-responsive-menu>
2
+ <xng-navbar id="main_nav" menu="mainMenu">
3
+ </xng-navbar>
4
+ <xng-session-links>
5
+ </xng-session-links>
6
+ </xng-responsive-menu>
7
7
 
8
8
  <div id="toast_main">
9
9
  </div>
10
10
 
11
- <ui-view lrd-state-attrs></ui-view>
11
+ <ui-view xng-state-attrs></ui-view>
12
12
 
13
13
  <footer>
14
- <span id="copyright">&copy; 2014 Your Organization Here</span>
14
+ <span id="copyright">&copy; 2016 Your Organization Here</span>
15
15
  <a ui-sref='root.inner.sessions' id='sign-in-link'>Sign In</a>
16
16
  </footer>
@@ -1,2 +1,2 @@
1
- <ui-view lrd-state-attrs>
1
+ <ui-view xng-state-attrs>
2
2
  </ui-view>
@@ -1,5 +1,5 @@
1
1
  <ul class="session-links">
2
- <li ng-hide="lrdSessionLinks.isLoggedIn"><a ui-sref='root.inner.registrations'>Sign Up</a></li>
3
- <li ng-hide="lrdSessionLinks.isLoggedIn"><a ui-sref='root.inner.sessions'>Sign In</a></li>
4
- <li ng-show="lrdSessionLinks.isLoggedIn"><a lrd-sign-out>Sign Out</a></li>
2
+ <li ng-hide="xngSessionLinks.isLoggedIn"><a ui-sref='root.inner.registrations'>Sign Up</a></li>
3
+ <li ng-hide="xngSessionLinks.isLoggedIn"><a ui-sref='root.inner.sessions'>Sign In</a></li>
4
+ <li ng-show="xngSessionLinks.isLoggedIn"><a xng-sign-out>Sign Out</a></li>
5
5
  </ul>
@@ -6,7 +6,7 @@ import OnLoginDirective from 'components/OnLoginDirective/OnLoginDirective.js';
6
6
  'ng-token-auth',
7
7
  SignOut])
8
8
  @Component({
9
- selector: 'lrdSessionLinks',
9
+ selector: 'xngSessionLinks',
10
10
  services: ['$rootScope', '$auth']
11
11
  })
12
12
  @Template({
@@ -1,7 +1,7 @@
1
1
  import {Module, DirectiveObject} from 'a1atscript';
2
2
 
3
3
  @Module('signOutDirective', ['ng-token-auth', 'ui.router.state'])
4
- @DirectiveObject('lrdSignOut', ['$state', '$auth'])
4
+ @DirectiveObject('xngSignOut', ['$state', '$auth'])
5
5
  export default class SignOut {
6
6
  constructor($state, $auth) {
7
7
  this.$state = $state;
@@ -8,7 +8,7 @@ export var backendUrl = (function(){
8
8
  }
9
9
 
10
10
  var matches = cookies.filter((cookie) => {
11
- return /^lrdBackendUrl=/.test(cookie);
11
+ return /^xngBackendUrl=/.test(cookie);
12
12
  });
13
13
 
14
14
  if(matches.length > 0) {
@@ -17,7 +17,7 @@ export var backendUrl = (function(){
17
17
  return environment.backendUrl;
18
18
  }
19
19
  }());
20
- export var appName = "LRD-CMS2";
20
+ export var appName = "XING-BASE";
21
21
  export var configuration = { backendUrl, appName };
22
22
 
23
23
  if(environment.name){
@@ -70,7 +70,7 @@
70
70
 
71
71
  <body>
72
72
  <div id='wrap'>
73
- <ui-view lrd-state-attrs>
73
+ <ui-view xng-state-attrs>
74
74
  <div class="intro-loading-circle-outer">
75
75
  <div class="intro-loading-circle-inner">
76
76
  <div class="intro-loading-circle">
@@ -6,4 +6,4 @@
6
6
  // * Overriding rules
7
7
  // * Including only the sub-mixins you care about
8
8
  // * Removing this include entirely and writing new rules
9
- @include lrd-form-defaults
9
+ @include xng-form-defaults
@@ -7,4 +7,4 @@
7
7
  // * Overriding rules
8
8
  // * Including only the sub-mixins you care about
9
9
  // * Removing this include entirely and writing new rules
10
- @include lrd-navbar-defaults
10
+ @include xng-navbar-defaults
@@ -72,7 +72,7 @@ describe( 'Passwords controllers', function() {
72
72
  $scope: $scope,
73
73
  $state: $stateMock,
74
74
  $auth: $authMock,
75
- $lrdToast: $toastMock,
75
+ $xngToast: $toastMock,
76
76
  $location: mockLocation,
77
77
  Serializer: mockSerializer
78
78
  });
@@ -134,7 +134,7 @@ describe( 'Passwords controllers', function() {
134
134
  $scope: $scope,
135
135
  $state: $stateMock,
136
136
  $auth: $authMock,
137
- $lrdToast: $toastMock,
137
+ $xngToast: $toastMock,
138
138
  Serializer: mockSerializer,
139
139
  $location: mockLocation
140
140
  });
@@ -56,7 +56,7 @@ describe( 'Registrations controllers', function() {
56
56
  $scope: $scope,
57
57
  $state: $stateMock,
58
58
  $auth: $authMock,
59
- $lrdToast: $toastMock,
59
+ $xngToast: $toastMock,
60
60
  Serializer: mockSerializer
61
61
  });
62
62
  $scope.$apply();
@@ -44,7 +44,7 @@ describe( 'Sessions controllers', function() {
44
44
  $scope: $scope,
45
45
  $state: $stateMock,
46
46
  $auth: $authMock,
47
- $lrdToast: $toastMock
47
+ $xngToast: $toastMock
48
48
  });
49
49
  $scope.$apply();
50
50
  }));
@@ -1,3 +1,3 @@
1
1
  $:.unshift("./backend")
2
2
  require 'lib/static-app'
3
- run LrdCms2::StaticApp.build("frontend/bin", ENV['LRD_BACKEND_PORT'])
3
+ run XingBase::StaticApp.build("frontend/bin", ENV['XING_BACKEND_PORT'])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xing-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Dorn
@@ -51,12 +51,6 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - bin/xing
54
- - default_configuration/base_app/API_DOC/README
55
- - default_configuration/base_app/API_DOC/admin-menus
56
- - default_configuration/base_app/API_DOC/admin-pages
57
- - default_configuration/base_app/API_DOC/content-block
58
- - default_configuration/base_app/API_DOC/navigation
59
- - default_configuration/base_app/API_DOC/page
60
54
  - default_configuration/base_app/CHANGELOG.md
61
55
  - default_configuration/base_app/Capfile
62
56
  - default_configuration/base_app/Gemfile
@@ -65,7 +59,6 @@ files:
65
59
  - default_configuration/base_app/Rakefile
66
60
  - default_configuration/base_app/backend/Gemfile
67
61
  - default_configuration/base_app/backend/Gemfile.lock
68
- - default_configuration/base_app/backend/README
69
62
  - default_configuration/base_app/backend/Rakefile
70
63
  - default_configuration/base_app/backend/app/controllers/application_controller.rb
71
64
  - default_configuration/base_app/backend/app/controllers/confirmations_controller.rb
@@ -114,7 +107,6 @@ files:
114
107
  - default_configuration/base_app/backend/public/422.html
115
108
  - default_configuration/base_app/backend/public/500.html
116
109
  - default_configuration/base_app/backend/public/favicon.ico
117
- - default_configuration/base_app/backend/public/index.html
118
110
  - default_configuration/base_app/backend/public/robots.txt
119
111
  - default_configuration/base_app/backend/script/rails
120
112
  - default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb
@@ -140,44 +132,12 @@ files:
140
132
  - default_configuration/base_app/doc/01_fail_resources.txt
141
133
  - default_configuration/base_app/doc/02_fail_auth.txt
142
134
  - default_configuration/base_app/doc/03_fail_menus.txt
143
- - default_configuration/base_app/dummy-api/admin/menu_items/10.json
144
- - default_configuration/base_app/dummy-api/admin/menu_items/11.json
145
- - default_configuration/base_app/dummy-api/admin/menu_items/12.json
146
- - default_configuration/base_app/dummy-api/admin/menu_items/13.json
147
- - default_configuration/base_app/dummy-api/admin/menu_items/14.json
148
- - default_configuration/base_app/dummy-api/admin/menu_items/15.json
149
- - default_configuration/base_app/dummy-api/admin/menu_items/16.json
150
- - default_configuration/base_app/dummy-api/admin/menus.json
151
- - default_configuration/base_app/dummy-api/admin/menus/1.json
152
- - default_configuration/base_app/dummy-api/admin/menus/2.json
153
- - default_configuration/base_app/dummy-api/admin/pages.json
154
- - default_configuration/base_app/dummy-api/admin/pages/about_us.json
155
- - default_configuration/base_app/dummy-api/admin/pages/contact_us.json
156
- - default_configuration/base_app/dummy-api/admin/pages/gallery.json
157
- - default_configuration/base_app/dummy-api/admin/pages/home.json
158
- - default_configuration/base_app/dummy-api/admin/pages/homepage.json
159
- - default_configuration/base_app/dummy-api/admin/pages/links.json
160
- - default_configuration/base_app/dummy-api/admin/pages/newsletter.json
161
- - default_configuration/base_app/dummy-api/homepage.json
162
- - default_configuration/base_app/dummy-api/navigation/main.json
163
- - default_configuration/base_app/dummy-api/pages/about_us.json
164
- - default_configuration/base_app/dummy-api/pages/contact_us.json
165
- - default_configuration/base_app/dummy-api/pages/gallery.json
166
- - default_configuration/base_app/dummy-api/pages/home.json
167
- - default_configuration/base_app/dummy-api/pages/homepage.json
168
- - default_configuration/base_app/dummy-api/pages/links.json
169
- - default_configuration/base_app/dummy-api/pages/newsletter.json
170
135
  - default_configuration/base_app/dump.rdb
171
136
  - default_configuration/base_app/example-lrd-dev-tmux.conf
172
- - default_configuration/base_app/frontend/CHANGELOG.md
173
137
  - default_configuration/base_app/frontend/Gemfile
174
138
  - default_configuration/base_app/frontend/Gemfile.lock
175
139
  - default_configuration/base_app/frontend/Gruntfile.js
176
- - default_configuration/base_app/frontend/LICENSE
177
- - default_configuration/base_app/frontend/README.md
178
- - default_configuration/base_app/frontend/bin/index.html
179
140
  - default_configuration/base_app/frontend/build.config.js
180
- - default_configuration/base_app/frontend/changelog.tpl
181
141
  - default_configuration/base_app/frontend/config/compass.rb
182
142
  - default_configuration/base_app/frontend/config/environments/development.js
183
143
  - default_configuration/base_app/frontend/config/environments/integration.js
@@ -190,8 +150,6 @@ files:
190
150
  - default_configuration/base_app/frontend/npm-shrinkwrap.json
191
151
  - default_configuration/base_app/frontend/package.json
192
152
  - default_configuration/base_app/frontend/sprockets/index.tpl.js
193
- - default_configuration/base_app/frontend/src/README.md
194
- - default_configuration/base_app/frontend/src/app/README.md
195
153
  - default_configuration/base_app/frontend/src/app/app.js
196
154
  - default_configuration/base_app/frontend/src/app/appConfig.js
197
155
  - default_configuration/base_app/frontend/src/app/auth/auth.js
@@ -225,9 +183,7 @@ files:
225
183
  - default_configuration/base_app/frontend/src/app/root.tpl.html
226
184
  - default_configuration/base_app/frontend/src/app/rootController.js
227
185
  - default_configuration/base_app/frontend/src/app/rootStates.js
228
- - default_configuration/base_app/frontend/src/assets/README.md
229
186
  - default_configuration/base_app/frontend/src/assets/icons/alert.svg
230
- - default_configuration/base_app/frontend/src/common/README.md
231
187
  - default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js
232
188
  - default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html
233
189
  - default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js
@@ -258,7 +214,6 @@ files:
258
214
  - default_configuration/base_app/frontend/test/support/mockDirective.js
259
215
  - default_configuration/base_app/frontend/test/support/stateResolveFn.js
260
216
  - default_configuration/base_app/frontend/test/support/testStates.js
261
- - default_configuration/base_app/frontend/tools.md
262
217
  - default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake
263
218
  - default_configuration/base_app/static-app.ru
264
219
  - default_configuration/base_app/tmux-windows
@@ -280,7 +235,7 @@ rdoc_options:
280
235
  - "--main"
281
236
  - doc/README
282
237
  - "--title"
283
- - xing-framework-0.0.2 Documentation
238
+ - xing-framework-0.0.3 Documentation
284
239
  require_paths:
285
240
  - lib/
286
241
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -1,23 +0,0 @@
1
-
2
- All requests and responses are JSON. Client should send Accept:
3
- "application/json" on all requests, and Content-Type: "application/json" on
4
- requests with bodies (i.e. POST, PUT).
5
-
6
- OPEN QUESTIONS:
7
- PATCH? Only makes sense if the body somehow represents a change rather than a replacement.
8
- All link relations? Or just self-links and use resource embed for
9
- relationships?
10
-
11
- Server responses should represent resources as a JSON object with two fields:
12
- `links` and `data`. Both fields should contain an object. The links object
13
- should have fields equivalent to HTML "rel" attributes. Importantly the self
14
- link, but we should define link types internal to the application.
15
-
16
- The data object is more free form. Some commonality of fields is worthwhile,
17
- but whatever most sensibly represents the resource is the best choice.
18
-
19
- Where a resource refers to another, include a subset of the other resource in
20
- the data object.
21
-
22
- Examples: #with ruby style comments
23
-
@@ -1,167 +0,0 @@
1
- # list of menus
2
- # This is the serialized output of Menu.list (class method)
3
- #
4
- # GET /admin/menus
5
- {
6
- links; {
7
- self: "/admin/menus"
8
- },
9
- data: [
10
- { links: {
11
- self: 'admin/menus/:id1'
12
- },
13
- data: {
14
- name: 'Menu 1'
15
- }
16
- },
17
- { links: {
18
- self: 'admin/menus/:id2'
19
- },
20
- data: {
21
- name: 'Menu 2'
22
- }
23
- },
24
- { links: {
25
- self: 'admin/menus/:id3'
26
- },
27
- data: {
28
- name: 'Menu 3'
29
- }
30
- }
31
- ]
32
- }
33
-
34
-
35
- # GET /admin/menu/:id
36
- #
37
- # Just like /navigation/main but takes the ID of one of the menus returned
38
- # in admin/menus, gives the full list *with* admin links for individual
39
- # menu items
40
- {
41
- links: {
42
- self: "/admin/menu/:id"
43
- },
44
- data: [
45
-
46
- # a top-level menu item
47
- {
48
- links : {
49
- self: 'admin/menu-item/:id'
50
- }
51
- data : {
52
- name: "Services",
53
- path: # IF type == 'raw url', this is included and contains the url
54
- page: { links: { self: "pages/:url_slug", #IF type == 'page', this is the URL of the page resource
55
- type: [ 'page' | 'raw_url' ]
56
- children: [
57
-
58
- # a sub-menu item under "Services", with a page link
59
- {
60
- links: {
61
- self: 'admin/menu-item/:id'
62
- },
63
- data: {
64
- type: 'page',
65
- name: "Startup MVPs",
66
- page: { links: { self: '/pages/startup-mvps' }} ,
67
- # no children - key omitted
68
- }
69
- },
70
-
71
- # a second sub-menu item under "Services", with a page link
72
- {
73
- links: {
74
- self: 'admin/menu-item/:id'
75
- },
76
- data: {
77
- type: 'page'
78
- name: "Code Rescue",
79
- page: { links: { self: '/pages/code-rescue' }} ,
80
- # no children - key omitted
81
- }
82
- },
83
-
84
- ]
85
- }
86
- },
87
-
88
- # a top-level menu item with an external link
89
- {
90
- links : {
91
- self: 'admin/menu-item/:id'
92
- }
93
- data: {
94
- type: 'raw_url',
95
- name: "About Web Security",
96
- path: 'https://www.owasp.org/index.php/Main_Page',
97
- # no children - key omitted
98
- }
99
- }
100
- ]
101
- }
102
-
103
-
104
-
105
-
106
-
107
- # GET /admin/menu-items/:id
108
- # For an item that liks to an external URL
109
- {
110
- links : {
111
- self: 'admin/menu-items/:id'
112
- }
113
- data: {
114
- type: 'raw_url',
115
- name: 'Services',
116
- path: 'https://www.owasp.org/index.php/Main_Page',
117
- parent_id: <integer>
118
- }
119
- }
120
- # GET /admin/menu-items/:id
121
- # For an item that liks to a page
122
- {
123
- links : {
124
- self: 'admin/menu-items/:id'
125
- }
126
- data: {
127
- type: 'page',
128
- name: 'Services',
129
- page: { links: { self: '/pages/:url_slug' }},
130
- page_id: <integer>,
131
- parent_id: <integer>
132
- }
133
- }
134
-
135
- #
136
- # POST /admin/menu-items
137
- #
138
-
139
- {
140
- # links omitted
141
-
142
- data : {
143
- name: "Services", # REQUIRED
144
- path: '/services', # optional if links to page
145
- page_url_slug: '/page_url_slug' # optional if links to external website
146
- type: [ 'page' | 'raw_url' ] # REQUIRED
147
- parent_id: <integer> # optional
148
- }
149
- }
150
-
151
- #
152
- # PUT /admin/menu-items/:id
153
- #
154
-
155
- {
156
- # links omitted
157
-
158
- data : {
159
- name: "Services", # optional
160
- path: '/services', # optional
161
- page_url_slug: '/page_url_slug' # optional
162
- type: [ 'page' | 'raw_url' ] # optional
163
- parent_id: <integer> # optional
164
- }
165
- }
166
-
167
-