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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1082d3b978ce84ff03add64d9a1f20883b83e2f9
4
- data.tar.gz: 462382d9c3352af1d28fce02410df740db249f1b
3
+ metadata.gz: f7f9061eb9641a02b8316a5d31cf3707a39153b4
4
+ data.tar.gz: 33fdda23706506120156ddc1b47df09c65c6fe3a
5
5
  SHA512:
6
- metadata.gz: aec42aea434594ced9cb25461ad188e91dce2dad87dbbbce8dbcc6bb547dc5dc01d9ede072358036f3c63cb266a022948096610863507e1a0dd1954f0bdd5b98
7
- data.tar.gz: 0cad5e94b3c539d411734043b6558fd6e7c566f5d9197e70533b08eae866b39f51a4441a3944e0bb910e15eda5af6cf8080a9d4e3685f5e80d458a00417bd9c4
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
- cloud_init_file = File.expand_path(options.cloud_init_file)
32
- params[:cloud_config] = File.read(cloud_init_file) if options.cloud_init_file && File.exist?(cloud_init_file)
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
- params[:cloud_config] = File.read(cloud_init_file) if options.cloud_init_file && File.exist?(cloud_init_file)
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
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries