eivo-rails 0.1.7 → 0.1.12

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: 516a55c532be0f88f162c863076c7abf4e86b4ab7ec4f77da01e51b5892882b0
4
- data.tar.gz: 1da536af7be3c4e04cf8ab98f182d0469b9516627c543e4b8df608b6a50b2164
3
+ metadata.gz: 2ebb9ae82f96f82b5c8134e5d347326c086b55eee8fd77a44bcb95d98b90f746
4
+ data.tar.gz: 944aa3bc921e5b996fcd6e0877c258b31c60a10dfe688977163f9b4ae7014097
5
5
  SHA512:
6
- metadata.gz: 3e6a0e043c6223ee94e29c89c69e5099c421f095425b8482665e59ba6f3d71a20beca7870ce4b7143e5d66de547442db98d4e19ade15258a3f4ced81f2d7adb6
7
- data.tar.gz: 8d6f28edf3f2a642b9a1d3f0005a36ccd78a4be9ecb8f4b11af4b8a534af2b67967466ce99b401707eaea41c8cf9dc8654bdd7715c16dcff88f37788480372aa
6
+ metadata.gz: f1ceb30fd849edbaf34e172067d1e69e87fa23e81aeb3387eb9d1c6a39c9c7ab47f340a7c8bd21dc13f5d32c149ebd638efd5f9853953e97e39730e19c4d3f7d
7
+ data.tar.gz: c39da444293ca9cb3f52dd787bd36a0c71a509f1f2b6ddd26a9228e3476b5ffb3c3eed5e2029d1c18dfe6b939588cfd6379dd2fedc3ff51dc2dcf527eb5e8718
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'lograge'
4
+
3
5
  if Rails.env.staging? || Rails.env.production?
4
6
  Rails.application.configure do
5
7
  config.colorize_logging = false
@@ -14,13 +16,14 @@ if Rails.env.staging? || Rails.env.production?
14
16
  config.lograge.ignore_actions = ['EIVO::StatusController#index']
15
17
 
16
18
  config.lograge.custom_options = ->(event) do
17
- result = {
18
- params: event.payload[:params].except('controller', 'action', 'format'),
19
- request_id: event.payload[:request_id]
20
- }
19
+ result = event.payload.dup || {}
20
+
21
+ result.delete(:headers)
21
22
 
22
- result[:user_id] = event.payload[:user_id] if event.payload[:user_id]
23
- result[:organization_id] = event.payload[:organization_id] if event.payload[:organization_id]
23
+ # Removed because already present in event.payload
24
+ if result[:params]
25
+ result[:params] = result[:params].except('controller', 'action', 'format')
26
+ end
24
27
 
25
28
  # https://github.com/roidrage/lograge/pull/307
26
29
  if event.respond_to?(:allocations)
@@ -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.1.7'
7
+ spec.version = '0.1.12'
8
8
  spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
9
9
  spec.email = ['jonathan@eivo.co']
10
10
 
@@ -42,6 +42,7 @@ module EIVO
42
42
 
43
43
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
44
44
  config.force_ssl = true
45
+ config.ssl_options = { redirect: { exclude: -> request { request.path == '/status' } } }
45
46
 
46
47
  # Use the lowest log level to ensure availability of diagnostic information
47
48
  # when problems arise.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- workers ENV.fetch('WEB_CONCURRENCY') { 0 }
4
- threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }
3
+ workers ENV.fetch('WEB_CONCURRENCY') { 0 }.to_i
4
+ threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
5
5
  threads threads_count, threads_count
6
6
 
7
7
  environment ENV.fetch('RAILS_ENV') { 'development' }
@@ -9,7 +9,7 @@ environment ENV.fetch('RAILS_ENV') { 'development' }
9
9
  if %w[production staging].include?(ENV['RAILS_ENV'])
10
10
  pidfile 'tmp/pids/puma.pid'
11
11
  state_path 'tmp/pids/puma.state'
12
- daemonize ENV.fetch('RAILS_DAEMONIZE') { false }
12
+ daemonize ActiveModel::Type::Boolean.new.cast(ENV.fetch('RAILS_DAEMONIZE') { false })
13
13
 
14
14
  if ENV['PORT']
15
15
  bind "tcp://0.0.0.0:#{ENV['PORT']}"
@@ -17,7 +17,7 @@ if %w[production staging].include?(ENV['RAILS_ENV'])
17
17
  bind 'unix://tmp/sockets/puma.sock'
18
18
  end
19
19
  else
20
- port ENV.fetch('PORT') { 3000 }
20
+ port ENV.fetch('PORT') { 3000 }.to_i
21
21
  end
22
22
 
23
23
  before_fork do
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.1.7
4
+ version: 0.1.12
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: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor