getaround_utils 0.2.13 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51565d059ccaf6283cf55e699ccd205e4f043efd597c093739f45e52fdfba22c
4
- data.tar.gz: 9f28c08c0f04120166c802c158dc8fa1263a3304e63c1e498d58f1df926987b5
3
+ metadata.gz: 05b96fb62ceb0e748a4ea723f073b00405b1a2f535ebc4410b03cb99f0fa8274
4
+ data.tar.gz: 58433c98978a20db3099baa14201d6ef6fca716981f0d003c2d04219e6bb3b8a
5
5
  SHA512:
6
- metadata.gz: 384fe8dbcbd3b6fbaea8b093a9217daeaaf3bd2c3432c7bb3bc4e7204055edf75e2b3f0af6926c17328c1f80b0ee054c05b7410f772734a99916cfe3eaf3ac4f
7
- data.tar.gz: 9040d753022b812502f084dc3c3cef369f6b4ca720123443d95f7c17ee2c2683cdba97505a453c9e584596413f9ba2abd6f052ef6aa4c974e59ef0b779b8c1a3
6
+ metadata.gz: 411e3f0b900353c822a4772ece9844581e4ccc0ef80aed43a70823a1fb1c1297a2699348883c7bb1333258f4f17b4f9dcd97092de5c74201306da94075a7f3d0
7
+ data.tar.gz: 90cde96571b65a8ac8d3e369bcb70a990e3fa10cd875865f21e4f41a07d85f38c6cc10acdeefd57d409427320dedbbd2aa1d378a5778ef7df6e24e5d60e1e607
@@ -6,6 +6,10 @@ inherit_gem:
6
6
  - .rubocop.yml
7
7
  - .rubocop-rspec.yml
8
8
 
9
+ AllCops:
10
+ Exclude:
11
+ - vendor/**/*
12
+
9
13
  Layout/MultilineMethodCallIndentation:
10
14
  Description: Vertical alignment results in awkward diffs.
11
15
  EnforcedStyle: indented
data/Gemfile CHANGED
@@ -1,8 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  gemspec
4
-
5
- gem "faraday", "~> 1.0"
6
- gem "ougai", "~> 1.8"
7
- gem "request_store_rails", "~> 2.0"
8
- gem "webmock", "~> 3.7"
@@ -1,235 +1,232 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- getaround_utils (0.2.13)
4
+ getaround_utils (0.2.19)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actioncable (6.0.0)
10
- actionpack (= 6.0.0)
9
+ actioncable (6.0.3.4)
10
+ actionpack (= 6.0.3.4)
11
11
  nio4r (~> 2.0)
12
12
  websocket-driver (>= 0.6.1)
13
- actionmailbox (6.0.0)
14
- actionpack (= 6.0.0)
15
- activejob (= 6.0.0)
16
- activerecord (= 6.0.0)
17
- activestorage (= 6.0.0)
18
- activesupport (= 6.0.0)
13
+ actionmailbox (6.0.3.4)
14
+ actionpack (= 6.0.3.4)
15
+ activejob (= 6.0.3.4)
16
+ activerecord (= 6.0.3.4)
17
+ activestorage (= 6.0.3.4)
18
+ activesupport (= 6.0.3.4)
19
19
  mail (>= 2.7.1)
20
- actionmailer (6.0.0)
21
- actionpack (= 6.0.0)
22
- actionview (= 6.0.0)
23
- activejob (= 6.0.0)
20
+ actionmailer (6.0.3.4)
21
+ actionpack (= 6.0.3.4)
22
+ actionview (= 6.0.3.4)
23
+ activejob (= 6.0.3.4)
24
24
  mail (~> 2.5, >= 2.5.4)
25
25
  rails-dom-testing (~> 2.0)
26
- actionpack (6.0.0)
27
- actionview (= 6.0.0)
28
- activesupport (= 6.0.0)
29
- rack (~> 2.0)
26
+ actionpack (6.0.3.4)
27
+ actionview (= 6.0.3.4)
28
+ activesupport (= 6.0.3.4)
29
+ rack (~> 2.0, >= 2.0.8)
30
30
  rack-test (>= 0.6.3)
