abstracted 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/.envrc +1 -0
  3. data/.gitignore +8 -0
  4. data/.rspec +3 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +14 -0
  7. data/Gemfile.lock +218 -0
  8. data/Guardfile +77 -0
  9. data/MIT-LICENSE +20 -0
  10. data/README.rdoc +3 -0
  11. data/Rakefile +15 -0
  12. data/abstracted.gemspec +51 -0
  13. data/app/assets/images/abstracted/.keep +0 -0
  14. data/app/assets/javascripts/abstract_resources.js +39 -0
  15. data/app/assets/javascripts/abstracted/.keep +0 -0
  16. data/app/assets/javascripts/crud.js.coffee +49 -0
  17. data/app/assets/javascripts/initializers.js.coffee +111 -0
  18. data/app/assets/stylesheets/abstract_resources.css +5 -0
  19. data/app/assets/stylesheets/abstracted/.keep +0 -0
  20. data/app/assets/stylesheets/scaffold.css +56 -0
  21. data/app/controllers/.keep +0 -0
  22. data/app/controllers/abstract_resources_controller.rb +290 -0
  23. data/app/controllers/application_controller.rb +22 -0
  24. data/app/helpers/.keep +0 -0
  25. data/app/helpers/abstract_resources_helper.rb +26 -0
  26. data/app/mailers/.keep +0 -0
  27. data/app/models/.keep +0 -0
  28. data/app/models/abstract_resource.rb +122 -0
  29. data/app/models/concerns/roleable.rb +61 -0
  30. data/app/policies/abstract_resource_policy.rb +58 -0
  31. data/app/views/.keep +0 -0
  32. data/app/views/abstract_resources/_default.html.erb +11 -0
  33. data/app/views/abstract_resources/destroy.js.haml +1 -0
  34. data/app/views/abstract_resources/edit.html.haml +11 -0
  35. data/app/views/abstract_resources/index.html.erb +1 -0
  36. data/app/views/abstract_resources/new.html.haml +12 -0
  37. data/app/views/abstract_resources/show.html.haml +13 -0
  38. data/bin/rails +12 -0
  39. data/config/locales/abstracted.en.yml +20 -0
  40. data/config/routes.rb +4 -0
  41. data/lib/abstracted.rb +8 -0
  42. data/lib/abstracted/engine.rb +19 -0
  43. data/lib/abstracted/version.rb +3 -0
  44. data/lib/abstracted_responder.rb +7 -0
  45. data/lib/tasks/abstracted_tasks.rake +4 -0
  46. data/spec/controllers/abstract_resources_controller_spec.rb +241 -0
  47. data/spec/dummy/README.rdoc +28 -0
  48. data/spec/dummy/Rakefile +6 -0
  49. data/spec/dummy/app/assets/images/.keep +0 -0
  50. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  51. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  52. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  53. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  54. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  55. data/spec/dummy/app/mailers/.keep +0 -0
  56. data/spec/dummy/app/models/.keep +0 -0
  57. data/spec/dummy/app/models/concerns/.keep +0 -0
  58. data/spec/dummy/app/models/user.rb +3 -0
  59. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  60. data/spec/dummy/bin/bundle +3 -0
  61. data/spec/dummy/bin/rails +4 -0
  62. data/spec/dummy/bin/rake +4 -0
  63. data/spec/dummy/bin/setup +29 -0
  64. data/spec/dummy/config.ru +4 -0
  65. data/spec/dummy/config/application.rb +26 -0
  66. data/spec/dummy/config/boot.rb +5 -0
  67. data/spec/dummy/config/database.yml +25 -0
  68. data/spec/dummy/config/environment.rb +5 -0
  69. data/spec/dummy/config/environments/development.rb +41 -0
  70. data/spec/dummy/config/environments/production.rb +79 -0
  71. data/spec/dummy/config/environments/test.rb +42 -0
  72. data/spec/dummy/config/initializers/assets.rb +11 -0
  73. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  74. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  75. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  76. data/spec/dummy/config/initializers/inflections.rb +16 -0
  77. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  78. data/spec/dummy/config/initializers/session_store.rb +3 -0
  79. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  80. data/spec/dummy/config/locales/en.yml +23 -0
  81. data/spec/dummy/config/routes.rb +56 -0
  82. data/spec/dummy/config/secrets.yml +22 -0
  83. data/spec/dummy/db/development.sqlite3 +0 -0
  84. data/spec/dummy/db/schema.rb +21 -0
  85. data/spec/dummy/db/test.sqlite3 +0 -0
  86. data/spec/dummy/lib/assets/.keep +0 -0
  87. data/spec/dummy/log/.keep +0 -0
  88. data/spec/dummy/log/development.log +0 -0
  89. data/spec/dummy/log/test.log +6229 -0
  90. data/spec/dummy/public/404.html +67 -0
  91. data/spec/dummy/public/422.html +67 -0
  92. data/spec/dummy/public/500.html +66 -0
  93. data/spec/dummy/public/favicon.ico +0 -0
  94. data/spec/factories/abstract_resources.rb +6 -0
  95. data/spec/factories/users.rb +5 -0
  96. data/spec/features/posts/manage_posts_spec.rb +24 -0
  97. data/spec/models/abstract_resource_spec.rb +14 -0
  98. data/spec/rails_helper.rb +114 -0
  99. data/spec/spec_helper.rb +97 -0
  100. data/test/integration/abstract_resource_test.rb +7 -0
  101. metadata +424 -0
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class AbstractResourceTest < ActionDispatch::IntegrationTest
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
metadata ADDED
@@ -0,0 +1,424 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: abstracted
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Walther H Diechmann
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pundit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: responders
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: combustion
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.5.3
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.5.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: factory_girl_rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: database_cleaner
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: capybara
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec-rails
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec-nc
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: guard
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: guard-rspec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: pry
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: pry-remote
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: pry-nav
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ description: Abstracted has a lot of inspiration from gems like resources_controller
238
+ by Ian White!
239
+ email:
240
+ - walther@diechmann.net
241
+ executables:
242
+ - rails
243
+ extensions: []
244
+ extra_rdoc_files: []
245
+ files:
246
+ - ".envrc"
247
+ - ".gitignore"
248
+ - ".rspec"
249
+ - ".ruby-version"
250
+ - Gemfile
251
+ - Gemfile.lock
252
+ - Guardfile
253
+ - MIT-LICENSE
254
+ - README.rdoc
255
+ - Rakefile
256
+ - abstracted.gemspec
257
+ - app/assets/images/abstracted/.keep
258
+ - app/assets/javascripts/abstract_resources.js
259
+ - app/assets/javascripts/abstracted/.keep
260
+ - app/assets/javascripts/crud.js.coffee
261
+ - app/assets/javascripts/initializers.js.coffee
262
+ - app/assets/stylesheets/abstract_resources.css
263
+ - app/assets/stylesheets/abstracted/.keep
264
+ - app/assets/stylesheets/scaffold.css
265
+ - app/controllers/.keep
266
+ - app/controllers/abstract_resources_controller.rb
267
+ - app/controllers/application_controller.rb
268
+ - app/helpers/.keep
269
+ - app/helpers/abstract_resources_helper.rb
270
+ - app/mailers/.keep
271
+ - app/models/.keep
272
+ - app/models/abstract_resource.rb
273
+ - app/models/concerns/roleable.rb
274
+ - app/policies/abstract_resource_policy.rb
275
+ - app/views/.keep
276
+ - app/views/abstract_resources/_default.html.erb
277
+ - app/views/abstract_resources/destroy.js.haml
278
+ - app/views/abstract_resources/edit.html.haml
279
+ - app/views/abstract_resources/index.html.erb
280
+ - app/views/abstract_resources/new.html.haml
281
+ - app/views/abstract_resources/show.html.haml
282
+ - bin/rails
283
+ - config/locales/abstracted.en.yml
284
+ - config/routes.rb
285
+ - lib/abstracted.rb
286
+ - lib/abstracted/engine.rb
287
+ - lib/abstracted/version.rb
288
+ - lib/abstracted_responder.rb
289
+ - lib/tasks/abstracted_tasks.rake
290
+ - spec/controllers/abstract_resources_controller_spec.rb
291
+ - spec/dummy/README.rdoc
292
+ - spec/dummy/Rakefile
293
+ - spec/dummy/app/assets/images/.keep
294
+ - spec/dummy/app/assets/javascripts/application.js
295
+ - spec/dummy/app/assets/stylesheets/application.css
296
+ - spec/dummy/app/controllers/application_controller.rb
297
+ - spec/dummy/app/controllers/concerns/.keep
298
+ - spec/dummy/app/helpers/application_helper.rb
299
+ - spec/dummy/app/mailers/.keep
300
+ - spec/dummy/app/models/.keep
301
+ - spec/dummy/app/models/concerns/.keep
302
+ - spec/dummy/app/models/user.rb
303
+ - spec/dummy/app/views/layouts/application.html.erb
304
+ - spec/dummy/bin/bundle
305
+ - spec/dummy/bin/rails
306
+ - spec/dummy/bin/rake
307
+ - spec/dummy/bin/setup
308
+ - spec/dummy/config.ru
309
+ - spec/dummy/config/application.rb
310
+ - spec/dummy/config/boot.rb
311
+ - spec/dummy/config/database.yml
312
+ - spec/dummy/config/environment.rb
313
+ - spec/dummy/config/environments/development.rb
314
+ - spec/dummy/config/environments/production.rb
315
+ - spec/dummy/config/environments/test.rb
316
+ - spec/dummy/config/initializers/assets.rb
317
+ - spec/dummy/config/initializers/backtrace_silencers.rb
318
+ - spec/dummy/config/initializers/cookies_serializer.rb
319
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
320
+ - spec/dummy/config/initializers/inflections.rb
321
+ - spec/dummy/config/initializers/mime_types.rb
322
+ - spec/dummy/config/initializers/session_store.rb
323
+ - spec/dummy/config/initializers/wrap_parameters.rb
324
+ - spec/dummy/config/locales/en.yml
325
+ - spec/dummy/config/routes.rb
326
+ - spec/dummy/config/secrets.yml
327
+ - spec/dummy/db/development.sqlite3
328
+ - spec/dummy/db/schema.rb
329
+ - spec/dummy/db/test.sqlite3
330
+ - spec/dummy/lib/assets/.keep
331
+ - spec/dummy/log/.keep
332
+ - spec/dummy/log/development.log
333
+ - spec/dummy/log/test.log
334
+ - spec/dummy/public/404.html
335
+ - spec/dummy/public/422.html
336
+ - spec/dummy/public/500.html
337
+ - spec/dummy/public/favicon.ico
338
+ - spec/factories/abstract_resources.rb
339
+ - spec/factories/users.rb
340
+ - spec/features/posts/manage_posts_spec.rb
341
+ - spec/models/abstract_resource_spec.rb
342
+ - spec/rails_helper.rb
343
+ - spec/spec_helper.rb
344
+ - test/integration/abstract_resource_test.rb
345
+ homepage: http://github.com/wdiechmann/abstracted
346
+ licenses:
347
+ - MIT
348
+ metadata: {}
349
+ post_install_message:
350
+ rdoc_options: []
351
+ require_paths:
352
+ - lib
353
+ required_ruby_version: !ruby/object:Gem::Requirement
354
+ requirements:
355
+ - - ">="
356
+ - !ruby/object:Gem::Version
357
+ version: 2.2.0
358
+ required_rubygems_version: !ruby/object:Gem::Requirement
359
+ requirements:
360
+ - - ">="
361
+ - !ruby/object:Gem::Version
362
+ version: '0'
363
+ requirements: []
364
+ rubyforge_project:
365
+ rubygems_version: 2.4.5
366
+ signing_key:
367
+ specification_version: 4
368
+ summary: Abstracted DRY's up your controllers totally
369
+ test_files:
370
+ - spec/controllers/abstract_resources_controller_spec.rb
371
+ - spec/dummy/README.rdoc
372
+ - spec/dummy/Rakefile
373
+ - spec/dummy/app/assets/images/.keep
374
+ - spec/dummy/app/assets/javascripts/application.js
375
+ - spec/dummy/app/assets/stylesheets/application.css
376
+ - spec/dummy/app/controllers/application_controller.rb
377
+ - spec/dummy/app/controllers/concerns/.keep
378
+ - spec/dummy/app/helpers/application_helper.rb
379
+ - spec/dummy/app/mailers/.keep
380
+ - spec/dummy/app/models/.keep
381
+ - spec/dummy/app/models/concerns/.keep
382
+ - spec/dummy/app/models/user.rb
383
+ - spec/dummy/app/views/layouts/application.html.erb
384
+ - spec/dummy/bin/bundle
385
+ - spec/dummy/bin/rails
386
+ - spec/dummy/bin/rake
387
+ - spec/dummy/bin/setup
388
+ - spec/dummy/config.ru
389
+ - spec/dummy/config/application.rb
390
+ - spec/dummy/config/boot.rb
391
+ - spec/dummy/config/database.yml
392
+ - spec/dummy/config/environment.rb
393
+ - spec/dummy/config/environments/development.rb
394
+ - spec/dummy/config/environments/production.rb
395
+ - spec/dummy/config/environments/test.rb
396
+ - spec/dummy/config/initializers/assets.rb
397
+ - spec/dummy/config/initializers/backtrace_silencers.rb
398
+ - spec/dummy/config/initializers/cookies_serializer.rb
399
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
400
+ - spec/dummy/config/initializers/inflections.rb
401
+ - spec/dummy/config/initializers/mime_types.rb
402
+ - spec/dummy/config/initializers/session_store.rb
403
+ - spec/dummy/config/initializers/wrap_parameters.rb
404
+ - spec/dummy/config/locales/en.yml
405
+ - spec/dummy/config/routes.rb
406
+ - spec/dummy/config/secrets.yml
407
+ - spec/dummy/db/development.sqlite3
408
+ - spec/dummy/db/schema.rb
409
+ - spec/dummy/db/test.sqlite3
410
+ - spec/dummy/lib/assets/.keep
411
+ - spec/dummy/log/.keep
412
+ - spec/dummy/log/development.log
413
+ - spec/dummy/log/test.log
414
+ - spec/dummy/public/404.html
415
+ - spec/dummy/public/422.html
416
+ - spec/dummy/public/500.html
417
+ - spec/dummy/public/favicon.ico
418
+ - spec/factories/abstract_resources.rb
419
+ - spec/factories/users.rb
420
+ - spec/features/posts/manage_posts_spec.rb
421
+ - spec/models/abstract_resource_spec.rb
422
+ - spec/rails_helper.rb
423
+ - spec/spec_helper.rb
424
+ - test/integration/abstract_resource_test.rb