gris 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +1 -0
  5. data/.rubocop_todo.yml +67 -0
  6. data/.ruby-gemset +1 -0
  7. data/.ruby-version +1 -0
  8. data/Gemfile +12 -0
  9. data/Gemfile.lock +203 -0
  10. data/Guardfile +82 -0
  11. data/MIT-LICENSE +20 -0
  12. data/README.md +7 -0
  13. data/Rakefile +11 -0
  14. data/bin/gris +5 -0
  15. data/gris.gemspec +40 -0
  16. data/lib/gris.rb +37 -0
  17. data/lib/gris/cli.rb +71 -0
  18. data/lib/gris/deprecations.rb +9 -0
  19. data/lib/gris/deprecations/gris_setup.rb +14 -0
  20. data/lib/gris/generators.rb +3 -0
  21. data/lib/gris/generators/api_generator.rb +31 -0
  22. data/lib/gris/generators/migration_generator.rb +228 -0
  23. data/lib/gris/generators/scaffold_generator.rb +21 -0
  24. data/lib/gris/generators/templates/api/app/apis/%name_tableize%_endpoint.rb.tt +65 -0
  25. data/lib/gris/generators/templates/api/app/models/%name_underscore%.rb.tt +2 -0
  26. data/lib/gris/generators/templates/api/app/presenters/%name_tableize%_presenter.rb.tt +5 -0
  27. data/lib/gris/generators/templates/api/app/presenters/%name_underscore%_presenter.rb.tt +10 -0
  28. data/lib/gris/generators/templates/api/spec/apis/%name_tableize%_endpoint_spec.rb.tt +70 -0
  29. data/lib/gris/generators/templates/api/spec/fabricators/%name_tableize%_fabricator.rb.tt +2 -0
  30. data/lib/gris/generators/templates/api/spec/models/%name_underscore%_spec.rb.tt +7 -0
  31. data/lib/gris/generators/templates/create_table_migration/%migration_filename%.rb.tt +19 -0
  32. data/lib/gris/generators/templates/migration/%migration_filename%.rb.tt +39 -0
  33. data/lib/gris/generators/templates/scaffold/.Procfile.tt +1 -0
  34. data/lib/gris/generators/templates/scaffold/.env.test.tt +11 -0
  35. data/lib/gris/generators/templates/scaffold/.env.tt +10 -0
  36. data/lib/gris/generators/templates/scaffold/.gitignore.tt +11 -0
  37. data/lib/gris/generators/templates/scaffold/.rspec.tt +3 -0
  38. data/lib/gris/generators/templates/scaffold/.rubocop.yml +18 -0
  39. data/lib/gris/generators/templates/scaffold/.ruby-gemset.tt +1 -0
  40. data/lib/gris/generators/templates/scaffold/.ruby-version.tt +1 -0
  41. data/lib/gris/generators/templates/scaffold/Gemfile.tt +33 -0
  42. data/lib/gris/generators/templates/scaffold/README.md.tt +3 -0
  43. data/lib/gris/generators/templates/scaffold/Rakefile +9 -0
  44. data/lib/gris/generators/templates/scaffold/app.rb +57 -0
  45. data/lib/gris/generators/templates/scaffold/app/apis/application_endpoint.rb +9 -0
  46. data/lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb +20 -0
  47. data/lib/gris/generators/templates/scaffold/config.ru.tt +6 -0
  48. data/lib/gris/generators/templates/scaffold/config/database.yml.tt +19 -0
  49. data/lib/gris/generators/templates/scaffold/config/initializers/active_record.rb +4 -0
  50. data/lib/gris/generators/templates/scaffold/db/schema.rb +11 -0
  51. data/lib/gris/generators/templates/scaffold/public/errors/404.html +11 -0
  52. data/lib/gris/generators/templates/scaffold/public/errors/500.html +11 -0
  53. data/lib/gris/generators/templates/scaffold/spec/apis/cors_spec.rb +31 -0
  54. data/lib/gris/generators/templates/scaffold/spec/spec_helper.rb +26 -0
  55. data/lib/gris/generators/templates/scaffold/spec/support/app_helper.rb +3 -0
  56. data/lib/gris/grape_extensions/crud_helpers.rb +26 -0
  57. data/lib/gris/identity.rb +50 -0
  58. data/lib/gris/middleware/app_monitor.rb +17 -0
  59. data/lib/gris/output_formatters/paginated_presenter.rb +41 -0
  60. data/lib/gris/output_formatters/presenter.rb +15 -0
  61. data/lib/gris/rspec_extensions/response_helpers.rb +57 -0
  62. data/lib/gris/setup.rb +17 -0
  63. data/lib/gris/version.rb +38 -0
  64. data/lib/tasks/db.rake +81 -0
  65. data/lib/tasks/routes.rake +11 -0
  66. data/spec/generators/api_generator_spec.rb +76 -0
  67. data/spec/generators/migration_generator_spec.rb +96 -0
  68. data/spec/generators/scaffold_generator_spec.rb +119 -0
  69. data/spec/grape_extensions/crud_helpers_spec.rb +5 -0
  70. data/spec/identity_spec.rb +86 -0
  71. data/spec/spec_helper.rb +10 -0
  72. data/spec/support/spec_generators_helper.rb +11 -0
  73. data/spec/version_spec.rb +40 -0
  74. metadata +426 -0
metadata ADDED
@@ -0,0 +1,426 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gris
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Dylan Fareed
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.19'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.19.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.19'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.19.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: activesupport
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '4.2'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 4.2.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '4.2'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 4.2.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: rake
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '10.4'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 10.4.2
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '10.4'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 10.4.2
73
+ - !ruby/object:Gem::Dependency
74
+ name: git
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '1.2'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.2.8
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.2'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 1.2.8
93
+ - !ruby/object:Gem::Dependency
94
+ name: logging
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ type: :runtime
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ - !ruby/object:Gem::Dependency
108
+ name: dotenv
109
+ requirement: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: 1.0.2
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 1.0.2
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: 1.0.2
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 1.0.2
127
+ - !ruby/object:Gem::Dependency
128
+ name: grape
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: 0.10.1
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: 0.10.1
137
+ type: :runtime
138
+ prerelease: false
139
+ version_requirements: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: 0.10.1
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: 0.10.1
147
+ - !ruby/object:Gem::Dependency
148
+ name: grape-roar
149
+ requirement: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: 0.3.0
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: 0.3.0
157
+ type: :runtime
158
+ prerelease: false
159
+ version_requirements: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: 0.3.0
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: 0.3.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: grape-swagger
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.9.0
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: 0.9.0
177
+ type: :runtime
178
+ prerelease: false
179
+ version_requirements: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - "~>"
182
+ - !ruby/object:Gem::Version
183
+ version: 0.9.0
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: 0.9.0
187
+ - !ruby/object:Gem::Dependency
188
+ name: roar
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - "~>"
192
+ - !ruby/object:Gem::Version
193
+ version: 1.0.0
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: 1.0.0
197
+ type: :runtime
198
+ prerelease: false
199
+ version_requirements: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - "~>"
202
+ - !ruby/object:Gem::Version
203
+ version: 1.0.0
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: 1.0.0
207
+ - !ruby/object:Gem::Dependency
208
+ name: racksh
209
+ requirement: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - "~>"
212
+ - !ruby/object:Gem::Version
213
+ version: '1.0'
214
+ type: :runtime
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - "~>"
219
+ - !ruby/object:Gem::Version
220
+ version: '1.0'
221
+ - !ruby/object:Gem::Dependency
222
+ name: bundler
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - "~>"
226
+ - !ruby/object:Gem::Version
227
+ version: 1.7.10
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: 1.7.10
231
+ type: :development
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - "~>"
236
+ - !ruby/object:Gem::Version
237
+ version: 1.7.10
238
+ - - ">="
239
+ - !ruby/object:Gem::Version
240
+ version: 1.7.10
241
+ - !ruby/object:Gem::Dependency
242
+ name: rspec
243
+ requirement: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - "~>"
246
+ - !ruby/object:Gem::Version
247
+ version: '3.1'
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: 3.1.0
251
+ type: :development
252
+ prerelease: false
253
+ version_requirements: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '3.1'
258
+ - - ">="
259
+ - !ruby/object:Gem::Version
260
+ version: 3.1.0
261
+ - !ruby/object:Gem::Dependency
262
+ name: rubocop
263
+ requirement: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - "~>"
266
+ - !ruby/object:Gem::Version
267
+ version: '0.28'
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: 0.28.0
271
+ type: :development
272
+ prerelease: false
273
+ version_requirements: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - "~>"
276
+ - !ruby/object:Gem::Version
277
+ version: '0.28'
278
+ - - ">="
279
+ - !ruby/object:Gem::Version
280
+ version: 0.28.0
281
+ - !ruby/object:Gem::Dependency
282
+ name: activerecord
283
+ requirement: !ruby/object:Gem::Requirement
284
+ requirements:
285
+ - - "~>"
286
+ - !ruby/object:Gem::Version
287
+ version: '4.2'
288
+ - - ">="
289
+ - !ruby/object:Gem::Version
290
+ version: 4.2.0
291
+ type: :development
292
+ prerelease: false
293
+ version_requirements: !ruby/object:Gem::Requirement
294
+ requirements:
295
+ - - "~>"
296
+ - !ruby/object:Gem::Version
297
+ version: '4.2'
298
+ - - ">="
299
+ - !ruby/object:Gem::Version
300
+ version: 4.2.0
301
+ - !ruby/object:Gem::Dependency
302
+ name: acts_as_fu
303
+ requirement: !ruby/object:Gem::Requirement
304
+ requirements:
305
+ - - "~>"
306
+ - !ruby/object:Gem::Version
307
+ version: '0'
308
+ type: :development
309
+ prerelease: false
310
+ version_requirements: !ruby/object:Gem::Requirement
311
+ requirements:
312
+ - - "~>"
313
+ - !ruby/object:Gem::Version
314
+ version: '0'
315
+ description: Gris is a generator for Grape, Roar, Hypermedia, PG API apps.
316
+ email: email@dylanfareed.com
317
+ executables:
318
+ - gris
319
+ extensions: []
320
+ extra_rdoc_files: []
321
+ files:
322
+ - ".gitignore"
323
+ - ".rspec"
324
+ - ".rubocop.yml"
325
+ - ".rubocop_todo.yml"
326
+ - ".ruby-gemset"
327
+ - ".ruby-version"
328
+ - Gemfile
329
+ - Gemfile.lock
330
+ - Guardfile
331
+ - MIT-LICENSE
332
+ - README.md
333
+ - Rakefile
334
+ - bin/gris
335
+ - gris.gemspec
336
+ - lib/gris.rb
337
+ - lib/gris/cli.rb
338
+ - lib/gris/deprecations.rb
339
+ - lib/gris/deprecations/gris_setup.rb
340
+ - lib/gris/generators.rb
341
+ - lib/gris/generators/api_generator.rb
342
+ - lib/gris/generators/migration_generator.rb
343
+ - lib/gris/generators/scaffold_generator.rb
344
+ - lib/gris/generators/templates/api/app/apis/%name_tableize%_endpoint.rb.tt
345
+ - lib/gris/generators/templates/api/app/models/%name_underscore%.rb.tt
346
+ - lib/gris/generators/templates/api/app/presenters/%name_tableize%_presenter.rb.tt
347
+ - lib/gris/generators/templates/api/app/presenters/%name_underscore%_presenter.rb.tt
348
+ - lib/gris/generators/templates/api/spec/apis/%name_tableize%_endpoint_spec.rb.tt
349
+ - lib/gris/generators/templates/api/spec/fabricators/%name_tableize%_fabricator.rb.tt
350
+ - lib/gris/generators/templates/api/spec/models/%name_underscore%_spec.rb.tt
351
+ - lib/gris/generators/templates/create_table_migration/%migration_filename%.rb.tt
352
+ - lib/gris/generators/templates/migration/%migration_filename%.rb.tt
353
+ - lib/gris/generators/templates/scaffold/.Procfile.tt
354
+ - lib/gris/generators/templates/scaffold/.env.test.tt
355
+ - lib/gris/generators/templates/scaffold/.env.tt
356
+ - lib/gris/generators/templates/scaffold/.gitignore.tt
357
+ - lib/gris/generators/templates/scaffold/.rspec.tt
358
+ - lib/gris/generators/templates/scaffold/.rubocop.yml
359
+ - lib/gris/generators/templates/scaffold/.ruby-gemset.tt
360
+ - lib/gris/generators/templates/scaffold/.ruby-version.tt
361
+ - lib/gris/generators/templates/scaffold/Gemfile.tt
362
+ - lib/gris/generators/templates/scaffold/README.md.tt
363
+ - lib/gris/generators/templates/scaffold/Rakefile
364
+ - lib/gris/generators/templates/scaffold/app.rb
365
+ - lib/gris/generators/templates/scaffold/app/apis/application_endpoint.rb
366
+ - lib/gris/generators/templates/scaffold/app/presenters/root_presenter.rb
367
+ - lib/gris/generators/templates/scaffold/config.ru.tt
368
+ - lib/gris/generators/templates/scaffold/config/database.yml.tt
369
+ - lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
370
+ - lib/gris/generators/templates/scaffold/db/schema.rb
371
+ - lib/gris/generators/templates/scaffold/public/errors/404.html
372
+ - lib/gris/generators/templates/scaffold/public/errors/500.html
373
+ - lib/gris/generators/templates/scaffold/spec/apis/cors_spec.rb
374
+ - lib/gris/generators/templates/scaffold/spec/spec_helper.rb
375
+ - lib/gris/generators/templates/scaffold/spec/support/app_helper.rb
376
+ - lib/gris/grape_extensions/crud_helpers.rb
377
+ - lib/gris/identity.rb
378
+ - lib/gris/middleware/app_monitor.rb
379
+ - lib/gris/output_formatters/paginated_presenter.rb
380
+ - lib/gris/output_formatters/presenter.rb
381
+ - lib/gris/rspec_extensions/response_helpers.rb
382
+ - lib/gris/setup.rb
383
+ - lib/gris/version.rb
384
+ - lib/tasks/db.rake
385
+ - lib/tasks/routes.rake
386
+ - spec/generators/api_generator_spec.rb
387
+ - spec/generators/migration_generator_spec.rb
388
+ - spec/generators/scaffold_generator_spec.rb
389
+ - spec/grape_extensions/crud_helpers_spec.rb
390
+ - spec/identity_spec.rb
391
+ - spec/spec_helper.rb
392
+ - spec/support/spec_generators_helper.rb
393
+ - spec/version_spec.rb
394
+ homepage: http://github.com/dylanfareed/gris/
395
+ licenses:
396
+ - MIT-LICENSE
397
+ metadata: {}
398
+ post_install_message:
399
+ rdoc_options: []
400
+ require_paths:
401
+ - lib
402
+ required_ruby_version: !ruby/object:Gem::Requirement
403
+ requirements:
404
+ - - ">="
405
+ - !ruby/object:Gem::Version
406
+ version: 2.1.5
407
+ required_rubygems_version: !ruby/object:Gem::Requirement
408
+ requirements:
409
+ - - ">="
410
+ - !ruby/object:Gem::Version
411
+ version: '0'
412
+ requirements: []
413
+ rubyforge_project:
414
+ rubygems_version: 2.4.3
415
+ signing_key:
416
+ specification_version: 4
417
+ summary: A simple api microservice generator.
418
+ test_files:
419
+ - spec/generators/api_generator_spec.rb
420
+ - spec/generators/migration_generator_spec.rb
421
+ - spec/generators/scaffold_generator_spec.rb
422
+ - spec/grape_extensions/crud_helpers_spec.rb
423
+ - spec/identity_spec.rb
424
+ - spec/spec_helper.rb
425
+ - spec/support/spec_generators_helper.rb
426
+ - spec/version_spec.rb