MovableInkAWS 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/movable_ink/aws/ec2.rb +2 -1
- data/lib/movable_ink/version.rb +1 -1
- data/spec/ec2_spec.rb +13 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b350dcc6432c0f218c528e9779bde52cfc535e605529a0513c05b02e605e396
|
4
|
+
data.tar.gz: 7197977f915549ff7c19623a446fd05c24768bf2773a72851e8cd98bcc619ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f6130a4a62193455450492c46fa1efde90b8b96c912637550bbc6797ed5fc45b28517295ed624f5668d3ea9efd19a3bc7e90c4afea8a6ab7699507ce38961c1
|
7
|
+
data.tar.gz: 363122ff9d3f11c9d04def581a25251139efdf7b2cb3d1c29ca2cc22d43622b2fda5731ff235016e5f0855ffb78becfb41294bd57f424982f349d051a8ae868e
|
data/Gemfile.lock
CHANGED
data/lib/movable_ink/aws/ec2.rb
CHANGED
data/lib/movable_ink/version.rb
CHANGED
data/spec/ec2_spec.rb
CHANGED
@@ -45,6 +45,19 @@ describe MovableInk::AWS::EC2 do
|
|
45
45
|
expect(aws.mi_env).to eq('staging')
|
46
46
|
end
|
47
47
|
|
48
|
+
it 'will read tag data if the cache file is empty' do
|
49
|
+
ec2.stub_responses(:describe_tags, tag_data)
|
50
|
+
allow(aws).to receive(:my_region).and_return('us-east-1')
|
51
|
+
allow(aws).to receive(:instance_id).and_return('i-12345')
|
52
|
+
allow(aws).to receive(:ec2).and_return(ec2)
|
53
|
+
|
54
|
+
f = Tempfile.new('cache')
|
55
|
+
f.write('')
|
56
|
+
f.close
|
57
|
+
allow(aws).to receive(:mi_env_cache_file_path).and_return(f.path)
|
58
|
+
expect(aws.mi_env).to eq('test')
|
59
|
+
end
|
60
|
+
|
48
61
|
it "should find the environment from the current instance's tags" do
|
49
62
|
ec2.stub_responses(:describe_tags, tag_data)
|
50
63
|
allow(aws).to receive(:my_region).and_return('us-east-1')
|