awshark 1.5.0 → 1.5.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: 1f20abce36658043c8b046859575b969365fd56528b3a786ca71e3009b078909
4
- data.tar.gz: 75631cf5ad34c594571a1f46297d3fa23c8da384c4789c43ea857a4ab09b972c
3
+ metadata.gz: 9243bfae1f80dc2a4ca0b2da531aca71d0adf817d4614c97ac4572a862723273
4
+ data.tar.gz: 1c16327dfcc7d641e6405c9acedbe1dde0edb037b1bd783367dc924f9f021c3c
5
5
  SHA512:
6
- metadata.gz: e75070ff5ad3295b994b9408edc5e448a205a413278b9dc6d2cae3b891840a976f6f5b0ccd9d8d4b9f6ba85fdf081ad1b3c83727712bea4228cb5248e659019b
7
- data.tar.gz: aa0feb28170116e34cab5a60ca8e60cfd6a6b76c9def7aaf78709aaa28a3475d2067bc39e76c9303481304ef11a757f69a54ebd4fdb9a0e1ce9cedf84c98d778
6
+ metadata.gz: 7b71799356977e4a517c902c260d48e2a7f404472bdff3da16b912ac06d083621f6d732a9fbdc3dc388d74730c1fc0d45bd3c916c960aa2f31d0f1393553e47e
7
+ data.tar.gz: 0370e335a254ea453ac7abeb17e3d9c9fb618facbf8ba667bdfa9064b7e20ec9f4a83b89ab6edf63b619fcb5b00d1218acf7ac34fd6e61d4342dc899d2dcc8d5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## Changelog
2
2
 
3
+ #### 1.5.1
4
+ - [new] `awshark cf [command] --bucket` option allows S3 path prefix
5
+
3
6
  #### 1.5.0
4
7
  - [new] add `awshark ssm list` to list AWS Parameter Store secrets
5
8
  - [new] add `awshark ssm deploy` to update AWS Parameter Store secrets
@@ -11,7 +11,8 @@ module Awshark
11
11
  def initialize(path, options = {})
12
12
  @path = path
13
13
 
14
- @bucket = options[:bucket]
14
+ @bucket_and_path = options[:bucket]
15
+ @bucket = (options[:bucket] || '').split('/')[0]
15
16
  @name = options[:name]
16
17
  @stage = options[:stage]
17
18
  end
@@ -77,8 +78,11 @@ module Awshark
77
78
  end
78
79
 
79
80
  def s3_key
80
- # https://apidock.com/ruby/Time/strftime
81
- @s3_key ||= "awshark/#{name}/#{Time.now.strftime('%Y-%m-%d')}.json"
81
+ return @s3_key if defined?(@s3_key)
82
+
83
+ _, *tail = @bucket_and_path.split('/')
84
+ prefix = [*tail, 'awshark', name].join('/')
85
+ @s3_key = "#{prefix}/#{Time.now.strftime('%Y-%m-%d')}.json"
82
86
  end
83
87
 
84
88
  def upload
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Awshark
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awshark
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joergen Dahlke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-10 00:00:00.000000000 Z
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport