run_tasks 2.0.3 → 2.0.5
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.
- checksums.yaml +4 -4
- data/src/run/core/help.rb +3 -3
- data/src/run/core.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a224c7c9f7f4da9cda370ed7ac53d2698934d79d
|
4
|
+
data.tar.gz: b734e7eeb183f54b1bba3ff3045fbff710930199
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed84d2e2158c842ce0dc88497215cee170424d42db2cbd4a32c63f741f309b18e00f395600a4d1c918e5e1e8fb1e39da82541383f1e35ab7755a8b8131d6b57d
|
7
|
+
data.tar.gz: f19870eb3d1920b8e9cd79adad2a0fdeaeca67a6619c353cdb6d64c839d4caf7ee644c674ab89f30279670a8e5903918a30fb1ab5b6fbe7f2ed5669e1bb3e413
|
data/src/run/core/help.rb
CHANGED
@@ -46,10 +46,10 @@ module Run
|
|
46
46
|
def self.extract_help_verbatims(contents, tasks)
|
47
47
|
lines = contents.lines.map(&:chomp)
|
48
48
|
|
49
|
-
tasks.map do |
|
50
|
-
lines_to_scan = (0..(line - 2 < 0 ? 0 : line - 2)).to_a.reverse
|
49
|
+
tasks.map do |task|
|
50
|
+
lines_to_scan = (0..(task[:line] - 2 < 0 ? 0 : task[:line] - 2)).to_a.reverse
|
51
51
|
{
|
52
|
-
names: names,
|
52
|
+
names: task[:names],
|
53
53
|
comments: lines_to_scan.each_with_object([]) do |current_line, comments|
|
54
54
|
match = /^\s*#\s*(?<comment>.*?)\s*$/.match(lines[current_line])
|
55
55
|
break comments if !match
|
data/src/run/core.rb
CHANGED
@@ -6,7 +6,7 @@ module Run
|
|
6
6
|
|
7
7
|
# @return [void]
|
8
8
|
def self.run_run
|
9
|
-
raise Run::Error::NonExistingRunfile.new if !File.
|
9
|
+
raise Run::Error::NonExistingRunfile.new if !File.exist?(RUNFILE_FILENAME)
|
10
10
|
require "./#{RUNFILE_FILENAME}"
|
11
11
|
run_requested_task if !display_help_if_needed
|
12
12
|
end
|