reacto 0.1.0 → 1.0.0
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/.gitignore +2 -0
- data/README.md +932 -11
- data/doc/reactive_programming_with_reacto.md +238 -0
- data/lib/reacto.rb +70 -0
- data/lib/reacto/behaviours.rb +24 -1
- data/lib/reacto/constants.rb +4 -1
- data/lib/reacto/executors.rb +8 -10
- data/lib/reacto/labeled_trackable.rb +14 -2
- data/lib/reacto/operations.rb +23 -2
- data/lib/reacto/operations/act.rb +69 -0
- data/lib/reacto/operations/append.rb +45 -0
- data/lib/reacto/operations/blocking_enumerable.rb +40 -0
- data/lib/reacto/operations/buffer.rb +1 -4
- data/lib/reacto/operations/chunk.rb +81 -0
- data/lib/reacto/operations/chunk_while.rb +56 -0
- data/lib/reacto/operations/cycle.rb +27 -0
- data/lib/reacto/operations/delay_each.rb +75 -0
- data/lib/reacto/operations/depend_on.rb +4 -5
- data/lib/reacto/operations/diff.rb +8 -10
- data/lib/reacto/operations/drop.rb +6 -8
- data/lib/reacto/operations/drop_while.rb +23 -0
- data/lib/reacto/operations/each_collect.rb +57 -0
- data/lib/reacto/operations/each_with_object.rb +31 -0
- data/lib/reacto/operations/extremums.rb +54 -0
- data/lib/reacto/operations/find_index.rb +28 -0
- data/lib/reacto/operations/flat_map.rb +2 -2
- data/lib/reacto/operations/flatten.rb +2 -7
- data/lib/reacto/operations/flatten_labeled.rb +44 -0
- data/lib/reacto/operations/{label.rb → group_by_label.rb} +1 -1
- data/lib/reacto/operations/include.rb +40 -0
- data/lib/reacto/operations/inject.rb +15 -9
- data/lib/reacto/operations/map.rb +15 -13
- data/lib/reacto/operations/merge.rb +17 -16
- data/lib/reacto/operations/operation_on_labeled.rb +29 -0
- data/lib/reacto/operations/partition.rb +52 -0
- data/lib/reacto/operations/prepend.rb +0 -3
- data/lib/reacto/operations/rescue_and_replace_error.rb +21 -0
- data/lib/reacto/operations/retry.rb +26 -0
- data/lib/reacto/operations/retry_when.rb +30 -0
- data/lib/reacto/operations/select.rb +2 -6
- data/lib/reacto/operations/slice.rb +50 -0
- data/lib/reacto/operations/slice_when.rb +41 -0
- data/lib/reacto/operations/split_labeled.rb +32 -0
- data/lib/reacto/operations/take.rb +9 -14
- data/lib/reacto/operations/take_while.rb +28 -0
- data/lib/reacto/operations/throttle.rb +2 -3
- data/lib/reacto/operations/track_on.rb +1 -3
- data/lib/reacto/shared_trackable.rb +2 -5
- data/lib/reacto/subscriptions/buffered_subscription.rb +10 -9
- data/lib/reacto/subscriptions/executor_subscription.rb +12 -4
- data/lib/reacto/subscriptions/tracker_subscription.rb +0 -4
- data/lib/reacto/subscriptions/zipping_subscription.rb +0 -1
- data/lib/reacto/trackable.rb +429 -64
- data/lib/reacto/version.rb +1 -1
- data/reacto.gemspec +2 -3
- data/spec/reacto/labeled_trackable_spec.rb +17 -0
- data/spec/reacto/trackable/act_spec.rb +15 -0
- data/spec/reacto/trackable/all_spec.rb +38 -0
- data/spec/reacto/trackable/any_spec.rb +39 -0
- data/spec/reacto/trackable/append_spec.rb +38 -0
- data/spec/reacto/trackable/buffer_spec.rb +11 -15
- data/spec/reacto/trackable/chunk_spec.rb +86 -0
- data/spec/reacto/trackable/chunk_while_spec.rb +22 -0
- data/spec/reacto/trackable/class_level/combine_last_spec.rb +1 -3
- data/spec/reacto/trackable/class_level/interval_spec.rb +4 -6
- data/spec/reacto/trackable/class_level/make_spec.rb +0 -15
- data/spec/reacto/trackable/{zip_spec.rb → class_level/zip_spec.rb} +0 -2
- data/spec/reacto/trackable/concat_spec.rb +12 -12
- data/spec/reacto/trackable/count_spec.rb +38 -0
- data/spec/reacto/trackable/cycle_spec.rb +14 -0
- data/spec/reacto/trackable/delay_each_spec.rb +18 -0
- data/spec/reacto/trackable/depend_on_spec.rb +6 -9
- data/spec/reacto/trackable/diff_spec.rb +3 -5
- data/spec/reacto/trackable/drop_errors_spec.rb +1 -3
- data/spec/reacto/trackable/drop_while_spec.rb +15 -0
- data/spec/reacto/trackable/each_cons_spec.rb +53 -0
- data/spec/reacto/trackable/each_slice_spec.rb +37 -0
- data/spec/reacto/trackable/each_with_index_spec.rb +33 -0
- data/spec/reacto/trackable/each_with_object_spec.rb +26 -0
- data/spec/reacto/trackable/entries_spec.rb +25 -0
- data/spec/reacto/trackable/execute_on_spec.rb +33 -0
- data/spec/reacto/trackable/find_index_spec.rb +31 -0
- data/spec/reacto/trackable/find_spec.rb +34 -0
- data/spec/reacto/trackable/first_spec.rb +36 -0
- data/spec/reacto/trackable/flat_map_latest_spec.rb +5 -5
- data/spec/reacto/trackable/flat_map_spec.rb +25 -0
- data/spec/reacto/trackable/flatten_labeled_spec.rb +48 -0
- data/spec/reacto/trackable/grep_spec.rb +29 -0
- data/spec/reacto/trackable/grep_v_spec.rb +23 -0
- data/spec/reacto/trackable/{label_spec.rb → group_by_label_spec.rb} +4 -11
- data/spec/reacto/trackable/include_spec.rb +23 -0
- data/spec/reacto/trackable/inject_spec.rb +30 -4
- data/spec/reacto/trackable/lift_spec.rb +1 -3
- data/spec/reacto/trackable/map_spec.rb +17 -3
- data/spec/reacto/trackable/max_by_spec.rb +12 -0
- data/spec/reacto/trackable/max_spec.rb +19 -0
- data/spec/reacto/trackable/merge_spec.rb +6 -7
- data/spec/reacto/trackable/min_by_spec.rb +12 -0
- data/spec/reacto/trackable/min_spec.rb +19 -0
- data/spec/reacto/trackable/minmax_by_spec.rb +12 -0
- data/spec/reacto/trackable/minmax_spec.rb +19 -0
- data/spec/reacto/trackable/none_spec.rb +38 -0
- data/spec/reacto/trackable/on_spec.rb +11 -4
- data/spec/reacto/trackable/one_spec.rb +38 -0
- data/spec/reacto/trackable/partition_spec.rb +23 -0
- data/spec/reacto/trackable/prepend_spec.rb +1 -3
- data/spec/reacto/trackable/reject_spec.rb +21 -0
- data/spec/reacto/trackable/rescue_and_replace_error_spec.rb +48 -0
- data/spec/reacto/trackable/rescue_and_replace_error_with_spec.rb +26 -0
- data/spec/reacto/trackable/retry_spec.rb +50 -0
- data/spec/reacto/trackable/retry_when_spec.rb +33 -0
- data/spec/reacto/trackable/select_spec.rb +18 -7
- data/spec/reacto/trackable/slice_after_spec.rb +38 -0
- data/spec/reacto/trackable/slice_before_spec.rb +38 -0
- data/spec/reacto/trackable/slice_when_spec.rb +26 -0
- data/spec/reacto/trackable/sort_by_spec.rb +16 -0
- data/spec/reacto/trackable/sort_spec.rb +23 -0
- data/spec/reacto/trackable/split_labeled_spec.rb +37 -0
- data/spec/reacto/trackable/take_while_spec.rb +16 -0
- data/spec/reacto/trackable/throttle_spec.rb +2 -3
- data/spec/reacto/trackable/track_on_spec.rb +2 -3
- data/spec/reacto/trackable/uniq_spec.rb +2 -4
- data/spec/support/helpers.rb +9 -1
- metadata +135 -25
- data/Gemfile.lock +0 -32
- data/lib/reacto/operations/cache.rb +0 -53
- data/spec/reacto/trackable/cache_spec.rb +0 -64
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
context Reacto::Trackable do
|
|
2
|
+
context '#slice_before' do
|
|
3
|
+
subject(:test_source) do
|
|
4
|
+
described_class.enumerable(['A', 'B', 0, 'C', 2, true, false, 3, 'DE'])
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
it 'emits Reacto::Trackable instances emitting slices of the values, ' \
|
|
8
|
+
'emitted by the source. The slices are determined by the first value ' \
|
|
9
|
+
'for which <pattern> === value is true' do
|
|
10
|
+
trackable = test_source.slice_before(Integer)
|
|
11
|
+
|
|
12
|
+
attach_test_trackers(trackable)
|
|
13
|
+
|
|
14
|
+
expect(test_data.size).to eq(5)
|
|
15
|
+
expect_trackable_values(test_data.first, ['A', 'B'])
|
|
16
|
+
expect_trackable_values(test_data[1], [0, 'C'])
|
|
17
|
+
expect_trackable_values(test_data[2], [2, true, false])
|
|
18
|
+
expect_trackable_values(test_data[3], [3, 'DE'])
|
|
19
|
+
expect(test_data.last).to eq('|')
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'emits Reacto::Trackable instances emitting slices of the values, ' \
|
|
23
|
+
'emitted by the source. The slices are determined by the first value ' \
|
|
24
|
+
'the block given returns true' do
|
|
25
|
+
trackable = test_source.slice_before do |val|
|
|
26
|
+
val == false || val == 0
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attach_test_trackers(trackable)
|
|
30
|
+
|
|
31
|
+
expect(test_data.size).to eq(4)
|
|
32
|
+
expect_trackable_values(test_data.first, ['A', 'B'])
|
|
33
|
+
expect_trackable_values(test_data[1], [0, 'C', 2, true])
|
|
34
|
+
expect_trackable_values(test_data[2], [false, 3, 'DE'])
|
|
35
|
+
expect(test_data.last).to eq('|')
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
context Reacto::Trackable do
|
|
2
|
+
context '#slice_when' do
|
|
3
|
+
subject(:test_source) do
|
|
4
|
+
described_class.enumerable([1, 2, 3, 100, 101, 102, 5, 200, 500, 7, 8])
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
it 'emits Reacto::Trackable instances emitting slices of the values, ' \
|
|
8
|
+
'emitted by the source. The slices are determined by the current and ' \
|
|
9
|
+
'the previous values for which the block given returns true' do
|
|
10
|
+
trackable = test_source.slice_when do |previous, current|
|
|
11
|
+
(current - previous).abs > 20
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
attach_test_trackers(trackable)
|
|
15
|
+
|
|
16
|
+
expect(test_data.size).to eq(7)
|
|
17
|
+
expect_trackable_values(test_data.first, [1, 2, 3])
|
|
18
|
+
expect_trackable_values(test_data[1], [100, 101, 102])
|
|
19
|
+
expect_trackable_values(test_data[2], [5])
|
|
20
|
+
expect_trackable_values(test_data[3], [200])
|
|
21
|
+
expect_trackable_values(test_data[4], [500])
|
|
22
|
+
expect_trackable_values(test_data[5], [7, 8])
|
|
23
|
+
expect(test_data.last).to eq('|')
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
context Reacto::Trackable do
|
|
2
|
+
context '#sort_by' do
|
|
3
|
+
subject(:test_source) do
|
|
4
|
+
described_class.enumerable(%w(elephant fox lion dog wolf))
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
it 'emits the values emitted by the source in sorted order, ' \
|
|
8
|
+
'using the value returned by the given block for comparison' do
|
|
9
|
+
trackable = test_source.sort_by { |word| word.length }
|
|
10
|
+
|
|
11
|
+
trackable.on(value: test_on_value)
|
|
12
|
+
|
|
13
|
+
expect(test_data).to eq(%w(dog fox wolf lion elephant))
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
context Reacto::Trackable do
|
|
2
|
+
context '#sort' do
|
|
3
|
+
subject(:test_source) { described_class.enumerable([5, 3, 8, 1, 2, 9, 10]) }
|
|
4
|
+
|
|
5
|
+
it 'emits the values emitted by the source in sorted order, ' \
|
|
6
|
+
'using the `<=>` operator of the values' do
|
|
7
|
+
trackable = test_source.sort
|
|
8
|
+
|
|
9
|
+
trackable.on(value: test_on_value)
|
|
10
|
+
|
|
11
|
+
expect(test_data).to eq([1, 2, 3, 5, 8, 9, 10])
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'emits the values emitted by the source in sorted order, ' \
|
|
15
|
+
'using the passed block' do
|
|
16
|
+
trackable = test_source.sort { |a, b| b <=> a }
|
|
17
|
+
|
|
18
|
+
trackable.on(value: test_on_value)
|
|
19
|
+
|
|
20
|
+
expect(test_data).to eq([10, 9, 8, 5, 3, 2, 1])
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
context Reacto::Trackable do
|
|
2
|
+
context '#split_labeled' do
|
|
3
|
+
it 'it turns a LabeledTrackable emitted by the source to multiple' \
|
|
4
|
+
'LabeledTrackable instances with their own labels, computed by the' \
|
|
5
|
+
'give block' do
|
|
6
|
+
trackable =
|
|
7
|
+
Reacto::Trackable.enumerable((1..10).each).group_by_label do |value|
|
|
8
|
+
[(value <= 5) ? 'one to five' : 'six to ten', value]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
trackable = trackable.split_labeled('one to five') do |value|
|
|
12
|
+
[(value < 4) ? 'one to three' : 'four and five', value]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
trackable.on(value: test_on_value)
|
|
16
|
+
expect(test_data.size).to eq(3)
|
|
17
|
+
|
|
18
|
+
one_to_three = test_data.first
|
|
19
|
+
one_to_three_data = []
|
|
20
|
+
one_to_three.on(value: ->(v) { one_to_three_data << v })
|
|
21
|
+
expect(one_to_three.label).to eq('one to three')
|
|
22
|
+
expect(one_to_three_data).to eq([1, 2, 3])
|
|
23
|
+
|
|
24
|
+
four_and_five = test_data[1]
|
|
25
|
+
four_and_five_data = []
|
|
26
|
+
four_and_five.on(value: ->(v) { four_and_five_data << v })
|
|
27
|
+
expect(four_and_five.label).to eq('four and five')
|
|
28
|
+
expect(four_and_five_data).to eq([4, 5])
|
|
29
|
+
|
|
30
|
+
six_to_ten = test_data.last
|
|
31
|
+
six_to_ten_data = []
|
|
32
|
+
six_to_ten.on(value: ->(v) { six_to_ten_data << v })
|
|
33
|
+
expect(six_to_ten.label).to eq('six to ten')
|
|
34
|
+
expect(six_to_ten_data).to eq((6..10).to_a)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
context Reacto::Trackable do
|
|
2
|
+
context '#take_while' do
|
|
3
|
+
subject(:test_source) do
|
|
4
|
+
described_class.enumerable(%w(some stuff hey way okay refrigerator bat))
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
it 'returns a Reacto::Trackable emitting the values incomming from the' \
|
|
8
|
+
' source, until the block given returns false' do
|
|
9
|
+
trackable = test_source.take_while { |val| val.length < 6 }
|
|
10
|
+
|
|
11
|
+
attach_test_trackers(trackable)
|
|
12
|
+
|
|
13
|
+
expect(test_data).to eq(%w(some stuff hey way okay |))
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
1
|
context Reacto::Trackable do
|
|
4
2
|
context '#throttle' do
|
|
5
3
|
it 'emits only the last values received after a given timeout' do
|
|
@@ -8,7 +6,8 @@ context Reacto::Trackable do
|
|
|
8
6
|
value: test_on_value, close: test_on_close, error: test_on_error
|
|
9
7
|
)
|
|
10
8
|
trackable.await(subscription)
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
expect(test_data.size).to eq(7)
|
|
12
11
|
end
|
|
13
12
|
end
|
|
14
13
|
end
|
|
@@ -17,12 +17,11 @@ context Reacto::Trackable do
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
context '#track_on' do
|
|
20
|
-
it 'executes the trackable
|
|
20
|
+
it 'executes the trackable behaviour on the passed executor' do
|
|
21
21
|
subject
|
|
22
22
|
.execute_on(Reacto::Executors.io)
|
|
23
|
-
.map(
|
|
23
|
+
.map(&-> (v) { v * 2 })
|
|
24
24
|
.on(value: test_on_value, close: test_on_close)
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
-
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
1
|
context Reacto::Trackable do
|
|
4
|
-
context 'uniq' do
|
|
2
|
+
context '#uniq' do
|
|
5
3
|
it 'sends only uniq values, dropping the repeating ones' do
|
|
6
4
|
trackable =
|
|
7
5
|
described_class.enumerable([1, 2, 3, 2, 4, 3, 2, 1, 5]).uniq
|
|
@@ -9,7 +7,7 @@ context Reacto::Trackable do
|
|
|
9
7
|
trackable.on(
|
|
10
8
|
value: test_on_value, close: test_on_close, error: test_on_error
|
|
11
9
|
)
|
|
12
|
-
expect(test_data).to
|
|
10
|
+
expect(test_data).to eq([1, 2, 3, 4, 5, '|'])
|
|
13
11
|
end
|
|
14
12
|
end
|
|
15
13
|
end
|
data/spec/support/helpers.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Helpers
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
let(:source) { described_class.new(test_behaviour) }
|
|
16
|
+
let(:source) { described_class.new(&test_behaviour) }
|
|
17
17
|
|
|
18
18
|
def attach_test_trackers(trackable)
|
|
19
19
|
trackable.on(
|
|
@@ -22,4 +22,12 @@ module Helpers
|
|
|
22
22
|
close: test_on_close
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
def expect_trackable_values(trackable, expected, label: nil)
|
|
27
|
+
expect(trackable.label).to eq(label) if label
|
|
28
|
+
|
|
29
|
+
values = []
|
|
30
|
+
trackable.on { |v| values << v }
|
|
31
|
+
expect(values).to eq(expected)
|
|
32
|
+
end
|
|
25
33
|
end
|
metadata
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reacto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nickolay Tzvetinov - Meddle
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.3'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '1.3'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rspec
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - ~>
|
|
31
|
+
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: 3.3.0
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - ~>
|
|
38
|
+
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: 3.3.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: concurrent-ruby
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - ~>
|
|
45
|
+
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.0.
|
|
47
|
+
version: 1.0.2
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- - ~>
|
|
52
|
+
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 1.0.
|
|
54
|
+
version: 1.0.2
|
|
55
55
|
description: Concurrent Reactive Programming for Ruby
|
|
56
56
|
email:
|
|
57
57
|
- n.tzvetinov@gmail.com
|
|
@@ -59,12 +59,12 @@ executables: []
|
|
|
59
59
|
extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
|
61
61
|
files:
|
|
62
|
-
- .gitignore
|
|
63
|
-
- .rspec
|
|
62
|
+
- ".gitignore"
|
|
63
|
+
- ".rspec"
|
|
64
64
|
- Gemfile
|
|
65
|
-
- Gemfile.lock
|
|
66
65
|
- README.md
|
|
67
66
|
- doc/create_and_user_trackables.md
|
|
67
|
+
- doc/reactive_programming_with_reacto.md
|
|
68
68
|
- lib/reacto.rb
|
|
69
69
|
- lib/reacto/behaviours.rb
|
|
70
70
|
- lib/reacto/cache/file.rb
|
|
@@ -73,24 +73,46 @@ files:
|
|
|
73
73
|
- lib/reacto/executors.rb
|
|
74
74
|
- lib/reacto/labeled_trackable.rb
|
|
75
75
|
- lib/reacto/operations.rb
|
|
76
|
+
- lib/reacto/operations/act.rb
|
|
77
|
+
- lib/reacto/operations/append.rb
|
|
78
|
+
- lib/reacto/operations/blocking_enumerable.rb
|
|
76
79
|
- lib/reacto/operations/buffer.rb
|
|
77
|
-
- lib/reacto/operations/
|
|
80
|
+
- lib/reacto/operations/chunk.rb
|
|
81
|
+
- lib/reacto/operations/chunk_while.rb
|
|
78
82
|
- lib/reacto/operations/concat.rb
|
|
83
|
+
- lib/reacto/operations/cycle.rb
|
|
84
|
+
- lib/reacto/operations/delay_each.rb
|
|
79
85
|
- lib/reacto/operations/depend_on.rb
|
|
80
86
|
- lib/reacto/operations/diff.rb
|
|
81
87
|
- lib/reacto/operations/drop.rb
|
|
82
88
|
- lib/reacto/operations/drop_errors.rb
|
|
89
|
+
- lib/reacto/operations/drop_while.rb
|
|
90
|
+
- lib/reacto/operations/each_collect.rb
|
|
91
|
+
- lib/reacto/operations/each_with_object.rb
|
|
92
|
+
- lib/reacto/operations/extremums.rb
|
|
93
|
+
- lib/reacto/operations/find_index.rb
|
|
83
94
|
- lib/reacto/operations/flat_map.rb
|
|
84
95
|
- lib/reacto/operations/flat_map_latest.rb
|
|
85
96
|
- lib/reacto/operations/flatten.rb
|
|
97
|
+
- lib/reacto/operations/flatten_labeled.rb
|
|
98
|
+
- lib/reacto/operations/group_by_label.rb
|
|
99
|
+
- lib/reacto/operations/include.rb
|
|
86
100
|
- lib/reacto/operations/inject.rb
|
|
87
|
-
- lib/reacto/operations/label.rb
|
|
88
101
|
- lib/reacto/operations/last.rb
|
|
89
102
|
- lib/reacto/operations/map.rb
|
|
90
103
|
- lib/reacto/operations/merge.rb
|
|
104
|
+
- lib/reacto/operations/operation_on_labeled.rb
|
|
105
|
+
- lib/reacto/operations/partition.rb
|
|
91
106
|
- lib/reacto/operations/prepend.rb
|
|
107
|
+
- lib/reacto/operations/rescue_and_replace_error.rb
|
|
108
|
+
- lib/reacto/operations/retry.rb
|
|
109
|
+
- lib/reacto/operations/retry_when.rb
|
|
92
110
|
- lib/reacto/operations/select.rb
|
|
111
|
+
- lib/reacto/operations/slice.rb
|
|
112
|
+
- lib/reacto/operations/slice_when.rb
|
|
113
|
+
- lib/reacto/operations/split_labeled.rb
|
|
93
114
|
- lib/reacto/operations/take.rb
|
|
115
|
+
- lib/reacto/operations/take_while.rb
|
|
94
116
|
- lib/reacto/operations/throttle.rb
|
|
95
117
|
- lib/reacto/operations/track_on.rb
|
|
96
118
|
- lib/reacto/operations/uniq.rb
|
|
@@ -117,10 +139,16 @@ files:
|
|
|
117
139
|
- lib/reacto/tracker.rb
|
|
118
140
|
- lib/reacto/version.rb
|
|
119
141
|
- reacto.gemspec
|
|
142
|
+
- spec/reacto/labeled_trackable_spec.rb
|
|
120
143
|
- spec/reacto/operations/track_on_spec.rb
|
|
121
144
|
- spec/reacto/shared_trackable_spec.rb
|
|
145
|
+
- spec/reacto/trackable/act_spec.rb
|
|
146
|
+
- spec/reacto/trackable/all_spec.rb
|
|
147
|
+
- spec/reacto/trackable/any_spec.rb
|
|
148
|
+
- spec/reacto/trackable/append_spec.rb
|
|
122
149
|
- spec/reacto/trackable/buffer_spec.rb
|
|
123
|
-
- spec/reacto/trackable/
|
|
150
|
+
- spec/reacto/trackable/chunk_spec.rb
|
|
151
|
+
- spec/reacto/trackable/chunk_while_spec.rb
|
|
124
152
|
- spec/reacto/trackable/class_level/combine_last_spec.rb
|
|
125
153
|
- spec/reacto/trackable/class_level/combine_spec.rb
|
|
126
154
|
- spec/reacto/trackable/class_level/enumerable_spec.rb
|
|
@@ -130,27 +158,65 @@ files:
|
|
|
130
158
|
- spec/reacto/trackable/class_level/make_spec.rb
|
|
131
159
|
- spec/reacto/trackable/class_level/never_spec.rb
|
|
132
160
|
- spec/reacto/trackable/class_level/value_spec.rb
|
|
161
|
+
- spec/reacto/trackable/class_level/zip_spec.rb
|
|
133
162
|
- spec/reacto/trackable/concat_spec.rb
|
|
163
|
+
- spec/reacto/trackable/count_spec.rb
|
|
164
|
+
- spec/reacto/trackable/cycle_spec.rb
|
|
165
|
+
- spec/reacto/trackable/delay_each_spec.rb
|
|
134
166
|
- spec/reacto/trackable/depend_on_spec.rb
|
|
135
167
|
- spec/reacto/trackable/diff_spec.rb
|
|
136
168
|
- spec/reacto/trackable/drop_errors_spec.rb
|
|
169
|
+
- spec/reacto/trackable/drop_while_spec.rb
|
|
170
|
+
- spec/reacto/trackable/each_cons_spec.rb
|
|
171
|
+
- spec/reacto/trackable/each_slice_spec.rb
|
|
172
|
+
- spec/reacto/trackable/each_with_index_spec.rb
|
|
173
|
+
- spec/reacto/trackable/each_with_object_spec.rb
|
|
174
|
+
- spec/reacto/trackable/entries_spec.rb
|
|
175
|
+
- spec/reacto/trackable/execute_on_spec.rb
|
|
176
|
+
- spec/reacto/trackable/find_index_spec.rb
|
|
177
|
+
- spec/reacto/trackable/find_spec.rb
|
|
178
|
+
- spec/reacto/trackable/first_spec.rb
|
|
137
179
|
- spec/reacto/trackable/flat_map_latest_spec.rb
|
|
138
180
|
- spec/reacto/trackable/flat_map_spec.rb
|
|
181
|
+
- spec/reacto/trackable/flatten_labeled_spec.rb
|
|
139
182
|
- spec/reacto/trackable/flatten_spec.rb
|
|
183
|
+
- spec/reacto/trackable/grep_spec.rb
|
|
184
|
+
- spec/reacto/trackable/grep_v_spec.rb
|
|
185
|
+
- spec/reacto/trackable/group_by_label_spec.rb
|
|
186
|
+
- spec/reacto/trackable/include_spec.rb
|
|
140
187
|
- spec/reacto/trackable/inject_spec.rb
|
|
141
|
-
- spec/reacto/trackable/label_spec.rb
|
|
142
188
|
- spec/reacto/trackable/lift_spec.rb
|
|
143
189
|
- spec/reacto/trackable/map_spec.rb
|
|
190
|
+
- spec/reacto/trackable/max_by_spec.rb
|
|
191
|
+
- spec/reacto/trackable/max_spec.rb
|
|
144
192
|
- spec/reacto/trackable/merge_spec.rb
|
|
193
|
+
- spec/reacto/trackable/min_by_spec.rb
|
|
194
|
+
- spec/reacto/trackable/min_spec.rb
|
|
195
|
+
- spec/reacto/trackable/minmax_by_spec.rb
|
|
196
|
+
- spec/reacto/trackable/minmax_spec.rb
|
|
197
|
+
- spec/reacto/trackable/none_spec.rb
|
|
145
198
|
- spec/reacto/trackable/on_spec.rb
|
|
199
|
+
- spec/reacto/trackable/one_spec.rb
|
|
200
|
+
- spec/reacto/trackable/partition_spec.rb
|
|
146
201
|
- spec/reacto/trackable/positional_filtering_spec.rb
|
|
147
202
|
- spec/reacto/trackable/prepend_spec.rb
|
|
203
|
+
- spec/reacto/trackable/reject_spec.rb
|
|
204
|
+
- spec/reacto/trackable/rescue_and_replace_error_spec.rb
|
|
205
|
+
- spec/reacto/trackable/rescue_and_replace_error_with_spec.rb
|
|
206
|
+
- spec/reacto/trackable/retry_spec.rb
|
|
207
|
+
- spec/reacto/trackable/retry_when_spec.rb
|
|
148
208
|
- spec/reacto/trackable/select_spec.rb
|
|
209
|
+
- spec/reacto/trackable/slice_after_spec.rb
|
|
210
|
+
- spec/reacto/trackable/slice_before_spec.rb
|
|
211
|
+
- spec/reacto/trackable/slice_when_spec.rb
|
|
212
|
+
- spec/reacto/trackable/sort_by_spec.rb
|
|
213
|
+
- spec/reacto/trackable/sort_spec.rb
|
|
214
|
+
- spec/reacto/trackable/split_labeled_spec.rb
|
|
215
|
+
- spec/reacto/trackable/take_while_spec.rb
|
|
149
216
|
- spec/reacto/trackable/throttle_spec.rb
|
|
150
217
|
- spec/reacto/trackable/track_on_spec.rb
|
|
151
218
|
- spec/reacto/trackable/uniq_spec.rb
|
|
152
219
|
- spec/reacto/trackable/wrap_spec.rb
|
|
153
|
-
- spec/reacto/trackable/zip_spec.rb
|
|
154
220
|
- spec/spec_helper.rb
|
|
155
221
|
- spec/support/helpers.rb
|
|
156
222
|
homepage: https://github.com/meddle0x53/reacto
|
|
@@ -163,25 +229,31 @@ require_paths:
|
|
|
163
229
|
- lib
|
|
164
230
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
231
|
requirements:
|
|
166
|
-
- -
|
|
232
|
+
- - ">="
|
|
167
233
|
- !ruby/object:Gem::Version
|
|
168
234
|
version: '0'
|
|
169
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
236
|
requirements:
|
|
171
|
-
- -
|
|
237
|
+
- - ">="
|
|
172
238
|
- !ruby/object:Gem::Version
|
|
173
239
|
version: '0'
|
|
174
240
|
requirements: []
|
|
175
241
|
rubyforge_project:
|
|
176
|
-
rubygems_version: 2.
|
|
242
|
+
rubygems_version: 2.2.2
|
|
177
243
|
signing_key:
|
|
178
244
|
specification_version: 4
|
|
179
|
-
summary:
|
|
245
|
+
summary: Reactive Programming for Ruby with some concurrency thrown into the mix.
|
|
180
246
|
test_files:
|
|
247
|
+
- spec/reacto/labeled_trackable_spec.rb
|
|
181
248
|
- spec/reacto/operations/track_on_spec.rb
|
|
182
249
|
- spec/reacto/shared_trackable_spec.rb
|
|
250
|
+
- spec/reacto/trackable/act_spec.rb
|
|
251
|
+
- spec/reacto/trackable/all_spec.rb
|
|
252
|
+
- spec/reacto/trackable/any_spec.rb
|
|
253
|
+
- spec/reacto/trackable/append_spec.rb
|
|
183
254
|
- spec/reacto/trackable/buffer_spec.rb
|
|
184
|
-
- spec/reacto/trackable/
|
|
255
|
+
- spec/reacto/trackable/chunk_spec.rb
|
|
256
|
+
- spec/reacto/trackable/chunk_while_spec.rb
|
|
185
257
|
- spec/reacto/trackable/class_level/combine_last_spec.rb
|
|
186
258
|
- spec/reacto/trackable/class_level/combine_spec.rb
|
|
187
259
|
- spec/reacto/trackable/class_level/enumerable_spec.rb
|
|
@@ -191,26 +263,64 @@ test_files:
|
|
|
191
263
|
- spec/reacto/trackable/class_level/make_spec.rb
|
|
192
264
|
- spec/reacto/trackable/class_level/never_spec.rb
|
|
193
265
|
- spec/reacto/trackable/class_level/value_spec.rb
|
|
266
|
+
- spec/reacto/trackable/class_level/zip_spec.rb
|
|
194
267
|
- spec/reacto/trackable/concat_spec.rb
|
|
268
|
+
- spec/reacto/trackable/count_spec.rb
|
|
269
|
+
- spec/reacto/trackable/cycle_spec.rb
|
|
270
|
+
- spec/reacto/trackable/delay_each_spec.rb
|
|
195
271
|
- spec/reacto/trackable/depend_on_spec.rb
|
|
196
272
|
- spec/reacto/trackable/diff_spec.rb
|
|
197
273
|
- spec/reacto/trackable/drop_errors_spec.rb
|
|
274
|
+
- spec/reacto/trackable/drop_while_spec.rb
|
|
275
|
+
- spec/reacto/trackable/each_cons_spec.rb
|
|
276
|
+
- spec/reacto/trackable/each_slice_spec.rb
|
|
277
|
+
- spec/reacto/trackable/each_with_index_spec.rb
|
|
278
|
+
- spec/reacto/trackable/each_with_object_spec.rb
|
|
279
|
+
- spec/reacto/trackable/entries_spec.rb
|
|
280
|
+
- spec/reacto/trackable/execute_on_spec.rb
|
|
281
|
+
- spec/reacto/trackable/find_index_spec.rb
|
|
282
|
+
- spec/reacto/trackable/find_spec.rb
|
|
283
|
+
- spec/reacto/trackable/first_spec.rb
|
|
198
284
|
- spec/reacto/trackable/flat_map_latest_spec.rb
|
|
199
285
|
- spec/reacto/trackable/flat_map_spec.rb
|
|
286
|
+
- spec/reacto/trackable/flatten_labeled_spec.rb
|
|
200
287
|
- spec/reacto/trackable/flatten_spec.rb
|
|
288
|
+
- spec/reacto/trackable/grep_spec.rb
|
|
289
|
+
- spec/reacto/trackable/grep_v_spec.rb
|
|
290
|
+
- spec/reacto/trackable/group_by_label_spec.rb
|
|
291
|
+
- spec/reacto/trackable/include_spec.rb
|
|
201
292
|
- spec/reacto/trackable/inject_spec.rb
|
|
202
|
-
- spec/reacto/trackable/label_spec.rb
|
|
203
293
|
- spec/reacto/trackable/lift_spec.rb
|
|
204
294
|
- spec/reacto/trackable/map_spec.rb
|
|
295
|
+
- spec/reacto/trackable/max_by_spec.rb
|
|
296
|
+
- spec/reacto/trackable/max_spec.rb
|
|
205
297
|
- spec/reacto/trackable/merge_spec.rb
|
|
298
|
+
- spec/reacto/trackable/min_by_spec.rb
|
|
299
|
+
- spec/reacto/trackable/min_spec.rb
|
|
300
|
+
- spec/reacto/trackable/minmax_by_spec.rb
|
|
301
|
+
- spec/reacto/trackable/minmax_spec.rb
|
|
302
|
+
- spec/reacto/trackable/none_spec.rb
|
|
206
303
|
- spec/reacto/trackable/on_spec.rb
|
|
304
|
+
- spec/reacto/trackable/one_spec.rb
|
|
305
|
+
- spec/reacto/trackable/partition_spec.rb
|
|
207
306
|
- spec/reacto/trackable/positional_filtering_spec.rb
|
|
208
307
|
- spec/reacto/trackable/prepend_spec.rb
|
|
308
|
+
- spec/reacto/trackable/reject_spec.rb
|
|
309
|
+
- spec/reacto/trackable/rescue_and_replace_error_spec.rb
|
|
310
|
+
- spec/reacto/trackable/rescue_and_replace_error_with_spec.rb
|
|
311
|
+
- spec/reacto/trackable/retry_spec.rb
|
|
312
|
+
- spec/reacto/trackable/retry_when_spec.rb
|
|
209
313
|
- spec/reacto/trackable/select_spec.rb
|
|
314
|
+
- spec/reacto/trackable/slice_after_spec.rb
|
|
315
|
+
- spec/reacto/trackable/slice_before_spec.rb
|
|
316
|
+
- spec/reacto/trackable/slice_when_spec.rb
|
|
317
|
+
- spec/reacto/trackable/sort_by_spec.rb
|
|
318
|
+
- spec/reacto/trackable/sort_spec.rb
|
|
319
|
+
- spec/reacto/trackable/split_labeled_spec.rb
|
|
320
|
+
- spec/reacto/trackable/take_while_spec.rb
|
|
210
321
|
- spec/reacto/trackable/throttle_spec.rb
|
|
211
322
|
- spec/reacto/trackable/track_on_spec.rb
|
|
212
323
|
- spec/reacto/trackable/uniq_spec.rb
|
|
213
324
|
- spec/reacto/trackable/wrap_spec.rb
|
|
214
|
-
- spec/reacto/trackable/zip_spec.rb
|
|
215
325
|
- spec/spec_helper.rb
|
|
216
326
|
- spec/support/helpers.rb
|