totally_lazy 0.0.4 → 0.0.5
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/.travis.yml +3 -0
- data/Gemfile +3 -0
- data/Guardfile +24 -0
- data/README.md +31 -0
- data/Rakefile +12 -0
- data/VERSION +1 -1
- data/lib/any.rb +13 -0
- data/lib/generators.rb +161 -0
- data/lib/option.rb +75 -10
- data/lib/pair.rb +6 -0
- data/lib/parallel/parallel.rb +442 -0
- data/lib/parallel/processor_count.rb +85 -0
- data/lib/predicates/compare.rb +32 -0
- data/lib/{predicates.rb → predicates/conversions.rb} +0 -13
- data/lib/predicates/numbers.rb +25 -0
- data/lib/predicates/predicates.rb +57 -0
- data/lib/predicates/where.rb +34 -0
- data/lib/predicates/where_processor.rb +13 -0
- data/lib/sequence.rb +217 -21
- data/lib/totally_lazy.rb +124 -1
- data/spec/functor_spec.rb +35 -0
- data/spec/generators_spec.rb +37 -0
- data/spec/option_spec.rb +73 -2
- data/spec/pair_spec.rb +5 -2
- data/spec/predicate_spec.rb +37 -5
- data/spec/sequence_spec.rb +144 -4
- data/spec/serialization_spec.rb +56 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/type_check_spec.rb +1 -2
- data/totally_lazy.gemspec +28 -4
- metadata +60 -3
data/spec/predicate_spec.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
|
-
require '
|
2
|
-
require_relative '../lib/totally_lazy'
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
3
2
|
|
4
3
|
describe 'Predicates' do
|
5
4
|
|
6
5
|
it 'should return only even numbers' do
|
7
6
|
expect(sequence(1,2,3,4,5,6).filter(even)).to eq(sequence(2,4,6))
|
7
|
+
expect(sequence(1,2,3,4,5,6).unfilter(odd)).to eq(sequence(2,4,6))
|
8
8
|
expect { sequence(pair(1,2),pair(3,4)).filter(even).entries }.to raise_error(UnsupportedTypeException)
|
9
9
|
end
|
10
10
|
|
11
|
-
it 'should return only
|
12
|
-
expect(sequence(1,2,3,4,5,6).filter(
|
13
|
-
expect
|
11
|
+
it 'should return only odd numbers' do
|
12
|
+
expect(sequence(1,2,3,4,5,6).filter(odd)).to eq(sequence(1,3,5))
|
13
|
+
expect(sequence(1,2,3,4,5,6).unfilter(even)).to eq(sequence(1,3,5))
|
14
|
+
expect { sequence(pair(1,2),pair(3,4)).filter(odd).entries }.to raise_error(UnsupportedTypeException)
|
14
15
|
end
|
15
16
|
|
16
17
|
it 'should return content as string' do
|
@@ -33,5 +34,36 @@ describe 'Predicates' do
|
|
33
34
|
expect(sequence(pair(1,2),pair(3,4)).map(as_array).head.class).to eq(Array)
|
34
35
|
end
|
35
36
|
|
37
|
+
it 'should work with basic where predicates' do
|
38
|
+
expect(sequence(1,2,3).filter(where(is greater_than 1))).to eq(sequence(2,3))
|
39
|
+
expect(sequence(1,2,3).filter(where(is greater_than 1).and(is less_than 3))).to eq(sequence(2))
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should work with method where predicates' do
|
43
|
+
expect(sequence(pair(1,2),pair(3,4),pair(5,7)).filter(where(key:greater_than(1)).and(value:odd)).to_a).to eq(sequence(pair(5,7)).to_a)
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'should work with inverted value predicates' do
|
47
|
+
expect(sequence(1,2,3,4,5).reject(where(is Compare.equal_to 3))).to eq(sequence(1,2,4,5))
|
48
|
+
expect(sequence(pair(1,2),pair(3,4),pair(5,7)).reject(where value:odd).to_a).to eq(sequence(pair(1,2),pair(3,4)).to_a)
|
49
|
+
expect(sequence(pair(1,2),pair(3,4),pair(5,7)).reject(where value:equals(2)).to_a).to eq(sequence(pair(3,4),pair(5,7)).to_a)
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'should work with symbols as values when applying predicates' do
|
53
|
+
expect(sequence(pair(:people,sequence(1,2)), pair(:swans,10)).filter(where(key:equals(:swans))).to_a).to eq(sequence(pair(:swans,10)).to_a)
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should work with inverted predicates' do
|
57
|
+
expect(sequence(1,2,3,4,5).reject(where(is odd))).to eq(sequence(2,4))
|
58
|
+
expect(sequence(1,2,3,4,5).reject(odd)).to eq(sequence(2,4))
|
59
|
+
expect(sequence(1,2,3,4,5).reject(greater_than 2)).to eq(sequence(1,2))
|
60
|
+
expect(sequence(1,2,3,4,5).filter(greater_than 2)).to eq(sequence(3,4,5))
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'should work with regex predicates' do
|
64
|
+
expect(sequence(pair('apples','pears'),pair('banana','orange'),pair('apples','melon')).filter(where key:matches(/app/)).to_a).to eq(sequence(pair('apples','pears'),pair('apples','melon')).to_a)
|
65
|
+
expect(sequence(pair('apples','pears'),pair('banana','orange'),pair('apples','melon')).reject(where key:matches(/app/)).to_a).to eq(sequence(pair('banana','orange')).to_a)
|
66
|
+
end
|
67
|
+
|
36
68
|
|
37
69
|
end
|
data/spec/sequence_spec.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
require_relative '../lib/totally_lazy'
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
3
2
|
|
4
3
|
describe 'Sequence' do
|
5
4
|
|
@@ -9,6 +8,7 @@ describe 'Sequence' do
|
|
9
8
|
|
10
9
|
it 'should support transpose' do
|
11
10
|
expect(sequence(sequence(1, 2), sequence(3, 4), sequence(5, 6)).transpose).to include(sequence(1, 3, 5), sequence(2, 4, 6))
|
11
|
+
expect { empty.transpose.entries }.to raise_error(NoSuchElementException)
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'should eagerly return the first element of a sequence, returns NoSuchElementException if empty' do
|
@@ -47,9 +47,149 @@ describe 'Sequence' do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'should lazily join sequences together' do
|
50
|
-
expect(sequence(1,2,3).join(sequence(4,5,6))).to eq(sequence(1,2,3,4,5,6))
|
51
|
-
expect(empty.join(sequence(1,2))).to eq(sequence(1,2))
|
50
|
+
expect(sequence(1, 2, 3).join(sequence(4, 5, 6))).to eq(sequence(1, 2, 3, 4, 5, 6))
|
51
|
+
expect(empty.join(sequence(1, 2))).to eq(sequence(1, 2))
|
52
52
|
end
|
53
53
|
|
54
|
+
it 'should support select' do
|
55
|
+
expect(sequence(1, 2, 3).filter(even)).to eq(sequence(2))
|
56
|
+
expect(sequence(1, 2, 3).find_all(even)).to eq(sequence(2))
|
57
|
+
expect(sequence(1, 2, 3).select(even)).to eq(sequence(2))
|
58
|
+
expect(sequence(1, 2, 3).filter(&:even?)).to eq(sequence(2))
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should support map' do
|
62
|
+
expect(sequence(1, 2, 3).map(as_string)).to eq(sequence('1', '2', '3'))
|
63
|
+
expect(sequence(1, 2, 3).collect(as_string)).to eq(sequence('1', '2', '3'))
|
64
|
+
expect(sequence(1, 2, 3).map { |x| x.to_s }).to eq(sequence('1', '2', '3'))
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'should support reject' do
|
68
|
+
expect(sequence(1, 2, 3).reject(even)).to eq(sequence(1, 3))
|
69
|
+
expect(sequence(1, 2, 3).unfilter(even)).to eq(sequence(1, 3))
|
70
|
+
expect(sequence(1, 2, 3).reject(&:even?)).to eq(sequence(1, 3))
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'should support grep' do
|
74
|
+
expect(sequence('apple', 'pear', 'banana').grep(/p/)).to eq(sequence('apple', 'pear'))
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'should support drop' do
|
78
|
+
expect(sequence(1, 2, 3).drop(1)).to eq(sequence(2, 3))
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'should support drop_while' do
|
82
|
+
expect(sequence(1, 2, 5, 4, 3).drop_while { |n| n < 5 }).to eq(sequence(5, 4, 3))
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'should support take' do
|
86
|
+
expect(sequence(1, 2, 3).take(2)).to eq(sequence(1, 2))
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'should support take_while' do
|
90
|
+
expect(sequence(1, 2, 5, 4, 3).take_while { |n| n < 5 }).to eq(sequence(1, 2))
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'should support flat_map' do
|
94
|
+
expect(sequence(sequence(1, 2), sequence(3, 4)).flat_map { |s| s }).to eq(sequence(1, 2, 3, 4))
|
95
|
+
expect(sequence(pair(1, 2), pair(3, 4)).flat_map { |s| s }).to eq(sequence(1, 2, 3, 4))
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'should support zip' do
|
99
|
+
expect(sequence(1, 2, 3).zip(sequence('a', 'b', 'c'))).to eq(sequence([1, 'a'], [2, 'b'], [3, 'c']))
|
100
|
+
expect(sequence(1, 2, 3).zip(sequence(4, 5, 6)) { |x| x.reduce(:+) }).to eq(sequence(5, 7, 9))
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'should support item access with get' do
|
104
|
+
expect(sequence(1, 2, 3).get(2)).to eq(3)
|
105
|
+
expect(sequence(1, 2, 3)[2]).to eq(3)
|
106
|
+
end
|
107
|
+
|
108
|
+
it 'should join the supplied sequence to the existing sequence' do
|
109
|
+
expect(sequence(1, 2, 3).join(sequence(4, 5, 6))).to eq(sequence(1, 2, 3, 4, 5, 6))
|
110
|
+
expect(sequence(1, 2, 3) << sequence(4, 5, 6)).to eq(sequence(1, 2, 3, 4, 5, 6))
|
111
|
+
end
|
112
|
+
|
113
|
+
it 'should append an item to the sequence (creates new sequence)' do
|
114
|
+
expect(sequence(1, 2, 3).append(4)).to eq(sequence(1, 2, 3, 4))
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'should add any item to the sequence (creates new sequence)' do
|
118
|
+
expect(sequence(1, 2, 3).add(sequence(4, 5, 6))).to eq(sequence(1, 2, 3, 4, 5, 6))
|
119
|
+
expect(sequence(1, 2, 3) + sequence(4, 5, 6)).to eq(sequence(1, 2, 3, 4, 5, 6))
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'should convert a sequence of sequences into a single flattened sequence' do
|
123
|
+
expect(sequence(sequence(1,2,3), sequence(4), sequence(5,6,7)).to_seq).to eq(sequence(1, 2, 3, 4, 5, 6,7))
|
124
|
+
expect{ sequence(1,2,3).to_seq.entries }.to raise_error(UnsupportedTypeException)
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'should create a sequence of sequences from a sequence of pairs' do
|
128
|
+
expect(sequence(pair(1,2),pair(3,4),pair(5,6)).from_pairs).to eq(sequence(1, 2, 3, 4, 5, 6))
|
129
|
+
expect {sequence({1=>2}).from_pairs.entries}.to raise_error(UnsupportedTypeException)
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'should convert a sequence to an array' do
|
133
|
+
expect(sequence(1, 2, 3).to_a).to eq([1,2,3])
|
134
|
+
expect(sequence(pair(1,2),pair(3,4)).to_a).to eq([{1=>2},{3=>4}])
|
135
|
+
expect(empty.to_a).to eq([])
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'should get or else the value at an index' do
|
139
|
+
expect(sequence(1, 2, 3).get_or_else(0,99)).to eq(1)
|
140
|
+
expect(sequence(1, 2, 3).get_or_else(99,1)).to eq(1)
|
141
|
+
end
|
142
|
+
|
143
|
+
it 'should get or else the value at an index' do
|
144
|
+
expect(sequence(1, 2, 3).get_or_throw(1,Exception,'oops')).to eq(2)
|
145
|
+
expect {sequence(1, 2, 3).get_or_throw(99,Exception,'oops')}.to raise_error(Exception)
|
146
|
+
end
|
147
|
+
|
148
|
+
it 'should get an option at an index' do
|
149
|
+
expect(sequence(1, 2, 3).get_option(1)).to eq(some(2))
|
150
|
+
expect(sequence(1, 2, 3).get_option(99)).to eq(none)
|
151
|
+
end
|
152
|
+
|
153
|
+
it 'should return all as flattened array' do
|
154
|
+
expect(sequence(sequence(1, 2, 3),sequence(4,5,6)).all).to eq([1,2,3,4,5,6])
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'should iterate empty' do
|
158
|
+
expect(empty.each{|i| i}).to eq([])
|
159
|
+
expect(Empty.new([1,2]).each{|i| i}).to eq([1,2])
|
160
|
+
expect(Empty.new([1,2]){|a| a}).to eq(empty)
|
161
|
+
end
|
162
|
+
|
163
|
+
it 'should support from_arrays' do
|
164
|
+
expect(sequence([1,2,3,4,5],[6,7]).from_arrays).to eq(sequence(1,2,3,4,5,6,7))
|
165
|
+
end
|
166
|
+
|
167
|
+
it 'should support from_sets' do
|
168
|
+
expect(sequence(Set.new([1,2,3,4,5]),Set.new([6,7])).from_sets.entries).to eq(sequence(1,2,3,4,5,6,7).entries)
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'should map concurrently' do
|
172
|
+
expect(sequence(1,2,3,4,5).map_concurrently(even)).to eq(sequence(2,4))
|
173
|
+
expect(sequence(1,2,3,4,5).map_concurrently{|i| i+1}).to eq(sequence(2,3,4,5,6))
|
174
|
+
expect(sequence(1,2,3,4,5).map_concurrently(even,in_threads:2)).to eq(sequence(2,4))
|
175
|
+
expect(sequence(1,2,3,4,5).map_concurrently(where(is even),in_processes:2)).to eq(sequence(2,4))
|
176
|
+
expect(sequence(1,2,3,4,5).map_concurrently(nil,in_threads:2){|i| i+1}).to eq(sequence(2,3,4,5,6))
|
177
|
+
end
|
178
|
+
|
179
|
+
it 'should each concurrently' do
|
180
|
+
expect(sequence(1,2,3).each_concurrently{|i| i }).to eq([1,2,3])
|
181
|
+
end
|
182
|
+
|
183
|
+
it 'should drop nils' do
|
184
|
+
expect(sequence(1,nil,2,nil,3).drop_nil).to eq(sequence(1,2,3))
|
185
|
+
end
|
186
|
+
|
187
|
+
it 'should cycle' do
|
188
|
+
expect(sequence(1,2,3).cycle.take(6)).to eq(sequence(1,2,3,1,2,3))
|
189
|
+
end
|
190
|
+
|
191
|
+
it 'should get pairs from sequence' do
|
192
|
+
expect(sequence(:name,'kings',:age,39).in_pairs.to_a).to eq(sequence(pair(:name,'kings'),pair(:age,39)).to_a)
|
193
|
+
end
|
54
194
|
|
55
195
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe 'Sequence Serialization/Deserialization' do
|
4
|
+
|
5
|
+
it 'should serialize a sequence' do
|
6
|
+
serialized = sequence(pair(7, 8), sequence(1, 2), sequence(3, sequence(5, 6)), sequence(pair(:apple, 99), option(1), none), [10, 11], {:apple => 8, :pear => 9}).serialize
|
7
|
+
expect(serialized).to eq([{:type => :pair, :values => {7 => 8}}, {:type => :sequence, :values => [1, 2]}, {:type => :sequence, :values => [3, {:type => :sequence, :values => [5, 6]}]}, {:type => :sequence, :values => [{:type => :pair, :values => {:apple => 99}}, {:type => :some, :values => 1}, {:type => :none, :values => nil}]}, {:type => Array, :values => [10, 11]}, {:type => Hash, :values => [{:type => Array, :values => [:apple, 8]}, {:type => Array, :values => [:pear, 9]}]}])
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should serialize a pair containing sequences' do
|
11
|
+
serialized = sequence(pair(:people,sequence(1,2))).serialize
|
12
|
+
expect(serialized).to eq([{:type => :pair, :values => [:people, {:type => :sequence, :values => [1,2]}]}])
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should deserialize a pair containing sequences' do
|
16
|
+
serialized = sequence(pair(:people,sequence(1,2))).serialize
|
17
|
+
expect(deserialize(serialized)[0].key).to eq(:people)
|
18
|
+
expect(deserialize(serialized)[0].value).to eq(sequence(1,2))
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should deserialize a serialized sequence containing pair' do
|
22
|
+
expect(seq[0].to_map).to eq(pair(7, 8).to_map)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should deserialize a serialized sequence containing sequence' do
|
26
|
+
expect(seq[1]).to eq(sequence(1, 2))
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should deserialize a serialized sequence containing nested sequence' do
|
30
|
+
expect(seq[2]).to eq(sequence(3, sequence(5, 6)))
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should deserialize a serialized sequence containing some' do
|
34
|
+
expect(seq[3][1]).to eq(option(1))
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should deserialize a serialized sequence containing none' do
|
38
|
+
expect(seq[3][2]).to eq(none)
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'should deserialize a serialized sequence containing an array' do
|
42
|
+
expect(seq[4]).to eq([10,11])
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should deserialize a serialized sequence containing a hash' do
|
46
|
+
expect(seq[5]).to eq({:apple => 8, :pear => 9})
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def seq
|
52
|
+
serialized = sequence(pair(7, 8), sequence(1, 2), sequence(3, sequence(5, 6)), sequence(pair(:apple, 99), option(1), none), [10, 11], {:apple => 8, :pear => 9}).serialize
|
53
|
+
deserialize(serialized)
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
3
|
+
|
4
|
+
require 'simplecov'
|
5
|
+
|
6
|
+
SimpleCov.configure do
|
7
|
+
load_profile 'test_frameworks'
|
8
|
+
end
|
9
|
+
|
10
|
+
ENV["COVERAGE"] && SimpleCov.start do
|
11
|
+
add_filter "/.rvm/"
|
12
|
+
add_filter "parallel"
|
13
|
+
end
|
14
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
15
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
16
|
+
|
17
|
+
require 'rspec'
|
18
|
+
require 'totally_lazy'
|
19
|
+
|
20
|
+
# Requires supporting files with custom matchers and macros, etc,
|
21
|
+
# in ./support/ and its subdirectories.
|
22
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
23
|
+
|
24
|
+
RSpec.configure do |config|
|
25
|
+
|
26
|
+
end
|
27
|
+
|
data/spec/type_check_spec.rb
CHANGED
data/totally_lazy.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: totally_lazy 0.0.
|
5
|
+
# stub: totally_lazy 0.0.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "totally_lazy"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.5"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Kingsley Hendrickse"]
|
14
|
-
s.date = "2014-
|
14
|
+
s.date = "2014-09-22"
|
15
15
|
s.description = "Port of java functional library totally lazy to ruby"
|
16
16
|
s.email = "kingsleyhendrickse@me.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -21,22 +21,37 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.files = [
|
22
22
|
".document",
|
23
23
|
".rspec",
|
24
|
+
".travis.yml",
|
24
25
|
"Gemfile",
|
26
|
+
"Guardfile",
|
25
27
|
"LICENSE.txt",
|
26
28
|
"README.md",
|
27
29
|
"Rakefile",
|
28
30
|
"VERSION",
|
31
|
+
"lib/any.rb",
|
29
32
|
"lib/functor.rb",
|
33
|
+
"lib/generators.rb",
|
30
34
|
"lib/option.rb",
|
31
35
|
"lib/pair.rb",
|
32
|
-
"lib/
|
36
|
+
"lib/parallel/parallel.rb",
|
37
|
+
"lib/parallel/processor_count.rb",
|
38
|
+
"lib/predicates/compare.rb",
|
39
|
+
"lib/predicates/conversions.rb",
|
40
|
+
"lib/predicates/numbers.rb",
|
41
|
+
"lib/predicates/predicates.rb",
|
42
|
+
"lib/predicates/where.rb",
|
43
|
+
"lib/predicates/where_processor.rb",
|
33
44
|
"lib/sequence.rb",
|
34
45
|
"lib/totally_lazy.rb",
|
35
46
|
"lib/type_check.rb",
|
47
|
+
"spec/functor_spec.rb",
|
48
|
+
"spec/generators_spec.rb",
|
36
49
|
"spec/option_spec.rb",
|
37
50
|
"spec/pair_spec.rb",
|
38
51
|
"spec/predicate_spec.rb",
|
39
52
|
"spec/sequence_spec.rb",
|
53
|
+
"spec/serialization_spec.rb",
|
54
|
+
"spec/spec_helper.rb",
|
40
55
|
"spec/type_check_spec.rb",
|
41
56
|
"totally_lazy.gemspec"
|
42
57
|
]
|
@@ -55,6 +70,9 @@ Gem::Specification.new do |s|
|
|
55
70
|
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
56
71
|
s.add_development_dependency(%q<rspec_html_formatter>, ["~> 0.3.0"])
|
57
72
|
s.add_development_dependency(%q<rake>, ["~> 10.3.2"])
|
73
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
74
|
+
s.add_development_dependency(%q<coveralls>, [">= 0"])
|
75
|
+
s.add_development_dependency(%q<guard-rspec>, [">= 0"])
|
58
76
|
else
|
59
77
|
s.add_dependency(%q<rspec>, ["~> 3.0.0"])
|
60
78
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
@@ -62,6 +80,9 @@ Gem::Specification.new do |s|
|
|
62
80
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
63
81
|
s.add_dependency(%q<rspec_html_formatter>, ["~> 0.3.0"])
|
64
82
|
s.add_dependency(%q<rake>, ["~> 10.3.2"])
|
83
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
84
|
+
s.add_dependency(%q<coveralls>, [">= 0"])
|
85
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
65
86
|
end
|
66
87
|
else
|
67
88
|
s.add_dependency(%q<rspec>, ["~> 3.0.0"])
|
@@ -70,6 +91,9 @@ Gem::Specification.new do |s|
|
|
70
91
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
71
92
|
s.add_dependency(%q<rspec_html_formatter>, ["~> 0.3.0"])
|
72
93
|
s.add_dependency(%q<rake>, ["~> 10.3.2"])
|
94
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
95
|
+
s.add_dependency(%q<coveralls>, [">= 0"])
|
96
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
73
97
|
end
|
74
98
|
end
|
75
99
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totally_lazy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kingsley Hendrickse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -94,6 +94,48 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 10.3.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
97
139
|
description: Port of java functional library totally lazy to ruby
|
98
140
|
email: kingsleyhendrickse@me.com
|
99
141
|
executables: []
|
@@ -104,22 +146,37 @@ extra_rdoc_files:
|
|
104
146
|
files:
|
105
147
|
- ".document"
|
106
148
|
- ".rspec"
|
149
|
+
- ".travis.yml"
|
107
150
|
- Gemfile
|
151
|
+
- Guardfile
|
108
152
|
- LICENSE.txt
|
109
153
|
- README.md
|
110
154
|
- Rakefile
|
111
155
|
- VERSION
|
156
|
+
- lib/any.rb
|
112
157
|
- lib/functor.rb
|
158
|
+
- lib/generators.rb
|
113
159
|
- lib/option.rb
|
114
160
|
- lib/pair.rb
|
115
|
-
- lib/
|
161
|
+
- lib/parallel/parallel.rb
|
162
|
+
- lib/parallel/processor_count.rb
|
163
|
+
- lib/predicates/compare.rb
|
164
|
+
- lib/predicates/conversions.rb
|
165
|
+
- lib/predicates/numbers.rb
|
166
|
+
- lib/predicates/predicates.rb
|
167
|
+
- lib/predicates/where.rb
|
168
|
+
- lib/predicates/where_processor.rb
|
116
169
|
- lib/sequence.rb
|
117
170
|
- lib/totally_lazy.rb
|
118
171
|
- lib/type_check.rb
|
172
|
+
- spec/functor_spec.rb
|
173
|
+
- spec/generators_spec.rb
|
119
174
|
- spec/option_spec.rb
|
120
175
|
- spec/pair_spec.rb
|
121
176
|
- spec/predicate_spec.rb
|
122
177
|
- spec/sequence_spec.rb
|
178
|
+
- spec/serialization_spec.rb
|
179
|
+
- spec/spec_helper.rb
|
123
180
|
- spec/type_check_spec.rb
|
124
181
|
- totally_lazy.gemspec
|
125
182
|
homepage: http://github.com/kingsleyh/totally_lazy
|