tacoma 1.0.7 → 1.0.8

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: 2101ae19937ab9ae68ef81dc17d7124a4b2150f7
4
- data.tar.gz: 74d9d4972f1064675b2b9bae17009d92a0062c07
3
+ metadata.gz: 078cadfaa9a052324dee98ffc3b9ead0475d8073
4
+ data.tar.gz: b4e4420034a21a7c4dc94466f01f92df7dd9d6df
5
5
  SHA512:
6
- metadata.gz: e6821a6791c6b7d8ac25c4b8ebbfcab8c0a085816fc4349118a2340c8b7326ad893dd4f076f90e375eb74aa9befb6f873677b5f7576137e3b0024ab62f4cfdff
7
- data.tar.gz: 81ce56f8e3b25ca639d1d30768fb6bc139c6dffede1e96dd68e7978f99a204eec02a840d857949b22ba58f8ebb49d02bcbc4107ff0ef3caf22f3ddf697e7ce9a
6
+ metadata.gz: c03c155a64652518a29589fa5ddb5b32f8957251bf180f1190d75e24dc3d28a0492a4d72fe33c631855d892a19956c64f874f6c02b32fd561fc1909033afde5b
7
+ data.tar.gz: 5c1cc5079915143ed9a4c4b98b2fedb841c7dc067fc8cd0bb8fa86cedc436d7e22a84e4baf33c109eb614d25ea8661a3fbde0e44988b00707cbdf3620df9fe24
data/README.md CHANGED
@@ -10,8 +10,8 @@ Simple command-line tool for managing AWS credentials across different projects
10
10
 
11
11
  Tacoma needs a special file `.tacoma.yml` in your home directory. It can create a sample for you with
12
12
 
13
- tacoma install
14
-
13
+ tacoma install
14
+
15
15
  The format of the `.tacoma.yml` file is pretty straighforward
16
16
 
17
17
  project:
@@ -25,7 +25,7 @@ The format of the `.tacoma.yml` file is pretty straighforward
25
25
  aws_access_key_id: "ANOTHERACCESSKEYID"
26
26
  repo: "$HOME/projects/another_project"
27
27
 
28
- Once setup with a file like this, you can run
28
+ Once setup with a file like this, you can run
29
29
 
30
30
  tacoma list
31
31
 
@@ -38,6 +38,8 @@ Will display the export commands for the AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_I
38
38
  - [Fog](https://github.com/fog/fog), which should work with Capistrano's capify-ec2.
39
39
  - [Boto](https://github.com/boto/boto)
40
40
  - [s3cmd](https://github.com/s3tools/s3cmd)
41
+ - [route53](https://github.com/pcorliss/ruby_route_53)
42
+ - [aws cli](https://github.com/aws/aws-cli)
41
43
 
42
44
  ## Bash Completion
43
45
 
@@ -21,7 +21,7 @@ module Tacoma
21
21
  config = Tool.config
22
22
  if config.keys.include?(environment) == false
23
23
  puts "Cannot find #{environment} key, check your YAML config file"
24
- return
24
+ return false
25
25
  end
26
26
 
27
27
  if config[environment]
@@ -48,37 +48,42 @@ module Tacoma
48
48
  desc "switch ENVIRONMENT", "Loads AWS environment vars"
49
49
  def switch(environment)
50
50
 
51
- Tool.load_vars(environment)
52
- @aws_identity_file = Tool.aws_identity_file
53
- @aws_secret_access_key = Tool.aws_secret_access_key
54
- @aws_access_key_id = Tool.aws_access_key_id
55
- @repo = Tool.repo
56
-
57
- # set configurations for tools
58
- {fog: '.fog', boto: '.boto', s3cfg: '.s3cfg', route53: '.route53'}.each do |tool, config_path|
59
- template_path = Pathname.new("#{self.class.source_root}/../template/#{tool}").realpath.to_s
60
- file_path = File.join(Dir.home, config_path)
61
- template template_path, file_path, :force => true
62
- end
63
51
 
64
- system("ssh-add #{@aws_identity_file}")
52
+ if Tool.load_vars(environment)
53
+ @aws_identity_file = Tool.aws_identity_file
54
+ @aws_secret_access_key = Tool.aws_secret_access_key
55
+ @aws_access_key_id = Tool.aws_access_key_id
56
+ @repo = Tool.repo
57
+
58
+ # set configurations for tools
59
+ {fog: '.fog', boto: '.boto', s3cfg: '.s3cfg', route53: '.route53', aws_credentials: '.aws/credentials'}.each do |tool, config_path|
60
+ template_path = Pathname.new("#{self.class.source_root}/../template/#{tool}").realpath.to_s
61
+ file_path = File.join(Dir.home, config_path)
62
+ template template_path, file_path, :force => true
63
+ end
64
+ system("ssh-add #{@aws_identity_file}")
65
+ return true
66
+ else
67
+ return false
68
+ end
65
69
  end
66
70
 
67
71
  desc "cd ENVIRONMENT", "Change directory to the project path"
68
72
  def cd(environment)
69
- switch(environment)
70
- Dir.chdir `echo #{@repo}`.strip
71
- puts "Welcome to the tacoma shell"
72
- shell = ENV['SHELL'].split('/').last
73
- options =
74
- case shell
75
- when 'zsh'
76
- ''
77
- else
78
- '--login'
79
- end
80
- system("#{shell} #{options}")
81
- Process.kill(:SIGQUIT, Process.getpgid(Process.ppid))
73
+ if switch(environment)
74
+ Dir.chdir `echo #{@repo}`.strip
75
+ puts "Welcome to the tacoma shell"
76
+ shell = ENV['SHELL'].split('/').last
77
+ options =
78
+ case shell
79
+ when 'zsh'
80
+ ''
81
+ else
82
+ '--login'
83
+ end
84
+ system("#{shell} #{options}")
85
+ Process.kill(:SIGQUIT, Process.getpgid(Process.ppid))
86
+ end
82
87
  end
83
88
 
84
89
  desc "install", "Create a sample ~/.tacoma.yml file"
@@ -1,3 +1,3 @@
1
1
  module Tacoma
2
- VERSION='1.0.7'
2
+ VERSION='1.0.8'
3
3
  end
@@ -0,0 +1,5 @@
1
+ # This file was automatically generated by Tacoma at <%= Time.now %>
2
+
3
+ [default]
4
+ aws_access_key_id = <%= @aws_access_key_id %>
5
+ aws_secret_access_key = <%= @aws_secret_access_key %>
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.7
4
+ version: 1.0.8
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-01-15 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -82,6 +82,7 @@ files:
82
82
  - lib/tacoma.rb
83
83
  - lib/tacoma/command.rb
84
84
  - lib/tacoma/version.rb
85
+ - lib/template/aws_credentials
85
86
  - lib/template/boto
86
87
  - lib/template/fog
87
88
  - lib/template/route53