monad-maybe 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ce465e91a7fa1eaf0d0ab623ea89f2e94fb1a19
4
- data.tar.gz: 2e99082f613f330a0f70ba2366ee197b13e9a85c
3
+ metadata.gz: 711b5f676d97b04b9a929f52a4b538b47e9a0f4c
4
+ data.tar.gz: aa5c6a26e8d76ae71ac94116d7e24c30f58b05e4
5
5
  SHA512:
6
- metadata.gz: 4b9a853ff984432ca743f2855165b29945e7664231229fbfe9c21a4b98d63c91b86d1d209e4704f45d451b9f01eb50f4b114aacc65ba0edbd472cf1da8baa1fe
7
- data.tar.gz: c8b2fe434cd8521497a3aa13138582d5c1a8363279a4346d0251f8a5be89eb5a0aa77a58791618710c282bd0842f2a5c4317a37855329aa45cfae155c63cd995
6
+ metadata.gz: 160810dd5f538ca55768e5f6d7d925d546604a339636b398532f26280c9b0aad5d37d5880759df5f6ca08cd018397a12e5217e31477c92b954f6fe3c9bcee32d
7
+ data.tar.gz: 5b919aea5a60ba2124e9acf81d77975654faeeb00c65fb12c11aac20b95d9aa29b2a10eaab9e4eef74a06a8e911e0e8dd77d22bde7c712b4fda6f7743534f352
data/Gemfile CHANGED
@@ -2,6 +2,6 @@ source "http://rubygems.org"
2
2
 
3
3
  group :development do
4
4
  gem 'jeweler'
5
- gem 'rocco'
5
+ gem 'yard'
6
6
  gem 'test-unit'
7
7
  end
data/Gemfile.lock CHANGED
@@ -8,20 +8,17 @@ GEM
8
8
  rake
9
9
  rdoc
10
10
  json (1.8.0)
11
- mustache (0.99.4)
12
11
  rake (10.0.4)
13
12
  rdoc (4.0.1)
14
13
  json (~> 1.4)
15
- redcarpet (2.3.0)
16
- rocco (0.8.2)
17
- mustache
18
- redcarpet
19
14
  test-unit (2.5.5)
15
+ yard (0.8.6.1)
20
16
 
21
17
  PLATFORMS
22
18
  ruby
19
+ x86-mingw32
23
20
 
24
21
  DEPENDENCIES
25
22
  jeweler
26
- rocco
27
23
  test-unit
24
+ yard
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
data/lib/monad/maybe.rb CHANGED
@@ -3,6 +3,8 @@ require_relative 'maybe/just'
3
3
  require_relative 'maybe/nothing'
4
4
  require_relative 'maybe/list'
5
5
 
6
+ # Top-level module includes some monkey patching and
7
+ # constructor methods. Monad::Maybe is included by default.
6
8
  module Monad
7
9
  module Maybe
8
10
  module Enumerable
@@ -45,8 +45,9 @@ module Monad
45
45
  end
46
46
 
47
47
  def to_s
48
- self
48
+ ''
49
49
  end
50
+ alias to_str to_s
50
51
 
51
52
  def to_a
52
53
  []
data/monad-maybe.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "monad-maybe"
8
- s.version = "0.8.0"
8
+ s.version = "0.8.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Delon Newman"]
@@ -39,16 +39,16 @@ Gem::Specification.new do |s|
39
39
 
40
40
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
41
  s.add_development_dependency(%q<jeweler>, [">= 0"])
42
- s.add_development_dependency(%q<rocco>, [">= 0"])
42
+ s.add_development_dependency(%q<yard>, [">= 0"])
43
43
  s.add_development_dependency(%q<test-unit>, [">= 0"])
44
44
  else
45
45
  s.add_dependency(%q<jeweler>, [">= 0"])
46
- s.add_dependency(%q<rocco>, [">= 0"])
46
+ s.add_dependency(%q<yard>, [">= 0"])
47
47
  s.add_dependency(%q<test-unit>, [">= 0"])
48
48
  end
49
49
  else
50
50
  s.add_dependency(%q<jeweler>, [">= 0"])
51
- s.add_dependency(%q<rocco>, [">= 0"])
51
+ s.add_dependency(%q<yard>, [">= 0"])
52
52
  s.add_dependency(%q<test-unit>, [">= 0"])
53
53
  end
54
54
  end
data/test/maybe.rb CHANGED
@@ -6,6 +6,7 @@ class MaybeTest < Test::Unit::TestCase
6
6
  assert nil.maybe.nothing?
7
7
  assert nil.maybe.value.nil?
8
8
  assert_equal 'test', nil.maybe.unwrap('test')
9
+ assert_equal '', nothing.to_s
9
10
  end
10
11
 
11
12
  def test_just
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monad-maybe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delon Newman
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rocco
28
+ name: yard
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
@@ -96,3 +96,4 @@ signing_key:
96
96
  specification_version: 4
97
97
  summary: A Ruby implementation of Haskell's Maybe Monad
98
98
  test_files: []
99
+ has_rdoc: