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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65d37b2ac41421d649b77a7f66e521f949bbc83e
4
- data.tar.gz: d2fe8895dfcb3ccdbd1d927f0da71d1b8993ebf9
3
+ metadata.gz: 977ae3b9248ffd6651acdce42ad8e3eccd657833
4
+ data.tar.gz: a0edcf92eff3bf7acdf17150c65107b2c04693b7
5
5
  SHA512:
6
- metadata.gz: cd5326a3ce9cacd1298d209ff50a6e1dc14f44e95d1582d9e16e06bfec8c66871217cdeb8e8d3ba101e8ba8f6d7f8f582bdb1d960b5f4f1acdb78e4657a6eadd
7
- data.tar.gz: 60381f042c1ead007a2dc0c768ca1f1a1eb5ab5c4b7f26e6f8bb884d94fcaab6065a03b507ece1ae1ac919886df5febfb5f969a9e7cec25b71dcc373bcd18e24
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
- _Your awesome improvements here!_
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
 
@@ -6,7 +6,7 @@ gem "guard"
6
6
  gem "guard-rspec"
7
7
  gem "appraisal"
8
8
  gem "webmock"
9
- gem "pg"
9
+ gem "pg", "~> 0.11"
10
10
  gem "sqlite3"
11
11
  gem "rails", "~> 3.2"
12
12
  gem "sidekiq", "< 5"
@@ -6,7 +6,7 @@ gem "guard"
6
6
  gem "guard-rspec"
7
7
  gem "appraisal"
8
8
  gem "webmock"
9
- gem "pg"
9
+ gem "pg", "~> 0.11"
10
10
  gem "sqlite3"
11
11
  gem "rails", "~> 4.2"
12
12
 
@@ -6,7 +6,7 @@ gem "guard"
6
6
  gem "guard-rspec"
7
7
  gem "appraisal"
8
8
  gem "webmock"
9
- gem "pg"
9
+ gem "pg", "~> 0.18"
10
10
  gem "sqlite3"
11
11
  gem "rails", "~> 5.0.0"
12
12
 
@@ -6,7 +6,7 @@ gem "guard"
6
6
  gem "guard-rspec"
7
7
  gem "appraisal"
8
8
  gem "webmock"
9
- gem "pg"
9
+ gem "pg", "~> 0.18"
10
10
  gem "sqlite3"
11
11
  gem "rails", "~> 5.1"
12
12
 
@@ -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
- self.level = ::Logger::Severity.const_get(selected_level || :DEBUG)
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', 'DEBUG')
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
- Rails.logger.set_log_level
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
@@ -1,3 +1,3 @@
1
1
  module RooOnRails
2
- VERSION = '1.17.0'.freeze
2
+ VERSION = '1.18.0'.freeze
3
3
  end
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.17.0
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-09 00:00:00.000000000 Z
11
+ date: 2018-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv-rails