31
31
  rails-dom-testing (~> 2.0)
32
32
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
33
- actiontext (6.0.0)
34
- actionpack (= 6.0.0)
35
- activerecord (= 6.0.0)
36
- activestorage (= 6.0.0)
37
- activesupport (= 6.0.0)
33
+ actiontext (6.0.3.4)
34
+ actionpack (= 6.0.3.4)
35
+ activerecord (= 6.0.3.4)
36
+ activestorage (= 6.0.3.4)
37
+ activesupport (= 6.0.3.4)
38
38
  nokogiri (>= 1.8.5)
39
- actionview (6.0.0)
40
- activesupport (= 6.0.0)
39
+ actionview (6.0.3.4)
40
+ activesupport (= 6.0.3.4)
41
41
  builder (~> 3.1)
42
42
  erubi (~> 1.4)
43
43
  rails-dom-testing (~> 2.0)
44
44
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
45
- activejob (6.0.0)
46
- activesupport (= 6.0.0)
45
+ activejob (6.0.3.4)
46
+ activesupport (= 6.0.3.4)
47
47
  globalid (>= 0.3.6)
48
- activemodel (6.0.0)
49
- activesupport (= 6.0.0)
50
- activerecord (6.0.0)
51
- activemodel (= 6.0.0)
52
- activesupport (= 6.0.0)
53
- activestorage (6.0.0)
54
- actionpack (= 6.0.0)
55
- activejob (= 6.0.0)
56
- activerecord (= 6.0.0)
48
+ activemodel (6.0.3.4)
49
+ activesupport (= 6.0.3.4)
50
+ activerecord (6.0.3.4)
51
+ activemodel (= 6.0.3.4)
52
+ activesupport (= 6.0.3.4)
53
+ activestorage (6.0.3.4)
54
+ actionpack (= 6.0.3.4)
55
+ activejob (= 6.0.3.4)
56
+ activerecord (= 6.0.3.4)
57
57
  marcel (~> 0.3.1)
58
- activesupport (6.0.0)
58
+ activesupport (6.0.3.4)
59
59
  concurrent-ruby (~> 1.0, >= 1.0.2)
60
60
  i18n (>= 0.7, < 2)
61
61
  minitest (~> 5.1)
62
62
  tzinfo (~> 1.1)
63
- zeitwerk (~> 2.1, >= 2.1.8)
63
+ zeitwerk (~> 2.2, >= 2.2.2)
64
64
  addressable (2.7.0)
65
65
  public_suffix (>= 2.0.2, < 5.0)
66
- ast (2.4.0)
67
- builder (3.2.3)
68
- coderay (1.1.2)
69
- concurrent-ruby (1.1.5)
70
- connection_pool (2.2.2)
71
- crack (0.4.3)
72
- safe_yaml (~> 1.0.0)
73
- crass (1.0.5)
74
- diff-lcs (1.3)
75
- erubi (1.9.0)
76
- faraday (1.0.0)
77
- multipart-post (>= 1.2, < 3)
78
- getaround-rubocop (0.1.0)
79
- relaxed-rubocop (~> 2.4, >= 2.4.0)
80
- rubocop (~> 0.75, >= 0.75.0)
66
+ ast (2.4.1)
67
+ builder (3.2.4)
68
+ coderay (1.1.3)
69
+ concurrent-ruby (1.1.7)
70
+ connection_pool (2.2.3)
71
+ crack (0.4.4)
72
+ crass (1.0.6)
73
+ diff-lcs (1.4.4)
74
+ erubi (1.10.0)
75
+ getaround-rubocop (0.2.2)
76
+ relaxed-rubocop (= 2.5)
77
+ rubocop (= 1.3.1)
78
+ rubocop-rspec (= 2.0.0)
81
79
  globalid (0.4.2)
82
80
  activesupport (>= 4.2.0)
83
- hashdiff (1.0.0)
84
- i18n (1.7.0)
81
+ hashdiff (1.0.1)
82
+ i18n (1.8.5)
85
83
  concurrent-ruby (~> 1.0)
