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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWRhOTliMDRkOWJjODEwMjQ3OWJhNzBiYTdiN2M2M2VhNWI1MzkxZg==
4
+ MTEyZDNjOTA1YTJiY2E4ZjZlYmZlMjMyZWMxNjI3YTlhNTNkNzZiNw==
5
5
  data.tar.gz: !binary |-
6
- YTAyZTRjNDNmMjYzMDc2MTIxMzA2YzdjNjI0MmUzMThjNjliZDkxMQ==
6
+ MDBkYmZjZWZjZWY0NTM3ODI2ODZiMDYyODdlYjRmNGZiZmY0YWRkYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjVjMGQ2YWNjYjQ3ODdiZDcyNWRiOGI3ZjgzNmNiYjI0ZDBjMTVlMWEzNjUz
10
- NGI5ZDg4N2FjM2RhOTJhYWMwYWE4NTY1Y2M4YmNkN2ZkZmQ3ZTI5ZjM5MDEx
11
- YzMzNWI3NmUwYzQwNDMwOTFiNWYyNTk4NjBmNzMwOTFhMWE3ZDk=
9
+ N2EwNmZmOWM4MDgwYjA4NmU5YzE0YzYzZTIwMTM0ZmFlYzJlMjA3MDA5MzM5
10
+ ZTYwN2Q1NGFiZTA5MmViOTVmMWNiODA0ZmViOTM2YTgyOGMyYTk3NjYzNDU0
11
+ MzU2NzhjMjFmMmY1MjJmYjVkNTRkMjVhZDkyNDZkZGE1NDcyODg=
12
12
  data.tar.gz: !binary |-
13
- MjNjZGY3YjkzZTY3ZjYzZWNkZmIyNWI2ODMxYWE3ZTQxODU3OGQ2NzA1OTI5
14
- NzI5NDk0MGJlNjE0NWQxYjg4MzU5YjhlNmVlMWU0MjhiMDNhZjRjODQ5M2Fh
15
- ZjliNjBhNjkzMWJhYzk1MmY2Mjc5Yjk0ZDYxNTFiOWJjZDNmN2I=
13
+ Y2ZjODEwZTZlNDIyMzM0NGMyNzQ1MzQ4MDE4NTNmMjE1NGQ1OTk4OGJjYzJj
14
+ N2E1OWE5NmM5NmRkMGVmMDg0MDE4NjU4ZGExNTkwY2MxYzYyOTBiZDNlZTg5
15
+ YTY5YWYxMWFiNzI5MzQxMDliYzM2NmFiYWNiOGFhNTc3YTY4YjU=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- singularity_dsl (1.3.1)
4
+ singularity_dsl (1.3.2)
5
5
  mixlib-shellout (~> 1.4)
6
6
  rainbow (~> 2.0.0)
7
7
  rake (~> 10.3)
@@ -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
- table.add_row task_row(dsl, task)
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 task_row(dsl, task_class)
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
- desc = task_class.new.description
17
- [name, task_name, desc]
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 << log_shell if @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
@@ -2,5 +2,5 @@
2
2
 
3
3
  # version const for gem
4
4
  module SingularityDsl
5
- VERSION = '1.3.1'
5
+ VERSION = '1.3.2'
6
6
  end
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.1
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-01 00:00:00.000000000 Z
11
+ date: 2014-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout