taipu 0.0.2 → 0.0.3

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: b12d44f2bfbbaa94d45b227167b9e331eab887a6
4
- data.tar.gz: 2599706e56aa52356cd41b3876195b2976edac5f
3
+ metadata.gz: 705e5d57b69d89d6c094af24c0bee0e84e4daae8
4
+ data.tar.gz: 8f5f0ccee8368f81fee5aa49e66b8baa088ad3fb
5
5
  SHA512:
6
- metadata.gz: ea0c608f2dc7e6afb70106daf6a1e3872fb1ed29fb69b5c68e49156e2f3c4232b1e1e6c7a48a50376b5195bcdd150b491e01ab129033a779e827a32936865266
7
- data.tar.gz: 184a46d9a6f6c6909546a0e27c87198e41bc3b6e56ec0df3a5323917bd011ed18a0fc4ca3c3e4b305d009dd4d145242b34ee965f9200009923ca723ba37a25b9
6
+ metadata.gz: 8c7f8a9082a8ab6721d592c8c8adf09b1a769b199078815cdaa4c35ff70144a9fd33eb6f79e6c8a2cf4ba11eedb2ac8c991ee912ef464296a41fce180d2921eb
7
+ data.tar.gz: 62352199ef97fd14e28e0f1bece8d63f5782bd545b5ac33d9325f98590a0054826f350a7595ca3b56cbbdf3b329633e54bc68def576967b36e8078821d5e1d99
data/.travis.yml CHANGED
@@ -5,11 +5,9 @@ script: 'bundle exec rake test:coverage --trace'
5
5
  before_install:
6
6
  - gem install bundler
7
7
  rvm:
8
- - 1.9.3
9
8
  - 2.0
10
9
  - 2.1
11
10
  - 2.2
12
11
  - ruby-head
13
- - jruby
14
12
  - jruby-head
15
13
  - rbx-2
File without changes
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # Taipu
2
2
 
