roo_on_rails 1.17.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +4 -3
- data/CHANGELOG.md +8 -1
- data/gemfiles/rails_3.gemfile +1 -1
- data/gemfiles/rails_4.gemfile +1 -1
- data/gemfiles/rails_5.gemfile +1 -1
- data/gemfiles/rails_5_1.gemfile +1 -1
- data/lib/roo_on_rails/logger.rb +4 -4
- data/lib/roo_on_rails/railties/logging.rb +7 -1
- data/lib/roo_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 977ae3b9248ffd6651acdce42ad8e3eccd657833
|
4
|
+
data.tar.gz: a0edcf92eff3bf7acdf17150c65107b2c04693b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b096c595d10954c892b8503c794b5f25be8e3025a772148250301aca35ef13efd3866ecd172932bd1912d630d85982e998d4ecd56c4489da4b995780228c601b
|
7
|
+
data.tar.gz: 534e4e7f680bf48da43eff5220716e14bc804fec5e026a13079277d332d107b4582d1482cd4c45b544d31dfbc2a5920cd430f266438e056009a6b9f15c1d04aa
|
data/Appraisals
CHANGED
@@ -2,22 +2,23 @@ appraise 'rails-3' do
|
|
2
2
|
gem 'rails', '~> 3.2'
|
3
3
|
gem 'sqlite3'
|
4
4
|
gem 'sidekiq', '< 5'
|
5
|
+
gem 'pg', '~> 0.11'
|
5
6
|
end
|
6
7
|
|
7
8
|
appraise 'rails-4' do
|
8
9
|
gem 'rails', '~> 4.2'
|
9
10
|
gem 'sqlite3'
|
10
|
-
gem 'pg'
|
11
|
+
gem 'pg', '~> 0.11'
|
11
12
|
end
|
12
13
|
|
13
14
|
appraise 'rails-5' do
|
14
15
|
gem 'rails', '~> 5.0.0'
|
15
16
|
gem 'sqlite3'
|
16
|
-
gem 'pg'
|
17
|
+
gem 'pg', '~> 0.18'
|
17
18
|
end
|
18
19
|
|
19
20
|
appraise 'rails-5-1' do
|
20
21
|
gem 'rails', '~> 5.1'
|
21
22
|
gem 'sqlite3'
|
22
|
-
gem 'pg'
|
23
|
+
gem 'pg', '~> 0.18'
|
23
24
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# HEAD
|
2
2
|
|
3
|
-
|
3
|
+
_A description of your awesome changes here!_
|
4
|
+
|
5
|
+
# v1.18.0 (2018-01-11)
|
6
|
+
|
7
|
+
Features:
|
8
|
+
|
9
|
+
- Respect rails config `log_level`, default to this if no LOG_LEVEL env
|
10
|
+
var is set instead of `debug`. (#87)
|
4
11
|
|
5
12
|
# v1.17.0 (2018-01-09)
|
6
13
|
|
data/gemfiles/rails_3.gemfile
CHANGED
data/gemfiles/rails_4.gemfile
CHANGED
data/gemfiles/rails_5.gemfile
CHANGED
data/gemfiles/rails_5_1.gemfile
CHANGED
data/lib/roo_on_rails/logger.rb
CHANGED
@@ -40,7 +40,6 @@ module RooOnRails
|
|
40
40
|
l.formatter = method(:_formatter)
|
41
41
|
end
|
42
42
|
super(logger)
|
43
|
-
set_log_level
|
44
43
|
end
|
45
44
|
|
46
45
|
def with(context = {})
|
@@ -60,17 +59,18 @@ module RooOnRails
|
|
60
59
|
nil
|
61
60
|
end
|
62
61
|
|
63
|
-
def set_log_level
|
62
|
+
def set_log_level(default: :DEBUG)
|
64
63
|
selected_level = ::Logger::Severity.constants.detect do |log_level|
|
65
64
|
log_level == log_level_setting.upcase.to_sym
|
66
65
|
end
|
67
|
-
|
66
|
+
|
67
|
+
self.level = ::Logger::Severity.const_get(selected_level || default.upcase)
|
68
68
|
end
|
69
69
|
|
70
70
|
private
|
71
71
|
|
72
72
|
def log_level_setting
|
73
|
-
ENV.fetch('LOG_LEVEL', '
|
73
|
+
@_log_level_setting ||= ENV.fetch('LOG_LEVEL', '')
|
74
74
|
end
|
75
75
|
|
76
76
|
class Proxy < SimpleDelegator
|
@@ -8,7 +8,13 @@ module RooOnRails
|
|
8
8
|
end
|
9
9
|
|
10
10
|
initializer 'roo_on_rails.logging.after', after: :initialize_logger do
|
11
|
-
|
11
|
+
# It is not possible to set log_level to an invalid value without some
|
12
|
+
# deliberate gymnastics (the setter will raise an error), and Rails
|
13
|
+
# defaults this to `debug`, so we don't need to guard against nil /
|
14
|
+
# invalidity
|
15
|
+
log_level = Rails.configuration.log_level
|
16
|
+
|
17
|
+
Rails.logger.set_log_level(default: log_level)
|
12
18
|
Rails.logger.debug 'initializer roo_on_rails.logging.after'
|
13
19
|
end
|
14
20
|
end
|
data/lib/roo_on_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roo_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Letessier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv-rails
|