vault-tools 0.5.11 → 0.5.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault-tools (0.5.11)
4
+ vault-tools (0.5.12)
5
5
  aws-sdk
6
6
  fernet (= 2.0.rc2)
7
7
  heroku-api
@@ -64,8 +64,8 @@ module Vault
64
64
  # Determine the path on S3 for the given invoice
65
65
  def path_for(opts = {})
66
66
  validate_path_opts(opts)
67
- start = DateTime.parse(opts[:start_time].to_s)
68
- stop = DateTime.parse(opts[:stop_time].to_s)
67
+ start = DateTime.parse(opts[:start_time].to_s).strftime('%Y-%m-%d')
68
+ stop = DateTime.parse(opts[:stop_time].to_s).strftime('%Y-%m-%d')
69
69
  user_hid = opts[:user_hid] || "user#{opts[:user_id]}@heroku.com"
70
70
  sprintf('%s/%s/%s_v%s', start, stop, user_hid, opts[:version])
71
71
  end
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Tools
3
- VERSION = '0.5.11'
3
+ VERSION = '0.5.12'
4
4
  end
5
5
  end
@@ -5,8 +5,7 @@ class StatementStoreTest < Vault::TestCase
5
5
  super
6
6
  StubbedS3.enable!(self)
7
7
  StubbedS3.seed('vault-v2-json-invoice-test',
8
- '2014-10-01T00:00:00+00:00/2014-11-01T00:00:00+00:00/user8@heroku.com_v2',
9
- '{"foo": 1}')
8
+ '2014-10-01/2014-11-01/user8@heroku.com_v2', '{"foo": 1}')
10
9
 
11
10
  end
12
11
 
@@ -14,14 +13,14 @@ class StatementStoreTest < Vault::TestCase
14
13
  inv = Vault::StatementStore.new(key_id: 'FAKE_ID', key: 'FAKE_KEY')
15
14
  path = inv.path_for(start_time: '2014-10-01', stop_time: '2014-11-01',
16
15
  user_id: 7, version: 2)
17
- assert_equal '2014-10-01T00:00:00+00:00/2014-11-01T00:00:00+00:00/user7@heroku.com_v2', path
16
+ assert_equal '2014-10-01/2014-11-01/user7@heroku.com_v2', path
18
17
  end
19
18
 
20
19
  def test_invoice_path_with_user_hid
21
20
  inv = Vault::StatementStore.new(key_id: 'FAKE_ID', key: 'FAKE_KEY')
22
21
  path = inv.path_for(start_time: '2014-10-01', stop_time: '2014-11-01',
23
22
  user_hid: 'user8@heroku.com', version: 2)
24
- assert_equal '2014-10-01T00:00:00+00:00/2014-11-01T00:00:00+00:00/user8@heroku.com_v2', path
23
+ assert_equal '2014-10-01/2014-11-01/user8@heroku.com_v2', path
25
24
  end
26
25
 
27
26
  def test_retrieve_invoice_json
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: 0.5.11
4
+ version: 0.5.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: