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,39 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
title 'Sign in'
|
3
|
-
meta_description '...'
|
4
|
-
heading 'Sign in'
|
5
|
-
%>
|
6
|
-
|
7
|
-
<div class="row">
|
8
|
-
<div class="col-sm-4">
|
9
|
-
<%= form_for resource, as: resource_name, url: session_path(resource_name) do |f| %>
|
10
|
-
<div class="form-group">
|
11
|
-
<%= f.label :email %>
|
12
|
-
<%= f.email_field :email, maxlength: 254, class: 'form-control', autofocus: true %>
|
13
|
-
</div>
|
14
|
-
<div class="form-group">
|
15
|
-
<%= f.label :password %>
|
16
|
-
<%= f.password_field :password, maxlength: 128, class: 'form-control',
|
17
|
-
data: {
|
18
|
-
'rule-required' => 'true',
|
19
|
-
'rule-minlength' => '8',
|
20
|
-
'rule-maxlength' => '128'
|
21
|
-
} %>
|
22
|
-
</div>
|
23
|
-
<% if devise_mapping.rememberable? -%>
|
24
|
-
<div class="checkbox">
|
25
|
-
<%= f.label :remember_me do %>
|
26
|
-
<%= f.check_box :remember_me %> Stay signed in
|
27
|
-
<% end %>
|
28
|
-
</div>
|
29
|
-
<% end -%>
|
30
|
-
<%= button_tag type: 'submit', class: 'btn btn-primary' do %>
|
31
|
-
Sign in
|
32
|
-
<% end %>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
35
|
-
<div class="col-sm-6 col-sm-offset-2">
|
36
|
-
<h4 class="success-color">Having trouble accessing your account?</h4>
|
37
|
-
<%= render 'devise/shared/links' %>
|
38
|
-
</div>
|
39
|
-
</div>
|
@@ -1,38 +0,0 @@
|
|
1
|
-
<%= content_tag(:h4, 'Or do something else') if controller_name != 'sessions' %>
|
2
|
-
<ul>
|
3
|
-
<%- if controller_name != 'sessions' %>
|
4
|
-
<li>
|
5
|
-
<%= link_to 'Sign in', new_session_path(resource_name) %>
|
6
|
-
</li>
|
7
|
-
<% end -%>
|
8
|
-
|
9
|
-
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
10
|
-
<li>
|
11
|
-
<%= link_to 'Register', new_registration_path(resource_name) %>
|
12
|
-
</li>
|
13
|
-
<% end -%>
|
14
|
-
|
15
|
-
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
16
|
-
<li>
|
17
|
-
<%= link_to 'Forgot your password?', new_password_path(resource_name) %>
|
18
|
-
</li>
|
19
|
-
<% end -%>
|
20
|
-
|
21
|
-
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
22
|
-
<li>
|
23
|
-
<%= link_to 'Re-send confirmation instructions?', new_confirmation_path(resource_name) %>
|
24
|
-
</li>
|
25
|
-
<% end -%>
|
26
|
-
|
27
|
-
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
28
|
-
<li>
|
29
|
-
<%= link_to 'Are you locked out of your account?', new_unlock_path(resource_name) %>
|
30
|
-
</li>
|
31
|
-
<% end -%>
|
32
|
-
|
33
|
-
<%- if devise_mapping.omniauthable? %>
|
34
|
-
<%- resource_class.omniauth_providers.each do |provider| %>
|
35
|
-
<li><%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %></li>
|
36
|
-
<% end -%>
|
37
|
-
<% end -%>
|
38
|
-
</ul>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
title 'Re-send unlock instructions'
|
3
|
-
meta_description '...'
|
4
|
-
heading 'Re-send unlock instructions'
|
5
|
-
%>
|
6
|
-
|
7
|
-
<div class="row">
|
8
|
-
<div class="col-sm-4">
|
9
|
-
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: {method: :post}) do |f| %>
|
10
|
-
<div class="form-group">
|
11
|
-
<%= f.label :email %>
|
12
|
-
<%= f.email_field :email, class: 'form-control', maxlength: 254, autofocus: true,
|
13
|
-
data: {
|
14
|
-
'rule-required' => 'true',
|
15
|
-
'rule-maxlength' => '254'
|
16
|
-
} %>
|
17
|
-
</div>
|
18
|
-
<%= button_tag type: 'submit', class: 'btn btn-primary' do %>
|
19
|
-
Send
|
20
|
-
<% end %>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
<div class="col-sm-6 col-sm-offset-2">
|
24
|
-
<%= render 'devise/shared/links' %>
|
25
|
-
</div>
|
26
|
-
</div>
|
data/lib/orats/templates/includes/new/rails/app/views/layouts/_disqus_comments_snippet.html.erb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
<% if ENV['DISQUS_SHORT_NAME'].present? %>
|
2
|
-
<div id="disqus_thread"></div>
|
3
|
-
<script type="text/javascript">
|
4
|
-
var disqus_shortname = '<%= ENV["DISQUS_SHORT_NAME"] %>';
|
5
|
-
(function () {
|
6
|
-
var dsq = document.createElement('script');
|
7
|
-
dsq.type = 'text/javascript';
|
8
|
-
dsq.async = true;
|
9
|
-
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
10
|
-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
11
|
-
})();
|
12
|
-
</script>
|
13
|
-
<noscript>
|
14
|
-
Please enable JavaScript to view the
|
15
|
-
<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
16
|
-
</noscript>
|
17
|
-
<a href="http://disqus.com" class="dsq-brlink">comments powered by
|
18
|
-
<span class="logo-disqus">Disqus</span></a>
|
19
|
-
<% end %>
|
data/lib/orats/templates/includes/new/rails/app/views/layouts/_disqus_count_snippet.html.erb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
<% if ENV['DISQUS_SHORT_NAME'].present? %>
|
2
|
-
<div id="disqus_thread"></div>
|
3
|
-
<script type="text/javascript">
|
4
|
-
var disqus_shortname = '<%= ENV["DISQUS_SHORT_NAME"] %>';
|
5
|
-
(function () {
|
6
|
-
var s = document.createElement('script');
|
7
|
-
s.async = true;
|
8
|
-
s.type = 'text/javascript';
|
9
|
-
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
10
|
-
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
11
|
-
}());
|
12
|
-
<% end %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<% if current_account %>
|
2
|
-
<li>
|
3
|
-
<%= link_to 'Settings', edit_account_registration_path %>
|
4
|
-
</li>
|
5
|
-
<li>
|
6
|
-
<%= link_to 'Sign out', destroy_account_session_path, method: :delete %>
|
7
|
-
</li>
|
8
|
-
<% else %>
|
9
|
-
<li>
|
10
|
-
<%= link_to 'Sign in', new_account_session_path %>
|
11
|
-
</li>
|
12
|
-
<li>
|
13
|
-
<%= link_to 'Register', new_account_registration_path %>
|
14
|
-
</li>
|
15
|
-
<% end %>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<title><%= yield :title %></title>
|
5
|
-
<meta charset="utf-8"/>
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
8
|
-
<meta name="description" content="<%= yield :meta_description %>"/>
|
9
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
10
|
-
<%= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js',
|
11
|
-
'application', 'data-turbolinks-track' => true %>
|
12
|
-
<%= csrf_meta_tags %>
|
13
|
-
<%= link_to_all_favicons %>
|
14
|
-
<!--[if lt IE 9]>
|
15
|
-
<script
|
16
|
-
src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
|
17
|
-
<script
|
18
|
-
src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.0/json3.min.js"></script>
|
19
|
-
<script
|
20
|
-
src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
|
21
|
-
<![endif]-->
|
22
|
-
</head>
|
23
|
-
|
24
|
-
<body>
|
25
|
-
<%= render 'layouts/google_analytics_snippet' %>
|
26
|
-
<header>
|
27
|
-
<%= render 'layouts/navigation' %>
|
28
|
-
</header>
|
29
|
-
|
30
|
-
<main role="main" class="container">
|
31
|
-
<div class="page-header">
|
32
|
-
<h1><%= yield :heading %></h1>
|
33
|
-
</div>
|
34
|
-
<%= render 'layouts/flash' %>
|
35
|
-
<%= yield %>
|
36
|
-
</main>
|
37
|
-
|
38
|
-
<footer>
|
39
|
-
<hr/>
|
40
|
-
<div class="container">
|
41
|
-
<%= render 'layouts/footer' %>
|
42
|
-
</div>
|
43
|
-
</footer>
|
44
|
-
|
45
|
-
<%= render 'layouts/disqus_count_snippet' %>
|
46
|
-
</body>
|
47
|
-
</html>
|
@@ -1,58 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
title 'Welcome to Ruby on Rails'
|
3
|
-
meta_description '...'
|
4
|
-
heading 'Welcome to Ruby on Rails'
|
5
|
-
%>
|
6
|
-
|
7
|
-
<div class="row">
|
8
|
-
<div class="col-sm-9">
|
9
|
-
<p class="lead">
|
10
|
-
You have successfully generated a project
|
11
|
-
with <%= link_to 'orats', 'https://github.com/nickjj/orats' %> vVERSION.
|
12
|
-
</p>
|
13
|
-
|
14
|
-
<hr/>
|
15
|
-
|
16
|
-
<p>
|
17
|
-
<%= image_tag 'https://badge.fury.io/rb/orats.png', alt: 'Gem badge' %> is
|
18
|
-
the latest version of orats.
|
19
|
-
</p>
|
20
|
-
|
21
|
-
<hr/>
|
22
|
-
|
23
|
-
<h3>Trying to figure out what to do next?</h3>
|
24
|
-
|
25
|
-
<p>
|
26
|
-
Visit the wiki guide
|
27
|
-
for <%= link_to 'what to look at after making a new project', 'https://github.com/nickjj/orats/wiki/What-to-look-at-after-making-a-new-project' %>
|
28
|
-
.
|
29
|
-
</p>
|
30
|
-
|
31
|
-
<hr/>
|
32
|
-
|
33
|
-
<h3>Want to get rid of the pages controller?</h3>
|
34
|
-
|
35
|
-
<p>
|
36
|
-
No problem, just follow these steps:
|
37
|
-
<ul>
|
38
|
-
<li>
|
39
|
-
Run <code>bundle exec rails d controller Pages</code>
|
40
|
-
</li>
|
41
|
-
<li>
|
42
|
-
Remove the root route from <code>config/routes.rb</code>
|
43
|
-
</li>
|
44
|
-
<li>
|
45
|
-
Remove the link in the navigation partial at
|
46
|
-
<code>app/views/layouts/_navigation_links.html.erb</code>
|
47
|
-
</li>
|
48
|
-
<li>
|
49
|
-
Restart the server
|
50
|
-
</li>
|
51
|
-
</ul>
|
52
|
-
</p>
|
53
|
-
</div>
|
54
|
-
|
55
|
-
<div class="col-sm-3">
|
56
|
-
<%= image_tag '/apple-touch-icon-228x228-precomposed.png', size: '228x228', alt: 'A ruby image I found on Google' %>
|
57
|
-
</div>
|
58
|
-
</div>
|
@@ -1 +0,0 @@
|
|
1
|
-
Devise::Async.backend = :sidekiq
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# Feel free to experiment with this, 0/16 is a good starting point.
|
2
|
-
threads ENV['THREADS_MIN'].to_i, ENV['THREADS_MAX'].to_i
|
3
|
-
|
4
|
-
# Go with at least 1 per CPU core, a higher amount will usually help for fast
|
5
|
-
# responses such as reading from a cache.
|
6
|
-
workers ENV['WORKERS'].to_i
|
7
|
-
|
8
|
-
# Listen on a tcp port or unix socket.
|
9
|
-
if ENV['LISTEN_ON'].include?(':')
|
10
|
-
bind "tcp://#{ENV['LISTEN_ON']}"
|
11
|
-
else
|
12
|
-
bind "unix:#{ENV['LISTEN_ON']}"
|
13
|
-
end
|
14
|
-
|
15
|
-
# The path where the pid file will be written to.
|
16
|
-
pidfile "#{ENV['RUN_STATE_PATH']}/#{ENV['SERVICE']}.pid"
|
17
|
-
|
18
|
-
# Use a shorter timeout instead of the 60s default. If you are handling large
|
19
|
-
# uploads you may want to increase this.
|
20
|
-
worker_timeout 30
|
21
|
-
|
22
|
-
# The file that gets logged to.
|
23
|
-
stdout_redirect ENV['LOG_FILE'], ENV['LOG_FILE']
|
24
|
-
|
25
|
-
# Preload the application before starting the workers.
|
26
|
-
preload_app!
|
27
|
-
|
28
|
-
# The path to the puma binary without any arguments, it will inherit everything
|
29
|
-
# from the original process.
|
30
|
-
restart_command 'bin/puma'
|
31
|
-
|
32
|
-
on_worker_boot do
|
33
|
-
# Don't bother having the master process hang onto older connections.
|
34
|
-
defined?(ActiveRecord::Base) and
|
35
|
-
ActiveRecord::Base.connection.disconnect!
|
36
|
-
|
37
|
-
defined?(ActiveRecord::Base) and
|
38
|
-
ActiveRecord::Base.establish_connection
|
39
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# Set the host name for URL creation
|
2
|
-
SitemapGenerator::Sitemap.default_host = "http://www.app_name.com"
|
3
|
-
|
4
|
-
SitemapGenerator::Sitemap.create do
|
5
|
-
# Put links creation logic here.
|
6
|
-
#
|
7
|
-
# The root path '/' and sitemap index file are added automatically for you.
|
8
|
-
# Links are added to the Sitemap in the order they are specified.
|
9
|
-
#
|
10
|
-
# Examples:
|
11
|
-
#
|
12
|
-
# add root_path
|
13
|
-
# add foobar_path, priority: 0.7, changefreq: 'daily'
|
14
|
-
#
|
15
|
-
# Iteration example:
|
16
|
-
#
|
17
|
-
# Article.published.find_each do |article|
|
18
|
-
# add article_path("#{article.id}-#{article.permalink}"), priority: 0.9, lastmod: article.updated_at
|
19
|
-
# end
|
20
|
-
end
|
@@ -1,84 +0,0 @@
|
|
1
|
-
# Heavily inspired by gitlab:
|
2
|
-
# https://github.com/gitlabhq/gitlabhq/blob/master/config/unicorn.rb.example
|
3
|
-
|
4
|
-
# Go with at least 1 per CPU core, a higher amount will usually help for fast
|
5
|
-
# responses such as reading from a cache.
|
6
|
-
worker_processes ENV['WORKERS'].to_i
|
7
|
-
|
8
|
-
# Listen on a tcp port or unix socket.
|
9
|
-
if ENV['LISTEN_ON'].include?(':')
|
10
|
-
listen ENV['LISTEN_ON']
|
11
|
-
else
|
12
|
-
# Use a shorter socket backlog for quicker failover when busy.
|
13
|
-
listen ENV['LISTEN_ON'], backlog: 64
|
14
|
-
end
|
15
|
-
|
16
|
-
# The path where the pid file will be written to.
|
17
|
-
pid "#{ENV['RUN_STATE_PATH']}/#{ENV['SERVICE']}.pid"
|
18
|
-
|
19
|
-
# Use a shorter timeout instead of the 60s default. If you are handling large
|
20
|
-
# uploads you may want to increase this.
|
21
|
-
timeout 30
|
22
|
-
|
23
|
-
# The file that gets logged to.
|
24
|
-
stdout_path ENV['LOG_FILE']
|
25
|
-
stderr_path ENV['LOG_FILE']
|
26
|
-
|
27
|
-
# Combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings:
|
28
|
-
# http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
|
29
|
-
preload_app true
|
30
|
-
GC.respond_to?(:copy_on_write_friendly=) and
|
31
|
-
GC.copy_on_write_friendly = true
|
32
|
-
|
33
|
-
# Enable this flag to have unicorn test client connections by writing the
|
34
|
-
# beginning of the HTTP headers before calling the application. This
|
35
|
-
# prevents calling the application for connections that have disconnected
|
36
|
-
# while queued. This is only guaranteed to detect clients on the same
|
37
|
-
# host unicorn runs on, and unlikely to detect disconnects even on a
|
38
|
-
# fast LAN.
|
39
|
-
check_client_connection false
|
40
|
-
|
41
|
-
before_fork do |server, worker|
|
42
|
-
# Don't bother having the master process hang onto older connections.
|
43
|
-
defined?(ActiveRecord::Base) and
|
44
|
-
ActiveRecord::Base.connection.disconnect!
|
45
|
-
|
46
|
-
# The following is only recommended for memory/DB-constrained
|
47
|
-
# installations. It is not needed if your system can house
|
48
|
-
# twice as many worker_processes as you have configured.
|
49
|
-
#
|
50
|
-
# This allows a new master process to incrementally
|
51
|
-
# phase out the old master process with SIGTTOU to avoid a
|
52
|
-
# thundering herd (especially in the "preload_app false" case)
|
53
|
-
# when doing a transparent upgrade. The last worker spawned
|
54
|
-
# will then kill off the old master process with a SIGQUIT.
|
55
|
-
old_pid = "#{server.config[:pid]}.oldbin"
|
56
|
-
if old_pid != server.pid
|
57
|
-
begin
|
58
|
-
sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
|
59
|
-
Process.kill(sig, File.read(old_pid).to_i)
|
60
|
-
rescue Errno::ENOENT, Errno::ESRCH
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
# Throttle the master from forking too quickly by sleeping. Due
|
65
|
-
# to the implementation of standard Unix signal handlers, this
|
66
|
-
# helps (but does not completely) prevent identical, repeated signals
|
67
|
-
# from being lost when the receiving process is busy.
|
68
|
-
# sleep 1
|
69
|
-
end
|
70
|
-
|
71
|
-
after_fork do |server, worker|
|
72
|
-
# Per-process listener ports for debugging, admin, migrations, etc..
|
73
|
-
# addr = "127.0.0.1:#{9293 + worker.nr}"
|
74
|
-
# server.listen(addr, tries: -1, delay: 5, tcp_nopush: true)
|
75
|
-
|
76
|
-
defined?(ActiveRecord::Base) and
|
77
|
-
ActiveRecord::Base.establish_connection
|
78
|
-
|
79
|
-
# If preload_app is true, then you may also want to check and
|
80
|
-
# restart any other shared sockets/descriptors such as Memcached,
|
81
|
-
# and Redis. TokyoCabinet file handles are safe to reuse
|
82
|
-
# between any number of forked children (assuming your kernel
|
83
|
-
# correctly implements pread()/pwrite() system calls).
|
84
|
-
end
|