eivo-rails 0.1.6 → 0.1.11

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: 1f0386c9f9fe278bc745d9e74be0b3480e2e68d6d0161adfd577c2b9891f9056
4
- data.tar.gz: 817921eba9e490f829b27e43de6961ff4efc8382c7103f09231b197e414063b4
3
+ metadata.gz: 1f4f0468c938c28b521471531f0dda6c72d6aff0735d0e7f2fbb3b420c7a6aa3
4
+ data.tar.gz: 126c2e7b093b2d09d4bc2b94c79d2f517e05045af304c55f6d84921ecedaab36
5
5
  SHA512:
6
- metadata.gz: efc2b1ae579523dc8097c26822d70f7683a0663d20b81a7c6dae7f9883b73d1b2ea749efaff1ced76997e45f56a39239fe7dce7e62caba46d9dc59ccda855c33
7
- data.tar.gz: 7d3588ff9a17f4d5ebbeb5dd56d248cff203e3ed6f1ee2027eee43ad9fd748c26986feca4d3cb694a4a238ed324d9294ea3efc1cb84cf0e67cb5f918d8a14d4f
6
+ metadata.gz: 0d6a35f5db36eaf1332321b82797b93c13987ace609d9e981a4554bb4b3146facb82be22833804d54db416da334b964356a86277e8b54af3a4a8a7037296b6fb
7
+ data.tar.gz: 8206c1d2286af450bfd10efbd41d46e9212d101dcda3866062943bfd0ea908693e330e3310f2dc687ab74951ec849346728c60e800e957a773caeed7b7c0fabc
@@ -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,11 @@ 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 || {}
21
20
 
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]
21
+ if result[:params]
22
+ result[:params] = result[:params].except('controller', 'action', 'format')
23
+ end
24
24
 
25
25
  # https://github.com/roidrage/lograge/pull/307
26
26
  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.6'
7
+ spec.version = '0.1.11'
8
8
  spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
9
9
  spec.email = ['jonathan@eivo.co']
10
10
 
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency 'oj'
26
26
 
27
27
  spec.add_dependency 'sentry-raven'
28
+ spec.add_dependency 'lograge'
28
29
 
29
30
  spec.add_development_dependency 'bundler'
30
31
  spec.add_development_dependency 'rake'
@@ -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.6
4
+ version: 0.1.11
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
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: lograge
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement