infopark-aws_utils 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78f958024570261c6c789338b7e9d35ffef622e6
4
- data.tar.gz: 0494bb77b8f40b3db3e2ca8e9dd4a1941ff6fc4b
3
+ metadata.gz: 4a0a126ad819e08ba69be679b4a22a37bd49dd9d
4
+ data.tar.gz: b64542e28b091da7e59472720ff3911390e7f3f6
5
5
  SHA512:
6
- metadata.gz: a2a277c0579471d4b08f0cfac7894365eea0ece83baeefd6d80a324138d16a38964a3f6a9e3d69bb5864d301784b92d8cfc68551c14685edc485b2f3ee36c158
7
- data.tar.gz: 21dfbc376fb2a28b6980a34c80614d37395576f8889a6cc36f34b8735545a08d2f90350812052bbae61e15ff64dd272b131e4143e1859a5120496d3ce6255228
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
 
@@ -1,5 +1,5 @@
1
1
  module Infopark
2
2
  module AwsUtils
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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
@@ -17,8 +17,6 @@ RSpec.configure do |config|
17
17
 
18
18
  config.disable_monkey_patching!
19
19
 
20
- config.warnings = true
21
-
22
20
  if config.files_to_run.one?
23
21
  config.default_formatter = "doc"
24
22
  end
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.0
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-06-30 00:00:00.000000000 Z
11
+ date: 2017-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk