stalkedbybean 0.2.2 → 0.2.3

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: 427ded4eb1b24b65f30bca50e35e0927c05d2c52a8358edf88cdf23cb62c8622
4
- data.tar.gz: 03d1f8c1aef392ac1b846c6fe598db51bc847658236209049f1ce0d1dab4e608
3
+ metadata.gz: c68bb884a6a5e3a25be3fd0a80ac1c8fd624743b951c045083053e5fa435ad76
4
+ data.tar.gz: ac9b03be9583c2fd10278c18d9e65a463b638f6213805b15624397f3263733ba
5
5
  SHA512:
6
- metadata.gz: 21b4f0796e1f3ea73d709956b04cea0a415dcbffc4e1296c9c5403a8ee86b05bb5c029b18c0e40d26f924520f8e8855a95f2b6e428855c0b800f4f2e3b27911f
7
- data.tar.gz: 632e0508e49729a8a83696ca2a8330ccd41257767ffceab890add5d4476e02a688c9be5b015597d3c9d6b6795ac600577bb34093fd11fb445a5ea5e4bc20f5b8
6
+ metadata.gz: d78f331ab2fe43eadac2d060d1fa460c5edfaf99d3f62bc73c351a70279b3f65d14afc2b4ae74e92aecab721f3cc04e8302314d2e2f0c5724b6fc766f7ed6802
7
+ data.tar.gz: 5d0670f4b8952625c778ec80f5747971b4520d870a7d700bb33841ba89d525915a84fb28c4df39b2f550c3e3f65db3d7b556f319d30ad8fb848f77f9cd4a46a2
@@ -8,12 +8,12 @@ module Stalkedbybean
8
8
  end
9
9
 
10
10
  def self.setup_IAM
11
-
11
+
12
12
  @app_tag = "#{@options[:app_name]}-#{@options[:environment]}"
13
13
  @client = Aws::IAM::Client.new(region: "#{@options[:aws_region]}", profile: "#{@options[:aws_profile]}")
14
14
  @iam = Aws::IAM::Resource.new(client: @client)
15
15
 
16
- role_name = "#{@app_tag}-beanstalk-EC2"
16
+ role_name = "#{@app_tag}-#{@options[:aws_region]}-beanstalk-EC2"
17
17
 
18
18
  begin
19
19
  role = self.create_role
@@ -13,7 +13,7 @@ module Stalkedbybean
13
13
  @client = Aws::KMS::Client.new(region: "#{@options[:aws_region]}", profile: "#{@options[:aws_profile]}")
14
14
  key = @client.create_key({})
15
15
  @client.create_alias({
16
- alias_name: "alias/#{@options[:app_name]}",
16
+ alias_name: "alias/#{@app_tag}",
17
17
  target_key_id: key[:key_metadata][:key_id]
18
18
  })
19
19
 
@@ -27,7 +27,7 @@ module Stalkedbybean
27
27
 
28
28
  def self.add_secret(key, value)
29
29
  raise(StandardError, "Missing or invalid key/value") if key == nil || value == nil
30
- system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@options[:app_name]} #{key} #{value}")
30
+ system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@app_tag} #{key} #{value}")
31
31
  end
32
32
 
33
33
  def self.get_secret(key)
@@ -42,7 +42,7 @@ module Stalkedbybean
42
42
  def self.change_secret(key, value, version)
43
43
  raise(StandardError, "Missing or invalid key/value") if key == nil || value == nil
44
44
  raise(StandardError, "Missing version number") if version == nil
45
- system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@options[:app_name]} -v #{version} #{key} #{value}")
45
+ system("credstash -r #{@options[:aws_region]} -p #{@options[:aws_profile]} -t #{@app_tag} put -k alias/#{@app_tag} -v #{version} #{key} #{value}")
46
46
  end
47
47
 
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module Stalkedbybean
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stalkedbybean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kavita Kalaichelvan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-04-11 00:00:00.000000000 Z
12
+ date: 2018-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler