eon-elements 0.0.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.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +1 -0
  4. data/.rvmrc +1 -0
  5. data/.yardopts +7 -0
  6. data/Gemfile +15 -0
  7. data/LICENSE.md +22 -0
  8. data/README.md +43 -0
  9. data/Rakefile +16 -0
  10. data/app/assets/images/eon/.keep +0 -0
  11. data/app/assets/javascripts/eon/.keep +0 -0
  12. data/app/assets/stylesheets/eon/.keep +0 -0
  13. data/app/controllers/.keep +0 -0
  14. data/app/helpers/.keep +0 -0
  15. data/app/mailers/.keep +0 -0
  16. data/app/models/.keep +0 -0
  17. data/app/views/.keep +0 -0
  18. data/bin/rails +8 -0
  19. data/config/routes.rb +2 -0
  20. data/eon-elements.gemspec +38 -0
  21. data/lib/eon.rb +4 -0
  22. data/lib/eon/elements.rb +4 -0
  23. data/lib/eon/elements/version.rb +5 -0
  24. data/lib/eon/engine.rb +4 -0
  25. data/lib/generators/eon/elements/USAGE +3 -0
  26. data/lib/generators/eon/elements/install_generator.rb +27 -0
  27. data/lib/generators/eon/elements/templates/controller.rb +48 -0
  28. data/lib/generators/eon/elements/templates/models/ability.rb +15 -0
  29. data/lib/generators/eon/elements/templates/models/permitted_params.rb +9 -0
  30. data/lib/generators/eon/elements/templates/scaffold/_form.html.haml +12 -0
  31. data/lib/generators/eon/elements/templates/scaffold/edit.html.haml +6 -0
  32. data/lib/generators/eon/elements/templates/scaffold/index.html.haml +33 -0
  33. data/lib/generators/eon/elements/templates/scaffold/new.html.haml +8 -0
  34. data/lib/generators/eon/elements/templates/scaffold/show.html.haml +17 -0
  35. data/lib/tasks/eon_tasks.rake +4 -0
  36. data/spec/dummy/README.rdoc +28 -0
  37. data/spec/dummy/Rakefile +6 -0
  38. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  39. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  40. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  41. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  42. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  43. data/spec/dummy/app/mailers/.keep +0 -0
  44. data/spec/dummy/app/models/.keep +0 -0
  45. data/spec/dummy/app/models/concerns/.keep +0 -0
  46. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  47. data/spec/dummy/bin/bundle +3 -0
  48. data/spec/dummy/bin/rails +4 -0
  49. data/spec/dummy/bin/rake +4 -0
  50. data/spec/dummy/config.ru +4 -0
  51. data/spec/dummy/config/application.rb +28 -0
  52. data/spec/dummy/config/boot.rb +9 -0
  53. data/spec/dummy/config/database.yml +25 -0
  54. data/spec/dummy/config/environment.rb +5 -0
  55. data/spec/dummy/config/environments/development.rb +27 -0
  56. data/spec/dummy/config/environments/production.rb +80 -0
  57. data/spec/dummy/config/environments/test.rb +36 -0
  58. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  59. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  60. data/spec/dummy/config/initializers/inflections.rb +16 -0
  61. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  62. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  63. data/spec/dummy/config/initializers/session_store.rb +3 -0
  64. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  65. data/spec/dummy/config/locales/en.yml +23 -0
  66. data/spec/dummy/config/routes.rb +49 -0
  67. data/spec/dummy/lib/assets/.keep +0 -0
  68. data/spec/dummy/log/.keep +0 -0
  69. data/spec/dummy/public/404.html +27 -0
  70. data/spec/dummy/public/422.html +26 -0
  71. data/spec/dummy/public/500.html +26 -0
  72. data/spec/dummy/public/favicon.ico +0 -0
  73. data/spec/spec_helper.rb +42 -0
  74. data/vendor/assets/images/.keep +0 -0
  75. data/vendor/assets/javascripts/html5_tags.js +3 -0
  76. data/vendor/assets/stylesheets/normalize.css +374 -0
  77. metadata +244 -0
File without changes
File without changes
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ <p>If you are the application owner check the logs for more information.</p>
26
+ </body>
27
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ <p>If you are the application owner check the logs for more information.</p>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,42 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../../spec/dummy/config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+
7
+ # Requires supporting ruby files with custom matchers and macros, etc,
8
+ # in spec/support/ and its subdirectories.
9
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
10
+
11
+ # Checks for pending migrations before tests are run.
12
+ # If you are not using ActiveRecord, you can remove this line.
13
+ ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
14
+
15
+ RSpec.configure do |config|
16
+ # ## Mock Framework
17
+ #
18
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
19
+ #
20
+ # config.mock_with :mocha
21
+ # config.mock_with :flexmock
22
+ config.mock_with :rr
23
+
24
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
25
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
26
+
27
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
28
+ # examples within a transaction, remove the following line or assign false
29
+ # instead of true.
30
+ config.use_transactional_fixtures = true
31
+
32
+ # If true, the base class of anonymous controllers will be inferred
33
+ # automatically. This will be the default behavior in future versions of
34
+ # rspec-rails.
35
+ config.infer_base_class_for_anonymous_controllers = false
36
+
37
+ # Run specs in random order to surface order dependencies. If you find an
38
+ # order dependency and want to debug it, you can fix the order by providing
39
+ # the seed, which is printed after each run.
40
+ # --seed 1234
41
+ config.order = "random"
42
+ end
File without changes
@@ -0,0 +1,3 @@
1
+ // HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
2
+ // Uncompressed source: https://github.com/aFarkas/html5shiv
3
+ (function(a,b){var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e})(this,document)
@@ -0,0 +1,374 @@
1
+ /*! normalize.css v2.0.1 | MIT License | git.io/normalize */
2
+
3
+ /* ==========================================================================
4
+ HTML5 display definitions
5
+ ========================================================================== */
6
+
7
+ /**
8
+ * Correct `block` display not defined in IE 8/9.
9
+ */
10
+
11
+ article,
12
+ aside,
13
+ details,
14
+ figcaption,
15
+ figure,
16
+ footer,
17
+ header,
18
+ hgroup,
19
+ nav,
20
+ section,
21
+ summary {
22
+ display: block;
23
+ }
24
+
25
+ /**
26
+ * Correct `inline-block` display not defined in IE 8/9.
27
+ */
28
+
29
+ audio,
30
+ canvas,
31
+ video {
32
+ display: inline-block;
33
+ }
34
+
35
+ /**
36
+ * Prevent modern browsers from displaying `audio` without controls.
37
+ * Remove excess height in iOS 5 devices.
38
+ */
39
+
40
+ audio:not([controls]) {
41
+ display: none;
42
+ height: 0;
43
+ }
44
+
45
+ /**
46
+ * Address styling not present in IE 8/9.
47
+ */
48
+
49
+ [hidden] {
50
+ display: none;
51
+ }
52
+
53
+ /* ==========================================================================
54
+ Base
55
+ ========================================================================== */
56
+
57
+ /**
58
+ * 1. Set default font family to sans-serif.
59
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
60
+ * user zoom.
61
+ */
62
+
63
+ html {
64
+ font-family: sans-serif; /* 1 */
65
+ -webkit-text-size-adjust: 100%; /* 2 */
66
+ -ms-text-size-adjust: 100%; /* 2 */
67
+ }
68
+
69
+ /**
70
+ * Remove default margin.
71
+ */
72
+
73
+ body {
74
+ margin: 0;
75
+ }
76
+
77
+ /* ==========================================================================
78
+ Links
79
+ ========================================================================== */
80
+
81
+ /**
82
+ * Address `outline` inconsistency between Chrome and other browsers.
83
+ */
84
+
85
+ a:focus {
86
+ outline: thin dotted;
87
+ }
88
+
89
+ /**
90
+ * Improve readability when focused and also mouse hovered in all browsers.
91
+ */
92
+
93
+ a:active,
94
+ a:hover {
95
+ outline: 0;
96
+ }
97
+
98
+ /* ==========================================================================
99
+ Typography
100
+ ========================================================================== */
101
+
102
+ /**
103
+ * Address variable `h1` font size within `section` and `article` contexts in
104
+ * Firefox 4+, Safari 5, and Chrome.
105
+ */
106
+
107
+ h1 {
108
+ font-size: 2em;
109
+ }
110
+
111
+ /**
112
+ * Address styling not present in IE 8/9, Safari 5, and Chrome.
113
+ */
114
+
115
+ abbr[title] {
116
+ border-bottom: 1px dotted;
117
+ }
118
+
119
+ /**
120
+ * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
121
+ */
122
+
123
+ b,
124
+ strong {
125
+ font-weight: bold;
126
+ }
127
+
128
+ /**
129
+ * Address styling not present in Safari 5 and Chrome.
130
+ */
131
+
132
+ dfn {
133
+ font-style: italic;
134
+ }
135
+
136
+ /**
137
+ * Address styling not present in IE 8/9.
138
+ */
139
+
140
+ mark {
141
+ background: #ff0;
142
+ color: #000;
143
+ }
144
+
145
+ /**
146
+ * Correct font family set oddly in Safari 5 and Chrome.
147
+ */
148
+
149
+ code,
150
+ kbd,
151
+ pre,
152
+ samp {
153
+ font-family: monospace, serif;
154
+ font-size: 1em;
155
+ }
156
+
157
+ /**
158
+ * Improve readability of pre-formatted text in all browsers.
159
+ */
160
+
161
+ pre {
162
+ white-space: pre;
163
+ white-space: pre-wrap;
164
+ word-wrap: break-word;
165
+ }
166
+
167
+ /**
168
+ * Set consistent quote types.
169
+ */
170
+
171
+ q {
172
+ quotes: "\201C" "\201D" "\2018" "\2019";
173
+ }
174
+
175
+ /**
176
+ * Address inconsistent and variable font size in all browsers.
177
+ */
178
+
179
+ small {
180
+ font-size: 80%;
181
+ }
182
+
183
+ /**
184
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
185
+ */
186
+
187
+ sub,
188
+ sup {
189
+ font-size: 75%;
190
+ line-height: 0;
191
+ position: relative;
192
+ vertical-align: baseline;
193
+ }
194
+
195
+ sup {
196
+ top: -0.5em;
197
+ }
198
+
199
+ sub {
200
+ bottom: -0.25em;
201
+ }
202
+
203
+ /* ==========================================================================
204
+ Embedded content
205
+ ========================================================================== */
206
+
207
+ /**
208
+ * Remove border when inside `a` element in IE 8/9.
209
+ */
210
+
211
+ img {
212
+ border: 0;
213
+ }
214
+
215
+ /**
216
+ * Correct overflow displayed oddly in IE 9.
217
+ */
218
+
219
+ svg:not(:root) {
220
+ overflow: hidden;
221
+ }
222
+
223
+ /* ==========================================================================
224
+ Figures
225
+ ========================================================================== */
226
+
227
+ /**
228
+ * Address margin not present in IE 8/9 and Safari 5.
229
+ */
230
+
231
+ figure {
232
+ margin: 0;
233
+ }
234
+
235
+ /* ==========================================================================
236
+ Forms
237
+ ========================================================================== */
238
+
239
+ /**
240
+ * Define consistent border, margin, and padding.
241
+ */
242
+
243
+ fieldset {
244
+ border: 1px solid #c0c0c0;
245
+ margin: 0 2px;
246
+ padding: 0.35em 0.625em 0.75em;
247
+ }
248
+
249
+ /**
250
+ * 1. Correct `color` not being inherited in IE 8/9.
251
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
252
+ */
253
+
254
+ legend {
255
+ border: 0; /* 1 */
256
+ padding: 0; /* 2 */
257
+ }
258
+
259
+ /**
260
+ * 1. Correct font family not being inherited in all browsers.
261
+ * 2. Correct font size not being inherited in all browsers.
262
+ * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
263
+ */
264
+
265
+ button,
266
+ input,
267
+ select,
268
+ textarea {
269
+ font-family: inherit; /* 1 */
270
+ font-size: 100%; /* 2 */
271
+ margin: 0; /* 3 */
272
+ }
273
+
274
+ /**
275
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
276
+ * the UA stylesheet.
277
+ */
278
+
279
+ button,
280
+ input {
281
+ line-height: normal;
282
+ }
283
+
284
+ /**
285
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
286
+ * and `video` controls.
287
+ * 2. Correct inability to style clickable `input` types in iOS.
288
+ * 3. Improve usability and consistency of cursor style between image-type
289
+ * `input` and others.
290
+ */
291
+
292
+ button,
293
+ html input[type="button"], /* 1 */
294
+ input[type="reset"],
295
+ input[type="submit"] {
296
+ -webkit-appearance: button; /* 2 */
297
+ cursor: pointer; /* 3 */
298
+ }
299
+
300
+ /**
301
+ * Re-set default cursor for disabled elements.
302
+ */
303
+
304
+ button[disabled],
305
+ html input[disabled] {
306
+ cursor: default;
307
+ }
308
+
309
+ /**
310
+ * 1. Address box sizing set to `content-box` in IE 8/9.
311
+ * 2. Remove excess padding in IE 8/9.
312
+ */
313
+
314
+ input[type="checkbox"],
315
+ input[type="radio"] {
316
+ box-sizing: border-box; /* 1 */
317
+ padding: 0; /* 2 */
318
+ }
319
+
320
+ /**
321
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
322
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
323
+ * (include `-moz` to future-proof).
324
+ */
325
+
326
+ input[type="search"] {
327
+ -webkit-appearance: textfield; /* 1 */
328
+ -moz-box-sizing: content-box;
329
+ -webkit-box-sizing: content-box; /* 2 */
330
+ box-sizing: content-box;
331
+ }
332
+
333
+ /**
334
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
335
+ * on OS X.
336
+ */
337
+
338
+ input[type="search"]::-webkit-search-cancel-button,
339
+ input[type="search"]::-webkit-search-decoration {
340
+ -webkit-appearance: none;
341
+ }
342
+
343
+ /**
344
+ * Remove inner padding and border in Firefox 4+.
345
+ */
346
+
347
+ button::-moz-focus-inner,
348
+ input::-moz-focus-inner {
349
+ border: 0;
350
+ padding: 0;
351
+ }
352
+
353
+ /**
354
+ * 1. Remove default vertical scrollbar in IE 8/9.
355
+ * 2. Improve readability and alignment in all browsers.
356
+ */
357
+
358
+ textarea {
359
+ overflow: auto; /* 1 */
360
+ vertical-align: top; /* 2 */
361
+ }
362
+
363
+ /* ==========================================================================
364
+ Tables
365
+ ========================================================================== */
366
+
367
+ /**
368
+ * Remove most spacing between table cells.
369
+ */
370
+
371
+ table {
372
+ border-collapse: collapse;
373
+ border-spacing: 0;
374
+ }