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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a962ebefb507146c9e7e2586efb356fd9615db7d
4
- data.tar.gz: d1cc277cb5364e6b017d1c2e8f5524da815d9f88
3
+ metadata.gz: dbc2c1df2c8703af85a48cec027481b51e963a7d
4
+ data.tar.gz: 81e5b8afc0c7bf47a65e68b2682ceb3f764b56c1
5
5
  SHA512:
6
- metadata.gz: cd8aa79bea6fc3f231a11da411e4157ba61b9c7ed26bd016cf6627a211ca74cc46e41577ee1a3480c046323d5cc9a936bcea175c3bdb9f52aef4a8af91bae60b
7
- data.tar.gz: af8f9e6abb19c279a1b3ca59310e33a0123e6b9e7d618d6a4e8bdca14ba237f2c8f929377d3f95c03157e06add6e0b011ba0bfe111154da2eb4411191c0992c0
6
+ metadata.gz: 35ac2f6b11c4adb23ebf976bef30c6e3bdd59da23ecf62e93a1ebc74d8a49378e2bc87ec9725622c8518b1f0da75d080080604d8993fd9adef065f7dd440d43d
7
+ data.tar.gz: bb92378034091e09808ad93a4e549102a2173330bdd8eaf372eee3b93b6f6fe79e6b883479b481bee0fd7f245a46a8ccc055ab7786562d1d26bc6bb46ad84108
@@ -5,7 +5,11 @@ AllCops:
5
5
  - 'spec/fixtures/**/*'
6
6
  - '*.gemspec'
7
7
 
8
- Style/TrailingComma:
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
@@ -29,7 +29,7 @@ module Loga
29
29
  end
30
30
 
31
31
  def initialize!
32
- @service_name.to_s.strip!
32
+ @service_name = service_name.to_s.strip
33
33
  @service_version = compute_service_version
34
34
 
35
35
  initialize_logger
@@ -52,7 +52,7 @@ module Loga
52
52
  parameter_filter.filter(hash)
53
53
  end
54
54
 
55
- KV_RE = '[^&;=]+'
55
+ KV_RE = '[^&;=]+'.freeze
56
56
  PAIR_RE = /(#{KV_RE})=(#{KV_RE})/
57
57
  def filtered_query_string
58
58
  query_string.gsub(PAIR_RE) do |_|
@@ -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, Style/GuardClause
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
@@ -1,3 +1,3 @@
1
1
  module Loga
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'.freeze
3
3
  end
@@ -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.30.0'
29
+ spec.add_development_dependency 'rubocop', '~> 0.40.0'
30
30
  spec.add_development_dependency 'timecop'
31
31
  end
@@ -28,7 +28,7 @@ when /unit/
28
28
  rspec_pattern = 'unit/**/*_spec.rb'
29
29
  require 'loga'
30
30
  else
31
- fail 'BUNDLE_GEMFILE is unknown. Ensure the appraisal is present in Appraisals'
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) { fail exception } }
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.0
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.30.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.30.0
138
+ version: 0.40.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: timecop
141
141
  requirement: !ruby/object:Gem::Requirement