pyper_rb 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/pyper/pipes.rb +1 -0
- data/lib/pyper/pipes/tap.rb +11 -0
- data/lib/pyper/version.rb +1 -1
- data/test/unit/pyper/pipes/tap_test.rb +30 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fe9e1243476e268f01593c2383021ebfd664ade
|
4
|
+
data.tar.gz: 1de2c649d12d60c55c64bdf451e55c18af9f6409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d4c4ce102f4f6bbae0a58b2a4e67bdb98e6b82c90d51b9d778ed133592af5541831c680a5eb09cb0e69af503ed55760ae39e4b0321cdb098635bb50179acbe8
|
7
|
+
data.tar.gz: da3ed05d7c501a879c4a8e243494fcee9853b6b8e7d4f0eed76080a7bbbaf66b095e6cc3cdf8329029fe5453932c75c33074831d673af1a8a199ea93718c0b33
|
data/Gemfile
CHANGED
data/lib/pyper/pipes.rb
CHANGED
data/lib/pyper/version.rb
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Pyper
|
4
|
+
module Pipes
|
5
|
+
class TapTest < Minitest::Should::TestCase
|
6
|
+
should "call the given block and return the original argument" do
|
7
|
+
called = false
|
8
|
+
res = Pyper::Pipeline.create do
|
9
|
+
add -> (n, _) { n + 2 }
|
10
|
+
add Pyper::Pipes::Tap.new { called = true }
|
11
|
+
add -> (n, _) { n + 4 }
|
12
|
+
end.push(1).value
|
13
|
+
|
14
|
+
assert_equal 7, res
|
15
|
+
assert called
|
16
|
+
end
|
17
|
+
|
18
|
+
should "yield the argument to the given block" do
|
19
|
+
yielded = nil
|
20
|
+
res = Pyper::Pipeline.create do
|
21
|
+
add -> (n, _) { n + 2 }
|
22
|
+
add Pyper::Pipes::Tap.new { |a| yielded = a }
|
23
|
+
add -> (n, _) { n + 4 }
|
24
|
+
end.push(1)
|
25
|
+
|
26
|
+
assert_equal 3, yielded
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pyper_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arron Norwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/pyper/pipes/no_op.rb
|
79
79
|
- lib/pyper/pipes/pry.rb
|
80
80
|
- lib/pyper/pipes/remove_fields.rb
|
81
|
+
- lib/pyper/pipes/tap.rb
|
81
82
|
- lib/pyper/version.rb
|
82
83
|
- pyper_rb.gemspec
|
83
84
|
- test/fixtures/cass_schema_config.yml
|
@@ -100,6 +101,7 @@ files:
|
|
100
101
|
- test/unit/pyper/pipes/model/virtus_deserializer_test.rb
|
101
102
|
- test/unit/pyper/pipes/no_op_test.rb
|
102
103
|
- test/unit/pyper/pipes/remove_fields_test.rb
|
104
|
+
- test/unit/pyper/pipes/tap_test.rb
|
103
105
|
homepage: ''
|
104
106
|
licenses:
|
105
107
|
- MIT
|
@@ -120,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
122
|
version: '0'
|
121
123
|
requirements: []
|
122
124
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.4.8
|
124
126
|
signing_key:
|
125
127
|
specification_version: 4
|
126
128
|
summary: Create pipelines for storing data.
|
@@ -145,4 +147,4 @@ test_files:
|
|
145
147
|
- test/unit/pyper/pipes/model/virtus_deserializer_test.rb
|
146
148
|
- test/unit/pyper/pipes/no_op_test.rb
|
147
149
|
- test/unit/pyper/pipes/remove_fields_test.rb
|
148
|
-
|
150
|
+
- test/unit/pyper/pipes/tap_test.rb
|