rukawa 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3708a96687aab4647f068cda298ad49619ae352d
4
- data.tar.gz: 27ac524cfb1eeb05a479e93e6f433a17a6498842
3
+ metadata.gz: a662fb54093353cccddf1ea735d9599c9ab55868
4
+ data.tar.gz: 1f860deaedc962f72de32f02b0760994aa5c41ba
5
5
  SHA512:
6
- metadata.gz: ad83b7c946d04cccfee6e16b3ac6b30d7421e361ece92287d0de503f380d1c9bda1e88b087f750b8cb994f0aca007e113008d028110f2ef959073277ef0fcd7a
7
- data.tar.gz: 51aae209a567c73ce9fa031e91423c37facd25f93829d1c08a1467b73561d238a4fbbe9f56f3d85718d1586d57309d3ab5cac0cc2dfcba0afad0faef56a2f087
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(*@start_jobs)
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)
@@ -1,3 +1,3 @@
1
1
  module Rukawa
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rukawa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007