totally_lazy 0.0.10 → 0.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e34f37ae8c53dd9dce6023c6a3d478cf86df5d1
4
- data.tar.gz: 2b8c465f1d922bc1fc84bd8dc10e4053d3317d1c
3
+ metadata.gz: 779623e20c4ee519261bb0b42e2a505d08f9acca
4
+ data.tar.gz: 3cb2bb9c54498c152c657db104c8a75fd983caef
5
5
  SHA512:
6
- metadata.gz: 3488513a08f9ab7133e21ff34cc54ab25723c6f3fb1161e67b81a1df2214cb5c858cbbb401e995a3b5580c824c2f0eb4df32ed43f50da02947bc3707c83c051e
7
- data.tar.gz: 68c0689495a08940649cf76a299d084293bd9afd313b12db06baa83b179a91cbed1e6abe9b5b8d59a124a8b1aa90002d95f5fde89f8eedd05ac02be7ce503d0f
6
+ metadata.gz: a6dfea8db53b757f7d59edae87ae8703e0556b45aa3975f2aa868389bcec32e9b38404de562f086d04618b35eda89b17491cf444605ac9c7424bc92775107158
7
+ data.tar.gz: d4846f4dcfe771e9607266e6c1ce66a79324b7102bad2068c047072e65bb93d5bfc371b12d3dac7042d66b756e2452d7f4e14e1770b3080f1f23dd4b996bc467
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.10
1
+ 0.0.11
data/lib/option.rb CHANGED
@@ -64,7 +64,7 @@ module Option
64
64
  end
65
65
 
66
66
  def to_seq
67
- sequence(self)
67
+ sequence(get)
68
68
  end
69
69
 
70
70
  def contains(item)
@@ -198,7 +198,7 @@ module Option
198
198
  end
199
199
 
200
200
  def to_seq
201
- sequence(self)
201
+ empty
202
202
  end
203
203
 
204
204
  def contains(item)
data/spec/option_spec.rb CHANGED
@@ -55,7 +55,8 @@ describe 'Option' do
55
55
  end
56
56
 
57
57
  it 'should convert to sequence' do
58
- expect(option(1).to_seq).to eq(sequence(option(1)))
58
+ expect(option(1).to_seq.to_a).to eq(sequence(1).to_a)
59
+ expect(none.to_seq).to eq(empty)
59
60
  end
60
61
 
61
62
  it 'should raise empty exception when calling get on none' do
@@ -86,10 +87,6 @@ describe 'Option' do
86
87
  expect { option(empty).get_or_throw(Exception, 'oops') }.to raise_error(Exception)
87
88
  end
88
89
 
89
- it 'should return sequence for none' do
90
- expect(option(empty).to_seq).to eq(sequence(none))
91
- end
92
-
93
90
  it 'should return false for contains for none' do
94
91
  expect(option(empty).contains('ooo')).to eq(false)
95
92
  end
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.10 ruby lib
5
+ # stub: totally_lazy 0.0.11 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "totally_lazy"
9
- s.version = "0.0.10"
9
+ s.version = "0.0.11"
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 = "2015-10-29"
14
+ s.date = "2015-10-30"
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 = [
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.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kingsley Hendrickse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2015-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec