rmaybe 0.9.0 → 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: afc34b6af201e824e1ab249c6eb15af786b5210d
4
+ data.tar.gz: 9a026a17bcef0a257b975f9db2382bf7ab089a2d
5
+ SHA512:
6
+ metadata.gz: d7f051c18a6d42034ed7a860067687bbb43df2540199102774289fa6b1ca5671c0d2c8fba707587cfb79af002dd7c3a5c9d04eb50c6b2a3ec63bd726349ea592
7
+ data.tar.gz: 36e831c0063a33bf2cb3efb903e2504f6fb5422fac42959b376c654b6732f024679340ac5632252c0f1c0059b3c5ddffaf2ddf92ccf8793afc6d102f61dd8d4d
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+
2
+ language: ruby
3
+ rvm:
4
+ - 1.8.7
5
+ - 2.1.1
6
+ script: bundle exec rspec spec
7
+
data/Gemfile CHANGED
@@ -2,3 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rmaybe.gemspec
4
4
  gemspec
5
+ gem 'rspec'
6
+ gem 'pry'
7
+
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Rmaybe
2
2
 
3
- This library give maybe monad on ruby.
3
+ [![Build Status](https://travis-ci.org/kmdsbng/rmaybe.svg?branch=master)](https://travis-ci.org/kmdsbng/rmaybe)
4
+ [![Gem Version](https://badge.fury.io/rb/rmaybe.png)](http://badge.fury.io/rb/rmaybe)
5
+
6
+ This library gives maybe monad on ruby.
4
7
 
5
8
  ## Installation
6
9
 
@@ -30,3 +33,4 @@ Or install it yourself as:
30
33
  3. Commit your changes (`git commit -am 'Add some feature'`)
31
34
  4. Push to the branch (`git push origin my-new-feature`)
32
35
  5. Create new Pull Request
36
+
@@ -1,3 +1,3 @@
1
1
  module Rmaybe
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+ require 'rmaybe'
4
+
5
+
6
+ describe 'maybe' do
7
+ it 'end method returns actual value' do
8
+ "hoge".maybe.upcase[0..2].end.should eq('HOG')
9
+ end
10
+
11
+ it 'nil.any_method return nil' do
12
+ [0].maybe[1].next.end.should eq(nil)
13
+
14
+ end
15
+
16
+ it 'throws no method error' do
17
+ lambda {
18
+ Rational(2, 5).maybe.invalid_method.end
19
+ }.should raise_error(NoMethodError)
20
+
21
+ end
22
+
23
+ end
24
+
@@ -0,0 +1,11 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require "rubygems"
3
+ require "bundler/setup"
4
+ require 'rspec'
5
+
6
+ Dir[File.join(File.dirname(__FILE__), "..", "lib", "*/.rb")].each{|f| require f }
7
+
8
+ RSpec.configure do
9
+ # ...
10
+ end
11
+
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmaybe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
5
- prerelease:
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - kmdsbng
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-25 00:00:00.000000000 Z
11
+ date: 2014-03-28 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: maybe monad library
15
14
  email:
@@ -18,7 +17,9 @@ executables: []
18
17
  extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
21
- - .gitignore
20
+ - ".gitignore"
21
+ - ".rspec"
22
+ - ".travis.yml"
22
23
  - Gemfile
23
24
  - LICENSE.txt
24
25
  - README.md
@@ -26,28 +27,32 @@ files:
26
27
  - lib/rmaybe.rb
27
28
  - lib/rmaybe/version.rb
28
29
  - rmaybe.gemspec
30
+ - spec/core/basic_usage_spec.rb
31
+ - spec/spec_helper.rb
29
32
  homepage: ''
30
33
  licenses: []
34
+ metadata: {}
31
35
  post_install_message:
32
36
  rdoc_options: []
33
37
  require_paths:
34
38
  - lib
35
39
  required_ruby_version: !ruby/object:Gem::Requirement
36
- none: false
37
40
  requirements:
38
- - - ! '>='
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '0'
41
44
  required_rubygems_version: !ruby/object:Gem::Requirement
42
- none: false
43
45
  requirements:
44
- - - ! '>='
46
+ - - ">="
45
47
  - !ruby/object:Gem::Version
46
48
  version: '0'
47
49
  requirements: []
48
50
  rubyforge_project:
49
- rubygems_version: 1.8.23
51
+ rubygems_version: 2.2.2
50
52
  signing_key:
51
- specification_version: 3
53
+ specification_version: 4
52
54
  summary: maybe monad library
53
- test_files: []
55
+ test_files:
56
+ - spec/core/basic_usage_spec.rb
57
+ - spec/spec_helper.rb
58
+ has_rdoc: