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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30215f797eb0408bdb04fcef03f996e62742d53900ab541fa88778d3bd9c3bb7
4
- data.tar.gz: 30dd62061f20a3f7c4d98485d33d2dfaed376ecd09d872a795879c3fa29e062a
3
+ metadata.gz: 760a137b1c3e642183950c4e765d3ec9b60c327178b2faac45ff7048d94f9d82
4
+ data.tar.gz: 6743dd1b28722d7995215b8d9d6a9fc615572a97447fc64df5666d3f452bbe89
5
5
  SHA512:
6
- metadata.gz: 47006d1b43d504f4faeb5052485b4fcc899be520353c84d1bbf80091983a2406977166a4089807f4222d54baafce4d0ccf1c74264cde82fa35c798448deb4c27
7
- data.tar.gz: 23e8a5878796fef48fb97f809e87d813d9c12943d34e3acec788735920391bab399f32dbf7a33b94d51f3867ca5cbc048f149ae3c183b31d0237cb171ee84390
6
+ metadata.gz: f0b647bf7ab47175b9337434f2c9064f4ee89318f2df3aebb3e2354a47fde6edcab89a713a864e6b94d32651d755a267ea5ea502b197481d6ba8fb7f3b05183b
7
+ data.tar.gz: c2a4280ee1a422e1a80016afaa62b22ee3c7489bcc4a5b510b2aa485267bbf9564fb34aa1f6c9ce82593ceef698a11e44e5dc95a19221a1068f6306fd02033a7
data/CODEOWNERS ADDED
@@ -0,0 +1,2 @@
1
+ # Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing.
2
+ #ECCN:Open Source
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault-tools (2.1.0)
4
+ vault-tools (2.1.1)
5
5
  aws-sdk-s3 (~> 1.0)
6
6
  coderay
7
7
  excon
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.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Vault
4
4
  module Tools
5
- VERSION = '2.1.0'
5
+ VERSION = '2.1.1'
6
6
  end
7
7
  end
@@ -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
- Log.count_status(response.status, request_path: request.path_info)
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.7.1'
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.0
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: 2021-08-26 00:00:00.000000000 Z
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.7.1
282
+ version: 2.5.3
282
283
  required_rubygems_version: !ruby/object:Gem::Requirement
283
284
  requirements:
284
285
  - - ">="