singularity_dsl 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/singularity_dsl/cli/cli.rb +1 -1
- data/lib/singularity_dsl/cli/table.rb +19 -3
- data/lib/singularity_dsl/tasks/shell_task.rb +1 -1
- data/lib/singularity_dsl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTEyZDNjOTA1YTJiY2E4ZjZlYmZlMjMyZWMxNjI3YTlhNTNkNzZiNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDBkYmZjZWZjZWY0NTM3ODI2ODZiMDYyODdlYjRmNGZiZmY0YWRkYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2EwNmZmOWM4MDgwYjA4NmU5YzE0YzYzZTIwMTM0ZmFlYzJlMjA3MDA5MzM5
|
10
|
+
ZTYwN2Q1NGFiZTA5MmViOTVmMWNiODA0ZmViOTM2YTgyOGMyYTk3NjYzNDU0
|
11
|
+
MzU2NzhjMjFmMmY1MjJmYjVkNTRkMjVhZDkyNDZkZGE1NDcyODg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2ZjODEwZTZlNDIyMzM0NGMyNzQ1MzQ4MDE4NTNmMjE1NGQ1OTk4OGJjYzJj
|
14
|
+
N2E1OWE5NmM5NmRkMGVmMDg0MDE4NjU4ZGExNTkwY2MxYzYyOTBiZDNlZTg5
|
15
|
+
YTY5YWYxMWFiNzI5MzQxMDliYzM2NmFiYWNiOGFhNTc3YTY4YjU=
|
data/Gemfile.lock
CHANGED
@@ -45,7 +45,7 @@ module SingularityDsl
|
|
45
45
|
dsl.load_tasks_in_path tasks_path if ::File.exist? tasks_path
|
46
46
|
table = task_table
|
47
47
|
dsl.task_list.each do |task|
|
48
|
-
|
48
|
+
task_rows(dsl, task).each { |row| table.add_row row }
|
49
49
|
end
|
50
50
|
puts table
|
51
51
|
end
|
@@ -10,11 +10,27 @@ module SingularityDsl
|
|
10
10
|
module Table
|
11
11
|
private
|
12
12
|
|
13
|
-
def
|
13
|
+
def task_rows(dsl, task_class)
|
14
|
+
desc_lines = desc_rows task_class.new.description
|
14
15
|
name = dsl.task_name task_class
|
15
16
|
task_name = dsl.task task_class
|
16
|
-
|
17
|
-
[
|
17
|
+
rows = [[name, task_name, desc_lines.shift]]
|
18
|
+
desc_lines.each { |line| rows.push ['', '', line] }
|
19
|
+
rows
|
20
|
+
end
|
21
|
+
|
22
|
+
def desc_rows(desc)
|
23
|
+
desc_lines = []
|
24
|
+
line = ''
|
25
|
+
desc.split(' ').each do |word|
|
26
|
+
if (line + word).length > 80
|
27
|
+
desc_lines.push line.strip
|
28
|
+
line = ''
|
29
|
+
end
|
30
|
+
line += " #{word}"
|
31
|
+
end
|
32
|
+
desc_lines.push line.strip
|
33
|
+
desc_lines
|
18
34
|
end
|
19
35
|
|
20
36
|
def task_table
|
@@ -46,7 +46,7 @@ class ShellTask < SingularityDsl::Task
|
|
46
46
|
def execute
|
47
47
|
throw 'command never defined' if @shell.nil?
|
48
48
|
command @alternative unless evaluate_conditionals
|
49
|
-
@live_stream <<
|
49
|
+
@live_stream << log_shell if @live_stream
|
50
50
|
@shell.run_command
|
51
51
|
return 0 if @no_fail
|
52
52
|
@shell.exitstatus
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: singularity_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chr0n1x
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|