tacoma 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -1
- data/README.md +7 -0
- data/lib/tacoma/command.rb +23 -0
- data/lib/tacoma/version.rb +1 -1
- 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: 8310f820be44f0ffc85fbbd01ce2efb9028474d8
|
4
|
+
data.tar.gz: fe8857502b48b144263b084421670df5c1ad0307
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f83ea8a3d456d8faf5f3ad1f1f9d1d51633a197a22a520f831fc8236eca3877ed44a9592f542a4c6df39bc8ebc927dd8cd21b44b3d467abeb90b16472174f20
|
7
|
+
data.tar.gz: 0afe0672977d5094ac2a460dc332ee33f04f951765a4e0bacf439771dfd426e636309abb235eebab9e3ad52d9e23b15d4fbba8fac9eb05300871634c2bc80a17
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
1.0.10
|
2
|
+
- Added 'tacoma current' command, which will display the current tacoma environment
|
1
3
|
1.0.9
|
2
4
|
- Added 'tacoma version' command, which will display version and available providers.
|
3
|
-
- Added '--with-exports' to the 'switch' command, which will echo the export commands to set the AWS env vars.
|
5
|
+
- Added '--with-exports' to the 'switch' command, which will echo the export commands to set the AWS env vars.
|
data/README.md
CHANGED
@@ -41,6 +41,13 @@ Will display the export commands for the AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_I
|
|
41
41
|
- [route53](https://github.com/pcorliss/ruby_route_53)
|
42
42
|
- [aws cli](https://github.com/aws/aws-cli)
|
43
43
|
|
44
|
+
Running tacoma switch with the --with-exports option will also echo shell export sentences for the most common incarnations of the AWS env vars.
|
45
|
+
|
46
|
+
tacoma version
|
47
|
+
|
48
|
+
Will display the current tacoma version and list all available configuration templates (providers).
|
49
|
+
|
50
|
+
|
44
51
|
## Bash Completion
|
45
52
|
|
46
53
|
There's an user contributed script for bash completion feature. To use it simply get from the `/contrib/` path and source it in your bash session (after rbenv gets sourced if it is there)
|
data/lib/tacoma/command.rb
CHANGED
@@ -31,6 +31,23 @@ module Tacoma
|
|
31
31
|
@repo = config[environment]['repo']
|
32
32
|
end
|
33
33
|
end
|
34
|
+
|
35
|
+
# Assume there is a ~/.aws/credentials file with a valid format
|
36
|
+
def current_environment
|
37
|
+
current_filename = File.join(Dir.home, ".aws/credentials")
|
38
|
+
File.open(current_filename).each do |line|
|
39
|
+
if /aws_access_key_id/ =~ line
|
40
|
+
current_access_key_id = line[20..-2] # beware the CRLF
|
41
|
+
config = Tool.config
|
42
|
+
for key in config.keys
|
43
|
+
if config[key]['aws_access_key_id'] == current_access_key_id
|
44
|
+
return "#{key}"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
nil
|
50
|
+
end
|
34
51
|
end
|
35
52
|
end
|
36
53
|
|
@@ -60,6 +77,12 @@ module Tacoma
|
|
60
77
|
end
|
61
78
|
end
|
62
79
|
|
80
|
+
desc "current", "Displays current loaded tacoma environment"
|
81
|
+
def current
|
82
|
+
puts Tool.current_environment
|
83
|
+
return true
|
84
|
+
end
|
85
|
+
|
63
86
|
desc "switch ENVIRONMENT", "Prepares AWS config files for the providers. --with-exports will output environment variables"
|
64
87
|
option :'with-exports'
|
65
88
|
|
data/lib/tacoma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tacoma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Lupión
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|