eivo-rails 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/eivo-rails.gemspec +1 -1
- data/lib/eivo-rails/environments/development.rb +1 -0
- data/lib/eivo-rails/environments/production.rb +23 -5
- data/lib/eivo-rails/environments/test.rb +1 -4
- data/lib/eivo-rails.rb +1 -1
- data/lib/generators/eivo/install_generator.rb +1 -1
- data/lib/generators/eivo/templates/.rubocop.yml +3 -0
- data/lib/generators/eivo/templates/Gemfile +4 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca46d12dee0811c4951252e10dddb9d692fbbdba1b9f5dce24cbcb59c1fe8ba
|
4
|
+
data.tar.gz: 70c082506f102740c152764b3add26b9edcd509d656fb7c51dc2f666de1ef7fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8582987e69c743f8489546d6f1c9da99c82c977f1b6d6015c34faf0f81f7262f1e6df4d976023060eaa5d63df707430a84e790176fbb82ddb67e40c52851180
|
7
|
+
data.tar.gz: a5f8a4074e606f92ab75493442682d5c3661a0f49fd322f6767eed0cbb132e4e6d99b8ddaa5cfb51faffd09b70aa218c6c51d3f80ab3fcb83b09572358e3e893
|
data/README.md
CHANGED
@@ -22,8 +22,8 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
If you don't have a Ruby On Rails project:
|
24
24
|
|
25
|
-
$ rails new ../example/ -d postgresql --skip-
|
26
|
-
|
25
|
+
$ rails new ../example/ -d postgresql --skip-action-mailer --skip-action-mailbox --skip-action-text --skip-active-storage --skip-action-cable --skip-spring --skip-turbolinks --skip-test --skip-system-test --skip-bootsnap
|
26
|
+
|
27
27
|
Then:
|
28
28
|
|
29
29
|
$ rails g eivo:install
|
data/eivo-rails.gemspec
CHANGED
@@ -21,6 +21,7 @@ module EIVO
|
|
21
21
|
# Run rails dev:cache to toggle caching.
|
22
22
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
23
23
|
config.action_controller.perform_caching = true
|
24
|
+
config.action_controller.enable_fragment_cache_logging = true
|
24
25
|
|
25
26
|
config.cache_store = :memory_store
|
26
27
|
config.public_file_server.headers = {
|
@@ -27,15 +27,12 @@ module EIVO
|
|
27
27
|
# Apache or NGINX already handles this.
|
28
28
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
29
29
|
|
30
|
-
# Compress
|
31
|
-
config.assets.js_compressor = :uglifier
|
30
|
+
# Compress CSS using a preprocessor.
|
32
31
|
# config.assets.css_compressor = :sass
|
33
32
|
|
34
33
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
35
34
|
config.assets.compile = false
|
36
35
|
|
37
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
38
|
-
|
39
36
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
40
37
|
# config.action_controller.asset_host = 'http://assets.example.com'
|
41
38
|
|
@@ -58,7 +55,7 @@ module EIVO
|
|
58
55
|
|
59
56
|
# Use a real queuing backend for Active Job (and separate queues per environment)
|
60
57
|
# config.active_job.queue_adapter = :resque
|
61
|
-
# config.active_job.queue_name_prefix = "
|
58
|
+
# config.active_job.queue_name_prefix = "example_#{Rails.env}"
|
62
59
|
|
63
60
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
64
61
|
# the I18n.default_locale when a translation cannot be found).
|
@@ -82,6 +79,27 @@ module EIVO
|
|
82
79
|
|
83
80
|
# Do not dump schema after migrations.
|
84
81
|
config.active_record.dump_schema_after_migration = false
|
82
|
+
|
83
|
+
# Inserts middleware to perform automatic connection switching.
|
84
|
+
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
85
|
+
# middleware. The `delay` is used to determine how long to wait after a write
|
86
|
+
# to send a subsequent read to the primary.
|
87
|
+
#
|
88
|
+
# The `database_resolver` class is used by the middleware to determine which
|
89
|
+
# database is appropriate to use based on the time delay.
|
90
|
+
#
|
91
|
+
# The `database_resolver_context` class is used by the middleware to set
|
92
|
+
# timestamps for the last write to the primary. The resolver uses the context
|
93
|
+
# class timestamps to determine how long to wait before reading from the
|
94
|
+
# replica.
|
95
|
+
#
|
96
|
+
# By default Rails will store a last write timestamp in the session. The
|
97
|
+
# DatabaseSelector middleware is designed as such you can define your own
|
98
|
+
# strategy for connection switching and pass that into the middleware through
|
99
|
+
# these configuration options.
|
100
|
+
# config.active_record.database_selector = { delay: 2.seconds }
|
101
|
+
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
102
|
+
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
85
103
|
end
|
86
104
|
end
|
87
105
|
end
|
@@ -6,10 +6,6 @@ module EIVO
|
|
6
6
|
Rails.application.configure do
|
7
7
|
# Settings specified here will take precedence over those in config/application.rb.
|
8
8
|
|
9
|
-
# The test environment is used exclusively to run your application's
|
10
|
-
# test suite. You never need to work with it otherwise. Remember that
|
11
|
-
# your test database is "scratch space" for the test suite and is wiped
|
12
|
-
# and recreated between test runs. Don't rely on the data there!
|
13
9
|
config.cache_classes = true
|
14
10
|
|
15
11
|
# Do not eager load code on boot. This avoids loading your whole application
|
@@ -26,6 +22,7 @@ module EIVO
|
|
26
22
|
# Show full error reports and disable caching.
|
27
23
|
config.consider_all_requests_local = true
|
28
24
|
config.action_controller.perform_caching = false
|
25
|
+
config.cache_store = :null_store
|
29
26
|
|
30
27
|
# Raise exceptions instead of rendering exception templates.
|
31
28
|
config.action_dispatch.show_exceptions = false
|
data/lib/eivo-rails.rb
CHANGED
@@ -10,7 +10,7 @@ require_relative 'eivo-rails/engine'
|
|
10
10
|
module EIVO
|
11
11
|
class << self
|
12
12
|
def configure(application)
|
13
|
-
application.config.load_defaults
|
13
|
+
application.config.load_defaults 6.0
|
14
14
|
application.config.require_master_key = true
|
15
15
|
|
16
16
|
application.config.generators do |g|
|
@@ -5,12 +5,11 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
5
5
|
|
6
6
|
ruby '2.6.3'
|
7
7
|
|
8
|
-
gem 'rails', '~>
|
8
|
+
gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
|
9
9
|
gem 'pg', '>= 0.18', '< 2.0'
|
10
|
-
gem 'puma', '~>
|
11
|
-
gem 'sass-rails', '
|
12
|
-
gem '
|
13
|
-
gem 'mini_racer', platforms: :ruby
|
10
|
+
gem 'puma', '~> 4.1'
|
11
|
+
gem 'sass-rails', '>= 6'
|
12
|
+
gem 'webpacker', '~> 4.0'
|
14
13
|
|
15
14
|
group :development, :test do
|
16
15
|
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eivo-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan VUKOVICH-TRIBOUHARET
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
|
-
rubygems_version: 3.0.
|
189
|
+
rubygems_version: 3.0.6
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: EIVO Rails
|