ubalo 0.20 → 0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ubalo +3 -6
- data/lib/ubalo/account.rb +5 -0
- data/lib/ubalo/container_process.rb +2 -3
- data/lib/ubalo/task.rb +1 -1
- data/lib/ubalo/version.rb +1 -1
- metadata +14 -14
data/bin/ubalo
CHANGED
@@ -166,6 +166,7 @@ command :init do |c|
|
|
166
166
|
c.action do |global_options,options,args|
|
167
167
|
name = options[:name] || hl.ask(" pod name: "){|q| q.echo = true}
|
168
168
|
pod = account.pod_by_name(name)
|
169
|
+
pod.update!
|
169
170
|
pod_dir.init(pod.fullname, logger)
|
170
171
|
logger.puts "Success! Next, run ubalo push."
|
171
172
|
end
|
@@ -248,12 +249,8 @@ command 'task:stop' do |c|
|
|
248
249
|
end
|
249
250
|
|
250
251
|
task.stop!
|
251
|
-
|
252
|
-
|
253
|
-
task.refresh!
|
254
|
-
task.complete?
|
255
|
-
end
|
256
|
-
puts task.full_printable_result
|
252
|
+
task.tail_process
|
253
|
+
puts task.printable_result
|
257
254
|
end
|
258
255
|
end
|
259
256
|
|
data/lib/ubalo/account.rb
CHANGED
@@ -100,6 +100,11 @@ module Ubalo
|
|
100
100
|
|
101
101
|
def pod_by_name(name)
|
102
102
|
pod_username, pod_name = Util.normalize_pod_name(username, name)
|
103
|
+
|
104
|
+
unless pod_name =~ /\A[\w-]+\Z/
|
105
|
+
raise Error, "Pod name is invalid"
|
106
|
+
end
|
107
|
+
|
103
108
|
Pod.new(self, pod_username, pod_name, {})
|
104
109
|
end
|
105
110
|
|
@@ -56,9 +56,8 @@ module Ubalo
|
|
56
56
|
|
57
57
|
def runtime
|
58
58
|
if @started_at
|
59
|
-
|
60
|
-
|
61
|
-
"%d:%02d s" % [minutes, seconds]
|
59
|
+
seconds = ((@stopped_at || DateTime.now) - @started_at) * 86400
|
60
|
+
"%2.1f s" % seconds
|
62
61
|
end
|
63
62
|
end
|
64
63
|
|
data/lib/ubalo/task.rb
CHANGED
@@ -122,7 +122,7 @@ module Ubalo
|
|
122
122
|
@elapsed_time = attributes['elapsed_time']
|
123
123
|
|
124
124
|
parse_arg(attributes['arg']) if attributes['arg']
|
125
|
-
parse_output(attributes['
|
125
|
+
parse_output(attributes['output']) if attributes['output']
|
126
126
|
self
|
127
127
|
end
|
128
128
|
|
data/lib/ubalo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ubalo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.21'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gli
|
16
|
-
requirement: &
|
16
|
+
requirement: &70247164806420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70247164806420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: highline
|
27
|
-
requirement: &
|
27
|
+
requirement: &70247164806000 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70247164806000
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70247164805520 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70247164805520
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rest-client
|
49
|
-
requirement: &
|
49
|
+
requirement: &70247164804960 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.6.3
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70247164804960
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: archive-tar-minitar
|
60
|
-
requirement: &
|
60
|
+
requirement: &70247164804200 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70247164804200
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: launchy
|
71
|
-
requirement: &
|
71
|
+
requirement: &70247164803160 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70247164803160
|
80
80
|
description: CLI and API client for Ubalo
|
81
81
|
email: dev@ubalo.com
|
82
82
|
executables:
|