railman 0.6.20 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/railman/cli.rb +7 -0
- data/lib/railman/version.rb +1 -1
- data/templates/rails_app/.ruby-version +1 -1
- data/templates/rails_app/Gemfile +18 -10
- data/templates/rails_app/README.md +1 -12
- data/templates/rails_app/app/assets/config/manifest.js +3 -0
- data/templates/rails_app/app/assets/javascripts/cable.js +13 -0
- data/templates/rails_app/app/{jobs → assets/javascripts/channels}/.keep +0 -0
- data/templates/rails_app/app/channels/application_cable/channel.rb +4 -0
- data/templates/rails_app/app/channels/application_cable/connection.rb +4 -0
- data/templates/rails_app/app/javascript/packs/application.js +17 -0
- data/templates/rails_app/app/javascript/packs/hello.vue +11 -0
- data/templates/rails_app/app/jobs/application_job.rb +2 -0
- data/templates/rails_app/app/models/application_record.rb +3 -0
- data/templates/rails_app/app/views/layouts/application.html.erb.tt +7 -4
- data/templates/rails_app/app/views/layouts/mailer.html.erb +5 -1
- data/templates/rails_app/bin/rails +6 -1
- data/templates/rails_app/bin/rake +5 -0
- data/templates/rails_app/bin/setup +21 -12
- data/templates/rails_app/bin/spring +17 -0
- data/templates/rails_app/bin/update +28 -0
- data/templates/rails_app/bin/webpack +19 -0
- data/templates/rails_app/bin/webpack-dev-server +27 -0
- data/templates/rails_app/bin/webpack-watcher +10 -0
- data/templates/rails_app/bin/yarn +10 -0
- data/templates/rails_app/config/application.rb.tt +1 -12
- data/templates/rails_app/config/cable.yml.tt +10 -0
- data/templates/rails_app/config/database.yml.tt +11 -22
- data/templates/rails_app/config/environment.rb +1 -1
- data/templates/rails_app/config/environments/development.rb +26 -13
- data/templates/rails_app/config/environments/production.rb.tt +40 -21
- data/templates/rails_app/config/environments/test.rb +6 -6
- data/templates/rails_app/config/initializers/application_controller_renderer.rb +6 -0
- data/templates/rails_app/config/initializers/assets.rb +6 -3
- data/templates/rails_app/config/initializers/cookies_serializer.rb +2 -0
- data/templates/rails_app/config/initializers/new_framework_defaults.rb +25 -0
- data/templates/rails_app/config/initializers/wrap_parameters.rb +2 -2
- data/templates/rails_app/config/puma.rb +76 -0
- data/templates/rails_app/config/secrets.yml +18 -6
- data/templates/rails_app/config/server/nginx.conf.tt +1 -1
- data/templates/rails_app/config/spring.rb +6 -0
- data/templates/rails_app/config/webpack/development.js +30 -0
- data/templates/rails_app/config/webpack/production.js +23 -0
- data/templates/rails_app/config/webpack/shared.js +80 -0
- data/templates/rails_app/db/seeds.rb +3 -3
- data/templates/rails_app/package.json.tt +28 -0
- data/templates/rails_app/{app/models/.keep → public/apple-touch-icon-precomposed.png} +0 -0
- data/templates/rails_app/{vendor/assets/javascripts/.keep → public/apple-touch-icon.png} +0 -0
- data/templates/rails_app/public/robots.txt +0 -4
- data/templates/rails_app/test/application_system_test_case.rb +5 -0
- data/templates/rails_app/{vendor/assets/stylesheets → test/system}/.keep +0 -0
- data/templates/rails_app/vendor/.keep +0 -0
- metadata +32 -10
- data/templates/rails_app/bin/unicorn +0 -16
- data/templates/rails_app/bin/unicorn_rails +0 -16
- data/templates/rails_app/config/unicorn.rb.tt +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 831f6c86324fa45701b49f8f59732166235d869f
|
4
|
+
data.tar.gz: b559cb8e524d8cbd40ae144dbb48087ed5ff2b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57f9a7428a8d4f74e40d47b5857f39c2d515e5fd838d37b2bac5e596bd0029d1e98a9805a5d20b10d89821ec54476eabaaed718f31a379bd7a27782d7c2ff460
|
7
|
+
data.tar.gz: 2dcd5ce5f29c26575bacda37c5f9c47138c9cb9bca1d6cbbea7399be9b36507f199a8ff084bbc976f87f9c8f478766903f58f7a6413e654be7a81899fb51a014
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.3
|
data/lib/railman/cli.rb
CHANGED
@@ -91,6 +91,13 @@ module Railman
|
|
91
91
|
template "rails_app/.env.example.test.tt", "#{@config.app_name}/.env.example.test"
|
92
92
|
else
|
93
93
|
directory "rails_app", @config.app_name, exclude_pattern: /home_controller|index\.html\.erb/
|
94
|
+
# delete files that shouldn't exist in the new version
|
95
|
+
remove_file "#{@config.app_name}/config/unicorn.rb"
|
96
|
+
remove_file "#{@config.app_name}/bin/unicorn"
|
97
|
+
remove_file "#{@config.app_name}/bin/unicorn_rails"
|
98
|
+
remove_file "#{@config.app_name}/app/jobs/.keep"
|
99
|
+
remove_file "#{@config.app_name}/app/models/.keep"
|
100
|
+
remove_dir "#{@config.app_name}/vendor/assets"
|
94
101
|
end
|
95
102
|
save_config(@config)
|
96
103
|
Dir.chdir @config.app_name do
|
data/lib/railman/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.3
|
data/templates/rails_app/Gemfile
CHANGED
@@ -1,36 +1,45 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
source 'https://rails-assets.org'
|
3
3
|
|
4
|
+
git_source(:github) do |repo_name|
|
5
|
+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
6
|
+
"https://github.com/#{repo_name}.git"
|
7
|
+
end
|
8
|
+
|
4
9
|
gem 'dotenv-rails', '2.1.1', require: 'dotenv/rails-now' # load ENV from .env
|
5
10
|
|
6
|
-
gem 'rails', '
|
11
|
+
gem 'rails', '~> 5.1.0.beta1'
|
7
12
|
gem 'pg', '0.18.2'
|
8
13
|
|
9
14
|
gem 'semantic-rails-ui' # semantic-ui + simple_form + rails helpers
|
10
15
|
|
16
|
+
gem 'webpacker', github: 'rails/webpacker'
|
17
|
+
|
11
18
|
gem 'hiredis', '0.6.1'
|
12
19
|
gem 'redis', '3.3.1', require: %w(redis redis/connection/hiredis)
|
13
|
-
gem 'redis-namespace', '1.5.2'
|
14
20
|
gem 'redis-rails', '5.0.1'
|
15
21
|
|
16
22
|
gem 'sidekiq', '4.1.1' # backgroud jobs
|
17
23
|
gem 'sidekiq-scheduler', '2.0.6' # scheduled background jobs
|
18
24
|
gem 'redis-namespace', '1.5.2' # share same redis instance for multiple applications
|
19
|
-
gem 'sinatra', '
|
25
|
+
gem 'sinatra', '2.0.0.beta2', :require => false # for sidekiq-web
|
20
26
|
|
21
|
-
gem '
|
22
|
-
gem 'unicorn-rails', '1.1.0' # use unicorn as local server
|
27
|
+
gem 'puma', '~> 3.7'
|
23
28
|
|
24
29
|
gem 'railman-deployment', '~> 0.2' # capistrano deployment
|
25
30
|
|
26
|
-
gem 'exception_notification', '4.1
|
31
|
+
gem 'exception_notification', '4.2.1' # exception notification per email
|
27
32
|
|
28
33
|
gem 'lograge', '~> 0.4.1' # one-line-per-request log messages
|
29
34
|
|
30
35
|
group :development do
|
31
|
-
gem 'annotate', '~> 2.7.1' # add comments to models with db column information
|
32
36
|
gem 'better_errors' # better error pages in development
|
33
37
|
gem 'binding_of_caller' # repl on the error page
|
38
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
39
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
40
|
+
gem 'spring'
|
41
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
42
|
+
gem 'annotate', '~> 2.7.1' # add comments to models with db column information
|
34
43
|
gem 'letter_opener', '1.4.1' # for email tests in development
|
35
44
|
# gem 'rack-mini-profiler'
|
36
45
|
# gem 'flamegraph' # mini-profiler flamegraph extension (?pp=flamegraph)
|
@@ -41,12 +50,11 @@ group :test do
|
|
41
50
|
gem 'minitest-screenshot-reporter', '0.0.2' # generate screenshots on capybara errors
|
42
51
|
gem 'simplecov', require: false # generate coverage reports
|
43
52
|
gem 'simplecov-rcov', '0.2.3', require: false # generate coverage reports for jenkins
|
44
|
-
gem 'capybara', '2.
|
53
|
+
gem 'capybara', '2.12.1' # dsl for browser tests
|
45
54
|
gem 'capybara_minitest_spec', '1.0.5' # capybara rspec-style matchers (must_have...)
|
46
|
-
gem 'selenium-webdriver', '2.
|
55
|
+
gem 'selenium-webdriver', '3.2.2' # use real browser for webtests
|
47
56
|
gem 'poltergeist', '1.8.1' # headless tests with phantom.js
|
48
57
|
gem 'database_cleaner', '1.5.2' # cleanup test database after every integration test
|
49
|
-
gem 'nokogiri', '1.6.8' # todo problems installing 1.6.8.1 on mac
|
50
58
|
end
|
51
59
|
|
52
60
|
# put additional application-specific gems to Gemfile.local
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# README
|
2
2
|
|
3
3
|
This README would normally document whatever steps are necessary to get the
|
4
4
|
application up and running.
|
@@ -22,14 +22,3 @@ Things you may want to cover:
|
|
22
22
|
* Deployment instructions
|
23
23
|
|
24
24
|
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
29
|
-
|
30
|
-
|
31
|
-
## How-Tos
|
32
|
-
|
33
|
-
### Add executable to bin
|
34
|
-
|
35
|
-
bundle binstubs some-gem-name
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
+
//
|
4
|
+
//= require action_cable
|
5
|
+
//= require_self
|
6
|
+
//= require_tree ./channels
|
7
|
+
|
8
|
+
(function() {
|
9
|
+
this.App || (this.App = {});
|
10
|
+
|
11
|
+
App.cable = ActionCable.createConsumer();
|
12
|
+
|
13
|
+
}).call(this);
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// This file is automatically compiled by Webpack, along with any other files
|
2
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
3
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
4
|
+
// that code so it'll be compiled.
|
5
|
+
//
|
6
|
+
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
|
7
|
+
// layout file, like app/views/layouts/application.html.erb
|
8
|
+
|
9
|
+
import Vue from 'vue'
|
10
|
+
import Hello from './hello.vue'
|
11
|
+
|
12
|
+
new Vue({
|
13
|
+
el: '#app',
|
14
|
+
template: '<Hello/>',
|
15
|
+
components: { Hello }
|
16
|
+
});
|
17
|
+
|
@@ -7,8 +7,10 @@
|
|
7
7
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
8
8
|
|
9
9
|
<title><%= @config.class_name %></title>
|
10
|
-
<%%=
|
11
|
-
|
10
|
+
<%%= csrf_meta_tags %>
|
11
|
+
|
12
|
+
<%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': true %>
|
13
|
+
<%%= javascript_include_tag 'application', 'data-turbolinks-track': true %>
|
12
14
|
|
13
15
|
<style data-turbolinks-track="true"><%%= yield :stylesheets %></style>
|
14
16
|
|
@@ -18,14 +20,15 @@
|
|
18
20
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
19
21
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
20
22
|
<![endif]-->
|
21
|
-
|
22
|
-
<%%= csrf_meta_tags %>
|
23
23
|
</head>
|
24
24
|
<body>
|
25
25
|
<div id="content">
|
26
26
|
<%%= ui_flash_messages %>
|
27
27
|
<%%= content_for?(:content) ? yield(:content) : yield %>
|
28
|
+
|
29
|
+
<div id='app'></div>
|
28
30
|
</div>
|
31
|
+
<%= javascript_pack_tag 'application' %>
|
29
32
|
<script>
|
30
33
|
window.current_language = "<%%= I18n.locale %>";
|
31
34
|
window.date_format = "<%%= I18n.t('date.formats.datepicker') %>";
|
@@ -1,8 +1,12 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'
|
4
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
|
5
|
+
<style>
|
6
|
+
/* Email styles need to be inline */
|
7
|
+
</style>
|
5
8
|
</head>
|
9
|
+
|
6
10
|
<body>
|
7
11
|
<%= yield %>
|
8
12
|
</body>
|
@@ -1,4 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
2
|
+
begin
|
3
|
+
load File.expand_path('../spring', __FILE__)
|
4
|
+
rescue LoadError => e
|
5
|
+
raise unless e.message.include?('spring')
|
6
|
+
end
|
7
|
+
APP_PATH = File.expand_path('../config/application', __dir__)
|
3
8
|
require_relative '../config/boot'
|
4
9
|
require 'rails/commands'
|
@@ -1,29 +1,38 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
3
5
|
|
4
6
|
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../',
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
8
|
|
7
|
-
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
8
14
|
# This script is a starting point to setup your application.
|
9
|
-
# Add necessary setup steps to this file
|
15
|
+
# Add necessary setup steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
# Install JavaScript dependencies if using Yarn
|
22
|
+
# system('bin/yarn')
|
10
23
|
|
11
|
-
puts "== Installing dependencies =="
|
12
|
-
system "gem install bundler --conservative"
|
13
|
-
system "bundle check || bundle install"
|
14
24
|
|
15
25
|
# puts "\n== Copying sample files =="
|
16
|
-
# unless File.exist?(
|
17
|
-
#
|
26
|
+
# unless File.exist?('config/database.yml')
|
27
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
18
28
|
# end
|
19
29
|
|
20
30
|
puts "\n== Preparing database =="
|
21
|
-
system
|
31
|
+
system! 'bin/rails db:setup'
|
22
32
|
|
23
33
|
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system
|
25
|
-
system "rm -rf tmp/cache"
|
34
|
+
system! 'bin/rails log:clear tmp:clear'
|
26
35
|
|
27
36
|
puts "\n== Restarting application server =="
|
28
|
-
system
|
37
|
+
system! 'bin/rails restart'
|
29
38
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require 'rubygems'
|
8
|
+
require 'bundler'
|
9
|
+
|
10
|
+
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
11
|
+
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
12
|
+
if spring
|
13
|
+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
14
|
+
gem 'spring', spring.version
|
15
|
+
require 'spring/binstub'
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a way to update your development environment automatically.
|
15
|
+
# Add necessary update steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
puts "\n== Updating database =="
|
21
|
+
system! 'bin/rails db:migrate'
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system! 'bin/rails log:clear tmp:clear'
|
25
|
+
|
26
|
+
puts "\n== Restarting application server =="
|
27
|
+
system! 'bin/rails restart'
|
28
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'shellwords'
|
3
|
+
|
4
|
+
ENV['RAILS_ENV'] ||= 'development'
|
5
|
+
RAILS_ENV = ENV['RAILS_ENV']
|
6
|
+
|
7
|
+
ENV['NODE_ENV'] ||= RAILS_ENV
|
8
|
+
NODE_ENV = ENV['NODE_ENV']
|
9
|
+
|
10
|
+
APP_PATH = File.expand_path('../', __dir__)
|
11
|
+
ESCAPED_APP_PATH = APP_PATH.shellescape
|
12
|
+
|
13
|
+
SET_NODE_PATH = "NODE_PATH=#{ESCAPED_APP_PATH}/node_modules"
|
14
|
+
WEBPACK_BIN = "./node_modules/webpack/bin/webpack.js"
|
15
|
+
WEBPACK_CONFIG = "#{ESCAPED_APP_PATH}/config/webpack/#{NODE_ENV}.js"
|
16
|
+
|
17
|
+
Dir.chdir(APP_PATH) do
|
18
|
+
exec "#{SET_NODE_PATH} #{WEBPACK_BIN} --config #{WEBPACK_CONFIG} #{ARGV.join(" ")}"
|
19
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'shellwords'
|
3
|
+
|
4
|
+
ENV['RAILS_ENV'] ||= 'development'
|
5
|
+
RAILS_ENV = ENV['RAILS_ENV']
|
6
|
+
|
7
|
+
ENV['NODE_ENV'] ||= RAILS_ENV
|
8
|
+
NODE_ENV = ENV['NODE_ENV']
|
9
|
+
|
10
|
+
APP_PATH = File.expand_path('../', __dir__)
|
11
|
+
ESCAPED_APP_PATH = APP_PATH.shellescape
|
12
|
+
|
13
|
+
SET_NODE_PATH = "NODE_PATH=#{ESCAPED_APP_PATH}/node_modules"
|
14
|
+
WEBPACKER_BIN = "./node_modules/.bin/webpack-dev-server"
|
15
|
+
WEBPACK_CONFIG = "#{ESCAPED_APP_PATH}/config/webpack/#{NODE_ENV}.js"
|
16
|
+
|
17
|
+
# Warn the user if the configuration is not set
|
18
|
+
RAILS_ENV_CONFIG = File.join("config", "environments", "#{RAILS_ENV}.rb")
|
19
|
+
|
20
|
+
# Look into the environment file for a non-commented variable declaration
|
21
|
+
unless File.foreach(File.join(APP_PATH, RAILS_ENV_CONFIG)).detect { |line| line.match(/^\s*[^#]*config\.x\.webpacker\[\:dev_server_host\].*=/) }
|
22
|
+
puts "Warning: if you want to use webpack-dev-server, you need to tell Webpacker to serve asset packs from it. Please set config.x.webpacker[:dev_server_host] in #{RAILS_ENV_CONFIG}.\n\n"
|
23
|
+
end
|
24
|
+
|
25
|
+
Dir.chdir(APP_PATH) do
|
26
|
+
exec "#{SET_NODE_PATH} #{WEBPACKER_BIN} --config #{WEBPACK_CONFIG} --content-base #{ESCAPED_APP_PATH}/public/packs #{ARGV.join(" ")}"
|
27
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
VENDOR_PATH = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(VENDOR_PATH) do
|
4
|
+
begin
|
5
|
+
exec "yarnpkg #{ARGV.join(" ")}"
|
6
|
+
rescue Errno::ENOENT
|
7
|
+
puts "Yarn executable was not detected in the system."
|
8
|
+
puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
+
end
|
10
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
@@ -11,16 +11,5 @@ module <%= @config.class_name %>
|
|
11
11
|
# Settings in config/environments/* take precedence over those specified here.
|
12
12
|
# Application configuration should go into files in config/initializers
|
13
13
|
# -- all .rb files in that directory are automatically loaded.
|
14
|
-
|
15
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
-
|
19
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
-
# config.i18n.default_locale = :de
|
22
|
-
|
23
|
-
# Do not swallow errors in after_commit/after_rollback callbacks.
|
24
|
-
config.active_record.raise_in_transactional_callbacks = true
|
25
14
|
end
|
26
15
|
end
|
@@ -1,32 +1,21 @@
|
|
1
|
-
|
1
|
+
default: &default
|
2
2
|
adapter: postgresql
|
3
3
|
encoding: unicode
|
4
|
-
port: 5432
|
5
4
|
host: localhost
|
6
|
-
|
7
|
-
username:
|
8
|
-
password:
|
9
|
-
pool: 5
|
5
|
+
port: 5432
|
6
|
+
username: <%= ENV['DB_USER'] %>
|
7
|
+
password: <%= ENV['DB_PASSWORD'] %>
|
8
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
9
|
timeout: 5000
|
11
10
|
|
11
|
+
development:
|
12
|
+
<<: *default
|
13
|
+
database: <%= @config.app_name %>_development
|
14
|
+
|
12
15
|
test:
|
13
|
-
|
14
|
-
encoding: unicode
|
15
|
-
port: 5432
|
16
|
-
host: localhost
|
16
|
+
<<: *default
|
17
17
|
database: <%= @config.app_name %>_test
|
18
|
-
username: <%%= ENV['DB_USER'] %>
|
19
|
-
password: <%%= ENV['DB_PASSWORD'] %>
|
20
|
-
pool: 5
|
21
|
-
timeout: 5000
|
22
18
|
|
23
19
|
production:
|
24
|
-
|
25
|
-
encoding: unicode
|
26
|
-
port: 5432
|
27
|
-
host: localhost
|
20
|
+
<<: *default
|
28
21
|
database: <%= @config.app_name %>_production
|
29
|
-
username: <%%= ENV['DB_USER'] %>
|
30
|
-
password: <%%= ENV['DB_PASSWORD'] %>
|
31
|
-
pool: 15
|
32
|
-
timeout: 5000
|
@@ -1,4 +1,7 @@
|
|
1
1
|
Rails.application.configure do
|
2
|
+
# Make javascript_pack_tag load assets from webpack-dev-server.
|
3
|
+
config.x.webpacker[:dev_server_host] = "http://localhost:8080"
|
4
|
+
|
2
5
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
6
|
|
4
7
|
# In the development environment your application's code is reloaded on
|
@@ -9,13 +12,28 @@ Rails.application.configure do
|
|
9
12
|
# Do not eager load code on boot.
|
10
13
|
config.eager_load = false
|
11
14
|
|
12
|
-
# Show full error reports
|
13
|
-
config.consider_all_requests_local
|
14
|
-
|
15
|
+
# Show full error reports.
|
16
|
+
config.consider_all_requests_local = true
|
17
|
+
|
18
|
+
# Enable/disable caching. By default caching is disabled.
|
19
|
+
if Rails.root.join('tmp/caching-dev.txt').exist?
|
20
|
+
config.action_controller.perform_caching = true
|
21
|
+
|
22
|
+
config.cache_store = :memory_store
|
23
|
+
config.public_file_server.headers = {
|
24
|
+
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
|
25
|
+
}
|
26
|
+
else
|
27
|
+
config.action_controller.perform_caching = false
|
28
|
+
|
29
|
+
config.cache_store = :null_store
|
30
|
+
end
|
15
31
|
|
16
32
|
# Don't care if the mailer can't send.
|
17
33
|
config.action_mailer.raise_delivery_errors = false
|
18
34
|
|
35
|
+
config.action_mailer.perform_caching = false
|
36
|
+
|
19
37
|
# Print deprecation notices to the Rails logger.
|
20
38
|
config.active_support.deprecation = :log
|
21
39
|
|
@@ -27,18 +45,9 @@ Rails.application.configure do
|
|
27
45
|
# number of complex assets.
|
28
46
|
config.assets.debug = true
|
29
47
|
|
30
|
-
#
|
31
|
-
# yet still be able to expire them through the digest params.
|
32
|
-
config.assets.digest = true
|
33
|
-
|
34
|
-
# Less asset logs in development
|
48
|
+
# Suppress logger output for asset requests.
|
35
49
|
config.assets.quiet = true
|
36
50
|
|
37
|
-
# Adds additional error checking when serving assets at runtime.
|
38
|
-
# Checks for improperly declared sprockets dependencies.
|
39
|
-
# Raises helpful error messages.
|
40
|
-
config.assets.raise_runtime_errors = true
|
41
|
-
|
42
51
|
# Raises error for missing translations
|
43
52
|
# config.action_view.raise_on_missing_translations = true
|
44
53
|
|
@@ -48,4 +57,8 @@ Rails.application.configure do
|
|
48
57
|
# config.active_job.queue_adapter = :sidekiq
|
49
58
|
|
50
59
|
config.action_mailer.default_url_options = { host: 'http://localhost:3000' }
|
60
|
+
|
61
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
62
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
63
|
+
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
51
64
|
end
|