option 1.1.0 → 1.2.1
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 +7 -0
- data/.gitignore +2 -0
- data/Gemfile +1 -2
- data/README.md +7 -3
- data/lib/option/version.rb +1 -1
- data/lib/option.rb +8 -1
- data/option.gemspec +3 -7
- data/spec/acceptance_spec.rb +3 -3
- data/spec/option_spec.rb +70 -53
- data/spec/spec_helper.rb +3 -3
- metadata +15 -72
- data/.travis.yml +0 -10
- data/LICENSE +0 -22
- data/gem-public_cert.pem +0 -20
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8d62b3e8f924c0460d6f8c1d33e5ca1c2b32ec3e4ed57c51357c31463fe0144a
|
4
|
+
data.tar.gz: 8046156564e161b894f525f7ec27c1c096a54ba8faf8ab1a8f405281e12a7c0c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e56d12174634bcbb184cb2a6a0f173cf4b36ed09be2b6889750ced4f7d234e434f50209835532eea7a0cf484ca7cea40a6cc26169f3503f70fd6a4590a002b54
|
7
|
+
data.tar.gz: 7449965349fbacfd90665cce8ec3af2af7896836e687177ccd33b81344af1d0924ae10912d1202f70a0085c23811f9449f570fe74a41812027ab812e77e9e2a8
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -76,6 +76,10 @@ end
|
|
76
76
|
|
77
77
|
1. Fork it
|
78
78
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
79
|
-
3.
|
80
|
-
4.
|
81
|
-
5.
|
79
|
+
3. Implement your feature. Patches not considered without accompanying tests.
|
80
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
81
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
82
|
+
6. Create new Pull Request
|
83
|
+
|
84
|
+
## License
|
85
|
+
http://rares.mit-license.org/
|
data/lib/option/version.rb
CHANGED
data/lib/option.rb
CHANGED
@@ -10,7 +10,6 @@ class OptionClass
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
13
|
private
|
15
14
|
|
16
15
|
def assert_option(result)
|
@@ -96,6 +95,10 @@ class SomeClass < OptionClass
|
|
96
95
|
else self
|
97
96
|
end
|
98
97
|
end
|
98
|
+
|
99
|
+
def error(*argv)
|
100
|
+
self
|
101
|
+
end
|
99
102
|
end
|
100
103
|
|
101
104
|
class NoneClass < OptionClass
|
@@ -171,6 +174,10 @@ class NoneClass < OptionClass
|
|
171
174
|
def flatten
|
172
175
|
self
|
173
176
|
end
|
177
|
+
|
178
|
+
def error(*argv)
|
179
|
+
argv.empty? ? raise : raise(*argv)
|
180
|
+
end
|
174
181
|
end
|
175
182
|
|
176
183
|
None = NoneClass.new
|
data/option.gemspec
CHANGED
@@ -3,10 +3,10 @@ require File.expand_path('../lib/option/version', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Rob Ares"]
|
6
|
-
gem.email = ["
|
6
|
+
gem.email = [""]
|
7
7
|
gem.description = %q{Ruby port of Scala's Option Monad}
|
8
8
|
gem.summary = %q{Option attempts to be faithful to the useful parts of the scala api. We lose the type safety but still is quite useful when dealing with optional values.}
|
9
|
-
gem.homepage = "http://www.
|
9
|
+
gem.homepage = "http://www.gitlab.com/rob.ares/option"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -15,9 +15,5 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Option::VERSION
|
17
17
|
|
18
|
-
gem.
|
19
|
-
gem.cert_chain = ["gem-public_cert.pem"]
|
20
|
-
|
21
|
-
gem.add_development_dependency "rake", "= 0.9.2.2"
|
22
|
-
gem.add_development_dependency "minitest", "= 3.4.0"
|
18
|
+
gem.add_development_dependency "minitest", ">= 5.20.0"
|
23
19
|
end
|
data/spec/acceptance_spec.rb
CHANGED
@@ -11,21 +11,21 @@ describe "Option" do
|
|
11
11
|
describe "left identity" do
|
12
12
|
|
13
13
|
it "obeys (return x) >>= f == f x" do
|
14
|
-
some.flat_map(&upcase).must_equal(upcase.call(some.get))
|
14
|
+
_(some.flat_map(&upcase)).must_equal(upcase.call(some.get))
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
describe "right identity" do
|
19
19
|
|
20
20
|
it "obeys m >>= return == m" do
|
21
|
-
some.flat_map { |v| Some(v) }.must_equal(some)
|
21
|
+
_(some.flat_map { |v| Some(v) }).must_equal(some)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "associative composition" do
|
26
26
|
|
27
27
|
it "obeys (m >>= f) >>= g == m >>= (\\x -> f x >>= g)" do
|
28
|
-
some.flat_map(&upcase).flat_map(&empty).
|
28
|
+
_(some.flat_map(&upcase).flat_map(&empty)).
|
29
29
|
must_equal(upcase.call(some.get).flat_map(&empty))
|
30
30
|
end
|
31
31
|
end
|
data/spec/option_spec.rb
CHANGED
@@ -3,211 +3,228 @@ require "spec_helper"
|
|
3
3
|
describe NoneClass do
|
4
4
|
|
5
5
|
it "#dup results in a TypeError" do
|
6
|
-
|
6
|
+
_ { None.dup }.must_raise TypeError
|
7
7
|
end
|
8
8
|
|
9
9
|
it "#clone results in a TypeError" do
|
10
|
-
|
10
|
+
_ { None.clone }.must_raise TypeError
|
11
11
|
end
|
12
12
|
|
13
13
|
it "#to_a returns an empty array" do
|
14
|
-
None.to_a.must_equal([])
|
14
|
+
_(None.to_a).must_equal([])
|
15
15
|
end
|
16
16
|
|
17
17
|
it "#get raises IndexError" do
|
18
|
-
|
18
|
+
_ { None.get }.must_raise IndexError
|
19
19
|
end
|
20
20
|
|
21
21
|
it "#get_or_else executes the block" do
|
22
|
-
None.get_or_else { "Some" }.must_equal "Some"
|
22
|
+
_(None.get_or_else { "Some" }).must_equal "Some"
|
23
23
|
end
|
24
24
|
|
25
25
|
it "#each does not execute the block" do
|
26
26
|
expected = nil
|
27
27
|
None.each { |v| expected = v }
|
28
28
|
|
29
|
-
expected.must_be_nil
|
29
|
+
_(expected).must_be_nil
|
30
30
|
end
|
31
31
|
|
32
32
|
it "#or_nil should return nil" do
|
33
|
-
None.or_nil.must_be_nil
|
33
|
+
_(None.or_nil).must_be_nil
|
34
34
|
end
|
35
35
|
|
36
36
|
it "#present? should be false" do
|
37
|
-
None.present
|
37
|
+
_(None.present?).must_equal(false)
|
38
38
|
end
|
39
39
|
|
40
40
|
it "#empty? should be true" do
|
41
|
-
None.empty
|
41
|
+
_(None.empty?).must_equal(true)
|
42
42
|
end
|
43
43
|
|
44
44
|
it "#map should return itself" do
|
45
|
-
None.map {}.must_be_none
|
45
|
+
_(None.map {}).must_be_none
|
46
46
|
end
|
47
47
|
|
48
48
|
it "#flat_map should return itself" do
|
49
|
-
None.flat_map {}.must_be_none
|
49
|
+
_(None.flat_map {}).must_be_none
|
50
50
|
end
|
51
51
|
|
52
52
|
it "#exists? should return false" do
|
53
|
-
None.exists? {}.must_equal(false)
|
53
|
+
_(None.exists? {}).must_equal(false)
|
54
54
|
end
|
55
55
|
|
56
56
|
it "#include? should return false" do
|
57
|
-
None.include?(
|
57
|
+
_(None.include?(subject_value)).must_equal(false)
|
58
58
|
end
|
59
59
|
|
60
60
|
it "#fold should invoke the default proc" do
|
61
|
-
None.fold(proc {
|
61
|
+
_(None.fold(proc { subject_value }) { |v| v.to_f }).must_equal(subject_value)
|
62
62
|
end
|
63
63
|
|
64
64
|
it "#filter with a true predicate returns itself" do
|
65
|
-
Option(
|
65
|
+
_(Option(subject_value).filter { |i| i == 12 }).must_be_some(subject_value)
|
66
66
|
end
|
67
67
|
|
68
68
|
it "#filter with a false predicate returns None" do
|
69
|
-
Option(
|
69
|
+
_(Option(subject_value).filter { |i| i == 1 }).must_be_none
|
70
70
|
end
|
71
71
|
|
72
72
|
it "should be aliased to None" do
|
73
|
-
None.must_be_instance_of(NoneClass)
|
73
|
+
_(None).must_be_instance_of(NoneClass)
|
74
74
|
end
|
75
75
|
|
76
76
|
it "#inside should return itself without invoking the block" do
|
77
77
|
expected = nil
|
78
|
-
None.inside { |v| expected =
|
79
|
-
expected.must_be_nil
|
78
|
+
None.inside { |v| expected = subject_value }
|
79
|
+
_(expected).must_be_nil
|
80
80
|
end
|
81
81
|
|
82
82
|
it "#or_else should invoke the block and return an Option" do
|
83
|
-
None.or_else { Some(
|
83
|
+
_(None.or_else { Some(subject_value) }).must_be_some(subject_value)
|
84
84
|
end
|
85
85
|
|
86
86
|
it "#or_else should raise a TypeError if an Option is not returned" do
|
87
|
-
|
87
|
+
_ { None.or_else { subject_value } }.must_raise TypeError
|
88
88
|
end
|
89
89
|
|
90
90
|
it "#flatten should return itself" do
|
91
|
-
None.flatten.must_be_none
|
91
|
+
_(None.flatten).must_be_none
|
92
|
+
end
|
93
|
+
|
94
|
+
it "#error should raise a RuntimeError with the given message" do
|
95
|
+
_ { None.error("error") }.must_raise RuntimeError, "error"
|
96
|
+
end
|
97
|
+
|
98
|
+
it "#error should raise the error passed to it" do
|
99
|
+
_ { None.error(ArgumentError.new("name")) }.must_raise ArgumentError, "name"
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should assemble an Error from the arguments passed in" do
|
103
|
+
_ { None.error(StandardError, "this is a problem") }.must_raise StandardError, "this is a problem"
|
92
104
|
end
|
93
105
|
end
|
94
106
|
|
95
107
|
describe SomeClass do
|
96
108
|
|
97
109
|
it "#to_a returns the value wrapped in an array" do
|
98
|
-
Some(
|
110
|
+
_(Some(subject_value).to_a).must_equal([subject_value])
|
99
111
|
end
|
100
112
|
|
101
113
|
it "#get returns the inner value" do
|
102
|
-
Some(
|
114
|
+
_(Some(subject_value).get).must_equal(subject_value)
|
103
115
|
end
|
104
116
|
|
105
117
|
it "#get_or_else does not execute the block;" do
|
106
118
|
expected = nil
|
107
|
-
Some(
|
119
|
+
Some(subject_value).get_or_else { expected = true }
|
108
120
|
|
109
|
-
expected.must_be_nil
|
121
|
+
_(expected).must_be_nil
|
110
122
|
end
|
111
123
|
|
112
124
|
it "#get_or_else returns the value" do
|
113
|
-
Some(
|
125
|
+
_(Some(subject_value).get_or_else { }).must_equal(subject_value)
|
114
126
|
end
|
115
127
|
|
116
128
|
it "#each executes the block passing the inner value" do
|
117
129
|
expected = nil
|
118
|
-
Some(
|
130
|
+
Some(subject_value).each { |v| expected = v }
|
119
131
|
|
120
|
-
expected.must_equal(
|
132
|
+
_(expected).must_equal(subject_value)
|
121
133
|
end
|
122
134
|
|
123
135
|
it "#or_nil should return the inner value" do
|
124
|
-
Some(
|
136
|
+
_(Some(subject_value).or_nil).must_equal(subject_value)
|
125
137
|
end
|
126
138
|
|
127
139
|
it "#present? should be true" do
|
128
|
-
Some(
|
140
|
+
_(Some(subject_value).present?).must_equal(true)
|
129
141
|
end
|
130
142
|
|
131
143
|
it "#empty? should be false" do
|
132
|
-
Some(
|
144
|
+
_(Some(subject_value).empty?).must_equal(false)
|
133
145
|
end
|
134
146
|
|
135
147
|
it "#map should return the result of the proc over the value in a Some" do
|
136
|
-
Some(
|
148
|
+
_(Some(subject_value).map { |v| v * 2 }).must_be_some(24)
|
137
149
|
end
|
138
150
|
|
139
151
|
it "#flat_map should raise TypeError if the returned value is not an Option" do
|
140
|
-
|
152
|
+
_ { Some(subject_value).flat_map { |v| v * 2 } }.must_raise TypeError
|
141
153
|
end
|
142
154
|
|
143
155
|
it "#flat_map should return an Option value from the block" do
|
144
|
-
Some(
|
156
|
+
_(Some(subject_value).flat_map { |v| Option(v * 2) }).must_be_some(24)
|
145
157
|
end
|
146
158
|
|
147
159
|
it "#flat_map can return None from the block" do
|
148
|
-
Some(
|
160
|
+
_(Some(subject_value).flat_map { |_| None }).must_be_none
|
149
161
|
end
|
150
162
|
|
151
163
|
it "#exists? should return true when the block evaluates true" do
|
152
|
-
Some(
|
164
|
+
_(Some(subject_value).exists? { |v| v % 2 == 0 }).must_equal(true)
|
153
165
|
end
|
154
166
|
|
155
167
|
it "#exists? should return false when the block evaluates false" do
|
156
|
-
Some(
|
168
|
+
_(Some(subject_value).exists? { |v| v % 2 != 0 }).must_equal(false)
|
157
169
|
end
|
158
170
|
|
159
171
|
it "#include? should return true when the passed value and the boxed value are the same" do
|
160
|
-
Some(
|
172
|
+
_(Some(subject_value).include?(subject_value)).must_equal(true)
|
161
173
|
end
|
162
174
|
|
163
175
|
it "#include? should return false when the passed value and the boxed value are not the same" do
|
164
|
-
Some(
|
176
|
+
_(Some(subject_value).include?(subject_value + 1)).must_equal(false)
|
165
177
|
end
|
166
178
|
|
167
179
|
it "#fold should map the proc over the value and return it" do
|
168
|
-
Some(
|
180
|
+
_(Some(subject_value).fold(proc { value * 2 }) { |v| v * 3 }).must_equal(36)
|
169
181
|
end
|
170
182
|
|
171
183
|
it "#filter should return itself" do
|
172
|
-
None.filter { |i| i == 0 }.must_be_none
|
184
|
+
_(None.filter { |i| i == 0 }).must_be_none
|
173
185
|
end
|
174
186
|
|
175
187
|
it "#inside should invoke the proc and return itself" do
|
176
188
|
expected = nil
|
177
|
-
Some(
|
178
|
-
expected.must_equal(
|
189
|
+
_(Some(subject_value).inside { |v| expected = v }).must_be_some(subject_value)
|
190
|
+
_(expected).must_equal(subject_value)
|
179
191
|
end
|
180
192
|
|
181
193
|
it "#or_else should return itself" do
|
182
|
-
Some(
|
194
|
+
_(Some(subject_value).or_else { None }).must_be_some(subject_value)
|
183
195
|
end
|
184
196
|
|
185
197
|
it "should wrap the creation of a Some" do
|
186
|
-
Some(
|
198
|
+
_(Some(subject_value)).must_be_instance_of(SomeClass)
|
187
199
|
end
|
188
200
|
|
189
201
|
it "should be aliased to Some" do
|
190
|
-
Some.new(
|
202
|
+
_(Some.new(subject_value)).must_be_some(subject_value)
|
191
203
|
end
|
192
204
|
|
193
205
|
it "#flatten" do
|
194
|
-
inner_value = Some(Some(Some(
|
195
|
-
inner_value.must_be_some(
|
196
|
-
inner_value.or_nil.must_equal(
|
206
|
+
inner_value = Some(Some(Some(subject_value))).flatten
|
207
|
+
_(inner_value).must_be_some(subject_value)
|
208
|
+
_(inner_value.or_nil).must_equal(subject_value)
|
209
|
+
end
|
210
|
+
|
211
|
+
it "#error should return the Some" do
|
212
|
+
value = !!(Some(subject_value).error("error") rescue false)
|
213
|
+
_(value).must_equal true
|
197
214
|
end
|
198
215
|
end
|
199
216
|
|
200
217
|
describe OptionClass do
|
201
218
|
|
202
219
|
it "must return a some if the passed value is not nil" do
|
203
|
-
Option(
|
220
|
+
_(Option(subject_value)).must_be_some(subject_value)
|
204
221
|
end
|
205
222
|
|
206
223
|
it "must return a None if the passed value is nil" do
|
207
|
-
Option(nil).must_be_none
|
224
|
+
_(Option(nil)).must_be_none
|
208
225
|
end
|
209
226
|
|
210
227
|
it "should do equality checks against the boxed value" do
|
211
|
-
Option(
|
228
|
+
_(Option(subject_value)).must_equal(subject_value)
|
212
229
|
end
|
213
230
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -2,9 +2,9 @@ require "minitest/autorun"
|
|
2
2
|
require "minitest/pride"
|
3
3
|
require "minitest/spec"
|
4
4
|
|
5
|
-
|
5
|
+
require_relative "../lib/option"
|
6
6
|
|
7
|
-
module
|
7
|
+
module Minitest::Assertions
|
8
8
|
|
9
9
|
def assert_some(value, option, msg = nil)
|
10
10
|
assert (option.is_a?(Some) && option.or_nil == value), "Expected Some(#{value})"
|
@@ -18,6 +18,6 @@ end
|
|
18
18
|
OptionClass.infect_an_assertion :assert_some, :must_be_some
|
19
19
|
OptionClass.infect_an_assertion :assert_none, :must_be_none
|
20
20
|
|
21
|
-
def
|
21
|
+
def subject_value
|
22
22
|
12
|
23
23
|
end
|
metadata
CHANGED
@@ -1,124 +1,67 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: option
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1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HorUnFyK1FUClJ6eTF2S3l2ZlEyYU5jQ1Mw
|
27
|
-
Z1hlWTh4a0tNWW1IRHViekJuNFk4bXZDcmZrMFRFcFNuSmZiZ2xjdlF4MDVN
|
28
|
-
dGcKRmJzQ0F3RUFBYU01TURjd0NRWURWUjBUQkFJd0FEQWRCZ05WSFE0RUZn
|
29
|
-
UVVvQnhON1I5cXVFL3A3NVBPSkY2dgpUYlVJSTJBd0N3WURWUjBQQkFRREFn
|
30
|
-
U3dNQTBHQ1NxR1NJYjNEUUVCQlFVQUE0SUJBUUJGdXppWHpDM1JSNkg1Ckox
|
31
|
-
RjQ2K2pKdytNOFpsYnpMREEzNnYrdm9memN5Q1FDQkV0U2YxSVVaaGh6U1pZ
|
32
|
-
cC9VR2h3TTRnOEs3NXRMT3IKemFIcHRObUZ3eXJZZ09SMnJnbE5TVHBZdFJC
|
33
|
-
TGt4S1E5Z2k2NkpkUk1kQWs1U0JDUGJ6akQ1M1RybWVjbXFGTwp5T1FOQWVr
|
34
|
-
ck9SNFZMcDQwZFFPMGcranRtQXV4TGN5OGdNazAzb1dHZjRvVE5jazRKVUM4
|
35
|
-
Q3FZR1VhenZ6a2hYCmNHbytaT1ZzbXhuVUNUaE90UE9idHRNSXdVZjY5Y1pa
|
36
|
-
RXJwU3JwSW9FRXoyUnBGQTJvZnJ6T0lNbW5FZUxUUWoKVUp6THlpQXI4SmVG
|
37
|
-
TjI4bXJ1dXFjNHFrRFZLUHBUdExQRk9GZXMzclRFSEIzaGZiM3AzczV5MW9R
|
38
|
-
dTYzb0puagpSK3QwWXZjVwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
-
date: 2013-02-16 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-06-17 00:00:00.000000000 Z
|
40
12
|
dependencies:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
|
-
requirements:
|
46
|
-
- - '='
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 0.9.2.2
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
|
-
requirements:
|
54
|
-
- - '='
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 0.9.2.2
|
57
13
|
- !ruby/object:Gem::Dependency
|
58
14
|
name: minitest
|
59
15
|
requirement: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
16
|
requirements:
|
62
|
-
- -
|
17
|
+
- - ">="
|
63
18
|
- !ruby/object:Gem::Version
|
64
|
-
version:
|
19
|
+
version: 5.20.0
|
65
20
|
type: :development
|
66
21
|
prerelease: false
|
67
22
|
version_requirements: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
23
|
requirements:
|
70
|
-
- -
|
24
|
+
- - ">="
|
71
25
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
26
|
+
version: 5.20.0
|
73
27
|
description: Ruby port of Scala's Option Monad
|
74
28
|
email:
|
75
|
-
-
|
29
|
+
- ''
|
76
30
|
executables: []
|
77
31
|
extensions: []
|
78
32
|
extra_rdoc_files: []
|
79
33
|
files:
|
80
|
-
- .gitignore
|
81
|
-
- .travis.yml
|
34
|
+
- ".gitignore"
|
82
35
|
- Gemfile
|
83
|
-
- LICENSE
|
84
36
|
- README.md
|
85
37
|
- Rakefile
|
86
|
-
- gem-public_cert.pem
|
87
38
|
- lib/option.rb
|
88
39
|
- lib/option/version.rb
|
89
40
|
- option.gemspec
|
90
41
|
- spec/acceptance_spec.rb
|
91
42
|
- spec/option_spec.rb
|
92
43
|
- spec/spec_helper.rb
|
93
|
-
homepage: http://www.
|
44
|
+
homepage: http://www.gitlab.com/rob.ares/option
|
94
45
|
licenses: []
|
46
|
+
metadata: {}
|
95
47
|
post_install_message:
|
96
48
|
rdoc_options: []
|
97
49
|
require_paths:
|
98
50
|
- lib
|
99
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
52
|
requirements:
|
102
|
-
- -
|
53
|
+
- - ">="
|
103
54
|
- !ruby/object:Gem::Version
|
104
55
|
version: '0'
|
105
|
-
segments:
|
106
|
-
- 0
|
107
|
-
hash: -4306780363685144709
|
108
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
57
|
requirements:
|
111
|
-
- -
|
58
|
+
- - ">="
|
112
59
|
- !ruby/object:Gem::Version
|
113
60
|
version: '0'
|
114
|
-
segments:
|
115
|
-
- 0
|
116
|
-
hash: -4306780363685144709
|
117
61
|
requirements: []
|
118
|
-
|
119
|
-
rubygems_version: 1.8.24
|
62
|
+
rubygems_version: 3.5.11
|
120
63
|
signing_key:
|
121
|
-
specification_version:
|
64
|
+
specification_version: 4
|
122
65
|
summary: Option attempts to be faithful to the useful parts of the scala api. We lose
|
123
66
|
the type safety but still is quite useful when dealing with optional values.
|
124
67
|
test_files:
|
data/.travis.yml
DELETED
data/LICENSE
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 Rob Ares
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/gem-public_cert.pem
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhyb2Iu
|
3
|
-
YXJlczEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
-
MB4XDTEzMDIwMTAzNTcxMloXDTE0MDIwMTAzNTcxMlowPzERMA8GA1UEAwwIcm9i
|
5
|
-
LmFyZXMxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
6
|
-
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOlgyNRdkrEvWu5C30qR
|
7
|
-
/fMzQxV/+3I7vzqzJQlmKz859Xh0x+D8cwCXo0O8V7xzm44+bYYfHO59dKdTAqYM
|
8
|
-
LINg3k0wJ1fV03PwNHKdBb9mnoDDAjlYZUYImZnLQC8iyRQV+W4imFUp7JrgJlTW
|
9
|
-
xft1owPEAtX9DKUH+ngmwrTOSv1gf9uNu5Fi7u73PAANKRWRoumOOC3jeI2EDTtR
|
10
|
-
dpd3cHWb1zHD1cW3QPrbPk5G5noo4rI1G5+n/vwnp7QH4TPjiYSsTX74z+Rqr+QT
|
11
|
-
Rzy1vKyvfQ2aNcCS0gXeY8xkKMYmHDubzBn4Y8mvCrfk0TEpSnJfbglcvQx05Mtg
|
12
|
-
FbsCAwEAAaM5MDcwCQYDVR0TBAIwADAd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