rukawa 0.3.1 → 0.3.2
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/lib/rukawa/dag.rb +1 -7
- data/lib/rukawa/version.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: a662fb54093353cccddf1ea735d9599c9ab55868
|
4
|
+
data.tar.gz: 1f860deaedc962f72de32f02b0760994aa5c41ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9945a19a8990cc809d96e3c4f5ada00a8b56924234627250f7bfdcfe6562eb4d997240eb7aabe34434ce80abb47af0486ceb4c7e383d2a68652d2899218b8a3
|
7
|
+
data.tar.gz: b1e02a5e7d17be36a7a658674834e89c9bf626948cb1a181e73d19a04c129cf58e3a19d347c56014a490abc4b665e187e19fc45988e8e80ffe1a327e792a6f58
|
data/lib/rukawa/dag.rb
CHANGED
@@ -11,7 +11,6 @@ module Rukawa
|
|
11
11
|
def initialize
|
12
12
|
@nodes = Set.new
|
13
13
|
@jobs = Set.new
|
14
|
-
@start_jobs = Set.new
|
15
14
|
@edges = Set.new
|
16
15
|
end
|
17
16
|
|
@@ -22,7 +21,6 @@ module Rukawa
|
|
22
21
|
job = job_class.new(job_net)
|
23
22
|
@nodes << job
|
24
23
|
@jobs << job if job.is_a?(Job)
|
25
|
-
@start_jobs << job if job.is_a?(Job) && dependencies[job_class].empty?
|
26
24
|
|
27
25
|
dependencies[job_class].each do |depend_job_class|
|
28
26
|
depend_job = @nodes.find { |j| j.instance_of?(depend_job_class) }
|
@@ -72,7 +70,7 @@ module Rukawa
|
|
72
70
|
def leveled_each
|
73
71
|
visited = Set.new
|
74
72
|
queue = []
|
75
|
-
queue.push(*@
|
73
|
+
queue.push(*@jobs.select { |j| j.in_comings.empty? })
|
76
74
|
|
77
75
|
if block_given?
|
78
76
|
until queue.empty?
|
@@ -91,10 +89,6 @@ module Rukawa
|
|
91
89
|
end
|
92
90
|
end
|
93
91
|
|
94
|
-
def start_jobs
|
95
|
-
@start_jobs
|
96
|
-
end
|
97
|
-
|
98
92
|
private
|
99
93
|
|
100
94
|
def tsortable_hash(hash)
|
data/lib/rukawa/version.rb
CHANGED