orats 0.7.3 → 0.8.0

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Gemfile +1 -1
  4. data/{LICENSE.txt → LICENSE} +21 -21
  5. data/README.md +51 -346
  6. data/Rakefile +1 -1
  7. data/bin/orats +5 -2
  8. data/lib/orats/argv_adjust.rb +61 -0
  9. data/lib/orats/cli.rb +53 -141
  10. data/lib/orats/cli_help/new +27 -0
  11. data/lib/orats/cli_help/nuke +19 -0
  12. data/lib/orats/commands/new/exec.rb +59 -0
  13. data/lib/orats/commands/new/rails.rb +197 -0
  14. data/lib/orats/commands/new/server.rb +67 -0
  15. data/lib/orats/commands/nuke.rb +66 -44
  16. data/lib/orats/common.rb +76 -0
  17. data/lib/orats/postgres.rb +90 -0
  18. data/lib/orats/process.rb +35 -0
  19. data/lib/orats/redis.rb +25 -0
  20. data/lib/orats/shell.rb +12 -0
  21. data/lib/orats/templates/auth.rb +96 -82
  22. data/lib/orats/templates/base.rb +115 -110
  23. data/lib/orats/templates/includes/new/rails/.env +28 -28
  24. data/lib/orats/templates/includes/new/rails/Gemfile +4 -4
  25. data/lib/orats/templates/includes/new/rails/config/{whenever.rb → schedule.rb} +0 -0
  26. data/lib/orats/ui.rb +33 -0
  27. data/lib/orats/version.rb +3 -2
  28. data/lib/orats.rb +2 -1
  29. data/orats.gemspec +7 -5
  30. data/test/integration/cli_test.rb +28 -177
  31. data/test/test_helper.rb +24 -9
  32. metadata +17 -29
  33. data/lib/orats/commands/common.rb +0 -146
  34. data/lib/orats/commands/diff/compare.rb +0 -106
  35. data/lib/orats/commands/diff/exec.rb +0 -60
  36. data/lib/orats/commands/diff/parse.rb +0 -66
  37. data/lib/orats/commands/inventory.rb +0 -100
  38. data/lib/orats/commands/playbook.rb +0 -60
  39. data/lib/orats/commands/project/exec.rb +0 -74
  40. data/lib/orats/commands/project/rails.rb +0 -162
  41. data/lib/orats/commands/project/server.rb +0 -57
  42. data/lib/orats/commands/role.rb +0 -70
  43. data/lib/orats/commands/ui.rb +0 -47
  44. data/lib/orats/templates/includes/inventory/group_vars/all.yml +0 -202
  45. data/lib/orats/templates/includes/inventory/hosts +0 -8
  46. data/lib/orats/templates/includes/playbook/Galaxyfile +0 -15
  47. data/lib/orats/templates/includes/playbook/common.yml +0 -23
  48. data/lib/orats/templates/includes/playbook/site.yml +0 -36
  49. data/lib/orats/templates/includes/role/.travis.yml +0 -19
  50. data/lib/orats/templates/includes/role/README.md +0 -62
  51. data/lib/orats/templates/includes/role/meta/main.yml +0 -123
  52. data/lib/orats/templates/includes/role/tests/inventory +0 -1
  53. data/lib/orats/templates/includes/role/tests/main.yml +0 -7
  54. data/lib/orats/templates/playbook.rb +0 -119
  55. data/lib/orats/templates/role.rb +0 -144
@@ -19,13 +19,12 @@ def method_to_sentence(method)
19
19
  method
20
20
  end
21
21
 
22
- def log_task(message)
22
+ def task(message, color = :blue)
23
23
  puts
24
- say_status 'task', "#{method_to_sentence(message.to_s)}:", :yellow
25
- puts '-'*80, ''; sleep 0.25
24
+ say_status 'task', set_color(message, :bold), color
26
25
  end
27
26
 
28
- def git_commit(message)
27
+ def commit(message)
29
28
  git add: '-A'
30
29
  git commit: "-m '#{message}'"
31
30
  end
@@ -38,7 +37,7 @@ def git_config(field)
38
37
  git_field_value.to_s.empty? ? default_value : git_field_value
39
38
  end
40
39
 
41
- def copy_from_local_gem(source, dest = '')
40
+ def orats_to_local(source, dest = '')
42
41
  dest = source if dest.empty?
43
42
 
44
43
  base_path = "#{File.expand_path File.dirname(__FILE__)}/includes/new/rails"
@@ -49,15 +48,15 @@ end
49
48
 
50
49
  # ---
51
50
 
52
- def initial_git_commit
53
- log_task __method__
51
+ def initial_commit
52
+ task __method__
54
53
 
55
54
  git :init
56
- git_commit 'Initial git commit'
55
+ commit 'Initial git commit'
57
56
  end
58
57
 
59
58
  def update_gitignore
60
- log_task __method__
59
+ task __method__
61
60
 
62
61
  append_to_file '.gitignore' do
63
62
  <<-S
@@ -77,68 +76,68 @@ def update_gitignore
77
76
  /public/assets/*
78
77
  S
79
78
  end
80
- git_commit 'Add common OS files, editor files and other paths'
79
+ commit 'Add common OS files, editor files and other paths'
81
80
  end
82
81
 
83
82
  def copy_gemfile
84
- log_task __method__
83
+ task __method__
85
84
 
86
- copy_from_local_gem 'Gemfile'
87
- git_commit 'Add Gemfile'
85
+ orats_to_local 'Gemfile'
86
+ commit 'Add Gemfile'
88
87
  end
89
88
 
90
89
  def copy_base_favicon
91
- log_task __method__
90
+ task __method__
92
91
 
93
- copy_from_local_gem 'app/assets/favicon/favicon_base.png'
94
- git_commit 'Add a 256x256 base favicon'
92
+ orats_to_local 'app/assets/favicon/favicon_base.png'
93
+ commit 'Add a 256x256 base favicon'
95
94
  end
96
95
 
97
96
  def add_dotenv
98
- log_task 'add_dotenv'
97
+ task 'add_dotenv'
99
98
 
100
- copy_from_local_gem '.env', '.env'
99
+ orats_to_local '.env', '.env'
101
100
  gsub_file '.env', 'generate_token', generate_token
102
101
  gsub_file '.env', 'app_name', app_name
103
- git_commit 'Add development environment file'
102
+ commit 'Add development environment file'
104
103
  end
105
104
 
106
105
  def add_procfile
107
- log_task __method__
106
+ task __method__
108
107
 
109
- copy_from_local_gem 'Procfile'
110
- git_commit 'Add Procfile'
108
+ orats_to_local 'Procfile'
109
+ commit 'Add Procfile'
111
110
  end
112
111
 
113
112
  def add_markdown_readme
114
- log_task __method__
113
+ task __method__
115
114
 
116
- copy_from_local_gem 'README.md'
117
- git_commit 'Add markdown readme'
115
+ orats_to_local 'README.md'
116
+ commit 'Add markdown readme'
118
117
  end
119
118
 
120
119
  def add_license
121
- log_task __method__
120
+ task __method__
122
121
 
123
122
  author_name = git_config 'name'
124
123
  author_email = git_config 'email'
125
124
 
126
- copy_from_local_gem '../../common/LICENSE', 'LICENSE'
125
+ orats_to_local '../../common/LICENSE', 'LICENSE'
127
126
  gsub_file 'LICENSE', 'Time.now.year', Time.now.year.to_s
128
127
  gsub_file 'LICENSE', 'author_name', author_name
129
128
  gsub_file 'LICENSE', 'author_email', author_email
130
- git_commit 'Add MIT license'
129
+ commit 'Add MIT license'
131
130
  end
132
131
 
133
132
  def update_app_secrets
134
- log_task __method__
133
+ task __method__
135
134
 
136
- copy_from_local_gem 'config/secrets.yml'
137
- git_commit 'DRY out the yaml'
135
+ orats_to_local 'config/secrets.yml'
136
+ commit 'DRY out the yaml'
138
137
  end
139
138
 
140
139
  def update_app_config
141
- log_task __method__
140
+ task __method__
142
141
 
143
142
  inject_into_file 'config/application.rb', after: "automatically loaded.\n" do
144
143
  <<-S
@@ -187,71 +186,72 @@ ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
187
186
  end
188
187
  S
189
188
  end
190
- git_commit 'Configure the mailer/redis, update the timezone and adjust the validation output'
189
+ commit 'Configure the mailer/redis, update the timezone and adjust ' + \
190
+ ' the validation output'
191
191
  end
192
192
 
193
193
  def update_database_config
194
- log_task __method__
194
+ task __method__
195
195
 
196
- copy_from_local_gem 'config/database.yml'
197
- git_commit 'DRY out the yaml'
196
+ orats_to_local 'config/database.yml'
197
+ commit 'DRY out the yaml'
198
198
  end
199
199
 
200
200
  def add_puma_config
201
- log_task __method__
201
+ task __method__
202
202
 
203
- copy_from_local_gem 'config/puma.rb'
204
- git_commit 'Add the puma config'
203
+ orats_to_local 'config/puma.rb'
204
+ commit 'Add the puma config'
205
205
  end
206
206
 
207
207
  def add_sidekiq_config
208
- log_task __method__
208
+ task __method__
209
209
 
210
- copy_from_local_gem 'config/sidekiq.yml'
211
- git_commit 'Add the sidekiq config'
210
+ orats_to_local 'config/sidekiq.yml'
211
+ commit 'Add the sidekiq config'
212
212
  end
213
213
 
214
214
  def add_sitemap_config
215
- log_task __method__
215
+ task __method__
216
216
 
217
- copy_from_local_gem 'config/sitemap.rb'
217
+ orats_to_local 'config/sitemap.rb'
218
218
  gsub_file 'config/sitemap.rb', 'app_name', app_name
219
- git_commit 'Add the sitemap config'
219
+ commit 'Add the sitemap config'
220
220
  end
221
221
 
222
222
  def add_whenever_config
223
- log_task __method__
223
+ task __method__
224
224
 
225
- copy_from_local_gem 'config/schedule.rb'
226
- git_commit 'Add the whenever config'
225
+ orats_to_local 'config/schedule.rb'
226
+ commit 'Add the whenever config'
227
227
  end
228
228
 
229
229
  def add_sidekiq_initializer
230
- log_task __method__
230
+ task __method__
231
231
 
232
- copy_from_local_gem 'config/initializers/sidekiq.rb'
232
+ orats_to_local 'config/initializers/sidekiq.rb'
233
233
  gsub_file 'config/initializers/sidekiq.rb', 'ns_app', app_name
234
- git_commit 'Add the sidekiq initializer'
234
+ commit 'Add the sidekiq initializer'
235
235
  end
236
236
 
237
237
  def add_mini_profiler_initializer
238
- log_task __method__
238
+ task __method__
239
239
 
240
- copy_from_local_gem 'config/initializers/mini_profiler.rb'
241
- git_commit 'Add the mini profiler initializer'
240
+ orats_to_local 'config/initializers/mini_profiler.rb'
241
+ commit 'Add the mini profiler initializer'
242
242
  end
243
243
 
244
244
  def add_staging_environment
245
- log_task __method__
245
+ task __method__
246
246
 
247
- copy_from_local_gem 'config/environments/staging.rb'
247
+ orats_to_local 'config/environments/staging.rb'
248
248
  gsub_file 'config/environments/staging.rb', 'app_name.humanize',
249
249
  app_name.humanize
250
- git_commit 'Add a staging environment'
250
+ commit 'Add a staging environment'
251
251
  end
252
252
 
253
253
  def update_development_environment
254
- log_task __method__
254
+ task __method__
255
255
 
256
256
  inject_into_file 'config/environments/development.rb',
257
257
  before: "\nend" do
@@ -261,20 +261,22 @@ def update_development_environment
261
261
  config.generators.javascript_engine = :coffee
262
262
  S
263
263
  end
264
- git_commit 'Update the default generator asset engines'
264
+ commit 'Update the default generator asset engines'
265
265
  end
266
266
 
267
267
  def update_production_environment
268
- log_task __method__
268
+ task __method__
269
269
 
270
- inject_into_file 'config/environments/production.rb', after: "config.log_level = :info\n" do
270
+ inject_into_file 'config/environments/production.rb',
271
+ after: "config.log_level = :info\n" do
271
272
  <<-'S'
272
273
  config.logger = Logger.new(config.paths['log'].first, 'daily')
273
274
  S
274
275
  end
275
- git_commit 'Update the logger to rotate daily'
276
+ commit 'Update the logger to rotate daily'
276
277
 
277
- inject_into_file 'config/environments/production.rb', after: "%w( search.js )\n" do
278
+ inject_into_file 'config/environments/production.rb',
279
+ after: "%w( search.js )\n" do
278
280
  <<-'S'
279
281
  config.assets.precompile << Proc.new { |path|
280
282
  if path =~ /\.(eot|svg|ttf|woff|png)\z/
@@ -283,15 +285,15 @@ def update_production_environment
283
285
  }
284
286
  S
285
287
  end
286
- git_commit 'Update the assets precompiler to include common file types'
288
+ commit 'Update the assets precompiler to include common file types'
287
289
 
288
290
  gsub_file 'config/environments/production.rb',
289
291
  '# config.assets.css_compressor', 'config.assets.css_compressor'
290
- git_commit 'Add sass asset compression'
292
+ commit 'Add sass asset compression'
291
293
  end
292
294
 
293
295
  def update_routes
294
- log_task __method__
296
+ task __method__
295
297
 
296
298
  prepend_file 'config/routes.rb', "require 'sidekiq/web'\n\n"
297
299
 
@@ -305,85 +307,87 @@ def update_routes
305
307
  mount Sidekiq::Web => '/sidekiq'
306
308
  S
307
309
  end
308
- git_commit 'Add a concern for pagination and mount sidekiq'
310
+ commit 'Add a concern for pagination and mount sidekiq'
309
311
  end
310
312
 
311
313
  def add_backup_lib
312
- log_task __method__
314
+ task __method__
313
315
 
314
- copy_from_local_gem 'lib/backup/config.rb'
315
- copy_from_local_gem 'lib/backup/models/backup.rb'
316
- git_commit 'Add backup library'
316
+ orats_to_local 'lib/backup/config.rb'
317
+ orats_to_local 'lib/backup/models/backup.rb'
318
+ commit 'Add backup library'
317
319
  end
318
320
 
319
321
  def add_favicon_task
320
- log_task __method__
322
+ task __method__
321
323
 
322
- copy_from_local_gem 'lib/tasks/orats/favicon.rake'
323
- git_commit 'Add a favicon generator task'
324
+ orats_to_local 'lib/tasks/orats/favicon.rake'
325
+ commit 'Add a favicon generator task'
324
326
  end
325
327
 
326
328
  def add_backup_task
327
- log_task __method__
329
+ task __method__
328
330
 
329
- copy_from_local_gem 'lib/tasks/orats/backup.rake'
331
+ orats_to_local 'lib/tasks/orats/backup.rake'
330
332
  gsub_file 'lib/tasks/orats/backup.rake', 'app_name', app_name
331
- git_commit 'Add an application backup task'
333
+ commit 'Add an application backup task'
332
334
  end
333
335
 
334
336
  def add_helpers
335
- log_task __method__
337
+ task __method__
336
338
 
337
- copy_from_local_gem 'app/helpers/application_helper.rb'
338
- git_commit 'Add various helpers'
339
+ orats_to_local 'app/helpers/application_helper.rb'
340
+ commit 'Add various helpers'
339
341
  end
340
342
 
341
343
  def add_layout
342
- log_task __method__
344
+ task __method__
343
345
 
344
- copy_from_local_gem 'app/views/layouts/application.html.erb'
345
- git_commit 'Add layout'
346
+ orats_to_local 'app/views/layouts/application.html.erb'
347
+ commit 'Add layout'
346
348
  end
347
349
 
348
350
  def add_layout_partials
349
- log_task __method__
351
+ task __method__
350
352
 
351
- copy_from_local_gem 'app/views/layouts/_flash.html.erb'
353
+ orats_to_local 'app/views/layouts/_flash.html.erb'
352
354
 
353
- copy_from_local_gem 'app/views/layouts/_navigation.html.erb'
355
+ orats_to_local 'app/views/layouts/_navigation.html.erb'
354
356
  gsub_file 'app/views/layouts/_navigation.html.erb', 'app_name', app_name
355
357
 
356
- copy_from_local_gem 'app/views/layouts/_navigation_links.html.erb'
358
+ orats_to_local 'app/views/layouts/_navigation_links.html.erb'
357
359
 
358
- copy_from_local_gem 'app/views/layouts/_footer.html.erb'
360
+ orats_to_local 'app/views/layouts/_footer.html.erb'
359
361
  gsub_file 'app/views/layouts/_footer.html.erb', 'Time.now.year.to_s',
360
362
  Time.now.year.to_s
361
363
  gsub_file 'app/views/layouts/_footer.html.erb', 'app_name', app_name
362
364
 
363
- copy_from_local_gem 'app/views/layouts/_google_analytics_snippet.html.erb'
364
- copy_from_local_gem 'app/views/layouts/_google_analytics_tracker.html.erb'
365
+ orats_to_local 'app/views/layouts/_google_analytics_snippet.html.erb'
366
+ orats_to_local 'app/views/layouts/_google_analytics_tracker.html.erb'
365
367
 
366
- copy_from_local_gem 'app/views/layouts/_disqus_comments_snippet.html.erb'
367
- copy_from_local_gem 'app/views/layouts/_disqus_count_snippet.html.erb'
368
+ orats_to_local 'app/views/layouts/_disqus_comments_snippet.html.erb'
369
+ orats_to_local 'app/views/layouts/_disqus_count_snippet.html.erb'
368
370
 
369
- git_commit 'Add layout partials'
371
+ commit 'Add layout partials'
370
372
  end
371
373
 
372
374
  def add_http_error_pages
373
- log_task __method__
375
+ task __method__
374
376
 
375
- copy_from_local_gem 'public/404.html'
376
- copy_from_local_gem 'public/422.html'
377
- copy_from_local_gem 'public/500.html'
378
- copy_from_local_gem 'public/502.html'
377
+ orats_to_local 'public/404.html'
378
+ orats_to_local 'public/422.html'
379
+ orats_to_local 'public/500.html'
380
+ orats_to_local 'public/502.html'
379
381
 
380
- git_commit 'Add http status code pages'
382
+ commit 'Add http status code pages'
381
383
  end
382
384
 
383
385
  def update_sass
384
- log_task __method__
386
+ task __method__
387
+
388
+ run 'mv app/assets/stylesheets/application.css app/assets/stylesheets/' + \
389
+ 'application.css.scss'
385
390
 
386
- run 'mv app/assets/stylesheets/application.css app/assets/stylesheets/application.css.scss'
387
391
  inject_into_file 'app/assets/stylesheets/application.css.scss',
388
392
  " *= require font-awesome\n",
389
393
  before: " *= require_self\n"
@@ -459,19 +463,20 @@ img {
459
463
  }
460
464
  S
461
465
  end
462
- git_commit 'Add font-awesome, bootstrap and a few default styles'
466
+ commit 'Add font-awesome, bootstrap and a few default styles'
463
467
  end
464
468
 
465
469
  def update_coffeescript
466
- log_task __method__
470
+ task __method__
467
471
 
468
472
  gsub_file 'app/assets/javascripts/application.js', "//= require jquery\n", ''
469
- git_commit 'Remove jquery because it is loaded from a CDN'
473
+ commit 'Remove jquery because it is loaded from a CDN'
470
474
 
471
475
  inject_into_file 'app/assets/javascripts/application.js',
472
476
  "//= require jquery.turbolinks\n",
473
477
  before: "//= require_tree .\n"
474
- inject_into_file 'app/assets/javascripts/application.js', before: "//= require_tree .\n" do
478
+ inject_into_file 'app/assets/javascripts/application.js',
479
+ before: "//= require_tree .\n" do
475
480
  <<-S
476
481
  //= require bootstrap/affix
477
482
  //= require bootstrap/alert
@@ -487,19 +492,19 @@ def update_coffeescript
487
492
  //= require bootstrap/transition
488
493
  S
489
494
  end
490
- git_commit 'Add jquery.turbolinks and bootstrap'
495
+ commit 'Add jquery.turbolinks and bootstrap'
491
496
  end
492
497
 
493
498
  def remove_unused_files_from_git
494
- log_task __method__
499
+ task __method__
495
500
 
496
501
  git add: '-u'
497
- git_commit 'Remove unused files'
502
+ commit 'Remove unused files'
498
503
  end
499
504
 
500
505
  # ---
501
506
 
502
- initial_git_commit
507
+ initial_commit
503
508
  update_gitignore
504
509
  copy_gemfile
505
510
  copy_base_favicon
@@ -529,4 +534,4 @@ add_layout_partials
529
534
  add_http_error_pages
530
535
  update_sass
531
536
  update_coffeescript
532
- remove_unused_files_from_git
537
+ remove_unused_files_from_git
@@ -1,43 +1,43 @@
1
- RAILS_ENV: development
1
+ RAILS_ENV: 'development'
2
2
 
3
- PROJECT_PATH: /home/yourname/dev/testproj
4
- TIME_ZONE: Eastern Time (US & Canada)
5
- DEFAULT_LOCALE: en
3
+ PROJECT_PATH: '/tmp/yourapp'
4
+ TIME_ZONE: 'Eastern Time (US & Canada)'
5
+ DEFAULT_LOCALE: 'en'
6
6
 
7
- GOOGLE_ANALYTICS_UA: ""
8
- DISQUS_SHORT_NAME: ""
9
- S3_ACCESS_KEY_ID: ""
10
- S3_SECRET_ACCESS_KEY: ""
11
- S3_REGION: ""
7
+ GOOGLE_ANALYTICS_UA: ''
8
+ DISQUS_SHORT_NAME: ''
9
+ S3_ACCESS_KEY_ID: ''
10
+ S3_SECRET_ACCESS_KEY: ''
11
+ S3_REGION: ''
12
12
 
13
- TOKEN_RAILS_SECRET: generate_token
13
+ TOKEN_RAILS_SECRET: 'generate_token'
14
14
 
15
- SMTP_ADDRESS: smtp.gmail.com
15
+ SMTP_ADDRESS: 'smtp.gmail.com'
16
16
  SMTP_PORT: 587 # 465 if you use ssl
17
- SMTP_DOMAIN: gmail.com
18
- SMTP_USERNAME: app_name@gmail.com
19
- SMTP_PASSWORD: thebestpassword
20
- SMTP_AUTH: plain
21
- SMTP_ENCRYPTION: starttls
22
-
23
- ACTION_MAILER_HOST: localhost:3000
24
- ACTION_MAILER_DEFAULT_FROM: info@app_name.com
25
- ACTION_MAILER_DEFAULT_TO: me@app_name.com
26
-
27
- DATABASE_NAME: app_name
28
- DATABASE_HOST: localhost
17
+ SMTP_DOMAIN: 'gmail.com'
18
+ SMTP_USERNAME: 'app_name@gmail.com'
19
+ SMTP_PASSWORD: 'thebestpassword'
20
+ SMTP_AUTH: 'plain'
21
+ SMTP_ENCRYPTION: 'starttls'
22
+
23
+ ACTION_MAILER_HOST: 'localhost:3000'
24
+ ACTION_MAILER_DEFAULT_FROM: 'info@app_name.com'
25
+ ACTION_MAILER_DEFAULT_TO: 'me@app_name.com'
26
+
27
+ DATABASE_NAME: 'app_name'
28
+ DATABASE_HOST: 'localhost'
29
29
  DATABASE_POOL: 25
30
30
  DATABASE_TIMEOUT: 5000
31
- DATABASE_USERNAME: postgres
32
- DATABASE_PASSWORD: supersecrets
31
+ DATABASE_USERNAME: 'postgres'
32
+ DATABASE_PASSWORD: 'supersecrets'
33
33
 
34
- CACHE_HOST: localhost
34
+ CACHE_HOST: 'localhost'
35
35
  CACHE_PORT: 6379
36
36
  CACHE_DATABASE: 0
37
- CACHE_PASSWORD: ""
37
+ CACHE_PASSWORD: ''
38
38
 
39
39
  PUMA_THREADS_MIN: 0
40
40
  PUMA_THREADS_MAX: 1
41
41
  PUMA_WORKERS: 0
42
42
 
43
- SIDEKIQ_CONCURRENCY: 25
43
+ SIDEKIQ_CONCURRENCY: 25
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '~> 4.1.2'
3
+ gem 'rails', '~> 4.1.4'
4
4
  gem 'turbolinks', '~> 2.2.2'
5
5
  gem 'jquery-rails', '~> 3.1.1'
6
6
  gem 'jquery-turbolinks', '~> 2.0.2'
@@ -12,8 +12,8 @@ gem 'font-awesome-rails', '~> 4.1.0'
12
12
  gem 'pg', '~> 0.17.1'
13
13
  gem 'redis-rails', '~> 4.0.0'
14
14
 
15
- gem 'puma', '~> 2.8.2'
16
- gem 'sidekiq', '~> 3.1.2'
15
+ gem 'puma', '~> 2.9.0'
16
+ gem 'sidekiq', '~> 3.2.1'
17
17
  gem 'sinatra', '>= 1.4.5', require: false
18
18
 
19
19
  gem 'whenever', '~> 0.9.2', require: false
@@ -44,4 +44,4 @@ end
44
44
 
45
45
  group :doc do
46
46
  gem 'sdoc', '~> 0.4.0', require: false
47
- end
47
+ end
data/lib/orats/ui.rb ADDED
@@ -0,0 +1,33 @@
1
+ module Orats
2
+ # print out various messages to the terminal
3
+ module UI
4
+ include Thor::Shell
5
+
6
+ def task(message, color = :blue)
7
+ puts
8
+ log 'task', message, color, true
9
+ end
10
+
11
+ def results(results, tag, message)
12
+ puts
13
+ log 'results', results, :magenta, true
14
+ log tag, message, :white
15
+ end
16
+
17
+ def error(error, message)
18
+ puts
19
+ log 'error', error, :red, :bold
20
+ log 'from', message, :yellow
21
+ end
22
+
23
+ def log(tag, message, ansi_color, bold = false)
24
+ if bold
25
+ msg = set_color(message, :bold)
26
+ else
27
+ msg = set_color(message)
28
+ end
29
+
30
+ say_status tag, msg, ansi_color
31
+ end
32
+ end
33
+ end
data/lib/orats/version.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # set the version of this gem
1
2
  module Orats
2
- VERSION = '0.7.3'
3
- end
3
+ VERSION = '0.8.0'
4
+ end
data/lib/orats.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'orats/version'
2
2
  require 'orats/cli'
3
3
 
4
+ # the base orats module
4
5
  module Orats
5
- end
6
+ end
data/orats.gemspec CHANGED
@@ -8,14 +8,16 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Orats::VERSION
9
9
  spec.authors = ['Nick Janetakis']
10
10
  spec.email = ['nick.janetakis@gmail.com']
11
- spec.summary = %q{Opinionated rails application templates.}
12
- spec.description = %q{A collection of rails application templates using modern versions of Ruby on Rails. Launch new applications and the infrastructure to run them in seconds.}
11
+ spec.summary = 'Opinionated rails application templates.'
12
+ spec.description = 'Generate modern Ruby on Rails applications using ' + \
13
+ ' best practices.'
14
+
13
15
  spec.homepage = 'https://github.com/nickjj/orats'
14
16
  spec.license = 'MIT'
15
17
 
16
18
  spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(/^(test|spec|features)/)
19
21
  spec.require_paths = ['lib']
20
22
 
21
23
  spec.add_dependency 'thor', '~> 0'
@@ -23,4 +25,4 @@ Gem::Specification.new do |spec|
23
25
  spec.add_development_dependency 'bundler', '~> 1.5'
24
26
  spec.add_development_dependency 'rake', '~> 0'
25
27
  spec.add_development_dependency 'minitest', '~> 5.3'
26
- end
28
+ end