dclog 0.1.0 → 0.2.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
  SHA256:
3
- metadata.gz: 234c6cbf8a91c2db908d2dcfc7d1ebd26a4190b6aeeb65304ff751a081cd3277
4
- data.tar.gz: 2bcdaa72564ab32acffce6b41d3c09e8ffce1a8872123dcb1c7eb43c84768c30
3
+ metadata.gz: 372c2975c0f10052f985877816b66e9f00655e23d22eb0a42711a1c5900acd02
4
+ data.tar.gz: 621591b55ce509bf61b00e9c590d5633766518ed30e0a703552b0aeb89c07922
5
5
  SHA512:
6
- metadata.gz: 750c2d7ceda983d659185f8d4057bcb1cacc7ebb26335fe9365a0f14bb36a22cc1253d61456028b7746dd72d7a9c055f71fe081413c569fc471655893ba5da46
7
- data.tar.gz: 250e98740b03fccb80b9b8d1a6358e682b767ff4e5139e50a08917f6f96b0cf98a3ece5e91a8521654e53cf8c28c08ed7c83de94167b52ae8d6d61166a752430
6
+ metadata.gz: fc462363942b62e6ca648379d9a4bf82f9329c67a14231450e96745d4369b05a7f9794eb0075e390009a85276bb9a6fb246d300817881353daff99d79b618a3e
7
+ data.tar.gz: 8e97ef06b48a428cc81af5395cbe2e412d3e0aba22621236d4739e3d4b4b1176b3bd9ce7d9f82cf647e81d3c28219fcc836f46470282e3b16ca853add68ab187
data/Gemfile.lock CHANGED
@@ -1,67 +1,66 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dclog (0.1.0)
4
+ dclog (0.2.0)
5
5
  rails (>= 5.0.0)
6
- sidekiq (>= 5.0.0)
7
6
 
8
7
  GEM
9
8
  remote: https://rubygems.org/
10
9
  specs:
11
- actioncable (6.1.3.2)
12
- actionpack (= 6.1.3.2)
13
- activesupport (= 6.1.3.2)
10
+ actioncable (6.1.4.1)
11
+ actionpack (= 6.1.4.1)
12
+ activesupport (= 6.1.4.1)
14
13
  nio4r (~> 2.0)
15
14
  websocket-driver (>= 0.6.1)
16
- actionmailbox (6.1.3.2)
17
- actionpack (= 6.1.3.2)
18
- activejob (= 6.1.3.2)
19
- activerecord (= 6.1.3.2)
20
- activestorage (= 6.1.3.2)
21
- activesupport (= 6.1.3.2)
15
+ actionmailbox (6.1.4.1)
16
+ actionpack (= 6.1.4.1)
17
+ activejob (= 6.1.4.1)
18
+ activerecord (= 6.1.4.1)
19
+ activestorage (= 6.1.4.1)
20
+ activesupport (= 6.1.4.1)
22
21
  mail (>= 2.7.1)
23
- actionmailer (6.1.3.2)
24
- actionpack (= 6.1.3.2)
25
- actionview (= 6.1.3.2)
26
- activejob (= 6.1.3.2)
27
- activesupport (= 6.1.3.2)
22
+ actionmailer (6.1.4.1)
23
+ actionpack (= 6.1.4.1)
24
+ actionview (= 6.1.4.1)
25
+ activejob (= 6.1.4.1)
26
+ activesupport (= 6.1.4.1)
28
27
  mail (~> 2.5, >= 2.5.4)
29
28
  rails-dom-testing (~> 2.0)
30
- actionpack (6.1.3.2)
31
- actionview (= 6.1.3.2)
32
- activesupport (= 6.1.3.2)
29
+ actionpack (6.1.4.1)
30
+ actionview (= 6.1.4.1)
31
+ activesupport (= 6.1.4.1)
33
32
  rack (~> 2.0, >= 2.0.9)
34
33
  rack-test (>= 0.6.3)
35
34
  rails-dom-testing (~> 2.0)
