orats 0.9.7 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.rubocop.yml +24 -0
- data/.travis.yml +9 -0
- data/README.md +103 -194
- data/bin/orats +2 -5
- data/lib/orats/cli.rb +6 -67
- data/lib/orats/cli_help/destroy +11 -0
- data/lib/orats/cli_help/new +2 -26
- data/lib/orats/commands/new.rb +127 -0
- data/lib/orats/common.rb +0 -29
- data/lib/orats/templates/base/.dockerignore +5 -0
- data/lib/orats/templates/base/.gitignore +22 -0
- data/lib/orats/templates/base/.rubocop.yml +29 -0
- data/lib/orats/templates/base/Dockerfile +102 -0
- data/lib/orats/templates/base/Gemfile +69 -0
- data/lib/orats/templates/base/Gemfile.lock +205 -0
- data/lib/orats/templates/base/README.md +24 -0
- data/lib/orats/templates/base/Rakefile +7 -0
- data/lib/orats/templates/base/app/assets/config/manifest.js +3 -0
- data/lib/orats/templates/base/app/assets/images/.keep +0 -0
- data/lib/orats/templates/base/app/assets/javascripts/application.js +33 -0
- data/lib/orats/templates/base/app/assets/javascripts/cable.js +14 -0
- data/lib/orats/templates/base/app/assets/javascripts/channels/.keep +0 -0
- data/lib/orats/templates/base/app/assets/stylesheets/application.scss +89 -0
- data/lib/orats/templates/base/app/channels/application_cable/channel.rb +4 -0
- data/lib/orats/templates/base/app/channels/application_cable/connection.rb +4 -0
- data/lib/orats/templates/base/app/controllers/application_controller.rb +3 -0
- data/lib/orats/templates/base/app/controllers/concerns/.keep +0 -0
- data/lib/orats/templates/base/app/controllers/pages_controller.rb +4 -0
- data/lib/orats/templates/base/app/helpers/application_helper.rb +31 -0
- data/lib/orats/templates/base/app/helpers/pages_helper.rb +2 -0
- data/lib/orats/templates/base/app/jobs/application_job.rb +2 -0
- data/lib/orats/templates/base/app/mailers/application_mailer.rb +4 -0
- data/lib/orats/templates/base/app/models/application_record.rb +3 -0
- data/lib/orats/templates/base/app/models/concerns/.keep +0 -0
- data/lib/orats/templates/{includes/new/rails → base}/app/views/layouts/_flash.html.erb +1 -1
- data/lib/orats/templates/base/app/views/layouts/_footer.html.erb +3 -0
- data/lib/orats/templates/{includes/new/rails/app/views/layouts/_google_analytics_snippet.html.erb → base/app/views/layouts/_google_analytics.html.erb} +5 -9
- data/lib/orats/templates/{includes/new/rails → base}/app/views/layouts/_navigation.html.erb +5 -4
- data/lib/orats/templates/base/app/views/layouts/application.html.erb +48 -0
- data/lib/orats/templates/base/app/views/layouts/mailer.html.erb +13 -0
- data/lib/orats/templates/base/app/views/layouts/mailer.text.erb +1 -0
- data/lib/orats/templates/base/app/views/pages/home.html.erb +46 -0
- data/lib/orats/templates/base/bin/bundle +3 -0
- data/lib/orats/templates/base/bin/rails +4 -0
- data/lib/orats/templates/base/bin/rake +4 -0
- data/lib/orats/templates/base/bin/setup +34 -0
- data/lib/orats/templates/base/bin/update +29 -0
- data/lib/orats/templates/base/cable/config.ru +4 -0
- data/lib/orats/templates/base/config.ru +5 -0
- data/lib/orats/templates/base/config/application.rb +71 -0
- data/lib/orats/templates/base/config/boot.rb +3 -0
- data/lib/orats/templates/base/config/cable.yml +14 -0
- data/lib/orats/templates/base/config/database.yml +13 -0
- data/lib/orats/templates/base/config/environment.rb +5 -0
- data/lib/orats/templates/base/config/environments/development.rb +49 -0
- data/lib/orats/templates/base/config/environments/production.rb +56 -0
- data/lib/orats/templates/base/config/environments/staging.rb +6 -0
- data/lib/orats/templates/base/config/environments/test.rb +40 -0
- data/lib/orats/templates/base/config/initializers/application_controller_renderer.rb +6 -0
- data/lib/orats/templates/base/config/initializers/assets.rb +12 -0
- data/lib/orats/templates/base/config/initializers/backtrace_silencers.rb +9 -0
- data/lib/orats/templates/base/config/initializers/cookies_serializer.rb +5 -0
- data/lib/orats/templates/base/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/orats/templates/base/config/initializers/inflections.rb +16 -0
- data/lib/orats/templates/base/config/initializers/mime_types.rb +4 -0
- data/lib/orats/templates/base/config/initializers/new_framework_defaults.rb +27 -0
- data/lib/orats/templates/base/config/initializers/session_store.rb +4 -0
- data/lib/orats/templates/{includes/new/rails → base}/config/initializers/sidekiq.rb +1 -4
- data/lib/orats/templates/base/config/initializers/timeout.rb +1 -0
- data/lib/orats/templates/base/config/initializers/wrap_parameters.rb +15 -0
- data/lib/orats/templates/base/config/locales/en.yml +23 -0
- data/lib/orats/templates/base/config/puma.rb +60 -0
- data/lib/orats/templates/base/config/routes.rb +3 -0
- data/lib/orats/templates/{includes/new/rails → base}/config/secrets.yml +3 -2
- data/lib/orats/templates/base/config/sidekiq.yml.erb +5 -0
- data/lib/orats/templates/base/config/spring.rb +6 -0
- data/lib/orats/templates/base/db/seeds.rb +9 -0
- data/lib/orats/templates/base/docker-compose.yml +59 -0
- data/lib/orats/templates/base/lib/assets/.keep +0 -0
- data/lib/orats/templates/base/lib/tasks/.keep +0 -0
- data/lib/orats/templates/base/log/.keep +0 -0
- data/lib/orats/templates/base/public/404.html +67 -0
- data/lib/orats/templates/base/public/422.html +67 -0
- data/lib/orats/templates/base/public/500.html +66 -0
- data/lib/orats/templates/base/public/apple-touch-icon-precomposed.png +0 -0
- data/lib/orats/templates/base/public/apple-touch-icon.png +0 -0
- data/lib/orats/templates/base/public/favicon.ico +0 -0
- data/lib/orats/templates/base/public/robots.txt +5 -0
- data/lib/orats/templates/base/test/controllers/.keep +0 -0
- data/lib/orats/templates/base/test/controllers/pages_controller_test.rb +9 -0
- data/lib/orats/templates/base/test/fixtures/.keep +0 -0
- data/lib/orats/templates/base/test/fixtures/files/.keep +0 -0
- data/lib/orats/templates/base/test/helpers/.keep +0 -0
- data/lib/orats/templates/base/test/integration/.keep +0 -0
- data/lib/orats/templates/base/test/mailers/.keep +0 -0
- data/lib/orats/templates/base/test/models/.keep +0 -0
- data/lib/orats/templates/base/test/test_helper.rb +11 -0
- data/lib/orats/templates/base/tmp/.keep +0 -0
- data/lib/orats/templates/base/vendor/assets/javascripts/.keep +0 -0
- data/lib/orats/templates/base/vendor/assets/stylesheets/.keep +0 -0
- data/lib/orats/ui.rb +5 -5
- data/lib/orats/util.rb +14 -0
- data/lib/orats/version.rb +1 -1
- data/orats.gemspec +3 -2
- data/test/integration/cli_test.rb +43 -65
- data/test/test_helper.rb +9 -58
- metadata +114 -66
- data/lib/orats/argv_adjust.rb +0 -61
- data/lib/orats/cli_help/nuke +0 -19
- data/lib/orats/commands/new/exec.rb +0 -59
- data/lib/orats/commands/new/rails.rb +0 -215
- data/lib/orats/commands/new/server.rb +0 -67
- data/lib/orats/commands/nuke.rb +0 -108
- data/lib/orats/postgres.rb +0 -92
- data/lib/orats/process.rb +0 -35
- data/lib/orats/redis.rb +0 -25
- data/lib/orats/shell.rb +0 -12
- data/lib/orats/templates/auth.rb +0 -394
- data/lib/orats/templates/base.rb +0 -546
- data/lib/orats/templates/includes/common/.gitignore +0 -6
- data/lib/orats/templates/includes/common/LICENSE +0 -22
- data/lib/orats/templates/includes/new/rails/.env +0 -59
- data/lib/orats/templates/includes/new/rails/Gemfile +0 -48
- data/lib/orats/templates/includes/new/rails/Procfile +0 -3
- data/lib/orats/templates/includes/new/rails/README.md +0 -3
- data/lib/orats/templates/includes/new/rails/app/assets/favicon/favicon_base.png +0 -0
- data/lib/orats/templates/includes/new/rails/app/helpers/application_helper.rb +0 -53
- data/lib/orats/templates/includes/new/rails/app/models/account.rb +0 -40
- data/lib/orats/templates/includes/new/rails/app/views/devise/confirmations/new.html.erb +0 -26
- data/lib/orats/templates/includes/new/rails/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/lib/orats/templates/includes/new/rails/app/views/devise/mailer/reset_password_instructions.html.erb +0 -10
- data/lib/orats/templates/includes/new/rails/app/views/devise/mailer/unlock_instructions.html.erb +0 -8
- data/lib/orats/templates/includes/new/rails/app/views/devise/passwords/edit.html.erb +0 -28
- data/lib/orats/templates/includes/new/rails/app/views/devise/passwords/new.html.erb +0 -26
- data/lib/orats/templates/includes/new/rails/app/views/devise/registrations/edit.html.erb +0 -51
- data/lib/orats/templates/includes/new/rails/app/views/devise/registrations/new.html.erb +0 -31
- data/lib/orats/templates/includes/new/rails/app/views/devise/sessions/new.html.erb +0 -39
- data/lib/orats/templates/includes/new/rails/app/views/devise/shared/_links.html.erb +0 -38
- data/lib/orats/templates/includes/new/rails/app/views/devise/unlocks/new.html.erb +0 -26
- data/lib/orats/templates/includes/new/rails/app/views/layouts/_disqus_comments_snippet.html.erb +0 -19
- data/lib/orats/templates/includes/new/rails/app/views/layouts/_disqus_count_snippet.html.erb +0 -12
- data/lib/orats/templates/includes/new/rails/app/views/layouts/_footer.html.erb +0 -2
- data/lib/orats/templates/includes/new/rails/app/views/layouts/_navigation_auth.html.erb +0 -15
- data/lib/orats/templates/includes/new/rails/app/views/layouts/_navigation_links.html.erb +0 -3
- data/lib/orats/templates/includes/new/rails/app/views/layouts/application.html.erb +0 -47
- data/lib/orats/templates/includes/new/rails/app/views/pages/home.html.erb +0 -58
- data/lib/orats/templates/includes/new/rails/config/database.yml +0 -6
- data/lib/orats/templates/includes/new/rails/config/environments/staging.rb +0 -5
- data/lib/orats/templates/includes/new/rails/config/initializers/devise_async.rb +0 -1
- data/lib/orats/templates/includes/new/rails/config/initializers/mini_profiler.rb +0 -4
- data/lib/orats/templates/includes/new/rails/config/puma.rb +0 -39
- data/lib/orats/templates/includes/new/rails/config/schedule.rb +0 -3
- data/lib/orats/templates/includes/new/rails/config/sidekiq.yml +0 -7
- data/lib/orats/templates/includes/new/rails/config/sitemap.rb +0 -20
- data/lib/orats/templates/includes/new/rails/config/unicorn.rb +0 -84
- data/lib/orats/templates/includes/new/rails/lib/tasks/orats/favicon.rake +0 -48
- data/lib/orats/templates/includes/new/rails/public/404.html +0 -13
- data/lib/orats/templates/includes/new/rails/public/422.html +0 -13
- data/lib/orats/templates/includes/new/rails/public/500.html +0 -13
- data/lib/orats/templates/includes/new/rails/public/502.html +0 -13
- data/lib/orats/templates/includes/new/rails/public/deploy.html +0 -14
- data/lib/orats/templates/includes/new/rails/test/fixtures/accounts.yml +0 -27
- data/lib/orats/templates/includes/new/rails/test/models/account_test.rb +0 -46
@@ -1,48 +0,0 @@
|
|
1
|
-
namespace :orats do
|
2
|
-
desc 'Create favicons from a single base png'
|
3
|
-
task :favicons do
|
4
|
-
require 'favicon_maker'
|
5
|
-
|
6
|
-
FaviconMaker.generate do
|
7
|
-
setup do
|
8
|
-
template_dir Rails.root.join('app', 'assets', 'favicon')
|
9
|
-
output_dir Rails.root.join('public')
|
10
|
-
end
|
11
|
-
|
12
|
-
favicon_base_path = "#{template_dir}/favicon_base.png"
|
13
|
-
|
14
|
-
unless File.exist?(favicon_base_path)
|
15
|
-
puts
|
16
|
-
puts 'A base favicon could not be found, make sure one exists at:'
|
17
|
-
puts favicon_base_path
|
18
|
-
puts
|
19
|
-
exit 1
|
20
|
-
end
|
21
|
-
|
22
|
-
from File.basename(favicon_base_path) do
|
23
|
-
icon 'speeddial-160x160.png'
|
24
|
-
icon 'apple-touch-icon-228x228-precomposed.png'
|
25
|
-
icon 'apple-touch-icon-152x152-precomposed.png'
|
26
|
-
icon 'apple-touch-icon-144x144-precomposed.png'
|
27
|
-
icon 'apple-touch-icon-120x120-precomposed.png'
|
28
|
-
icon 'apple-touch-icon-114x114-precomposed.png'
|
29
|
-
icon 'apple-touch-icon-76x76-precomposed.png'
|
30
|
-
icon 'apple-touch-icon-72x72-precomposed.png'
|
31
|
-
icon 'apple-touch-icon-60x60-precomposed.png'
|
32
|
-
icon 'apple-touch-icon-57x57-precomposed.png'
|
33
|
-
icon 'favicon-196x196.png'
|
34
|
-
icon 'favicon-160x160.png'
|
35
|
-
icon 'favicon-96x96.png'
|
36
|
-
icon 'favicon-64x64.png'
|
37
|
-
icon 'favicon-32x32.png'
|
38
|
-
icon 'favicon-24x24.png'
|
39
|
-
icon 'favicon-16x16.png'
|
40
|
-
icon 'favicon.ico', size: '64x64,32x32,24x24,16x16'
|
41
|
-
end
|
42
|
-
|
43
|
-
each_icon do |filepath|
|
44
|
-
puts "Creating favicon @ #{filepath}"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The server is being updated</title>
|
5
|
-
<meta charset="utf-8"/>
|
6
|
-
<style>
|
7
|
-
</style>
|
8
|
-
</head>
|
9
|
-
|
10
|
-
<body>
|
11
|
-
<h1>The server is being updated</h1>
|
12
|
-
<p>A new version of this site is being deployed right now. Please try again in about a minute or less.</p>
|
13
|
-
</body>
|
14
|
-
</html>
|
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
foo:
|
3
|
-
id: 1
|
4
|
-
email: foo@bar.com
|
5
|
-
encrypted_password: passwordisnotreallyencrypted
|
6
|
-
role: admin
|
7
|
-
created_at: 2012-01-01 01:45:17
|
8
|
-
current_sign_in_at: 2013-03-15 11:22:33
|
9
|
-
|
10
|
-
no_role:
|
11
|
-
id: 2
|
12
|
-
email: joey@almostcool.com
|
13
|
-
encrypted_password: hackthegibson
|
14
|
-
created_at: 1995-09-15 08:10:12
|
15
|
-
|
16
|
-
bad_role:
|
17
|
-
id: 3
|
18
|
-
email: hello@world.com
|
19
|
-
encrypted_password: reallysecure
|
20
|
-
role: ahhhh
|
21
|
-
created_at: 2011-09-20 10:10:10
|
22
|
-
|
23
|
-
beep:
|
24
|
-
id: 4
|
25
|
-
email: beep@beep.com
|
26
|
-
encrypted_password: beepbeepbeep
|
27
|
-
created_at: 2010-03-6 05:15:45
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class AccountTest < ActiveSupport::TestCase
|
4
|
-
def setup
|
5
|
-
@account = accounts(:foo)
|
6
|
-
end
|
7
|
-
|
8
|
-
def teardown
|
9
|
-
@account = nil
|
10
|
-
end
|
11
|
-
|
12
|
-
test 'expect new account' do
|
13
|
-
assert @account.valid?
|
14
|
-
assert_not_nil @account.email
|
15
|
-
assert_not_nil @account.encrypted_password
|
16
|
-
end
|
17
|
-
|
18
|
-
test 'expect guest to be default role' do
|
19
|
-
no_role = accounts(:no_role)
|
20
|
-
assert_equal 'guest', no_role.role
|
21
|
-
end
|
22
|
-
|
23
|
-
test 'expect invalid role to not save' do
|
24
|
-
bad_role = accounts(:bad_role)
|
25
|
-
assert_not bad_role.valid?
|
26
|
-
end
|
27
|
-
|
28
|
-
test 'expect e-mail to be unique' do
|
29
|
-
duplicate = Account.create(email: 'foo@bar.com')
|
30
|
-
|
31
|
-
assert_not duplicate.valid?
|
32
|
-
end
|
33
|
-
|
34
|
-
test 'expect random password if password is empty' do
|
35
|
-
@account.password = ''
|
36
|
-
@account.encrypted_password = ''
|
37
|
-
@account.save
|
38
|
-
|
39
|
-
random_password = Account.generate_password
|
40
|
-
assert_equal 10, random_password.length
|
41
|
-
end
|
42
|
-
|
43
|
-
test 'expect random password of 20 characters' do
|
44
|
-
assert_equal 20, Account.generate_password(20).length
|
45
|
-
end
|
46
|
-
end
|