clinode 0.0.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Clinode
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -19,7 +19,8 @@ helper :stackscript_list do |ls|
19
19
  end
20
20
 
21
21
  helper :stackscript_meta_update do |ls,stackscript_id,opts|
22
- params = opts
22
+ VALID_KEYS = [:label,:ispublic,:rev_note,:description]
23
+ params = opts.reject{|key,value| !VALID_KEYS.include?(key)}
23
24
  params[:stackscriptid] = stackscript_id
24
25
  ls.update(params)
25
26
  end
@@ -57,8 +58,13 @@ end
57
58
 
58
59
  desc "List your stackscripts"
59
60
  usage "--dir=<directory> stackscript directory to upload from/download to"
61
+ usage "--label=<new label>"
62
+ usage "--ispublic=true/false"
63
+ usage "--description=<stackscript update>"
64
+ usage "--rev_note=<revision note>"
60
65
  flags :output => "Output the content of the stackscript only"
61
66
  flags :update => "Update the content of the stackscript"
67
+ flags :meta_update => "Update the meta data of the stackscript"
62
68
  command :stackscript do |arg|
63
69
  helper.linode_config
64
70
  ls = helper.stackscript_linode
@@ -77,6 +83,8 @@ command :stackscript do |arg|
77
83
  if options[:update]
78
84
  filename = "#{options[:dir]}/#{arg}_stack.sh"
79
85
  helper.stackscript_update(ls,arg,filename)
86
+ elsif options[:meta_update]
87
+ helper.stackscript_meta_update(ls,arg,options)
80
88
  else
81
89
  helper.stackscript_process(ls,arg)
82
90
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clinode
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
- - 0
7
+ - 1
8
8
  - 0
9
9
  - 1
10
- version: 0.0.1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aditya Sanghi