86
- jaro_winkler (1.5.4)
87
84
  lograge (0.11.2)
88
85
  actionpack (>= 4)
89
86
  activesupport (>= 4)
90
87
  railties (>= 4)
91
88
  request_store (~> 1.0)
92
- loofah (2.3.1)
89
+ loofah (2.7.0)
93
90
  crass (~> 1.0.2)
94
91
  nokogiri (>= 1.5.9)
95
92
  mail (2.7.1)
96
93
  mini_mime (>= 0.1.1)
97
94
  marcel (0.3.3)
98
95
  mimemagic (~> 0.3.2)
99
- method_source (0.9.2)
100
- mimemagic (0.3.3)
96
+ method_source (1.0.0)
97
+ mimemagic (0.3.5)
101
98
  mini_mime (1.0.2)
102
99
  mini_portile2 (2.4.0)
103
- minitest (5.13.0)
104
- multipart-post (2.1.1)
105
- nio4r (2.5.2)
100
+ minitest (5.14.2)
101
+ nio4r (2.5.4)
106
102
  nokogiri (1.10.10)
107
103
  mini_portile2 (~> 2.4.0)
108
- oj (3.10.14)
104
+ oj (3.10.16)
109
105
  ougai (1.8.5)
110
106
  oj (~> 3.10)
111
- parallel (1.18.0)
112
- parser (2.6.5.0)
113
- ast (~> 2.4.0)
114
- pry (0.12.2)
115
- coderay (~> 1.1.0)
116
- method_source (~> 0.9.0)
117
- public_suffix (4.0.2)
107
+ parallel (1.20.0)
108
+ parser (2.7.2.0)
109
+ ast (~> 2.4.1)
110
+ pry (0.13.1)
111
+ coderay (~> 1.1)
112
+ method_source (~> 1.0)
113
+ public_suffix (4.0.6)
118
114
  rack (2.2.3)
119
- rack-protection (2.0.7)
120
- rack
121
115
  rack-test (1.1.0)
122
116
  rack (>= 1.0, < 3)
123
- rails (6.0.0)
124
- actioncable (= 6.0.0)
125
- actionmailbox (= 6.0.0)
126
- actionmailer (= 6.0.0)
127
- actionpack (= 6.0.0)
128
- actiontext (= 6.0.0)
129
- actionview (= 6.0.0)
130
- activejob (= 6.0.0)
131
- activemodel (= 6.0.0)
132
- activerecord (= 6.0.0)
133
- activestorage (= 6.0.0)
134
- activesupport (= 6.0.0)
117
+ rails (6.0.3.4)
118
+ actioncable (= 6.0.3.4)
119
+ actionmailbox (= 6.0.3.4)
120
+ actionmailer (= 6.0.3.4)
121
+ actionpack (= 6.0.3.4)
122
+ actiontext (= 6.0.3.4)
123
+ actionview (= 6.0.3.4)
124
+ activejob (= 6.0.3.4)
125
+ activemodel (= 6.0.3.4)
126
+ activerecord (= 6.0.3.4)
127
+ activestorage (= 6.0.3.4)
128
+ activesupport (= 6.0.3.4)
135
129
  bundler (>= 1.3.0)
136
- railties (= 6.0.0)
130
+ railties (= 6.0.3.4)
137
131
  sprockets-rails (>= 2.0.0)
138
132
  rails-dom-testing (2.0.3)
139
133
  activesupport (>= 4.2.0)
140
134
  nokogiri (>= 1.6)
141
135
  rails-html-sanitizer (1.3.0)
142
136
  loofah (~> 2.3)
143
- railties (6.0.0)
144
- actionpack (= 6.0.0)
145
- activesupport (= 6.0.0)
137
+ railties (6.0.3.4)
138
+ actionpack (= 6.0.3.4)
139
+ activesupport (= 6.0.3.4)
146
140
  method_source
147
141
  rake (>= 0.8.7)
148
142
  thor (>= 0.20.3, < 2.0)
149
143
  rainbow (3.0.0)