36
35
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.1.3.2)
38
- actionpack (= 6.1.3.2)
39
- activerecord (= 6.1.3.2)
40
- activestorage (= 6.1.3.2)
41
- activesupport (= 6.1.3.2)
36
+ actiontext (6.1.4.1)
37
+ actionpack (= 6.1.4.1)
38
+ activerecord (= 6.1.4.1)
39
+ activestorage (= 6.1.4.1)
40
+ activesupport (= 6.1.4.1)
42
41
  nokogiri (>= 1.8.5)
43
- actionview (6.1.3.2)
44
- activesupport (= 6.1.3.2)
42
+ actionview (6.1.4.1)
43
+ activesupport (= 6.1.4.1)
45
44
  builder (~> 3.1)
46
45
  erubi (~> 1.4)
47
46
  rails-dom-testing (~> 2.0)
48
47
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.1.3.2)
50
- activesupport (= 6.1.3.2)
48
+ activejob (6.1.4.1)
49
+ activesupport (= 6.1.4.1)
51
50
  globalid (>= 0.3.6)
52
- activemodel (6.1.3.2)
53
- activesupport (= 6.1.3.2)
54
- activerecord (6.1.3.2)
55
- activemodel (= 6.1.3.2)
56
- activesupport (= 6.1.3.2)
57
- activestorage (6.1.3.2)
58
- actionpack (= 6.1.3.2)
59
- activejob (= 6.1.3.2)
60
- activerecord (= 6.1.3.2)
61
- activesupport (= 6.1.3.2)
51
+ activemodel (6.1.4.1)
52
+ activesupport (= 6.1.4.1)
53
+ activerecord (6.1.4.1)
54
+ activemodel (= 6.1.4.1)
55
+ activesupport (= 6.1.4.1)
56
+ activestorage (6.1.4.1)
57
+ actionpack (= 6.1.4.1)
58
+ activejob (= 6.1.4.1)
59
+ activerecord (= 6.1.4.1)
60
+ activesupport (= 6.1.4.1)
62
61
  marcel (~> 1.0.0)
63
- mini_mime (~> 1.0.2)
64
- activesupport (6.1.3.2)
62
+ mini_mime (>= 1.1.0)
63
+ activesupport (6.1.4.1)
65
64
  concurrent-ruby (~> 1.0, >= 1.0.2)
66
65
  i18n (>= 1.6, < 2)
67
66
  minitest (>= 5.1)
@@ -70,7 +69,6 @@ GEM
70
69
  ast (2.4.2)
71
70
  builder (3.2.4)
72
71
  concurrent-ruby (1.1.9)
73
- connection_pool (2.2.5)
74
72
  crass (1.0.6)
75
73
  diff-lcs (1.4.4)
76
74
  docile (1.4.0)
@@ -86,12 +84,10 @@ GEM
86
84
  mini_mime (>= 0.1.1)
87
85
  marcel (1.0.1)
88
86
  method_source (1.0.0)
89
- mini_mime (1.0.3)
90
- mini_portile2 (2.5.3)
87
+ mini_mime (1.1.1)
91
88
  minitest (5.14.4)
92
89
  nio4r (2.5.7)
93
- nokogiri (1.11.7)
94
- mini_portile2 (~> 2.5.0)
90
+ nokogiri (1.11.7-x86_64-linux)
95
91
  racc (~> 1.4)
96
92
  parallel (1.20.1)
97
93
  parser (3.0.1.1)
@@ -100,35 +96,34 @@ GEM
100
96
  rack (2.2.3)
101
97
  rack-test (1.1.0)
102
98
  rack (>= 1.0, < 3)