3
- [![Build Status](https://travis-ci.org/cyril/taipu.rb.svg?branch=master)](https://travis-ci.org/cyril/taipu.rb)
4
- [![Dependency Status](https://gemnasium.com/cyril/taipu.rb.svg)](https://gemnasium.com/cyril/taipu.rb)
5
- [![Gem Version](http://img.shields.io/gem/v/taipu.svg)](https://rubygems.org/gems/taipu)
6
- [![Inline docs](http://inch-ci.org/github/cyril/taipu.rb.svg?branch=master)](http://inch-ci.org/github/cyril/taipu.rb)
7
- [![Documentation](http://img.shields.io/:yard-docs-38c800.svg)](http://rubydoc.info/gems/taipu/frames)
3
+ [![Build Status](https://travis-ci.org/cyril/taipu.rb.svg?branch=master)][travis]
4
+ [![Gem Version](https://badge.fury.io/rb/taipu.svg)][gem]
5
+ [![Inline docs](http://inch-ci.org/github/cyril/taipu.rb.svg?branch=master)][inchpages]
6
+ [![Documentation](http://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
8
7
 
9
- > taipuation library with some built-in matchers for Ruby.
8
+ > Collections of types for Ruby.
10
9
 
11
10
  ## Contact
12
11
 
@@ -36,6 +35,13 @@ Or install it yourself as:
36
35
 
37
36
  $ gem install taipu
38
37
 
38
+ ## Usage
39
+
40
+ ```ruby
41
+ type = Taipu::Number.new(min: 42)
42
+ type.to_h # => { min: 42, max: nil, type: :number }
43
+ ```
44
+
39
45
  ## Versioning
40
46
 
41
47
  __Taipu__ follows [Semantic Versioning 2.0](http://semver.org/).
@@ -47,3 +53,12 @@ __Taipu__ follows [Semantic Versioning 2.0](http://semver.org/).
47
53
  3. Commit your changes (`git commit -am 'Add some feature'`)
48
54
  4. Push to the branch (`git push origin my-new-feature`)
49
55
  5. Create a new Pull Request
56
+
57
+ ## License
58
+
59
+ See `LICENSE.md` file.
60
+
61
+ [gem]: https://rubygems.org/gems/taipu
62
+ [travis]: https://travis-ci.org/cyril/taipu.rb
63
+ [inchpages]: http://inch-ci.org/github/cyril/taipu.rb/
64
+ [rubydoc]: http://rubydoc.info/gems/taipu/frames
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/taipu.rb CHANGED
@@ -1,6 +1,7 @@
1
- Dir[File.join File.dirname(__FILE__), 'taipu', '*.rb'].each do |filename|
2
- require_relative filename
1
+ # Namespace for the Taipu library.
2
+ module Taipu
3
3
  end
4
4
 
5
- module Taipu
5
+ Dir[File.join File.dirname(__FILE__), 'taipu', '*.rb'].each do |filename|
6
+ require_relative filename
6
7
  end
data/lib/taipu/base.rb CHANGED
@@ -2,10 +2,6 @@
2
2
  module Taipu
3
3
  # Abstract class.
4
4
  class Base
5
- def initialize(*)
6
- freeze
7
- end
8
-
9
5
  def to_h
10
6
  {
11
7
  type: to_sym
data/lib/taipu/number.rb CHANGED
@@ -4,17 +4,11 @@ require_relative 'base'
4
4
  module Taipu
5
5
  # The type number.
6
6
  class Number < Base
7
- def initialize( min: nil,
8
- max: nil )
9
-
10
- if !min.nil? && !max.nil?
11
- fail 'MinIsGreaterThanMaxError' if min > max
12
- end
7
+ def initialize(min: nil, max: nil)
8
+ fail 'MinIsGreaterThanMaxError' if !min.nil? && !max.nil? && min > max
13
9
 
14
10
  @min = min
15
11
  @max = max
16
-
17
- freeze
18
12
  end
19
13
 
20
14
  def constraints
data/lib/taipu/string.rb CHANGED
@@ -4,19 +4,13 @@ require_relative 'base'
4
4
  module Taipu
5
5
  # The type string.
6
6
  class String < Base
7
- def initialize( minlen: nil,
8
- maxlen: nil,
9
- pattern: nil )
10
-
11
- if !minlen.nil? && !maxlen.nil?
12
- fail 'MinlenIsLongerThanMaxlenError' if minlen > maxlen
13
- end
7
+ def initialize(minlen: nil, maxlen: nil, pattern: nil)
8
+ fail 'MinlenIsLongerThanMaxlenError' if !minlen.nil? && !maxlen.nil? &&
9
+ minlen > maxlen
14
10
 
15
11
  @minlen = minlen
16
12
  @maxlen = maxlen
17
13
  @pattern = pattern
18
-
19
- freeze
20
14
  end
21
15
 
22
16
  def constraints
data/taipu.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'taipu'
3
- spec.version = File.read('VERSION.semver')
3
+ spec.version = File.read('VERSION.semver').chomp
4
4
  spec.authors = ['Cyril Wack']
5
5
  spec.email = ['contact@cyril.email']
6
6
 
@@ -9,14 +9,15 @@ Gem::Specification.new do |spec|
9
9
  spec.homepage = 'https://github.com/cyril/taipu.rb'
10
10
  spec.license = 'MIT'
11
11
 
12
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(/^test\//) }
13
- spec.executables = spec.files.grep(/^exe\//) { |f| File.basename(f) }
12
+ spec.files =
13
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^test/}) }
14
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
14
15
  spec.require_paths = ['lib']
15
16
 
16
- spec.add_development_dependency 'bundler', '~> 1.8'
17
- spec.add_development_dependency 'rake', '~> 10.0'
18
- spec.add_development_dependency 'yard', '~> 0.8'
19
- spec.add_development_dependency 'simplecov', '~> 0.9.1'
20
- spec.add_development_dependency 'rubocop', '~> 0.29'
21
- spec.add_development_dependency 'expect', '~> 0.0.6'
17
+ spec.add_development_dependency 'bundler', '~> 1.10.6'
18
+ spec.add_development_dependency 'rake', '~> 10.4.2'
19
+ spec.add_development_dependency 'yard', '~> 0.8.7.6'
20
+ spec.add_development_dependency 'simplecov', '~> 0.10.0'
21
+ spec.add_development_dependency 'rubocop', '~> 0.33.0'
22
+ spec.add_development_dependency 'spectus', '~> 2.1.3'
22
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taipu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,84 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: 1.10.6
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: 1.10.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 10.4.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 10.4.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: yard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.8'
47
+ version: 0.8.7.6
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.8'
54
+ version: 0.8.7.6
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.9.1
61
+ version: 0.10.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.9.1
68
+ version: 0.10.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.29'
75
+ version: 0.33.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.29'
82
+ version: 0.33.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: expect
84
+ name: spectus
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.0.6
89
+ version: 2.1.3
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.0.6
96
+ version: 2.1.3
97
97
  description: Collections of types for Ruby.
98
98
  email:
99
99
  - contact@cyril.email
@@ -106,7 +106,7 @@ files:
106
106
  - ".yardopts"
107
107
  - CODE_OF_CONDUCT.md
108
108
  - Gemfile
109
- - LICENSE.mv
109
+ - LICENSE.md
110
110
  - README.md
111
111
  - Rakefile
112
112
  - VERSION.semver
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.4.5
144
+ rubygems_version: 2.4.5.1
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Collections of types.