appydays 0.6.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/appydays/configurable/spec_helpers.rb +20 -0
- data/lib/appydays/loggable.rb +11 -2
- data/lib/appydays/version.rb +1 -1
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd157bff00c9a41a678f4f8877660e90f9bb094b367ea0bedf153d7ea30d528
|
4
|
+
data.tar.gz: 4da1794259b8f5a2ad0d43544092487b91b56f840439404567ca26467264c8d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85e0c276cb7978298f3a14fadfa71e767b216b2fd419beecda09fe6855eea3de8cf58e9651869eae45a1317a47df659ff0db69de8daf29533040f190eaac07b2
|
7
|
+
data.tar.gz: 0d07c35465caebd19c9cb86a3d2113cdd1bacebe80cfedd2251da076fdaadec46d0fa47c5e147e9c3fee78ec7b1afff39291ea30057b20e562c28010af4710dc
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "appydays/configurable"
|
4
|
+
|
5
|
+
module Appydays::Configurable::SpecHelpers
|
6
|
+
def self.included(context)
|
7
|
+
context.around(:each) do |example|
|
8
|
+
to_reset = example.metadata[:reset_configuration]
|
9
|
+
if to_reset
|
10
|
+
to_reset = [to_reset] unless to_reset.respond_to?(:to_ary)
|
11
|
+
to_reset.each(&:reset_configuration)
|
12
|
+
end
|
13
|
+
begin
|
14
|
+
example.run
|
15
|
+
ensure
|
16
|
+
to_reset&.each(&:reset_configuration)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/appydays/loggable.rb
CHANGED
@@ -72,8 +72,17 @@ module Appydays::Loggable
|
|
72
72
|
SemanticLogger.add_appender(io: $stdout, formatter: format.to_sym)
|
73
73
|
end
|
74
74
|
|
75
|
-
def self.with_log_tags(tags
|
76
|
-
|
75
|
+
def self.with_log_tags(tags)
|
76
|
+
if defined?(Sentry)
|
77
|
+
Sentry.configure_scope do |scope|
|
78
|
+
scope.set_extras(tags)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
blockresult = nil
|
82
|
+
SemanticLogger.named_tagged(tags) do
|
83
|
+
blockresult = yield
|
84
|
+
end
|
85
|
+
return blockresult
|
77
86
|
end
|
78
87
|
|
79
88
|
@stderr_appended = false
|
data/lib/appydays/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appydays
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lithic Tech
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -142,56 +142,56 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 1.31.1
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 1.31.1
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rubocop-performance
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 1.14.2
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 1.14.2
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop-rake
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 0.6.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 0.6.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rubocop-sequel
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 0.3.4
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 0.3.4
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: sequel
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,13 +237,14 @@ dependencies:
|
|
237
237
|
description: 'appydays provides support for env-based configuration, and common structured
|
238
238
|
logging capabilities
|
239
239
|
|
240
|
-
'
|
241
|
-
email:
|
240
|
+
'
|
241
|
+
email:
|
242
242
|
executables: []
|
243
243
|
extensions: []
|
244
244
|
extra_rdoc_files: []
|
245
245
|
files:
|
246
246
|
- lib/appydays/configurable.rb
|
247
|
+
- lib/appydays/configurable/spec_helpers.rb
|
247
248
|
- lib/appydays/dotenviable.rb
|
248
249
|
- lib/appydays/loggable.rb
|
249
250
|
- lib/appydays/loggable/httparty_formatter.rb
|
@@ -258,7 +259,7 @@ licenses:
|
|
258
259
|
- MIT
|
259
260
|
metadata:
|
260
261
|
rubygems_mfa_required: 'true'
|
261
|
-
post_install_message:
|
262
|
+
post_install_message:
|
262
263
|
rdoc_options: []
|
263
264
|
require_paths:
|
264
265
|
- lib
|
@@ -273,8 +274,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
274
|
- !ruby/object:Gem::Version
|
274
275
|
version: '0'
|
275
276
|
requirements: []
|
276
|
-
rubygems_version: 3.
|
277
|
-
signing_key:
|
277
|
+
rubygems_version: 3.3.3
|
278
|
+
signing_key:
|
278
279
|
specification_version: 4
|
279
280
|
summary: Provides support for env-based configuration, and common structured logging
|
280
281
|
capabilities
|