orats 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Gemfile +1 -1
- data/{LICENSE.txt → LICENSE} +21 -21
- data/README.md +51 -346
- data/Rakefile +1 -1
- data/bin/orats +5 -2
- data/lib/orats/argv_adjust.rb +61 -0
- data/lib/orats/cli.rb +53 -141
- data/lib/orats/cli_help/new +27 -0
- data/lib/orats/cli_help/nuke +19 -0
- data/lib/orats/commands/new/exec.rb +59 -0
- data/lib/orats/commands/new/rails.rb +197 -0
- data/lib/orats/commands/new/server.rb +67 -0
- data/lib/orats/commands/nuke.rb +66 -44
- data/lib/orats/common.rb +76 -0
- data/lib/orats/postgres.rb +90 -0
- data/lib/orats/process.rb +35 -0
- data/lib/orats/redis.rb +25 -0
- data/lib/orats/shell.rb +12 -0
- data/lib/orats/templates/auth.rb +96 -82
- data/lib/orats/templates/base.rb +115 -110
- data/lib/orats/templates/includes/new/rails/.env +28 -28
- data/lib/orats/templates/includes/new/rails/Gemfile +4 -4
- data/lib/orats/templates/includes/new/rails/config/{whenever.rb → schedule.rb} +0 -0
- data/lib/orats/ui.rb +33 -0
- data/lib/orats/version.rb +3 -2
- data/lib/orats.rb +2 -1
- data/orats.gemspec +7 -5
- data/test/integration/cli_test.rb +28 -177
- data/test/test_helper.rb +24 -9
- metadata +17 -29
- data/lib/orats/commands/common.rb +0 -146
- data/lib/orats/commands/diff/compare.rb +0 -106
- data/lib/orats/commands/diff/exec.rb +0 -60
- data/lib/orats/commands/diff/parse.rb +0 -66
- data/lib/orats/commands/inventory.rb +0 -100
- data/lib/orats/commands/playbook.rb +0 -60
- data/lib/orats/commands/project/exec.rb +0 -74
- data/lib/orats/commands/project/rails.rb +0 -162
- data/lib/orats/commands/project/server.rb +0 -57
- data/lib/orats/commands/role.rb +0 -70
- data/lib/orats/commands/ui.rb +0 -47
- data/lib/orats/templates/includes/inventory/group_vars/all.yml +0 -202
- data/lib/orats/templates/includes/inventory/hosts +0 -8
- data/lib/orats/templates/includes/playbook/Galaxyfile +0 -15
- data/lib/orats/templates/includes/playbook/common.yml +0 -23
- data/lib/orats/templates/includes/playbook/site.yml +0 -36
- data/lib/orats/templates/includes/role/.travis.yml +0 -19
- data/lib/orats/templates/includes/role/README.md +0 -62
- data/lib/orats/templates/includes/role/meta/main.yml +0 -123
- data/lib/orats/templates/includes/role/tests/inventory +0 -1
- data/lib/orats/templates/includes/role/tests/main.yml +0 -7
- data/lib/orats/templates/playbook.rb +0 -119
- data/lib/orats/templates/role.rb +0 -144
data/lib/orats/templates/base.rb
CHANGED
@@ -19,13 +19,12 @@ def method_to_sentence(method)
|
|
19
19
|
method
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
22
|
+
def task(message, color = :blue)
|
23
23
|
puts
|
24
|
-
say_status 'task',
|
25
|
-
puts '-'*80, ''; sleep 0.25
|
24
|
+
say_status 'task', set_color(message, :bold), color
|
26
25
|
end
|
27
26
|
|
28
|
-
def
|
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
|
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
|
53
|
-
|
51
|
+
def initial_commit
|
52
|
+
task __method__
|
54
53
|
|
55
54
|
git :init
|
56
|
-
|
55
|
+
commit 'Initial git commit'
|
57
56
|
end
|
58
57
|
|
59
58
|
def update_gitignore
|
60
|
-
|
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
|
-
|
79
|
+
commit 'Add common OS files, editor files and other paths'
|
81
80
|
end
|
82
81
|
|
83
82
|
def copy_gemfile
|
84
|
-
|
83
|
+
task __method__
|
85
84
|
|
86
|
-
|
87
|
-
|
85
|
+
orats_to_local 'Gemfile'
|
86
|
+
commit 'Add Gemfile'
|
88
87
|
end
|
89
88
|
|
90
89
|
def copy_base_favicon
|
91
|
-
|
90
|
+
task __method__
|
92
91
|
|
93
|
-
|
94
|
-
|
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
|
-
|
97
|
+
task 'add_dotenv'
|
99
98
|
|
100
|
-
|
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
|
-
|
102
|
+
commit 'Add development environment file'
|
104
103
|
end
|
105
104
|
|
106
105
|
def add_procfile
|
107
|
-
|
106
|
+
task __method__
|
108
107
|
|
109
|
-
|
110
|
-
|
108
|
+
orats_to_local 'Procfile'
|
109
|
+
commit 'Add Procfile'
|
111
110
|
end
|
112
111
|
|
113
112
|
def add_markdown_readme
|
114
|
-
|
113
|
+
task __method__
|
115
114
|
|
116
|
-
|
117
|
-
|
115
|
+
orats_to_local 'README.md'
|
116
|
+
commit 'Add markdown readme'
|
118
117
|
end
|
119
118
|
|
120
119
|
def add_license
|
121
|
-
|
120
|
+
task __method__
|
122
121
|
|
123
122
|
author_name = git_config 'name'
|
124
123
|
author_email = git_config 'email'
|
125
124
|
|
126
|
-
|
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
|
-
|
129
|
+
commit 'Add MIT license'
|
131
130
|
end
|
132
131
|
|
133
132
|
def update_app_secrets
|
134
|
-
|
133
|
+
task __method__
|
135
134
|
|
136
|
-
|
137
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
194
|
+
task __method__
|
195
195
|
|
196
|
-
|
197
|
-
|
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
|
-
|
201
|
+
task __method__
|
202
202
|
|
203
|
-
|
204
|
-
|
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
|
-
|
208
|
+
task __method__
|
209
209
|
|
210
|
-
|
211
|
-
|
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
|
-
|
215
|
+
task __method__
|
216
216
|
|
217
|
-
|
217
|
+
orats_to_local 'config/sitemap.rb'
|
218
218
|
gsub_file 'config/sitemap.rb', 'app_name', app_name
|
219
|
-
|
219
|
+
commit 'Add the sitemap config'
|
220
220
|
end
|
221
221
|
|
222
222
|
def add_whenever_config
|
223
|
-
|
223
|
+
task __method__
|
224
224
|
|
225
|
-
|
226
|
-
|
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
|
-
|
230
|
+
task __method__
|
231
231
|
|
232
|
-
|
232
|
+
orats_to_local 'config/initializers/sidekiq.rb'
|
233
233
|
gsub_file 'config/initializers/sidekiq.rb', 'ns_app', app_name
|
234
|
-
|
234
|
+
commit 'Add the sidekiq initializer'
|
235
235
|
end
|
236
236
|
|
237
237
|
def add_mini_profiler_initializer
|
238
|
-
|
238
|
+
task __method__
|
239
239
|
|
240
|
-
|
241
|
-
|
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
|
-
|
245
|
+
task __method__
|
246
246
|
|
247
|
-
|
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
|
-
|
250
|
+
commit 'Add a staging environment'
|
251
251
|
end
|
252
252
|
|
253
253
|
def update_development_environment
|
254
|
-
|
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
|
-
|
264
|
+
commit 'Update the default generator asset engines'
|
265
265
|
end
|
266
266
|
|
267
267
|
def update_production_environment
|
268
|
-
|
268
|
+
task __method__
|
269
269
|
|
270
|
-
inject_into_file 'config/environments/production.rb',
|
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
|
-
|
276
|
+
commit 'Update the logger to rotate daily'
|
276
277
|
|
277
|
-
inject_into_file 'config/environments/production.rb',
|
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
|
-
|
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
|
-
|
292
|
+
commit 'Add sass asset compression'
|
291
293
|
end
|
292
294
|
|
293
295
|
def update_routes
|
294
|
-
|
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
|
-
|
310
|
+
commit 'Add a concern for pagination and mount sidekiq'
|
309
311
|
end
|
310
312
|
|
311
313
|
def add_backup_lib
|
312
|
-
|
314
|
+
task __method__
|
313
315
|
|
314
|
-
|
315
|
-
|
316
|
-
|
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
|
-
|
322
|
+
task __method__
|
321
323
|
|
322
|
-
|
323
|
-
|
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
|
-
|
329
|
+
task __method__
|
328
330
|
|
329
|
-
|
331
|
+
orats_to_local 'lib/tasks/orats/backup.rake'
|
330
332
|
gsub_file 'lib/tasks/orats/backup.rake', 'app_name', app_name
|
331
|
-
|
333
|
+
commit 'Add an application backup task'
|
332
334
|
end
|
333
335
|
|
334
336
|
def add_helpers
|
335
|
-
|
337
|
+
task __method__
|
336
338
|
|
337
|
-
|
338
|
-
|
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
|
-
|
344
|
+
task __method__
|
343
345
|
|
344
|
-
|
345
|
-
|
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
|
-
|
351
|
+
task __method__
|
350
352
|
|
351
|
-
|
353
|
+
orats_to_local 'app/views/layouts/_flash.html.erb'
|
352
354
|
|
353
|
-
|
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
|
-
|
358
|
+
orats_to_local 'app/views/layouts/_navigation_links.html.erb'
|
357
359
|
|
358
|
-
|
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
|
-
|
364
|
-
|
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
|
-
|
367
|
-
|
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
|
-
|
371
|
+
commit 'Add layout partials'
|
370
372
|
end
|
371
373
|
|
372
374
|
def add_http_error_pages
|
373
|
-
|
375
|
+
task __method__
|
374
376
|
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
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
|
-
|
382
|
+
commit 'Add http status code pages'
|
381
383
|
end
|
382
384
|
|
383
385
|
def update_sass
|
384
|
-
|
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
|
-
|
466
|
+
commit 'Add font-awesome, bootstrap and a few default styles'
|
463
467
|
end
|
464
468
|
|
465
469
|
def update_coffeescript
|
466
|
-
|
470
|
+
task __method__
|
467
471
|
|
468
472
|
gsub_file 'app/assets/javascripts/application.js', "//= require jquery\n", ''
|
469
|
-
|
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',
|
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
|
-
|
495
|
+
commit 'Add jquery.turbolinks and bootstrap'
|
491
496
|
end
|
492
497
|
|
493
498
|
def remove_unused_files_from_git
|
494
|
-
|
499
|
+
task __method__
|
495
500
|
|
496
501
|
git add: '-u'
|
497
|
-
|
502
|
+
commit 'Remove unused files'
|
498
503
|
end
|
499
504
|
|
500
505
|
# ---
|
501
506
|
|
502
|
-
|
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: /
|
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.
|
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.
|
16
|
-
gem 'sidekiq', '~> 3.1
|
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
|
File without changes
|
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
data/lib/orats.rb
CHANGED
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 =
|
12
|
-
spec.description =
|
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(
|
18
|
-
spec.test_files = spec.files.grep(
|
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
|