tacoma 1.0.8 → 1.0.9

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
  SHA1:
3
- metadata.gz: 078cadfaa9a052324dee98ffc3b9ead0475d8073
4
- data.tar.gz: b4e4420034a21a7c4dc94466f01f92df7dd9d6df
3
+ metadata.gz: c05f3a97b0e21578cf344aec50ff58cbf36ce2dc
4
+ data.tar.gz: b41d4cbfc54289c9a347d05b03fcc202d7901fd8
5
5
  SHA512:
6
- metadata.gz: c03c155a64652518a29589fa5ddb5b32f8957251bf180f1190d75e24dc3d28a0492a4d72fe33c631855d892a19956c64f874f6c02b32fd561fc1909033afde5b
7
- data.tar.gz: 5c1cc5079915143ed9a4c4b98b2fedb841c7dc067fc8cd0bb8fa86cedc436d7e22a84e4baf33c109eb614d25ea8661a3fbde0e44988b00707cbdf3620df9fe24
6
+ metadata.gz: b98e6b4a9c73b3356c8cb33d530d79d5258b1b1fc0fe1238d041e87b72dfc7db879c5f6d8ae6670e4a07f9a453ea7f57b0aed519ffecc2ced601756b81793e7e
7
+ data.tar.gz: dd712caaf12f5c32f8a6c2db8bd4c558377722705508d9e489389e5c287c86b308ff32c79f472a47adc6f5a8b1b4d840c9d4d07a7c025d486aac5a773c3a520c
data/CHANGELOG ADDED
@@ -0,0 +1,3 @@
1
+ 1.0.9
2
+ - 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.
@@ -45,9 +45,25 @@ module Tacoma
45
45
  end
46
46
  end
47
47
 
48
- desc "switch ENVIRONMENT", "Loads AWS environment vars"
49
- def switch(environment)
48
+ TOOLS = {fog: '.fog',
49
+ boto: '.boto',
50
+ s3cfg: '.s3cfg',
51
+ route53: '.route53',
52
+ aws_credentials: '.aws/credentials'}
53
+
54
+ desc "version", "Displays current tacoma version"
55
+ def version
56
+ puts "tacoma, version #{Tacoma::VERSION}"
57
+ puts "Configuration templates available for:"
58
+ TOOLS.each do |tool, config_path|
59
+ puts " #{tool.to_s} => '~/#{config_path}'"
60
+ end
61
+ end
50
62
 
63
+ desc "switch ENVIRONMENT", "Prepares AWS config files for the providers. --with-exports will output environment variables"
64
+ option :'with-exports'
65
+
66
+ def switch(environment)
51
67
 
52
68
  if Tool.load_vars(environment)
53
69
  @aws_identity_file = Tool.aws_identity_file
@@ -56,12 +72,19 @@ module Tacoma
56
72
  @repo = Tool.repo
57
73
 
58
74
  # set configurations for tools
59
- {fog: '.fog', boto: '.boto', s3cfg: '.s3cfg', route53: '.route53', aws_credentials: '.aws/credentials'}.each do |tool, config_path|
75
+ TOOLS.each do |tool, config_path|
60
76
  template_path = Pathname.new("#{self.class.source_root}/../template/#{tool}").realpath.to_s
61
77
  file_path = File.join(Dir.home, config_path)
62
78
  template template_path, file_path, :force => true
63
79
  end
80
+
64
81
  system("ssh-add #{@aws_identity_file}")
82
+ if options[:'with-exports']
83
+ puts "export AWS_SECRET_ACCESS_KEY=#{@aws_secret_access_key}"
84
+ puts "export AWS_SECRET_KEY=#{@aws_secret_access_key}"
85
+ puts "export AWS_ACCESS_KEY=#{@aws_access_key_id}"
86
+ puts "export AWS_ACCESS_KEY_ID=#{@aws_access_key_id}"
87
+ end
65
88
  return true
66
89
  else
67
90
  return false
@@ -1,3 +1,3 @@
1
1
  module Tacoma
2
- VERSION='1.0.8'
2
+ VERSION='1.0.9'
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tacoma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
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-19 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: Easy command line tool for AWS credentials management
@@ -74,7 +74,8 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - ".gitignore"
77
+ - .gitignore
78
+ - CHANGELOG
78
79
  - Gemfile
79
80
  - README.md
80
81
  - bin/tacoma
@@ -99,19 +100,20 @@ require_paths:
99
100
  - lib
100
101
  required_ruby_version: !ruby/object:Gem::Requirement
101
102
  requirements:
102
- - - ">="
103
+ - - '>='
103
104
  - !ruby/object:Gem::Version
104
105
  version: '0'
105
106
  required_rubygems_version: !ruby/object:Gem::Requirement
106
107
  requirements:
107
- - - ">="
108
+ - - '>='
108
109
  - !ruby/object:Gem::Version
109
110
  version: '0'
110
111
  requirements: []
111
112
  rubyforge_project:
112
- rubygems_version: 2.2.2
113
+ rubygems_version: 2.0.0
113
114
  signing_key:
114
115
  specification_version: 4
115
116
  summary: This tool reads a YAML file with the credentials for your AWS accounts and
116
117
  loads them into your environment.
117
118
  test_files: []
119
+ has_rdoc: