loggery 0.2.1 → 0.3.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
- SHA1:
3
- metadata.gz: a3267ee8ed1a0024f4c0678e68966a9d13ad84cb
4
- data.tar.gz: 4ea72bd362f057dc81c1b5b858bb9871b82d4347
2
+ SHA256:
3
+ metadata.gz: b3f02b4ee50f2e942444925c0278c5f18e9cfdc0e38594102570055a4d6ddf75
4
+ data.tar.gz: '0733840f78c3d3bc32a2e6cb5c5cf8109716bdd608793978b6f67a2cef0c4c57'
5
5
  SHA512:
6
- metadata.gz: 47d0718b91ddc4d108cbc2fa4572b856c50bdb1edd13ab4c2554e228ceeeb3a9b9dbab01df0661beee87905ecf8e0e8ffaaa74280342b9615006b7c06259feaf
7
- data.tar.gz: 9f1a353afaf04ba2827214b73f7b08d6d3c8203fc5ea015a6170e3892a1d7187fb419e4e3b1b54406acaac95d8e32ddb15fe48077810acd92c4eea5311c73999
6
+ metadata.gz: d87cca82b3c6ee57708e31f58abb608378e136537d71f945650d5fcd2ab289f1e469f8fedbedf39941f9b08b5408dbe8aab8db9923704771f928cf5bc2bb7a9b
7
+ data.tar.gz: 72d8d29e17a52316df6b1059eeddea1fb39b0236beacc60917e5a8416b524c809ec690be95857f4643a29bddca09578884717262b3f51cc4fefdfe4b0f2337cf
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /spec/tmp/
10
11
 
11
12
  log
12
13
 
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3
2
+ TargetRubyVersion: 2.5
3
3
 
4
4
  Style/StringLiterals:
5
5
  EnforcedStyle: double_quotes
@@ -1,16 +1,13 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.2
4
+ - 2.5.6
5
+ - 2.6.4
5
6
  gemfile:
6
- - gemfiles/rails4.2.gemfile
7
- - gemfiles/rails5.0.gemfile
8
- - gemfiles/rails5.1.gemfile
9
7
  - gemfiles/rails5.2.gemfile
8
+ - gemfiles/rails6.0.gemfile
10
9
  before_install:
11
10
  - rvm use @global
12
- - gem uninstall bundler -x
13
- - gem install -v 1.17.2 bundler --no-rdoc --no-ri
14
- script:
11
+ script:
15
12
  - bundle exec rubocop
16
13
  - bundle exec rspec
data/Appraisals CHANGED
@@ -1,17 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise "rails4.2" do
4
- gem "rails", "~> 4.2.0"
5
- end
6
-
7
- appraise "rails5.0" do
8
- gem "rails", "~> 5.0.0"
9
- end
10
-
11
- appraise "rails5.1" do
12
- gem "rails", "~> 5.1.0"
3
+ appraise "rails5.2" do
4
+ gem "rails", "~>5.2.0"
13
5
  end
14
6
 
15
- appraise "rails5.2" do
16
- gem "rails", "5.2.0.beta2"
7
+ appraise "rails6.0" do
8
+ gem "rails", "~>6.0.0"
17
9
  end
@@ -0,0 +1,6 @@
1
+ # Loggery Changes
2
+
3
+ 0.3.0
4
+ ---------
5
+
6
+ Support Sidekiq 6
data/README.md CHANGED
@@ -25,7 +25,7 @@ And then execute:
25
25
 
26
26
  ### Basic Rails integration
27
27
 
28
- To enable, add
28
+ To enable, add
29
29
 
30
30
  ```ruby
31
31
  config.loggery.enabled = true
@@ -85,8 +85,8 @@ your `ApplicationController`:
85
85
  include Loggery::Controller::LoggingContext
86
86
 
87
87
  def loggery_log_context
88
- {
89
- user_id: current_user&.id,
88
+ {
89
+ user_id: current_user&.id,
90
90
  user_email: current_user&.email
91
91
  }
92
92
  end
@@ -98,7 +98,7 @@ would like to add to your log records.
98
98
 
99
99
  ### Sidekiq
100
100
 
101
- If you're using Sidekiq you can enable structured logging in sidekiq by adding these lines to
101
+ If you're using Sidekiq you can enable structured logging in sidekiq by adding these lines to
102
102
  `config/initializers/sidekiq.rb`:
103
103
 
104
104
  ```ruby
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "5.2.0.beta2"
5
+ gem "rails", "5.2.0"
6
6
 
7
7
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.2.0"
5
+ gem "rails", "6.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Loggery
4
4
  module Gem
5
- VERSION = "0.2.1"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -19,14 +19,12 @@ module Loggery
19
19
  log_job_start(message, job_instance_name)
20
20
 
21
21
  log_job_runtime(:sidekiq_job, job_instance_name) do
22
- begin
23
- yield
24
- rescue StandardError => e
25
- # Log exceptions here, otherwise they won't have the metadata available anymore by
26
- # the time they reach the Sidekiq default error handler.
27
- self.class.error_handler&.call(e)
28
- raise e
29
- end
22
+ yield
23
+ rescue StandardError => e
24
+ # Log exceptions here, otherwise they won't have the metadata available anymore by
25
+ # the time they reach the Sidekiq default error handler.
26
+ self.class.error_handler&.call(e)
27
+ raise e
30
28
  end
31
29
  end
32
30
  end
@@ -4,9 +4,9 @@ module Loggery
4
4
  module Sidekiq
5
5
  module Setup
6
6
  def self.setup
7
- ::Sidekiq::Logging.logger = Rails.logger
8
-
9
7
  ::Sidekiq.configure_server do |config|
8
+ config.logger = Rails.logger
9
+
10
10
  config.server_middleware do |chain|
11
11
  chain.add Loggery::Metadata::Middleware::Sidekiq
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loggery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Stemplinger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-22 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -233,15 +233,14 @@ files:
233
233
  - ".travis.yml"
234
234
  - Appraisals
235
235
  - CODE_OF_CONDUCT.md
236
+ - Changes.md
236
237
  - Gemfile
237
238
  - LICENSE.txt
238
239
  - README.md
239
240
  - Rakefile
240
241
  - gemfiles/.bundle/config
241
- - gemfiles/rails4.2.gemfile
242
- - gemfiles/rails5.0.gemfile
243
- - gemfiles/rails5.1.gemfile
244
242
  - gemfiles/rails5.2.gemfile
243
+ - gemfiles/rails6.0.gemfile
245
244
  - lib/loggery.rb
246
245
  - lib/loggery/controller/logging_context.rb
247
246
  - lib/loggery/gem/version.rb
@@ -274,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
273
  version: '0'
275
274
  requirements: []
276
275
  rubyforge_project:
277
- rubygems_version: 2.5.2
276
+ rubygems_version: 2.7.6
278
277
  signing_key:
279
278
  specification_version: 4
280
279
  summary: Generate logstash compatible log output from Rails apps.
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 5.0.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 5.1.0"
6
-
7
- gemspec path: "../"