loga 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -1
- data/circle.yml +0 -4
- data/lib/loga/configuration.rb +1 -1
- data/lib/loga/rack/request.rb +1 -1
- data/lib/loga/rack/request_id.rb +1 -1
- data/lib/loga/version.rb +1 -1
- data/loga.gemspec +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/loga/formatter_spec.rb +2 -4
- data/spec/unit/loga/rack/logger_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbc2c1df2c8703af85a48cec027481b51e963a7d
|
4
|
+
data.tar.gz: 81e5b8afc0c7bf47a65e68b2682ceb3f764b56c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ac2f6b11c4adb23ebf976bef30c6e3bdd59da23ecf62e93a1ebc74d8a49378e2bc87ec9725622c8518b1f0da75d080080604d8993fd9adef065f7dd440d43d
|
7
|
+
data.tar.gz: bb92378034091e09808ad93a4e549102a2173330bdd8eaf372eee3b93b6f6fe79e6b883479b481bee0fd7f245a46a8ccc055ab7786562d1d26bc6bb46ad84108
|
data/.rubocop.yml
CHANGED
@@ -5,7 +5,11 @@ AllCops:
|
|
5
5
|
- 'spec/fixtures/**/*'
|
6
6
|
- '*.gemspec'
|
7
7
|
|
8
|
-
Style/
|
8
|
+
Style/TrailingCommaInLiteral:
|
9
|
+
Enabled: true
|
10
|
+
EnforcedStyleForMultiline: comma
|
11
|
+
|
12
|
+
Style/TrailingCommaInArguments:
|
9
13
|
Enabled: true
|
10
14
|
EnforcedStyleForMultiline: comma
|
11
15
|
|
@@ -17,3 +21,9 @@ Style/FormatString:
|
|
17
21
|
|
18
22
|
Style/PerlBackrefs:
|
19
23
|
Enabled: false
|
24
|
+
|
25
|
+
Style/ExtraSpacing:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/SpaceAroundOperators:
|
29
|
+
Enabled: false
|
data/circle.yml
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
dependencies:
|
2
2
|
override:
|
3
|
-
- rvm-exec 1.9.3-p392 bundle install -j 4
|
4
|
-
- rvm-exec 1.9.3-p392 bundle exec appraisal install -j 4
|
5
3
|
- rvm-exec 2.0.0-p353 bundle install -j 4
|
6
4
|
- rvm-exec 2.0.0-p353 bundle exec appraisal install -j 4
|
7
5
|
- rvm-exec 2.2.2 bundle install -j 4
|
8
6
|
- rvm-exec 2.2.2 bundle exec appraisal install -j 4
|
9
7
|
test:
|
10
8
|
override:
|
11
|
-
- RACK_ENV=development rvm-exec 1.9.3-p392 bundle exec appraisal rspec
|
12
|
-
- RACK_ENV=production rvm-exec 1.9.3-p392 bundle exec appraisal rspec
|
13
9
|
- RACK_ENV=development rvm-exec 2.0.0-p353 bundle exec appraisal rspec
|
14
10
|
- RACK_ENV=production rvm-exec 2.0.0-p353 bundle exec appraisal rspec
|
15
11
|
- RACK_ENV=development rvm-exec 2.2.2 bundle exec appraisal rspec
|
data/lib/loga/configuration.rb
CHANGED
data/lib/loga/rack/request.rb
CHANGED
data/lib/loga/rack/request_id.rb
CHANGED
@@ -3,7 +3,7 @@ require 'securerandom'
|
|
3
3
|
require 'active_support/core_ext/string/access'
|
4
4
|
require 'active_support/core_ext/object/blank'
|
5
5
|
|
6
|
-
# rubocop:disable Metrics/LineLength, Lint/AssignmentInCondition
|
6
|
+
# rubocop:disable Metrics/LineLength, Lint/AssignmentInCondition
|
7
7
|
module Loga
|
8
8
|
module Rack
|
9
9
|
# Makes a unique request id available to the action_dispatch.request_id env variable (which is then accessible through
|
data/lib/loga/version.rb
CHANGED
data/loga.gemspec
CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency 'rack-test'
|
27
27
|
spec.add_development_dependency 'rake'
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.0.0'
|
29
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 0.40.0'
|
30
30
|
spec.add_development_dependency 'timecop'
|
31
31
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -28,7 +28,7 @@ when /unit/
|
|
28
28
|
rspec_pattern = 'unit/**/*_spec.rb'
|
29
29
|
require 'loga'
|
30
30
|
else
|
31
|
-
|
31
|
+
raise 'BUNDLE_GEMFILE is unknown. Ensure the appraisal is present in Appraisals'
|
32
32
|
end
|
33
33
|
|
34
34
|
RSpec.configure do |config|
|
@@ -20,15 +20,13 @@ describe Loga::Formatter do
|
|
20
20
|
'host' => host,
|
21
21
|
'short_message' => be_a(String),
|
22
22
|
'timestamp' => be_a(Float),
|
23
|
-
'level' => 6
|
24
|
-
)
|
23
|
+
'level' => 6)
|
25
24
|
end
|
26
25
|
|
27
26
|
it 'includes Loga additional fields' do
|
28
27
|
expect(json).to include('_service.name' => service_name,
|
29
28
|
'_service.version' => service_version,
|
30
|
-
'_tags' => []
|
31
|
-
)
|
29
|
+
'_tags' => [])
|
32
30
|
end
|
33
31
|
|
34
32
|
it 'outputs the timestamp in seconds since UNIX epoch' do
|
@@ -57,7 +57,7 @@ describe Loga::Rack::Logger do
|
|
57
57
|
let(:response_status) { 200 }
|
58
58
|
|
59
59
|
context 'when an exception is raised' do
|
60
|
-
let(:app) { ->(_env) {
|
60
|
+
let(:app) { ->(_env) { raise exception } }
|
61
61
|
|
62
62
|
it 'does not rescue the exception' do
|
63
63
|
expect { subject.call(env) }.to raise_error(StandardError)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Funding Circle
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.40.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.40.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: timecop
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|