totally_lazy 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.idea/.rakeTasks +1 -1
- data/lib/option.rb +1 -1
- data/spec/option_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGUwZmNlOWE1NDZiMmM1MTkyNGZiMTk3ZDkyZWRjYWI2MjU2MTAzOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmMyNmM3MjBjM2UyYWM3N2U4ZjZjYTJmYzdhY2QzMjZmZGE4ZTBjOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmIyYTI0NTM3ZTA3MThjNzMyMDdmYmY2MjBhZmZiN2JiZDJmZjFjYmJiNWZh
|
10
|
+
ODEyODNmZmZjNGUxNjhlMmJkNDVkYjdkNjcyMmU2MDhhM2I5ZWMyMjhmNWM5
|
11
|
+
NTZiZWVkYmVkN2EyMDk2M2ZlZWUwYzU1MjljMzJiYWJlZTQyOWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MThiYWVkMTExMWM4NDI3NGExZmRlMDk1NjJlNzg4NWQyYTNiZDViODYzMmEz
|
14
|
+
ZjAyNGRlZDViMDM4NWMwYzcwYjI1MTZjZGMzYzhlODkwNGQ4MGUzM2NkMWU2
|
15
|
+
ZGZmYmMyMmEwNTlhNzQ2ZjkxNjg4NzY3NmQyZjFhZTdkMzQ0ODc=
|
data/.idea/.rakeTasks
CHANGED
@@ -4,4 +4,4 @@ You are allowed to:
|
|
4
4
|
1. Remove rake task
|
5
5
|
2. Add existing rake tasks
|
6
6
|
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
-
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build gem into pkg/" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated file" fullCmd="clobber" taksId="clobber" /><RakeTask description="Start IRB with all runtime dependencies loaded" fullCmd="console[script]" taksId="console[script]" /><RakeGroup description="" fullCmd="" taksId="gemcutter"><RakeTask description="Release gem to Gemcutter" fullCmd="gemcutter:release" taksId="release" /></RakeGroup><RakeTask description="Generate and validate gemspec" fullCmd="gemspec" taksId="gemspec" /><RakeGroup description="" fullCmd="" taksId="gemspec"><RakeTask description="Display the gemspec for debugging purposes, as jeweler knows it (not from the filesystem)" fullCmd="gemspec:debug" taksId="debug" /><RakeTask description="Regenerate the gemspec on the filesystem" fullCmd="gemspec:generate" taksId="generate" /><RakeTask description="Regenerate and validate gemspec, and then commits and pushes to git" fullCmd="gemspec:release" taksId="release" /><RakeTask description="Validates the gemspec on the filesystem" fullCmd="gemspec:validate" taksId="validate" /></RakeGroup><RakeGroup description="" fullCmd="" taksId="git"><RakeTask description="Tag and push release to git" fullCmd="git:release" taksId="release" /></RakeGroup><RakeTask description="run rspec guard" fullCmd="guard" taksId="guard" /><RakeTask description="Build and install gem using `gem install`" fullCmd="install" taksId="install" /><RakeTask description="rebuild gem" fullCmd="re" taksId="re" /><RakeTask description="Release gem" fullCmd="release" taksId="release" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="Displays the current version" fullCmd="version" taksId="version" /><RakeTask description="" fullCmd="console" taksId="console" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="gemspec_required" taksId="gemspec_required" /><RakeTask description="" fullCmd="version_required" taksId="version_required" /></RakeGroup></Settings>
|
data/lib/option.rb
CHANGED
@@ -45,7 +45,7 @@ module Option
|
|
45
45
|
|
46
46
|
def map(fn=nil, &block)
|
47
47
|
assert_funcs(fn, block_given?)
|
48
|
-
|
48
|
+
option(block_given? ? block.call(@value) : fn.(@value))
|
49
49
|
end
|
50
50
|
|
51
51
|
def flat_map(fn=nil, &block) # function should return an option
|
data/spec/option_spec.rb
CHANGED
@@ -41,7 +41,7 @@ describe 'Option' do
|
|
41
41
|
expect(option(1).map { |value| value.to_s }).to eq(option('1'))
|
42
42
|
expect(some(2).map(to_string)).to eq(some('2'))
|
43
43
|
expect(none.map(to_string)).to eq(none)
|
44
|
-
expect(some(2).map(ignore_and_return(nil))).to eq(
|
44
|
+
expect(some(2).map(ignore_and_return(nil))).to eq(none)
|
45
45
|
end
|
46
46
|
|
47
47
|
it 'should support flat_map' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totally_lazy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raymond Barlow
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|