aws-ec2-instance_types 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dldinternet/aws/ec2/instance_types/cli.rb +11 -1
- data/lib/dldinternet/aws/ec2/instance_types/mixins/ec2_instance_types.rb +6 -4
- data/lib/dldinternet/aws/ec2/instance_types/mixins/no_commands.rb +4 -0
- data/lib/dldinternet/aws/ec2/instance_types/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: 296a86c6c9f1a27ff7f04ecc94a41e54877252b3
|
4
|
+
data.tar.gz: 5e335f7cfb8188b3eb996050caf8c85577167827
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3463e440d24644218ca492fdcb7f106fb720f2a4788706a59d7889a5b957cfcc08124aed2a34f94e46c31d7b8939ef842db91e92aac5ecfe5bbf13d55687d5e2
|
7
|
+
data.tar.gz: 86449e0c5ef9afa146799bc6462f6c264db621f3eeb713f96e5f633aa5c0c45a763aace3dd38de25f28c622e1028c6ff39fdde88ec229c6d812b4354928b08f5
|
@@ -16,6 +16,8 @@ module DLDInternet
|
|
16
16
|
class_option :debug, :type => :boolean
|
17
17
|
class_option :log_level, :type => :string, :banner => 'Log level ([:trace, :debug, :info, :step, :warn, :error, :fatal, :todo])'
|
18
18
|
class_option :inifile, :type => :string
|
19
|
+
class_option :help, :type => :boolean
|
20
|
+
class_option :format, :type => :string, :default => 'pretty', :banner => '[:pretty, :yaml, :json]'
|
19
21
|
|
20
22
|
no_commands do
|
21
23
|
|
@@ -41,7 +43,15 @@ module DLDInternet
|
|
41
43
|
parse_options
|
42
44
|
puts 'get instance types' if options[:verbose]
|
43
45
|
|
44
|
-
|
46
|
+
it = DLDInternet::AWS::EC2::Instance_Types.getEC2_Instance_Types()
|
47
|
+
case options[:format]
|
48
|
+
when /yaml/
|
49
|
+
puts it.to_yaml line_width: 1024, indentation: 4, canonical: false
|
50
|
+
when /json/
|
51
|
+
puts JSON.pretty_generate( it, { indent: "\t", space: ' '})
|
52
|
+
else
|
53
|
+
puts it.ai
|
54
|
+
end
|
45
55
|
0
|
46
56
|
end
|
47
57
|
|
@@ -32,7 +32,8 @@ module DLDInternet
|
|
32
32
|
when /json/
|
33
33
|
f.write JSON.pretty_generate(it, { indent: "\t", space: ' '})
|
34
34
|
else
|
35
|
-
|
35
|
+
f.write YAML::dump(it)
|
36
|
+
# abort! "Unsupported save format #{format}!"
|
36
37
|
end
|
37
38
|
f.close
|
38
39
|
end
|
@@ -48,14 +49,15 @@ module DLDInternet
|
|
48
49
|
case format
|
49
50
|
when /json/
|
50
51
|
JSON.parse(spec)
|
51
|
-
when /yaml/
|
52
|
+
#when /yaml/
|
53
|
+
else
|
52
54
|
begin
|
53
55
|
YAML.load(spec)
|
54
56
|
rescue Psych::SyntaxError => e
|
55
57
|
abort! "Error in the template specification: #{e.message}\n#{spec.split(/\n/).map{|l| "#{i+=1}: #{l}"}.join("\n")}"
|
56
58
|
end
|
57
|
-
else
|
58
|
-
|
59
|
+
# else
|
60
|
+
# abort! "Unsupported file type: #{path}"
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-ec2-instance_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christo De Lange
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|