Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make splice stage respect reset, and be a little better about calling…

… super()
  • Loading branch information...
commit fb5c40006e768a598427b163bd474a5c65cf04e3 1 parent 2879a76
@mediocretes mediocretes authored
View
2  VERSION
@@ -1 +1 @@
-1.1.4
+1.1.5
View
8 lib/stages/splice.rb
@@ -11,10 +11,12 @@ def process
handle_value item
end
end
+ super()
+ end
- while !source_empty?
- handle_value input
- end
+ def reset
+ @pipelines.each{ |pipeline| pipeline.reset }
+ super()
end
end
end
View
2  stages.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = "stages"
- s.version = "1.1.4"
+ s.version = "1.1.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nathan D Acuff"]
View
7 test/test_stages.rb
@@ -195,6 +195,13 @@ class TestStages < MiniTest::Unit::TestCase
assert_equal([1,2,3,4,4,5], pipeline.to_a)
end
+ test "splice with left hand input resets" do
+ pipeline = Each.new([4,5]) | Splice.new(Each.new([1,2]), Each.new([3,4]))
+ assert_equal([1,2,3,4,4,5], pipeline.to_a)
+ pipeline.reset
+ assert_equal([1,2,3,4,4,5], pipeline.to_a)
+ end
+
def sing
{ :do => 'doe a deer a female deer',
:re => 'ray a drop of golden sun',
Please sign in to comment.
Something went wrong with that request. Please try again.