vault-tools 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODEOWNERS +2 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/lib/vault-tools/version.rb +1 -1
- data/lib/vault-tools/web.rb +2 -1
- data/test/web_test.rb +12 -0
- data/vault-tools.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 760a137b1c3e642183950c4e765d3ec9b60c327178b2faac45ff7048d94f9d82
|
4
|
+
data.tar.gz: 6743dd1b28722d7995215b8d9d6a9fc615572a97447fc64df5666d3f452bbe89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0b647bf7ab47175b9337434f2c9064f4ee89318f2df3aebb3e2354a47fde6edcab89a713a864e6b94d32651d755a267ea5ea502b197481d6ba8fb7f3b05183b
|
7
|
+
data.tar.gz: c2a4280ee1a422e1a80016afaa62b22ee3c7489bcc4a5b510b2aa485267bbf9564fb34aa1f6c9ce82593ceef698a11e44e5dc95a19221a1068f6306fd02033a7
|
data/CODEOWNERS
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -95,5 +95,8 @@ Generate the API documentation:
|
|
95
95
|
> bundle exec rake release
|
96
96
|
|
97
97
|
## Release Notes
|
98
|
+
Version 2.1.1 (2022-01-06):
|
99
|
+
- Added tooling to support metadata tags on request status metrics.
|
100
|
+
- Reverted change to minimum supported ruby version.
|
98
101
|
Version 2.1.0 (2021-08-26):
|
99
102
|
guard-minitest was removed due to it causing problems with the ruby version upgrade. Was not actively used anymore. Hasn't been updated in a long time.
|
data/lib/vault-tools/version.rb
CHANGED
data/lib/vault-tools/web.rb
CHANGED
@@ -112,7 +112,8 @@ module Vault
|
|
112
112
|
# Log details about the request including how long it took.
|
113
113
|
after do
|
114
114
|
@action ||= 'unknown'
|
115
|
-
|
115
|
+
@metadata ||= {}
|
116
|
+
Log.count_status(response.status, @metadata.merge(request_path: request.path_info))
|
116
117
|
Log.time("http.#{@action}", (Time.now - @start_request) * 1000)
|
117
118
|
end
|
118
119
|
|
data/test/web_test.rb
CHANGED
@@ -247,6 +247,18 @@ class WebTest < Vault::TestCase
|
|
247
247
|
assert_equal request_id, last_response.headers['Request-ID']
|
248
248
|
end
|
249
249
|
|
250
|
+
def test_that_metadata_gets_logged
|
251
|
+
mock(Vault::Log).count_status(200, {
|
252
|
+
'user' => 'amanda',
|
253
|
+
'some_flag' => 'true',
|
254
|
+
request_path: '/logging-test'
|
255
|
+
})
|
256
|
+
app.get '/logging-test' do
|
257
|
+
@metadata = {'user' => 'amanda', 'some_flag' => 'true'}
|
258
|
+
end
|
259
|
+
get '/logging-test'
|
260
|
+
end
|
261
|
+
|
250
262
|
def test_that_excon_proxies_request_id
|
251
263
|
request_id = 'JKJK-123'
|
252
264
|
Excon.stub(
|
data/vault-tools.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.description = "Basic tools for Heroku Vault's Ruby projects"
|
15
15
|
gem.summary = "Test classes, base web classes, and helpers - oh my!"
|
16
16
|
gem.homepage = ""
|
17
|
-
gem.required_ruby_version = '>= 2.
|
17
|
+
gem.required_ruby_version = '>= 2.5.3'
|
18
18
|
|
19
19
|
gem.files = `git ls-files`.split($/)
|
20
20
|
gem.test_files = gem.files.grep('^(test|spec|features)/')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vault-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Continanza
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: scrolls
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- ".circleci/config.yml"
|
224
224
|
- ".gitignore"
|
225
225
|
- ".yardopts"
|
226
|
+
- CODEOWNERS
|
226
227
|
- Gemfile
|
227
228
|
- Gemfile.lock
|
228
229
|
- Guardfile
|
@@ -278,7 +279,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
278
279
|
requirements:
|
279
280
|
- - ">="
|
280
281
|
- !ruby/object:Gem::Version
|
281
|
-
version: 2.
|
282
|
+
version: 2.5.3
|
282
283
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
283
284
|
requirements:
|
284
285
|
- - ">="
|