150
- rake (12.3.3)
151
- redis (4.1.3)
152
- relaxed-rubocop (2.4)
153
- request_store (1.4.1)
144
+ rake (13.0.1)
145
+ redis (4.2.3)
146
+ regexp_parser (1.8.2)
147
+ relaxed-rubocop (2.5)
148
+ request_store (1.5.0)
154
149
  rack (>= 1.4)
155
150
  request_store_rails (2.0.0)
156
151
  concurrent-ruby (~> 1.0)
157
- rspec (3.9.0)
158
- rspec-core (~> 3.9.0)
159
- rspec-expectations (~> 3.9.0)
160
- rspec-mocks (~> 3.9.0)
161
- rspec-core (3.9.0)
162
- rspec-support (~> 3.9.0)
163
- rspec-expectations (3.9.0)
152
+ rexml (3.2.4)
153
+ rspec (3.10.0)
154
+ rspec-core (~> 3.10.0)
155
+ rspec-expectations (~> 3.10.0)
156
+ rspec-mocks (~> 3.10.0)
157
+ rspec-core (3.10.0)
158
+ rspec-support (~> 3.10.0)
159
+ rspec-expectations (3.10.0)
164
160
  diff-lcs (>= 1.2.0, < 2.0)
165
- rspec-support (~> 3.9.0)
166
- rspec-mocks (3.9.0)
161
+ rspec-support (~> 3.10.0)
162
+ rspec-mocks (3.10.0)
167
163
  diff-lcs (>= 1.2.0, < 2.0)
168
- rspec-support (~> 3.9.0)
169
- rspec-rails (3.9.0)
170
- actionpack (>= 3.0)
171
- activesupport (>= 3.0)
172
- railties (>= 3.0)
173
- rspec-core (~> 3.9.0)
174
- rspec-expectations (~> 3.9.0)
175
- rspec-mocks (~> 3.9.0)
176
- rspec-support (~> 3.9.0)
177
- rspec-support (3.9.0)
178
- rubocop (0.76.0)
179
- jaro_winkler (~> 1.5.1)
164
+ rspec-support (~> 3.10.0)
165
+ rspec-rails (4.0.1)
166
+ actionpack (>= 4.2)
167
+ activesupport (>= 4.2)
168
+ railties (>= 4.2)
169
+ rspec-core (~> 3.9)
170
+ rspec-expectations (~> 3.9)
171
+ rspec-mocks (~> 3.9)
172
+ rspec-support (~> 3.9)
173
+ rspec-support (3.10.0)
174
+ rubocop (1.3.1)
180
175
  parallel (~> 1.10)
181
- parser (>= 2.6)
176
+ parser (>= 2.7.1.5)
182
177
  rainbow (>= 2.2.2, < 4.0)
178
+ regexp_parser (>= 1.8)
179
+ rexml
180
+ rubocop-ast (>= 1.1.1)
183
181
  ruby-progressbar (~> 1.7)
184
- unicode-display_width (>= 1.4.0, < 1.7)
185
- rubocop-rspec (1.36.0)
186
- rubocop (>= 0.68.1)
182
+ unicode-display_width (>= 1.4.0, < 2.0)
183
+ rubocop-ast (1.1.1)
184
+ parser (>= 2.7.1.5)
185
+ rubocop-rspec (2.0.0)
186
+ rubocop (~> 1.0)
187
+ rubocop-ast (>= 1.1.0)
187
188
  ruby-progressbar (1.10.1)
188
- safe_yaml (1.0.5)
189
- sidekiq (6.0.3)
189
+ sidekiq (6.1.2)
190
190
  connection_pool (>= 2.2.2)
191
- rack (>= 2.0.0)
192
- rack-protection (>= 2.0.0)
193
- redis (>= 4.1.0)
194
- sprockets (4.0.0)
191
+ rack (~> 2.0)
192
+ redis (>= 4.2.0)
193
+ sprockets (4.0.2)
195
194
  concurrent-ruby (~> 1.0)
196
195
  rack (> 1, < 3)
197
- sprockets-rails (3.2.1)
196
+ sprockets-rails (3.2.2)
198
197
  actionpack (>= 4.0)
