clinode 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/clinode/version.rb +1 -1
- data/lib/commands/stackscript.rb +7 -7
- metadata +3 -3
data/lib/clinode/version.rb
CHANGED
data/lib/commands/stackscript.rb
CHANGED
@@ -8,7 +8,7 @@ end
|
|
8
8
|
|
9
9
|
helper :stackscript_list do |ls|
|
10
10
|
Clinode.debug "listing"
|
11
|
-
ls.list.each do |stackscript|
|
11
|
+
ls.stackscript.list.each do |stackscript|
|
12
12
|
print_stackscript(stackscript)
|
13
13
|
end
|
14
14
|
end
|
@@ -17,25 +17,25 @@ helper :stackscript_meta_update do |ls,stackscript_id,opts|
|
|
17
17
|
VALID_KEYS = [:label,:ispublic,:rev_note,:description]
|
18
18
|
params = opts.reject{|key,value| !VALID_KEYS.include?(key)}
|
19
19
|
params[:stackscriptid] = stackscript_id
|
20
|
-
ls.update(params)
|
20
|
+
ls.stackscript.update(params)
|
21
21
|
end
|
22
22
|
|
23
23
|
helper :stackscript_create do |ls,opts|
|
24
24
|
VALID_KEYS = [:label,:ispublic,:rev_note,:description]
|
25
25
|
params = opts.reject{|key,value| !VALID_KEYS.include?(key)}
|
26
26
|
params[:script] = File.read(Clinode.options[:file])
|
27
|
-
ls.create(params)
|
27
|
+
ls.stackscript.create(params)
|
28
28
|
end
|
29
29
|
|
30
30
|
helper :stackscript_delete do |ls,stackscript_id|
|
31
|
-
ls.delete(:stackscriptid => stackscript_id)
|
31
|
+
ls.stackscript.delete(:stackscriptid => stackscript_id)
|
32
32
|
puts "Stack Script #{stackscript_id} deleted."
|
33
33
|
end
|
34
34
|
|
35
35
|
helper :stackscript_update do |ls,stackscript_id,filename|
|
36
36
|
if File.exists?(filename)
|
37
37
|
script = File.read(filename)
|
38
|
-
ls.update(:stackscriptid => stackscript_id,:script => script)
|
38
|
+
ls.stackscript.update(:stackscriptid => stackscript_id,:script => script)
|
39
39
|
puts "Stack Script #{stackscript_id} uploaded."
|
40
40
|
end
|
41
41
|
end
|
@@ -50,7 +50,7 @@ helper :stackscript_upload do |ls|
|
|
50
50
|
end
|
51
51
|
|
52
52
|
helper :stackscript_download do |ls|
|
53
|
-
ls.list.each do |stackscript|
|
53
|
+
ls.stackscript.list.each do |stackscript|
|
54
54
|
filename = "#{Clinode.options[:dir]}/#{stackscript.stackscriptid}_stack.sh"
|
55
55
|
File.open(filename,"w+"){|f|f.write(stackscript.script)}
|
56
56
|
Clinode.debug "Writing Script #{stackscript.stackscriptid} #{stackscript.label} into #{filename}"
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
helper :stackscript_process do |ls,stackscript_id|
|
61
61
|
Clinode.debug "Fetching StackScript #{stackscript_id}"
|
62
|
-
stackscript = ls.list(:stackscript => stackscript_id)
|
62
|
+
stackscript = ls.stackscript.list(:stackscript => stackscript_id)
|
63
63
|
print_stackscript(stackscript[0])
|
64
64
|
end
|
65
65
|
|
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:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aditya Sanghi
|