eivo-rails-api 0.0.9 → 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: bb78506450fd24aad118f26a029539a77129c28033eac18310fb2725e242e4d1
4
- data.tar.gz: 5fc161c8c3320160ee109fb014261a5628b12ac62059dabebcf0cbc2dffb5cb8
3
+ metadata.gz: 98ad3107efcdaa9f7dd2b381e5d20759c0131c462470a8ac725e3b0066031de6
4
+ data.tar.gz: 7bdf8d8fd29fea9f678b7a7a799c79a6f3172ef509e6b373da33db5c5ab6edf4
5
5
  SHA512:
6
- metadata.gz: 62ac0d0137b463df9842d15dfe92b877088d62b4e2d1481777a992adf4a4fe5aaa74c6dfa876d277f4c8a2eeb3028761fd3808e9366112beb3ded2efa7e4546c
7
- data.tar.gz: d0ade019d3a1e609c494d94f24fce09d6424b497b0f97a8882b853e703a382104ec8d3c67f995d6eb5c00bb3122663fc1fd9fe0c958e8d9942eecee7c394e7e4
6
+ metadata.gz: a52083cbacad9b1b93ccbccfb89824307cb79bf5ff96f43bffa8b84a359131f80ff2c492c667466950f6034c57204053815fe3fe27b7c89461c3c90391fb53e0
7
+ data.tar.gz: 1cc114c47766453289eec462818753167024e4bab02472aa13d1d9fe8e2a8d3163224d6b94691fe930d2ebea4227b7fd9976bd232694ecd859a50a20b8257e76
data/README.md CHANGED
@@ -22,7 +22,7 @@ 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-sprockets --skip-spring --skip-coffee --skip-javascript --skip-turbolinks --skip-test --skip-system-test --skip-bootsnap --skip-action-mailer --api
25
+ $ rails new ../example/ -d postgresql --api --skip-action-mailer --skip-action-mailbox --skip-action-text --skip-active-storage --skip-action-cable --skip-sprockets --skip-spring --skip-javascript --skip-turbolinks --skip-test --skip-system-test --skip-bootsnap --skip-webpack-install
26
26
 
27
27
  Then:
28
28
 
@@ -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-api'
7
- spec.version = '0.0.9'
7
+ spec.version = '0.1.0'
8
8
  spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
9
9
  spec.email = ['jonathan@eivo.co']
10
10
 
@@ -13,7 +13,7 @@ require_relative 'eivo-rails-api/engine'
13
13
  module EIVO
14
14
  class << self
15
15
  def configure(application)
16
- application.config.load_defaults 5.2
16
+ application.config.load_defaults 6.0
17
17
  application.config.api_only = true
18
18
 
19
19
  application.config.require_master_key = true
@@ -20,8 +20,6 @@ module EIVO
20
20
  # Enable/disable caching. By default caching is disabled.
21
21
  # Run rails dev:cache to toggle caching.
22
22
  if Rails.root.join('tmp', 'caching-dev.txt').exist?
23
- config.action_controller.perform_caching = true
24
-
25
23
  config.cache_store = :memory_store
26
24
  config.public_file_server.headers = {
27
25
  'Cache-Control' => "public, max-age=#{2.days.to_i}"
@@ -17,7 +17,6 @@ module EIVO
17
17
 
18
18
  # Full error reports are disabled and caching is turned on.
19
19
  config.consider_all_requests_local = false
20
- config.action_controller.perform_caching = true
21
20
 
22
21
  # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
23
22
  # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
@@ -73,6 +72,27 @@ module EIVO
73
72
 
74
73
  # Do not dump schema after migrations.
75
74
  config.active_record.dump_schema_after_migration = false
75
+
76
+ # Inserts middleware to perform automatic connection switching.
77
+ # The `database_selector` hash is used to pass options to the DatabaseSelector
78
+ # middleware. The `delay` is used to determine how long to wait after a write
79
+ # to send a subsequent read to the primary.
80
+ #
81
+ # The `database_resolver` class is used by the middleware to determine which
82
+ # database is appropriate to use based on the time delay.
83
+ #
84
+ # The `database_resolver_context` class is used by the middleware to set
85
+ # timestamps for the last write to the primary. The resolver uses the context
86
+ # class timestamps to determine how long to wait before reading from the
87
+ # replica.
88
+ #
89
+ # By default Rails will store a last write timestamp in the session. The
90
+ # DatabaseSelector middleware is designed as such you can define your own
91
+ # strategy for connection switching and pass that into the middleware through
92
+ # these configuration options.
93
+ # config.active_record.database_selector = { delay: 2.seconds }
94
+ # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
95
+ # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
76
96
  end
77
97
  end
78
98
  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
@@ -5,9 +5,9 @@ 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'
10
+ gem 'puma', '~> 4.1'
11
11
 
12
12
  group :development, :test do
13
13
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eivo-rails-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
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
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  - !ruby/object:Gem::Version
217
217
  version: '0'
218
218
  requirements: []
219
- rubygems_version: 3.0.3
219
+ rubygems_version: 3.0.6
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: EIVO Rails API