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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fc14635a89044b193176551563761a94449587ee12f9fe5c49ea729db831a66
4
- data.tar.gz: 860a73ed10c553c9e32ba83493ded68c889fa98a9bf4979cc91a019f8995ef01
3
+ metadata.gz: 1ca46d12dee0811c4951252e10dddb9d692fbbdba1b9f5dce24cbcb59c1fe8ba
4
+ data.tar.gz: 70c082506f102740c152764b3add26b9edcd509d656fb7c51dc2f666de1ef7fe
5
5
  SHA512:
6
- metadata.gz: 572b06adb2af703c92ba929c6b4e4a04664afd1bcec39e817553a2b0aca449ae9e971ee008347d4f3020657ce1d7e1e97b571d3fd2f556d03105c6215ad3cb7a
7
- data.tar.gz: 7d5d7fce15a667cd5f625e9b0c4b0a85b6841b869382a4a85de41a04c84cedcb4e3036fe18612ea2bd3f4d0e5ff891154a21196ca34104baeb4ad0e753097666
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-yarn --skip-active-storage --skip-action-cable --skip-spring --skip-coffee --skip-turbolinks --skip-test --skip-system-test --skip-bootsnap --skip-action-mailer
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
@@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'eivo-rails'
7
- spec.version = '0.0.6'
7
+ spec.version = '0.1.0'
8
8
  spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
9
9
  spec.email = ['jonathan@eivo.co']
10
10
 
@@ -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 JavaScripts and CSS.
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 = "id_yokitup_com_#{Rails.env}"
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 5.2
13
+ application.config.load_defaults 6.0
14
14
  application.config.require_master_key = true
15
15
 
16
16
  application.config.generators do |g|
@@ -19,7 +19,7 @@ module EIVO
19
19
  end
20
20
 
21
21
  def create_initializer_file
22
- @application = Rails.application.class.parent_name
22
+ @application = Rails.application.class.module_parent_name
23
23
 
24
24
  remove_dir 'config/environments'
25
25
 
@@ -88,6 +88,9 @@ Performance/ChainArrayAllocation:
88
88
 
89
89
  # Rails
90
90
 
91
+ Rails/ApplicationController:
92
+ Enabled: false
93
+
91
94
  Rails/BulkChangeTable:
92
95
  Enabled: false
93
96
 
@@ -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', '~> 5.2.3'
8
+ gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
9
9
  gem 'pg', '>= 0.18', '< 2.0'
10
- gem 'puma', '~> 3.11'
11
- gem 'sass-rails', '~> 5.0'
12
- gem 'uglifier', '>= 1.3.0'
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.6
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: 2019-08-21 00:00:00.000000000 Z
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.3
189
+ rubygems_version: 3.0.6
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: EIVO Rails