civo 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/civo/cli/commands/templates.rb +8 -4
- data/lib/civo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7f9061eb9641a02b8316a5d31cf3707a39153b4
|
4
|
+
data.tar.gz: 33fdda23706506120156ddc1b47df09c65c6fe3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26df74fea59438d2f0c469c093729ecf47257c632e5b4cc7e3e68c7a32cc4a06c9f543a63e22060bd51d81376a49eb92221709ac6f07c823b3bd0d3b96f19156
|
7
|
+
data.tar.gz: 667b2596939d5034a1b12ded2c5fd01e1a303d4027fdea9cb851ccbbe9a87f49c325eed21bab6012bde13c8da686b31c38d25ad7f86faf66b5d202c254ee7fb0
|
@@ -28,8 +28,10 @@ if Civo::Config.admin?
|
|
28
28
|
params[:image_id] = options.image_id if options.image_id
|
29
29
|
params[:short_description] = options.short_description if options.short_description
|
30
30
|
params[:description] = options.description if options.description
|
31
|
-
|
32
|
-
|
31
|
+
if options.cloud_init_file
|
32
|
+
cloud_init_file = File.expand_path(options.cloud_init_file)
|
33
|
+
params[:cloud_config] = File.read(cloud_init_file) if File.exist?(cloud_init_file)
|
34
|
+
end
|
33
35
|
begin
|
34
36
|
Civo::Template.create(params)
|
35
37
|
puts "Template '#{args.first}' updated."
|
@@ -54,12 +56,14 @@ if Civo::Config.admin?
|
|
54
56
|
params = {
|
55
57
|
id: args[0]
|
56
58
|
}
|
57
|
-
cloud_init_file = File.expand_path(options.cloud_init_file)
|
58
59
|
params[:name] = options.name if options.name
|
59
60
|
params[:image_id] = options.image_id if options.image_id
|
60
61
|
params[:short_description] = options.short_description if options.short_description
|
61
62
|
params[:description] = options.description if options.description
|
62
|
-
|
63
|
+
if options.cloud_init_file
|
64
|
+
cloud_init_file = File.expand_path(options.cloud_init_file)
|
65
|
+
params[:cloud_config] = File.read(cloud_init_file) if File.exist?(cloud_init_file)
|
66
|
+
end
|
63
67
|
begin
|
64
68
|
Civo::Template.save(params)
|
65
69
|
puts "Template '#{args.first}' updated."
|
data/lib/civo/version.rb
CHANGED