mvpkit 0.8.1 → 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/VERSION +1 -1
- data/bin/mvp +0 -1
- data/mvpkit.gemspec +71 -50
- data/package.json +1 -0
- data/project/.babelrc +3 -0
- data/project/.env +15 -0
- data/project/.gitignore +15 -40
- data/project/.iteration +3 -0
- data/project/Gemfile +43 -19
- data/project/Gemfile.lock +237 -165
- data/project/Procfile +2 -1
- data/project/README.md +0 -1
- data/project/app/assets/config/manifest.js +2 -0
- data/project/app/assets/javascripts/application.js +5 -0
- data/project/app/assets/javascripts/templates.js.erb +14 -0
- data/project/app/assets/stylesheets/application.scss +2 -0
- data/project/app/controllers/application_controller.rb +25 -5
- data/project/app/helpers/application_helper.rb +17 -4
- data/project/app/mailers/application_mailer.rb +5 -0
- data/project/app/templates/README.txt +1 -0
- data/project/app/templates/examples/template.mustache +1 -0
- data/project/app/views/examples/mustache.html.erb +25 -3
- data/project/app/views/layouts/_header.html.erb +22 -14
- data/project/app/views/layouts/_notifications.html.erb +10 -0
- data/project/app/views/layouts/application.html.erb +22 -11
- data/project/app/views/layouts/mailer.html.erb +5 -0
- data/project/app/views/layouts/mailer.text.erb +1 -0
- data/project/app/webpack/javascripts/behaviors/example.js +21 -0
- data/project/app/webpack/javascripts/controllers/home.js +15 -0
- data/project/app/webpack/javascripts/lib/clientsidevalidations.js +3 -0
- data/project/app/webpack/javascripts/lib/selectize.js +1 -0
- data/project/app/webpack/javascripts/pack.js +47 -0
- data/project/app/webpack/stylesheets/config/variables.scss +41 -0
- data/project/app/webpack/stylesheets/init/reset.scss +48 -0
- data/project/app/webpack/stylesheets/layout/main.scss +7 -0
- data/project/app/webpack/stylesheets/pack.scss +20 -0
- data/project/app/webpack/stylesheets/skin/alerts.scss +3 -0
- data/project/app/webpack/stylesheets/skin/buttons.scss +38 -0
- data/project/app/webpack/stylesheets/skin/hero.scss +45 -0
- data/project/app/webpack/stylesheets/skin/images.scss +13 -0
- data/project/app/webpack/stylesheets/skin/progress.scss +3 -0
- data/project/app/webpack/stylesheets/skin/selectize.scss +30 -0
- data/project/{assets/stylesheets/lib → app/webpack/stylesheets/skin}/spacing.scss +0 -2
- data/project/app/webpack/stylesheets/skin/tables.scss +10 -0
- data/project/app/webpack/stylesheets/skin/treatments.scss +3 -0
- data/project/app/webpack/stylesheets/skin/turbolinks.scss +4 -0
- data/project/app/webpack/stylesheets/skin/typography.scss +116 -0
- data/project/bin/rails +1 -6
- data/project/bin/rake +0 -5
- data/project/bin/setup +17 -17
- data/project/bin/update +29 -0
- data/project/config/application.rb +5 -4
- data/project/config/boot.rb +1 -1
- data/project/config/cable.yml +9 -0
- data/project/config/environment.rb +1 -1
- data/project/config/environments/development.rb +29 -26
- data/project/config/environments/production.rb +32 -19
- data/project/config/environments/test.rb +6 -6
- data/project/config/initializers/algolia.rb +7 -0
- data/project/config/initializers/application_controller_renderer.rb +6 -0
- data/project/config/initializers/assets.rb +23 -2
- data/project/config/initializers/client_side_validations.rb +20 -0
- data/project/config/initializers/cookies_serializer.rb +2 -0
- data/project/config/initializers/date_formats.rb +6 -0
- data/project/config/initializers/fingerprint.rb +1 -0
- data/project/config/initializers/geocoder.rb +9 -0
- data/project/config/initializers/new_framework_defaults.rb +23 -0
- data/project/config/initializers/rails_admin.rb +13 -7
- data/project/config/initializers/sidekiq.rb +19 -0
- data/project/config/initializers/simple_form.rb +2 -0
- data/project/config/initializers/stripe.rb +8 -0
- data/project/config/initializers/wrap_parameters.rb +2 -2
- data/project/config/puma.rb +47 -0
- data/project/config/routes.rb +4 -2
- data/project/config/secrets.yml +17 -3
- data/project/config/sidekiq.yml +6 -0
- data/project/config/spring.rb +6 -0
- data/project/config/stripe/coupons.rb +39 -0
- data/project/config/stripe/plans.rb +32 -0
- data/project/lib/tasks/heroku.rake +10 -2
- data/project/lib/tasks/migrations.rake +3 -0
- data/project/package.json +19 -28
- data/project/public/favicon.ico +0 -0
- data/project/webpack.config.js +62 -53
- metadata +70 -49
- data/project/app/decorators/.keep +0 -0
- data/project/app/mailers/.keep +0 -0
- data/project/app/views/layouts/_includes.html.erb +0 -7
- data/project/app/views/layouts/modal.html.erb +0 -14
- data/project/assets/images/.keep +0 -0
- data/project/assets/images/favicon.ico +0 -0
- data/project/assets/javascripts/controllers/home.coffee +0 -15
- data/project/assets/javascripts/pack.js +0 -9
- data/project/assets/stylesheets/config/variables.scss +0 -876
- data/project/assets/stylesheets/layout/basic.scss +0 -6
- data/project/assets/stylesheets/layout/carousel.scss +0 -127
- data/project/assets/stylesheets/layout/cover.scss +0 -129
- data/project/assets/stylesheets/skin/style.scss +0 -16
- data/project/assets/stylesheets/style.scss +0 -8
- data/project/config/initializers/mustache.rb +0 -7
- data/project/log/development.log +0 -48216
- data/project/log/production.log +0 -0
- data/project/public/404.html +0 -67
- data/project/public/422.html +0 -67
- data/project/public/500.html +0 -66
- data/project/public/assets/javascripts/448c34a56d699c29117adc64c43affeb.woff2 +0 -0
- data/project/public/assets/javascripts/89889688147bd7575d6327160d64e760.svg +0 -288
- data/project/public/assets/javascripts/e18bbf611f2a2e43afc071aa2f4e1512.ttf +0 -0
- data/project/public/assets/javascripts/f4769f9bdb7466be65088239c12046d1.eot +0 -0
- data/project/public/assets/javascripts/fa2772327f55d8198301fdb8bcfc8158.woff +0 -0
- data/project/public/assets/javascripts/pack.js +0 -31367
- data/project/public/assets/javascripts/pack.js.map +0 -1
- data/project/public/assets/pack.js +0 -17220
- data/project/public/assets/style.css +0 -7477
- /data/app/views/layouts/{minimum_viable_product → mvp}/_instrumentation.html.erb +0 -0
- /data/app/views/layouts/{minimum_viable_product → mvp}/_meta.html.erb +0 -0
- /data/app/views/layouts/{minimum_viable_product → mvp}/application.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/_example.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap/_buttons.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap/_forms.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap/_header.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap/_panels.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap/_tables.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap/_typography.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/bootstrap.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/elements/_grouping.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/elements/partials/_row_groups_of.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/index.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/layouts/basic.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/layouts/carousel.html.erb +0 -0
- /data/app/views/{minimum_viable_product → mvp}/styleguide/layouts/cover.html.erb +0 -0
@@ -0,0 +1,116 @@
|
|
1
|
+
@import url('https://fonts.googleapis.com/css?family=Lato:400,900|Open+Sans:400,700');
|
2
|
+
|
3
|
+
.text-no-underline {
|
4
|
+
text-decoration: none !important;
|
5
|
+
}
|
6
|
+
|
7
|
+
.text-underline {
|
8
|
+
text-decoration: underline !important;
|
9
|
+
}
|
10
|
+
|
11
|
+
.text-nowrap {
|
12
|
+
white-space: nowrap;
|
13
|
+
}
|
14
|
+
|
15
|
+
.text-black {
|
16
|
+
color: #000;
|
17
|
+
&:hover {
|
18
|
+
color: #000;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
.text-grey {
|
23
|
+
color: $color-grey;
|
24
|
+
}
|
25
|
+
|
26
|
+
.text-grey2 {
|
27
|
+
color: $color-grey2;
|
28
|
+
}
|
29
|
+
|
30
|
+
.text-grey3 {
|
31
|
+
color: $color-grey3;
|
32
|
+
}
|
33
|
+
|
34
|
+
.text-grey4 {
|
35
|
+
color: $color-grey4;
|
36
|
+
}
|
37
|
+
|
38
|
+
.text-grey5 {
|
39
|
+
color: $color-grey5;
|
40
|
+
}
|
41
|
+
|
42
|
+
.text-grey6 {
|
43
|
+
color: $color-grey6;
|
44
|
+
}
|
45
|
+
|
46
|
+
.anchor {
|
47
|
+
display: block;
|
48
|
+
position: relative;
|
49
|
+
top: -70px;
|
50
|
+
visibility: hidden;
|
51
|
+
}
|
52
|
+
|
53
|
+
body {
|
54
|
+
font-family: 'Open Sans', sans-serif;
|
55
|
+
font-size: 14px;
|
56
|
+
line-height: 24px;
|
57
|
+
}
|
58
|
+
|
59
|
+
small {
|
60
|
+
font-size: 10px;
|
61
|
+
line-height: 18px;
|
62
|
+
}
|
63
|
+
|
64
|
+
p.lead {
|
65
|
+
font-size: 18px;
|
66
|
+
line-height: 24px;
|
67
|
+
}
|
68
|
+
|
69
|
+
h1 {
|
70
|
+
font-family: 'Lato', sans-serif;
|
71
|
+
font-weight: 800;
|
72
|
+
font-size: 52px;
|
73
|
+
line-height: 67px;
|
74
|
+
// font-size: 40px;
|
75
|
+
// line-height: 48px;
|
76
|
+
}
|
77
|
+
|
78
|
+
h2 {
|
79
|
+
font-family: 'Lato', sans-serif;
|
80
|
+
font-weight: 800;
|
81
|
+
font-size: 40px;
|
82
|
+
line-height: 48px;
|
83
|
+
// font-size: 28px;
|
84
|
+
// line-height: 34px;
|
85
|
+
}
|
86
|
+
|
87
|
+
h3 {
|
88
|
+
font-family: 'Lato', sans-serif;
|
89
|
+
font-weight: 800;
|
90
|
+
// font-size: 28px;
|
91
|
+
// line-height: 34px;
|
92
|
+
font-size: 34px;
|
93
|
+
line-height: 42px;
|
94
|
+
}
|
95
|
+
|
96
|
+
h4 {
|
97
|
+
font-family: 'Lato', sans-serif;
|
98
|
+
font-weight: 900;
|
99
|
+
// font-size: 20px;
|
100
|
+
// line-height: 26px;
|
101
|
+
font-size: 28px;
|
102
|
+
line-height: 34px;
|
103
|
+
}
|
104
|
+
|
105
|
+
h5 {
|
106
|
+
font-family: 'Lato', sans-serif;
|
107
|
+
font-weight: 700;
|
108
|
+
text-transform: uppercase;
|
109
|
+
font-size: 20px;
|
110
|
+
line-height: 26px;
|
111
|
+
}
|
112
|
+
|
113
|
+
h6 {
|
114
|
+
font-family: 'Lato', sans-serif;
|
115
|
+
font-weight: 700;
|
116
|
+
}
|
data/project/bin/rails
CHANGED
@@ -1,9 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
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', __FILE__)
|
2
|
+
APP_PATH = File.expand_path('../config/application', __dir__)
|
8
3
|
require_relative '../config/boot'
|
9
4
|
require 'rails/commands'
|
data/project/bin/rake
CHANGED
data/project/bin/setup
CHANGED
@@ -1,32 +1,32 @@
|
|
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
|
-
|
8
|
-
|
9
|
-
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
system
|
13
|
+
chdir APP_ROOT do
|
14
|
+
puts '== Installing dependencies =='
|
15
|
+
system! 'gem install bundler --conservative'
|
16
|
+
system('bundle check') || system!('bundle install')
|
17
|
+
system('npm install')
|
14
18
|
|
15
19
|
# puts "\n== Copying sample files =="
|
16
|
-
# unless File.exist?(
|
17
|
-
#
|
20
|
+
# unless File.exist?('config/database.yml')
|
21
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
18
22
|
# end
|
19
23
|
|
20
24
|
puts "\n== Preparing database =="
|
21
|
-
system
|
25
|
+
system! 'bin/rails db:setup'
|
22
26
|
|
23
27
|
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system
|
25
|
-
system "rm -rf tmp/cache"
|
26
|
-
|
27
|
-
puts "\n== Installing Node Modules =="
|
28
|
-
system "npm install"
|
28
|
+
system! 'bin/rails log:clear tmp:clear'
|
29
29
|
|
30
|
-
puts "\n==
|
31
|
-
system
|
30
|
+
puts "\n== Restarting application server =="
|
31
|
+
system! 'bin/rails restart'
|
32
32
|
end
|
data/project/bin/update
ADDED
@@ -0,0 +1,29 @@
|
|
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
|
+
|
21
|
+
puts "\n== Updating database =="
|
22
|
+
system! 'bin/rails db:migrate'
|
23
|
+
|
24
|
+
puts "\n== Removing old logs and tempfiles =="
|
25
|
+
system! 'bin/rails log:clear tmp:clear'
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system! 'bin/rails restart'
|
29
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
@@ -8,7 +8,8 @@ Bundler.require(*Rails.groups)
|
|
8
8
|
|
9
9
|
module Project
|
10
10
|
class Application < Rails::Application
|
11
|
-
config.
|
11
|
+
# config.middleware.use Rack::Static, :urls => ["/javascripts", "/stylesheets", "/images", "/assets"], :root => "public"
|
12
|
+
|
12
13
|
config.active_record.raise_in_transactional_callbacks = true
|
13
14
|
config.generators do |g|
|
14
15
|
g.helper false
|
@@ -21,8 +22,8 @@ module Project
|
|
21
22
|
g.stylesheets false
|
22
23
|
g.test_framework false
|
23
24
|
end
|
24
|
-
|
25
|
-
config.
|
25
|
+
config.exceptions_app = self.routes
|
26
|
+
config.paths["app/views"].unshift("#{Rails.root}/app/templates")
|
26
27
|
|
27
28
|
_host = ENV['HOST_DOMAIN'] || "localhost"
|
28
29
|
_port = ENV['HOST_PORT'] || "3000"
|
data/project/config/boot.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
if defined? BetterErrors
|
2
|
+
BetterErrors.editor = "atm://open?url=file://%{file}&line=%{line}"
|
3
|
+
end
|
4
|
+
|
1
5
|
Rails.application.configure do
|
2
6
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
7
|
|
@@ -9,12 +13,25 @@ Rails.application.configure do
|
|
9
13
|
# Do not eager load code on boot.
|
10
14
|
config.eager_load = false
|
11
15
|
|
12
|
-
# Show full error reports
|
13
|
-
config.consider_all_requests_local
|
14
|
-
|
16
|
+
# Show full error reports.
|
17
|
+
config.consider_all_requests_local = true
|
18
|
+
|
19
|
+
# Enable/disable caching. By default caching is disabled.
|
20
|
+
if Rails.root.join('tmp/caching-dev.txt').exist?
|
21
|
+
config.action_controller.perform_caching = true
|
22
|
+
|
23
|
+
config.cache_store = :memory_store
|
24
|
+
config.public_file_server.headers = {
|
25
|
+
'Cache-Control' => 'public, max-age=172800'
|
26
|
+
}
|
27
|
+
else
|
28
|
+
config.action_controller.perform_caching = false
|
29
|
+
|
30
|
+
config.cache_store = :null_store
|
31
|
+
end
|
15
32
|
|
16
33
|
# Don't care if the mailer can't send.
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
34
|
+
# config.action_mailer.raise_delivery_errors = false
|
18
35
|
if ENV['DELIVER_MAIL']=='true'
|
19
36
|
puts
|
20
37
|
puts
|
@@ -28,40 +45,26 @@ Rails.application.configure do
|
|
28
45
|
config.action_mailer.delivery_method = :letter_opener
|
29
46
|
end
|
30
47
|
|
48
|
+
config.action_mailer.perform_caching = false
|
49
|
+
|
31
50
|
# Print deprecation notices to the Rails logger.
|
32
51
|
config.active_support.deprecation = :log
|
33
52
|
|
34
53
|
# Raise an error on page load if there are pending migrations.
|
35
54
|
config.active_record.migration_error = :page_load
|
36
55
|
|
37
|
-
# Disable serving static files from the `/public` folder by default since
|
38
|
-
# Apache or NGINX already handles this.
|
39
|
-
config.serve_static_files = true
|
40
|
-
|
41
|
-
# Compress JavaScripts and CSS.
|
42
|
-
# config.assets.js_compressor = :uglifier
|
43
|
-
# config.assets.css_compressor = :sass
|
44
|
-
|
45
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
46
|
-
config.assets.compile = true
|
47
|
-
|
48
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
49
|
-
# yet still be able to expire them through the digest params.
|
50
|
-
config.assets.digest = true
|
51
|
-
|
52
56
|
# Debug mode disables concatenation and preprocessing of assets.
|
53
57
|
# This option may cause significant delays in view rendering with a large
|
54
58
|
# number of complex assets.
|
55
59
|
config.assets.debug = true
|
56
60
|
|
57
|
-
#
|
58
|
-
config.assets.quiet =
|
59
|
-
|
60
|
-
# Adds additional error checking when serving assets at runtime.
|
61
|
-
# Checks for improperly declared sprockets dependencies.
|
62
|
-
# Raises helpful error messages.
|
63
|
-
config.assets.raise_runtime_errors = true
|
61
|
+
# Suppress logger output for asset requests.
|
62
|
+
config.assets.quiet = false
|
64
63
|
|
65
64
|
# Raises error for missing translations
|
66
65
|
# config.action_view.raise_on_missing_translations = true
|
66
|
+
|
67
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
68
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
69
|
+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
67
70
|
end
|
@@ -14,52 +14,55 @@ Rails.application.configure do
|
|
14
14
|
config.consider_all_requests_local = false
|
15
15
|
config.action_controller.perform_caching = true
|
16
16
|
|
17
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
-
# For large-scale production use, consider using a caching reverse proxy like
|
20
|
-
# NGINX, varnish or squid.
|
21
|
-
# config.action_dispatch.rack_cache = true
|
22
|
-
|
23
17
|
# Disable serving static files from the `/public` folder by default since
|
24
18
|
# Apache or NGINX already handles this.
|
25
|
-
config.
|
19
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
20
|
|
27
21
|
# Compress JavaScripts and CSS.
|
28
|
-
config.assets.js_compressor = :uglifier
|
22
|
+
# config.assets.js_compressor = :uglifier
|
29
23
|
# config.assets.css_compressor = :sass
|
30
24
|
|
31
25
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
26
|
config.assets.compile = false
|
33
27
|
|
34
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
-
# yet still be able to expire them through the digest params.
|
36
|
-
config.assets.digest = true
|
37
|
-
|
38
28
|
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
39
29
|
|
30
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
31
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
32
|
+
|
40
33
|
# Specifies the header that your server uses for sending files.
|
41
34
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
42
35
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
43
36
|
|
37
|
+
# Mount Action Cable outside main process or domain
|
38
|
+
# config.action_cable.mount_path = nil
|
39
|
+
# config.action_cable.url = 'wss://example.com/cable'
|
40
|
+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
41
|
+
|
44
42
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
45
|
-
#
|
43
|
+
# config.force_ssl = true
|
46
44
|
|
47
45
|
# Use the lowest log level to ensure availability of diagnostic information
|
48
46
|
# when problems arise.
|
49
47
|
config.log_level = :debug
|
50
48
|
|
51
49
|
# Prepend all log lines with the following tags.
|
52
|
-
|
53
|
-
|
54
|
-
# Use a different logger for distributed setups.
|
55
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
50
|
+
config.log_tags = [ :request_id ]
|
56
51
|
|
57
52
|
# Use a different cache store in production.
|
58
53
|
# config.cache_store = :mem_cache_store
|
54
|
+
if ENV["MEMCACHEDCLOUD_SERVERS"]
|
55
|
+
config.cache_store = :dalli_store, ENV["MEMCACHEDCLOUD_SERVERS"].split(','), { :username => ENV["MEMCACHEDCLOUD_USERNAME"], :password => ENV["MEMCACHEDCLOUD_PASSWORD"] }
|
56
|
+
end
|
59
57
|
|
60
|
-
#
|
61
|
-
# config.
|
58
|
+
# Use a real queuing backend for Active Job (and separate queues per environment)
|
59
|
+
# config.active_job.queue_adapter = :resque
|
60
|
+
# config.active_job.queue_name_prefix = "__PROJECT_NAME_SLUG___#{Rails.env}"
|
61
|
+
config.action_mailer.perform_caching = false
|
62
62
|
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
63
66
|
# Ignore bad email addresses and do not raise email delivery errors.
|
64
67
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
68
|
# config.action_mailer.raise_delivery_errors = false
|
@@ -88,6 +91,16 @@ Rails.application.configure do
|
|
88
91
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
89
92
|
config.log_formatter = ::Logger::Formatter.new
|
90
93
|
|
94
|
+
# Use a different logger for distributed setups.
|
95
|
+
# require 'syslog/logger'
|
96
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
97
|
+
|
98
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
99
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
100
|
+
logger.formatter = config.log_formatter
|
101
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
102
|
+
end
|
103
|
+
|
91
104
|
# Do not dump schema after migrations.
|
92
105
|
config.active_record.dump_schema_after_migration = false
|
93
106
|
end
|
@@ -12,9 +12,11 @@ Rails.application.configure do
|
|
12
12
|
# preloads Rails for running tests, you may have to set it to true.
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
|
-
# Configure
|
16
|
-
config.
|
17
|
-
config.
|
15
|
+
# Configure public file server for tests with Cache-Control for performance.
|
16
|
+
config.public_file_server.enabled = true
|
17
|
+
config.public_file_server.headers = {
|
18
|
+
'Cache-Control' => 'public, max-age=3600'
|
19
|
+
}
|
18
20
|
|
19
21
|
# Show full error reports and disable caching.
|
20
22
|
config.consider_all_requests_local = true
|
@@ -25,15 +27,13 @@ Rails.application.configure do
|
|
25
27
|
|
26
28
|
# Disable request forgery protection in test environment.
|
27
29
|
config.action_controller.allow_forgery_protection = false
|
30
|
+
config.action_mailer.perform_caching = false
|
28
31
|
|
29
32
|
# Tell Action Mailer not to deliver emails to the real world.
|
30
33
|
# The :test delivery method accumulates sent emails in the
|
31
34
|
# ActionMailer::Base.deliveries array.
|
32
35
|
config.action_mailer.delivery_method = :test
|
33
36
|
|
34
|
-
# Randomize the order test cases are executed.
|
35
|
-
config.active_support.test_order = :random
|
36
|
-
|
37
37
|
# Print deprecation notices to the stderr.
|
38
38
|
config.active_support.deprecation = :stderr
|
39
39
|
|
@@ -1,11 +1,32 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
|
+
# ExecJS.runtime = ExecJS::Runtimes::Node
|
2
3
|
|
3
4
|
# Version of your assets, change this if you want to expire all your assets.
|
4
5
|
Rails.application.config.assets.version = '1.0'
|
5
6
|
|
6
7
|
# Add additional assets to the asset load path
|
7
|
-
Rails.application.config.assets.paths
|
8
|
+
Rails.application.config.assets.paths += [
|
9
|
+
Rails.root.join('public', 'assets', 'javascripts'),
|
10
|
+
Rails.root.join('node_modules')
|
11
|
+
]
|
12
|
+
|
13
|
+
# Rails.application.config.assets.digest = true
|
14
|
+
# Rails.application.config.assets.enabled = true
|
15
|
+
Rails.application.config.assets.initialize_on_precompile = true
|
8
16
|
|
9
17
|
# Precompile additional assets.
|
10
18
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
-
|
19
|
+
|
20
|
+
# Extended control, from http://9elements.com/io/babel-rails-5-and-sprockets-4/
|
21
|
+
# Rails.application.config.assets.configure do |env|
|
22
|
+
# Sprockets::Commoner::Processor.configure(env,
|
23
|
+
# # include, exclude, and babel_exclude patterns can be path prefixes or regexes.
|
24
|
+
# # Explicitely list paths to include. The default is `[env.root]`
|
25
|
+
# include: ['app/assets/javascripts/subdirectory'],
|
26
|
+
# # List files to ignore and not process require calls or apply any Babel transforms to. Default is ['vendor/bundle'].
|
27
|
+
# exclude: ['vendor/bundle', /ignored/],
|
28
|
+
# # Anything listed in babel_exclude has its require calls resolved, but no transforms listed in .babelrcs applied.
|
29
|
+
# # Default is [/node_modules/]
|
30
|
+
# babel_exclude: [/node_modules/]
|
31
|
+
# )
|
32
|
+
# end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# ClientSideValidations Initializer
|
2
|
+
|
3
|
+
# Disabled validators
|
4
|
+
# ClientSideValidations::Config.disabled_validators = []
|
5
|
+
|
6
|
+
# Uncomment to validate number format with current I18n locale
|
7
|
+
# ClientSideValidations::Config.number_format_with_locale = true
|
8
|
+
|
9
|
+
# Uncomment the following block if you want each input field to have the validation messages attached.
|
10
|
+
#
|
11
|
+
# Note: client_side_validation requires the error to be encapsulated within
|
12
|
+
# <label for="#{instance.send(:tag_id)}" class="message"></label>
|
13
|
+
#
|
14
|
+
# ActionView::Base.field_error_proc = proc do |html_tag, instance|
|
15
|
+
# if html_tag =~ /^<label/
|
16
|
+
# %(<div class="field_with_errors">#{html_tag}</div>).html_safe
|
17
|
+
# else
|
18
|
+
# %(<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>).html_safe
|
19
|
+
# end
|
20
|
+
# end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
Time::DATE_FORMATS[:date_short] = '%m/%d/%Y'
|
2
|
+
Time::DATE_FORMATS[:month_and_year] = '%B %Y'
|
3
|
+
Time::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") }
|
4
|
+
|
5
|
+
Date::DATE_FORMATS[:month_and_year] = '%B %Y'
|
6
|
+
Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") }
|
@@ -0,0 +1 @@
|
|
1
|
+
ASSET_FINGERPRINT = "b7cfa8d0071066f66c2f"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains migration options to ease your Rails 5.0 upgrade.
|
4
|
+
#
|
5
|
+
# Once upgraded flip defaults one by one to migrate to the new default.
|
6
|
+
#
|
7
|
+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
8
|
+
|
9
|
+
# Enable per-form CSRF tokens. Previous versions had false.
|
10
|
+
Rails.application.config.action_controller.per_form_csrf_tokens = false
|
11
|
+
|
12
|
+
# Enable origin-checking CSRF mitigation. Previous versions had false.
|
13
|
+
Rails.application.config.action_controller.forgery_protection_origin_check = false
|
14
|
+
|
15
|
+
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
|
16
|
+
# Previous versions had false.
|
17
|
+
ActiveSupport.to_time_preserves_timezone = false
|
18
|
+
|
19
|
+
# Require `belongs_to` associations by default. Previous versions had false.
|
20
|
+
Rails.application.config.active_record.belongs_to_required_by_default = false
|
21
|
+
|
22
|
+
# Do not halt callback chains when a callback returns false. Previous versions had true.
|
23
|
+
ActiveSupport.halt_callback_chains_on_return_false = true
|
@@ -1,11 +1,5 @@
|
|
1
1
|
RailsAdmin.config do |config|
|
2
|
-
|
3
|
-
if ENV["ADMIN_USER"] && ENV["ADMIN_PASSWORD"]
|
4
|
-
authenticate_or_request_with_http_basic('Site Message') do |username, password|
|
5
|
-
username == ENV["ADMIN_USER"] && password == ENV["ADMIN_PASSWORD"]
|
6
|
-
end
|
7
|
-
end
|
8
|
-
end
|
2
|
+
|
9
3
|
### Popular gems integration
|
10
4
|
|
11
5
|
## == Devise ==
|
@@ -19,12 +13,24 @@ RailsAdmin.config do |config|
|
|
19
13
|
|
20
14
|
## == Pundit ==
|
21
15
|
# config.authorize_with :pundit
|
16
|
+
config.authorize_with do
|
17
|
+
admin = begin
|
18
|
+
!!User.find(session[:user_id]).try(:is_admin)
|
19
|
+
rescue
|
20
|
+
false
|
21
|
+
end
|
22
|
+
redirect_to "/" unless admin
|
23
|
+
end
|
22
24
|
|
23
25
|
## == PaperTrail ==
|
24
26
|
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
|
25
27
|
|
26
28
|
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
|
27
29
|
|
30
|
+
## == Gravatar integration ==
|
31
|
+
## To disable Gravatar integration in Navigation Bar set to false
|
32
|
+
# config.show_gravatar true
|
33
|
+
|
28
34
|
config.actions do
|
29
35
|
dashboard # mandatory
|
30
36
|
index # mandatory
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# url = URI.parse(ENV["OPENREDIS_URL"] || "redis://127.0.0.1:6379")
|
2
|
+
|
3
|
+
Sidekiq.configure_server do |config|
|
4
|
+
config.redis = { url: ENV["REDIS_URL"],
|
5
|
+
namespace: '___PROJECT_NAME_SLUG___sidekiq' }
|
6
|
+
end
|
7
|
+
|
8
|
+
Sidekiq.configure_client do |config|
|
9
|
+
config.redis = { url: ENV["REDIS_URL"],
|
10
|
+
namespace: '___PROJECT_NAME_SLUG___sidekiq' }
|
11
|
+
end
|
12
|
+
|
13
|
+
# Perform Sidekiq jobs immediately in development,
|
14
|
+
# so you don't have to run a separate process.
|
15
|
+
# You'll also benefit from code reloading.
|
16
|
+
if ENV['RESQUE'] == "inline"
|
17
|
+
require 'sidekiq/testing'
|
18
|
+
Sidekiq::Testing.inline!
|
19
|
+
end
|