103
- rails (6.1.3.2)
104
- actioncable (= 6.1.3.2)
105
- actionmailbox (= 6.1.3.2)
106
- actionmailer (= 6.1.3.2)
107
- actionpack (= 6.1.3.2)
108
- actiontext (= 6.1.3.2)
109
- actionview (= 6.1.3.2)
110
- activejob (= 6.1.3.2)
111
- activemodel (= 6.1.3.2)
112
- activerecord (= 6.1.3.2)
113
- activestorage (= 6.1.3.2)
114
- activesupport (= 6.1.3.2)
99
+ rails (6.1.4.1)
100
+ actioncable (= 6.1.4.1)
101
+ actionmailbox (= 6.1.4.1)
102
+ actionmailer (= 6.1.4.1)
103
+ actionpack (= 6.1.4.1)
104
+ actiontext (= 6.1.4.1)
105
+ actionview (= 6.1.4.1)
106
+ activejob (= 6.1.4.1)
107
+ activemodel (= 6.1.4.1)
108
+ activerecord (= 6.1.4.1)
109
+ activestorage (= 6.1.4.1)
110
+ activesupport (= 6.1.4.1)
115
111
  bundler (>= 1.15.0)
116
- railties (= 6.1.3.2)
112
+ railties (= 6.1.4.1)
117
113
  sprockets-rails (>= 2.0.0)
118
114
  rails-dom-testing (2.0.3)
119
115
  activesupport (>= 4.2.0)
120
116
  nokogiri (>= 1.6)
121
117
  rails-html-sanitizer (1.3.0)
122
118
  loofah (~> 2.3)
123
- railties (6.1.3.2)
124
- actionpack (= 6.1.3.2)
125
- activesupport (= 6.1.3.2)
119
+ railties (6.1.4.1)
120
+ actionpack (= 6.1.4.1)
121
+ activesupport (= 6.1.4.1)
126
122
  method_source
127
- rake (>= 0.8.7)
123
+ rake (>= 0.13)
128
124
  thor (~> 1.0)
129
125
  rainbow (3.0.0)
130
126
  rake (13.0.3)
131
- redis (4.3.1)
132
127
  regexp_parser (2.1.1)
133
128
  rexml (3.2.5)
134
129
  rspec (3.10.0)
@@ -156,10 +151,6 @@ GEM
156
151
  rubocop-ast (1.7.0)
157
152
  parser (>= 3.0.1.1)
158
153
  ruby-progressbar (1.11.0)
159
- sidekiq (6.2.1)
160
- connection_pool (>= 2.2.2)
161
- rack (~> 2.0)
162
- redis (>= 4.2.0)
163
154
  simplecov (0.21.2)
164
155
  docile (~> 1.1)
165
156
  simplecov-html (~> 0.11)
data/dclog.gemspec CHANGED
@@ -33,5 +33,4 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'simplecov'
34
34
 
35
35
  spec.add_dependency 'rails', '>= 5.0.0'
36
- spec.add_dependency 'sidekiq', '>= 5.0.0'
37
36
  end
data/lib/dclog/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dclog
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
data/lib/dclog.rb CHANGED
@@ -1,9 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rails'
4
- require 'sidekiq'
5
4
  require_relative 'dclog/version'
6
5
 
6
+ begin
7
+ require 'sidekiq'
8
+ rescue LoadError
9
+ Rails.logger.info('The Sidekiq gem is not installed')
10
+ end
11
+
7
12
  module Dclog
8
13
  class << self
9
14
  def method_missing(method, *args)
@@ -30,7 +35,7 @@ module Dclog
30
35
  def log_to_stdout(severity, caller, message)
31
36
  raise_no_method_error!(severity) unless valid_level?(severity)
32
37
 
33
- Sidekiq.logger.send(severity, caller) { message }
38
+ Sidekiq.logger.send(severity, caller) { message } if defined?(Sidekiq)
34
39
  Rails.logger.send(severity, caller) { message }
35
40
  end
36
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dclog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jairo Junior
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-08-13 00:00:00.000000000 Z
13
+ date: 2021-09-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -68,20 +68,6 @@ dependencies:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: 5.0.0
71
- - !ruby/object:Gem::Dependency
72
- name: sidekiq
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: 5.0.0
78
- type: :runtime
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 5.0.0
85
71
  description: A gem to format logs to json, and run one commando to log into sidekiq
86
72
  and rails
87
73
  email: