pele 0.1.12.pre.pre → 0.1.13.pre.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pele/cli.rb +5 -10
  3. data/lib/pele/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aec4459bfaa9e562423f5fec59108fea84ee4b3e
4
- data.tar.gz: 35d1e895cfe360bc80347bc86771e278f12b0675
3
+ metadata.gz: efb95f1e2faa519e6e0195764a53be3d9c5dbbb5
4
+ data.tar.gz: 1e794cd85aaea6ca89a61383ea5958e51e4318e5
5
5
  SHA512:
6
- metadata.gz: ec590af23d90cca6030116610602102cb9113d01be291fd27a4b103f49ecbcc9a22fd888135923b8d3facb029e8db1ad63c2ff28c86ca010029a6b330a96ab38
7
- data.tar.gz: 72245962ad53e3f921c6d9e237120eb60f47528300d9327311edc5668a480258a9234e7f7e4cbd539efed42be98015fbe3f8c2140899ade6a0301ab775f337c1
6
+ metadata.gz: 450492003109d248b62694f2356c670191098bbc4f1e4de70d6de4df912f7db31502deafe081d8675f61f6346326c8b3c0819c94324fdac18d835be8d8abf98b
7
+ data.tar.gz: 5a4bab62507dcaa0ddc3ef4b50203bbbd0572e6e0a653275de3832f8dbbf69c40fcfd11b89ca5c77bd1326946b5f24a1fbeafcac06416462a929bbf35b124332
@@ -27,9 +27,9 @@ module Pele
27
27
  puts ''
28
28
  say('Provide your aws credentials below', :yellow)
29
29
  puts ''
30
- aws_access_key_id = prompt.ask('AWS Access Key ID: '.colorize(:blue), required: true)
31
- aws_secret_access_key = prompt.ask('AWS Secret Access Key: '.colorize(:blue), required: true)
32
- aws_region = prompt.select('Choose a AWS region: '.colorize(:blue), Pele::Regions::ALL)
30
+ aws_access_key_id = prompt.ask('AWS Access Key ID: '.colorize(:blue), required: true).delete(' ')
31
+ aws_secret_access_key = prompt.ask('AWS Secret Access Key: '.colorize(:blue), required: true).delete(' ')
32
+ aws_region = prompt.select('Choose a AWS region: '.colorize(:blue), Pele::Regions::ALL).delete(' ')
33
33
  if aws_access_key_id.empty? || aws_secret_access_key.empty? || aws_region.empty?
34
34
  say('You need to provide all three credentials. Please try again', :red)
35
35
  abort
@@ -39,17 +39,12 @@ module Pele
39
39
  end
40
40
  puts ''
41
41
  say('Now lets generate AWS key-pair. This is needed to access EC2 Instances', :green)
42
- if File.exist? File.expand_path "#{os}key"
43
- puts ''
44
- overwrite = prompt.select('Looks like you already have a key generated. Would you like to generate new one?', %w[Yes No])
45
- abort if overwrite == 'Yes'
46
- end
47
42
  puts ''
48
- key_pair_name = prompt.ask('Name your key-pair. For example: mykeypair.colorize(:green)')
43
+ key_pair_name = prompt.ask("Name your key-pair. For example: #{'mykeypair'.colorize(:green)}").delete(' ')
49
44
  begin
50
45
  ec2 = Aws::EC2::Client.new
51
46
  key_pair = ec2.create_key_pair(key_name: "#{key_pair_name}-pele")
52
- create_file (OS.mac? || OS.linux? ? "~/.ssh/#{key_pair.key_name}.pem" : "%HOMEPATH%\.ssh\#{key_pair.key_name}.pem") do
47
+ create_file (OS.mac? || OS.linux? ? "~/.ssh/#{key_pair.key_name}.pem" : "%HOMEPATH%\\.ssh\\#{key_pair.key_name}.pem") do
53
48
  key_pair.key_material
54
49
  end
55
50
  say('Key-pair successfully generated', :green)
@@ -1,3 +1,3 @@
1
1
  module Pele
2
- VERSION = '0.1.12-pre'.freeze
2
+ VERSION = '0.1.13-pre'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pele
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12.pre.pre
4
+ version: 0.1.13.pre.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suyesh Bhandari