eivo-rails-api 0.1.5 → 0.1.10

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: c6a6c56a63023bb7746f46774e14d75283fa0eb4a45f5734dfa285fd1a231e16
4
- data.tar.gz: 367398cf54e3b7a6c0f67cd9042d7209671a8da145358a38c6d5289b395066d3
3
+ metadata.gz: 293a3f3bef35b46009f162831c7cac036911d95691acd7663de201201e77cf0b
4
+ data.tar.gz: 34cea63eec948fb39809de3556d828f736b88e64a68e5569ea840d04b6fd7263
5
5
  SHA512:
6
- metadata.gz: 68de242f152c42c5a6fc780124da07c393fce0f6f4ccea5a8c692dfe92706a6c90b3b8d36b7510808e42ed041961376024fe1a7f46a9694f6b653c2719df559c
7
- data.tar.gz: 39018bb898894a3da7ea7d13e7abc4b21f75d49c0b56cf0c4787163e388d52fe6866baa3393f1586aa57dcc163506a23bc6d580255819ffc6a5e368395fc5671
6
+ metadata.gz: 9b825140beec644c8b2a3329624dfd6ede68869436fa788b998cd1f45e24388c5bcc5e467330fc587a06589612c39bddd20f80d05552304d6e9a2449a62a9839
7
+ data.tar.gz: 882e34dc80ec565cbab69571ad8e27e9f406f1ab33ec0cb193e945e9da6276139851c8b4ca9f8a2c7b1810a32b8bbd8634a4d11bc2c3a2e10f6b11152598957d
@@ -44,9 +44,6 @@ Naming/PredicateName:
44
44
  Naming/VariableNumber:
45
45
  EnforcedStyle: snake_case
46
46
 
47
- Style/BracesAroundHashParameters:
48
- EnforcedStyle: context_dependent
49
-
50
47
  Style/Documentation:
51
48
  Enabled: false
52
49
 
data/README.md CHANGED
@@ -37,10 +37,6 @@ sentry:
37
37
  dsn: ""
38
38
  ```
39
39
 
40
- ### Warning
41
-
42
- `force_ssl` option is not enabled, for performance reasons SSL / TLS should be managed by the web server (nginx, Apache).
43
-
44
40
  ## License
45
41
 
46
42
  This project is released under the MIT license. See the LICENSE file for more info.
@@ -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
@@ -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.1.5'
7
+ spec.version = '0.1.10'
8
8
  spec.authors = ['Jonathan VUKOVICH-TRIBOUHARET']
9
9
  spec.email = ['jonathan@eivo.co']
10
10
 
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency 'kaminari'
29
29
 
30
+ spec.add_dependency 'lograge'
30
31
  spec.add_dependency 'sentry-raven'
31
32
 
32
33
  spec.add_development_dependency 'bundler'
@@ -39,7 +39,7 @@ module EIVO
39
39
  # Highlight code that triggered database queries in logs.
40
40
  config.active_record.verbose_query_logs = true
41
41
 
42
- # Raises error for missing translations
42
+ # Raises error for missing translations.
43
43
  # config.action_view.raise_on_missing_translations = true
44
44
 
45
45
  # Use an evented file watcher to asynchronously detect changes in source code,
@@ -16,7 +16,7 @@ module EIVO
16
16
  config.eager_load = true
17
17
 
18
18
  # Full error reports are disabled and caching is turned on.
19
- config.consider_all_requests_local = false
19
+ config.consider_all_requests_local = false
20
20
 
21
21
  # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
22
22
  # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
@@ -31,10 +31,11 @@ module EIVO
31
31
 
32
32
  # Specifies the header that your server uses for sending files.
33
33
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
34
- config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
34
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
35
35
 
36
36
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
37
- # config.force_ssl = true
37
+ config.force_ssl = true
38
+ config.ssl_options = { redirect: { exclude: ->(request) { request.path == '/status' } } }
38
39
 
39
40
  # Use the lowest log level to ensure availability of diagnostic information
40
41
  # when problems arise.
@@ -46,7 +47,7 @@ module EIVO
46
47
  # Use a different cache store in production.
47
48
  # config.cache_store = :mem_cache_store
48
49
 
49
- # Use a real queuing backend for Active Job (and separate queues per environment)
50
+ # Use a real queuing backend for Active Job (and separate queues per environment).
50
51
  # config.active_job.queue_adapter = :resque
51
52
  # config.active_job.queue_name_prefix = "example_#{Rails.env}"
52
53
 
@@ -73,7 +74,7 @@ module EIVO
73
74
  logger = ActiveSupport::Logger.new(STDOUT)
74
75
  logger.formatter = config.log_formatter
75
76
  config.log_level = :info
76
- config.logger = logger
77
+ config.logger = logger
77
78
  end
78
79
 
79
80
  # Do not dump schema after migrations.
@@ -3,6 +3,10 @@
3
3
  module EIVO
4
4
  class Environment
5
5
  def self.test
6
+ # The test environment is used exclusively to run your application's
7
+ # test suite. You never need to work with it otherwise. Remember that
8
+ # your test database is "scratch space" for the test suite and is wiped
9
+ # and recreated between test runs. Don't rely on the data there!
6
10
  Rails.application.configure do
7
11
  # Settings specified here will take precedence over those in config/application.rb.
8
12
 
@@ -33,7 +37,7 @@ module EIVO
33
37
  # Print deprecation notices to the stderr.
34
38
  config.active_support.deprecation = :stderr
35
39
 
36
- # Raises error for missing translations
40
+ # Raises error for missing translations.
37
41
  # config.action_view.raise_on_missing_translations = true
38
42
  end
39
43
  end
@@ -3,9 +3,9 @@
3
3
  source 'https://rubygems.org'
4
4
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
- ruby '2.6.3'
6
+ ruby '2.7.1'
7
7
 
8
- gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
8
+ gem 'rails', '~> 6.0.3', '>= 6.0.3.1'
9
9
  gem 'pg', '>= 0.18', '< 2.0'
10
10
  gem 'puma', '~> 4.1'
11
11
 
@@ -14,7 +14,7 @@ group :development, :test do
14
14
  end
15
15
 
16
16
  group :development do
17
- gem 'listen', '>= 3.0.5', '< 3.2'
17
+ gem 'listen', '~> 3.2'
18
18
  end
19
19
 
20
20
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
@@ -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-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.10
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-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: lograge
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: sentry-raven
85
99
  requirement: !ruby/object:Gem::Requirement