199
198
  activesupport (>= 4.0)
200
199
  sprockets (>= 3.0.0)
201
- thor (0.20.3)
200
+ thor (1.0.1)
202
201
  thread_safe (0.3.6)
203
- tzinfo (1.2.5)
202
+ tzinfo (1.2.8)
204
203
  thread_safe (~> 0.1)
205
- unicode-display_width (1.6.0)
206
- webmock (3.7.6)
204
+ unicode-display_width (1.7.0)
205
+ webmock (3.10.0)
207
206
  addressable (>= 2.3.6)
208
207
  crack (>= 0.3.2)
209
208
  hashdiff (>= 0.4.0, < 2.0.0)
210
- websocket-driver (0.7.1)
209
+ websocket-driver (0.7.3)
211
210
  websocket-extensions (>= 0.1.0)
212
211
  websocket-extensions (0.1.5)
213
- zeitwerk (2.2.1)
212
+ zeitwerk (2.4.1)
214
213
 
215
214
  PLATFORMS
216
215
  ruby
217
216
 
218
217
  DEPENDENCIES
219
218
  bundler (~> 2.0)
220
- faraday (~> 1.0)
221
- getaround-rubocop (~> 0.1.0, >= 0.1.0)
219
+ getaround-rubocop (= 0.2.2)
222
220
  getaround_utils!
223
221
  lograge (~> 0.11.2)
224
222
  ougai (~> 1.8)
225
- pry (~> 0.12.2)
223
+ pry (~> 0.13.1)
226
224
  rails (~> 6.0)
227
- rake (~> 12.3)
225
+ rake (~> 13.0)
228
226
  request_store_rails (~> 2.0)
229
227
  rspec (~> 3.9, >= 3.9.0)
230
- rspec-rails (~> 3.9)
231
- rubocop (~> 0.75, >= 0.75.0)
232
- rubocop-rspec (~> 1.36, >= 0.36.0)
228
+ rspec-rails (~> 4.0)
229
+ rubocop (= 1.3.1)
233
230
  sidekiq (~> 6.0)
234
231
  webmock (~> 3.7)
235
232
 
@@ -1,28 +1,36 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative './lib/getaround_utils/version'
2
4
 
3
5
  Gem::Specification.new do |gem|
4
- gem.name = 'getaround_utils'
5
- gem.version = GetaroundUtils::VERSION
6
- gem.summary = 'Backend shared utility classes'
7
- gem.description = 'Shared base utility classes for Getaround Backend Applications.'
8
- gem.authors = ['Drivy', 'Laurent Humez']
9
- gem.email = ['oss@drivy.com']
10
- gem.homepage = 'https://github.com/drivy'
11
- gem.license = 'MIT'
6
+ gem.name = 'getaround_utils'
7
+ gem.required_ruby_version = '>=2.6'
8
+ gem.version = GetaroundUtils::VERSION
9
+ gem.summary = 'Backend shared utility classes'
10
+ gem.description = 'Shared base utility classes for Getaround Backend Applications.'
11
+ gem.authors = ['Drivy', 'Laurent Humez']
12
+ gem.email = ['oss@drivy.com']
13
+ gem.homepage = 'https://github.com/drivy'
14
+ gem.license = 'MIT'
12
15
 
13
- gem.files = Dir.chdir(File.expand_path(__dir__)) do
16
+ gem.files = Dir.chdir(File.expand_path(__dir__)) do
14
17
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
15
18
  end
16
19
 
17
- gem.add_development_dependency "bundler", "~> 2.0"
18
- gem.add_development_dependency 'getaround-rubocop', '~> 0.1.0', '>= 0.1.0'
20
+ # Development dependencies
21
+ gem.add_development_dependency 'bundler', '~> 2.0'
22
+ gem.add_development_dependency 'getaround-rubocop', '= 0.2.2'
23
+ gem.add_development_dependency 'pry', '~> 0.13.1'
24
+ gem.add_development_dependency 'rake', '~> 13.0'
25
+ gem.add_development_dependency 'rspec', '~> 3.9', '>= 3.9.0'
26
+ gem.add_development_dependency 'rspec-rails', '~> 4.0'
27
+ gem.add_development_dependency 'rubocop', '= 1.3.1'
28
+ gem.add_development_dependency 'webmock', '~> 3.7'
29
+
30
+ # Functional (optional) dependencies
19
31
  gem.add_development_dependency 'lograge', '~> 0.11.2'
20
- gem.add_development_dependency 'pry', '~> 0.12.2'
32
+ gem.add_development_dependency 'ougai', '~> 1.8'
21
33
  gem.add_development_dependency 'rails', '~> 6.0'
22
- gem.add_development_dependency "rake", "~> 12.3"
23
- gem.add_development_dependency 'rspec', '~> 3.9', '>= 3.9.0'
24
- gem.add_development_dependency 'rspec-rails', '~> 3.9'
25
- gem.add_development_dependency 'rubocop', '~> 0.75', '>= 0.75.0'
26
- gem.add_development_dependency 'rubocop-rspec', '~> 1.36', '>= 0.36.0'
34
+ gem.add_development_dependency 'request_store_rails', '~> 2.0'
27
35
  gem.add_development_dependency 'sidekiq', '~> 6.0'
28
36
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'getaround_utils/mixins'
2
4
  require 'getaround_utils/ougai'
3
5
  require 'getaround_utils/utils'
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'getaround_utils/mixins/loggable'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'logger'
2
4
  module GetaroundUtils; end
3
5
  module GetaroundUtils::Mixins; end
@@ -15,7 +17,7 @@ module GetaroundUtils::Mixins::Loggable
15
17
  end
16
18
 
17
19
  def loggable_logger_fallback
18
- @loggable_logger_fallback ||= Logger.new(STDOUT)
20
+ @loggable_logger_fallback ||= Logger.new($stdout)
19
21
  end
20
22
 
21
23
  def loggable_logger
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'getaround_utils/ougai/deep_key_value_formatter'
2
4
  require 'getaround_utils/ougai/json_formatter'
@@ -12,6 +12,6 @@ class GetaroundUtils::Ougai::DeepKeyValueFormatter < Ougai::Formatters::Base
12
12
  data[:message] = message if message != 'No message'
13
13
 
14
14
  payload = { severity: severity, progname: progname }.merge(data).compact
15
- GetaroundUtils::Utils::DeepKeyValue.serialize(payload) + "\n"
15
+ "#{GetaroundUtils::Utils::DeepKeyValue.serialize(payload)}\n"
16
16
  end
17
17
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'ougai'
3
4
  require 'json'
4
5
 
5
6
  module GetaroundUtils; end
@@ -12,6 +13,6 @@ class GetaroundUtils::Ougai::JsonFormatter < Ougai::Formatters::Base
12
13
  unless message == 'No message'
13
14
 
14
15
  payload = { severity: severity, progname: progname }.merge(data).compact
15
- JSON.dump(payload) + "\n"
16
+ "#{JSON.dump(payload)}\n"
16
17
  end
17
18
  end
@@ -16,8 +16,27 @@ class GetaroundUtils::Railties::Lograge < Rails::Railtie
16
16
  payload[:lograge][:remote_ip] = request.remote_ip
17
17
  payload[:lograge][:user_agent] = request.user_agent
18
18
  payload[:lograge][:referer] = request.referer
19
- payload[:lograge][:session_id] = session.is_a?(Hash) ? session[:id] : session.id if defined?(session)
19
+ payload[:lograge][:session_id] = session.is_a?(Hash) ? session[:id] : session.id.to_s if defined?(session)
20
20
  payload[:lograge][:user_id] = current_user&.id if defined?(current_user)
21
+ payload[:lograge][:origin] = 'lograge'
22
+
23
+ if defined?(NewRelic::Agent::Tracer)
24
+ if span_id = NewRelic::Agent::Tracer.span_id
25
+ payload[:lograge]['span.id'] = span_id
26
+ end
27
+ if trace_id = NewRelic::Agent::Tracer.trace_id
28
+ payload[:lograge]['trace.id'] = trace_id
29
+ end
30
+ payload[:lograge]['entity.type'] = 'SERVICE'
31
+ payload[:lograge]['entity.guid'] = NewRelic::Agent.config[:entity_guid]
32
+ payload[:lograge]['entity.name'] = NewRelic::Agent.config[:app_name]&.first
33
+ end
34
+
35
+ if defined?(NewRelic::Agent::Hostname)
36
+ payload[:lograge]['hostname'] = NewRelic::Agent::Hostname.get
37
+ end
38
+
39
+ nil
21
40
  end
22
41
  end
23
42
 
@@ -44,7 +44,7 @@ class OugaiRequestStoreMiddleware
44
44
  end
45
45
 
46
46
  class GetaroundUtils::Railties::Ougai < Rails::Railtie
47
- config.ougai_logger = OugaiRailsLogger.new(STDOUT)
47
+ config.ougai_logger = OugaiRailsLogger.new($stdout)
48
48
  config.ougai_logger.after_initialize if Rails::VERSION::MAJOR < 6
49
49
  config.ougai_logger.formatter = GetaroundUtils::Ougai::JsonFormatter.new
50
50
  config.ougai_logger.before_log = lambda do |data|
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'getaround_utils/utils/deep_key_value'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module GetaroundUtils; end
2
4
  module GetaroundUtils::Utils; end
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module GetaroundUtils
2
- VERSION = '0.2.13'.freeze
4
+ VERSION = '0.2.19'
3
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getaround_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drivy
8
8
  - Laurent Humez
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-10 00:00:00.000000000 Z
12
+ date: 2021-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -29,152 +29,162 @@ dependencies:
29
29
  name: getaround-rubocop
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 0.1.0
34
+ version: 0.2.2
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '='
40
+ - !ruby/object:Gem::Version
41
+ version: 0.2.2
42
+ - !ruby/object:Gem::Dependency
43
+ name: pry
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
35
46
  - - "~>"
36
47
  - !ruby/object:Gem::Version
37
- version: 0.1.0
48
+ version: 0.13.1
38
49
  type: :development
39
50
  prerelease: false
40
51
  version_requirements: !ruby/object:Gem::Requirement
41
52
  requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: 0.1.0
45
53
  - - "~>"
46
54
  - !ruby/object:Gem::Version
47
- version: 0.1.0
55
+ version: 0.13.1
48
56
  - !ruby/object:Gem::Dependency
49
- name: lograge
57
+ name: rake
50
58
  requirement: !ruby/object:Gem::Requirement
51
59
  requirements:
52
60
  - - "~>"
53
61
  - !ruby/object:Gem::Version
54
- version: 0.11.2
62
+ version: '13.0'
55
63
  type: :development
56
64
  prerelease: false
57
65
  version_requirements: !ruby/object:Gem::Requirement
58
66
  requirements:
59
67
  - - "~>"
60
68
  - !ruby/object:Gem::Version
61
- version: 0.11.2
69
+ version: '13.0'
62
70
  - !ruby/object:Gem::Dependency
63
- name: pry
71
+ name: rspec
64
72
  requirement: !ruby/object:Gem::Requirement
65
73
  requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 3.9.0
66
77
  - - "~>"
67
78
  - !ruby/object:Gem::Version
68
- version: 0.12.2
79
+ version: '3.9'
69
80
  type: :development
70
81
  prerelease: false
71
82
  version_requirements: !ruby/object:Gem::Requirement
72
83
  requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 3.9.0
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: 0.12.2
89
+ version: '3.9'
76
90
  - !ruby/object:Gem::Dependency
77
- name: rails
91
+ name: rspec-rails
78
92
  requirement: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '6.0'
96
+ version: '4.0'
83
97
  type: :development
84
98
  prerelease: false
85
99
  version_requirements: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '6.0'
103
+ version: '4.0'
90
104
  - !ruby/object:Gem::Dependency
91
- name: rake
105
+ name: rubocop
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 1.3.1
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 1.3.1
118
+ - !ruby/object:Gem::Dependency
119
+ name: webmock
92
120
  requirement: !ruby/object:Gem::Requirement
93
121
  requirements:
94
122
  - - "~>"
95
123
  - !ruby/object:Gem::Version
96
- version: '12.3'
124
+ version: '3.7'
97
125
  type: :development
98
126
  prerelease: false
99
127
  version_requirements: !ruby/object:Gem::Requirement
100
128
  requirements:
101
129
  - - "~>"
102
130
  - !ruby/object:Gem::Version
103
- version: '12.3'
131
+ version: '3.7'
104
132
  - !ruby/object:Gem::Dependency
105
- name: rspec
133
+ name: lograge
106
134
  requirement: !ruby/object:Gem::Requirement
107
135
  requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: 3.9.0
111
136
  - - "~>"
112
137
  - !ruby/object:Gem::Version
113
- version: '3.9'
138
+ version: 0.11.2
114
139
  type: :development
115
140
  prerelease: false
116
141
  version_requirements: !ruby/object:Gem::Requirement
117
142
  requirements:
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 3.9.0
121
143
  - - "~>"
122
144
  - !ruby/object:Gem::Version
123
- version: '3.9'
145
+ version: 0.11.2
124
146
  - !ruby/object:Gem::Dependency
125
- name: rspec-rails
147
+ name: ougai
126
148
  requirement: !ruby/object:Gem::Requirement
127
149
  requirements:
128
150
  - - "~>"
129
151
  - !ruby/object:Gem::Version
130
- version: '3.9'
152
+ version: '1.8'
131
153
  type: :development
132
154
  prerelease: false
133
155
  version_requirements: !ruby/object:Gem::Requirement
134
156
  requirements:
135
157
  - - "~>"
136
158
  - !ruby/object:Gem::Version
137
- version: '3.9'
159
+ version: '1.8'
138
160
  - !ruby/object:Gem::Dependency
139
- name: rubocop
161
+ name: rails
140
162
  requirement: !ruby/object:Gem::Requirement
141
163
  requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- version: 0.75.0
145
164
  - - "~>"
146
165
  - !ruby/object:Gem::Version
147
- version: '0.75'
166
+ version: '6.0'
148
167
  type: :development
149
168
  prerelease: false
150
169
  version_requirements: !ruby/object:Gem::Requirement
151
170
  requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- version: 0.75.0
155
171
  - - "~>"
156
172
  - !ruby/object:Gem::Version
157
- version: '0.75'
173
+ version: '6.0'
158
174
  - !ruby/object:Gem::Dependency
159
- name: rubocop-rspec
175
+ name: request_store_rails
160
176
  requirement: !ruby/object:Gem::Requirement
161
177
  requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- version: 0.36.0
165
178
  - - "~>"
166
179
  - !ruby/object:Gem::Version
167
- version: '1.36'
180
+ version: '2.0'
168
181
  type: :development
169
182
  prerelease: false
170
183
  version_requirements: !ruby/object:Gem::Requirement
171
184
  requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: 0.36.0
175
185
  - - "~>"
176
186
  - !ruby/object:Gem::Version
177
- version: '1.36'
187
+ version: '2.0'
178
188
  - !ruby/object:Gem::Dependency
179
189
  name: sidekiq
180
190
  requirement: !ruby/object:Gem::Requirement
@@ -217,7 +227,7 @@ homepage: https://github.com/drivy
217
227
  licenses:
218
228
  - MIT
219
229
  metadata: {}
220
- post_install_message:
230
+ post_install_message:
221
231
  rdoc_options: []
222
232
  require_paths:
223
233
  - lib
@@ -225,7 +235,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
235
  requirements:
226
236
  - - ">="
227
237
  - !ruby/object:Gem::Version
228
- version: '0'
238
+ version: '2.6'
229
239
  required_rubygems_version: !ruby/object:Gem::Requirement
230
240
  requirements:
231
241
  - - ">="
@@ -233,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
243
  version: '0'
234
244
  requirements: []
235
245
  rubygems_version: 3.0.3
236
- signing_key:
246
+ signing_key:
237
247
  specification_version: 4
238
248
  summary: Backend shared utility classes
239
249
  test_files: []