infopark-aws_utils 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/infopark/aws_utils/env.rb +1 -1
- data/lib/infopark/aws_utils/version.rb +1 -1
- data/spec/env_spec.rb +22 -0
- data/spec/spec_helper.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a0a126ad819e08ba69be679b4a22a37bd49dd9d
|
4
|
+
data.tar.gz: b64542e28b091da7e59472720ff3911390e7f3f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e5d3675484ee47605025d6be28c66acaf4f849effe1efbc4b59424da8d8a464371ee159a5df6da088ab86d858085f83bd61faf78801647b161f56e0f4d517cf
|
7
|
+
data.tar.gz: 26f575cd4de6b834565c7963792459434bf7d5d3d43939fb134cedcb36f8b5a88ce0a5be520492a1306d33ee0b1227056588e1b7f83076a3a156499cb79c08ff
|
@@ -9,7 +9,7 @@ class Env
|
|
9
9
|
def initialize(profile_name = nil)
|
10
10
|
@credentials = Aws::SharedCredentials.new(profile_name: profile_name)
|
11
11
|
@clients = Hash.new do |clients, mod|
|
12
|
-
mod.const_get(:Client).new(credentials: @credentials, region: 'eu-west-1')
|
12
|
+
clients[mod] = mod.const_get(:Client).new(credentials: @credentials, region: 'eu-west-1')
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
data/spec/env_spec.rb
CHANGED
@@ -35,4 +35,26 @@ RSpec.describe Infopark::AwsUtils::Env do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
[
|
40
|
+
[:aas, Aws::ApplicationAutoScaling],
|
41
|
+
[:alb, Aws::ElasticLoadBalancingV2],
|
42
|
+
[:as, Aws::AutoScaling],
|
43
|
+
[:cw, Aws::CloudWatch],
|
44
|
+
[:cwl, Aws::CloudWatchLogs],
|
45
|
+
[:ec2, Aws::EC2],
|
46
|
+
[:ecr, Aws::ECR],
|
47
|
+
[:ecs, Aws::ECS],
|
48
|
+
[:sts, Aws::STS],
|
49
|
+
].each do |_client, _mod|
|
50
|
+
describe "##{_client}" do
|
51
|
+
subject(:client) { env.send(_client) }
|
52
|
+
|
53
|
+
it { is_expected.to be_a(_mod.const_get("Client")) }
|
54
|
+
|
55
|
+
it "is cached" do
|
56
|
+
expect(client).to be(env.send(_client))
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
38
60
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark-aws_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilo Prütz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|