wannabe_bool 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +16 -21
- data/lib/wannabe_bool/version.rb +1 -1
- data/spec/spec_helper.rb +3 -0
- data/wannabe_bool.gemspec +6 -2
- metadata +23 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b54356c96d57cdae1b1d4695d17bddb1cdc1da96
|
4
|
+
data.tar.gz: 879500036a1480ab3a7529fb85c8d620b2782fd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be1f4b9d03379aed7b1a984faddcfee8dd44299f7b6c74f0b055bccc263c22d36a5d554fe694cb760524ce7ea5668cce9f38aa14f747ea3842e11b3ff04495e
|
7
|
+
data.tar.gz: 1423582aafb7be084a42117cc6291079d0a0302d73df05e5f10cc4bc4db29287c526831ef18a7aa33fedd63c690b172891c514f90bc5f4b1755c8d96b2ee3287
|
data/.travis.yml
ADDED
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
= Wannabe Bool
|
2
2
|
|
3
|
-
If string
|
3
|
+
If <b>string</b>, <b>integer</b>, <b>symbol</b> and <b>nil</b> values wanna be a <b>boolean</b> value, they can with the new <code>to_b</code> method.
|
4
|
+
|
5
|
+
{<img src="https://badge.fury.io/rb/wannabe_bool.png" alt="Gem Version" />}[http://badge.fury.io/rb/wannabe_bool]
|
6
|
+
{<img src="https://travis-ci.org/prodis/wannabe_bool.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/prodis/wannabe_bool]
|
7
|
+
{<img src="https://coveralls.io/repos/prodis/wannabe_bool/badge.png" alt="Coverage Status" />}[https://coveralls.io/r/prodis/wannabe_bool]
|
8
|
+
{<img src="https://codeclimate.com/github/prodis/wannabe_bool/badges/gpa.svg" alt="Code Climate" />}[https://codeclimate.com/github/prodis/wannabe_bool]
|
9
|
+
|
4
10
|
|
5
11
|
== Installing
|
6
12
|
|
@@ -13,13 +19,11 @@ If string, integer, symbol and nil values wanna be a boolean value, they can.
|
|
13
19
|
|
14
20
|
== Using
|
15
21
|
|
16
|
-
|
22
|
+
<code>to_b</code> method is available on <code>String</code>, <code>Symbol</code>, <code>Integer</code>, <code>TrueClass</code>, <code>FalseClass</code> and <code>NilClass</code>.
|
17
23
|
|
18
24
|
require 'wannabe_bool'
|
19
25
|
|
20
|
-
|
21
|
-
# String
|
22
|
-
# ----------------------------------------
|
26
|
+
==== String
|
23
27
|
'1'.to_b # => true
|
24
28
|
't'.to_b # => true
|
25
29
|
'T'.to_b # => true
|
@@ -61,9 +65,7 @@ Method <b>to_b</b> method is available on String, Symbol, Integer, TrueClass, Fa
|
|
61
65
|
'NOT'.to_b # => false
|
62
66
|
'wherever'.to_b # => false
|
63
67
|
|
64
|
-
|
65
|
-
# Symbol
|
66
|
-
# ----------------------------------------
|
68
|
+
==== Symbol
|
67
69
|
:1.to_b # => true
|
68
70
|
:t.to_b # => true
|
69
71
|
:T.to_b # => true
|
@@ -90,34 +92,27 @@ Method <b>to_b</b> method is available on String, Symbol, Integer, TrueClass, Fa
|
|
90
92
|
:NOT.to_b # => false
|
91
93
|
:wherever.to_b # => false
|
92
94
|
|
93
|
-
|
94
|
-
# Integer
|
95
|
-
# ----------------------------------------
|
95
|
+
==== Integer
|
96
96
|
1.to_b # => true
|
97
97
|
|
98
98
|
0.to_b # => false
|
99
99
|
2.to_b # => false
|
100
100
|
|
101
|
-
|
102
|
-
# TrueClass
|
103
|
-
# ----------------------------------------
|
101
|
+
==== TrueClass
|
104
102
|
true.to_b # => true
|
105
103
|
|
106
|
-
|
107
|
-
# FalseClass
|
108
|
-
# ----------------------------------------
|
104
|
+
==== FalseClass
|
109
105
|
false.to_b # => false
|
110
106
|
|
111
|
-
|
112
|
-
# NilClass
|
113
|
-
# ----------------------------------------
|
107
|
+
==== NilClass
|
114
108
|
nil.to_b # => false
|
115
109
|
|
110
|
+
|
116
111
|
== Author
|
117
112
|
- {Fernando Hamasaki de Amorim (prodis)}[http://prodis.blog.br]
|
118
113
|
|
119
114
|
|
120
|
-
== Contributing to wannabe_bool
|
115
|
+
== Contributing to <b>wannabe_bool</b>
|
121
116
|
|
122
117
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
123
118
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
data/lib/wannabe_bool/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/wannabe_bool.gemspec
CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = WannabeBool::VERSION
|
8
8
|
spec.authors = ['Prodis a.k.a. Fernando Hamasaki de Amorim']
|
9
9
|
spec.email = ['prodis@gmail.com']
|
10
|
-
spec.
|
11
|
-
spec.
|
10
|
+
spec.summary = 'If string, integer, symbol and nil values wanna be a boolean value, they can with the new #to_b method.'
|
11
|
+
spec.description = spec.summary
|
12
12
|
spec.homepage = 'https://github.com/prodis/wannabe_bool'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
@@ -19,7 +19,11 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.platform = Gem::Platform::RUBY
|
21
21
|
spec.required_ruby_version = Gem::Requirement.new('>= 1.9.3')
|
22
|
+
spec.post_install_message = %{
|
23
|
+
Thank you for installing one more gem from a Brazilian Ruby Developer.
|
24
|
+
}
|
22
25
|
|
26
|
+
spec.add_development_dependency 'coveralls'
|
23
27
|
spec.add_development_dependency 'rake'
|
24
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
25
29
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wannabe_bool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prodis a.k.a. Fernando Hamasaki de Amorim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: coveralls
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,8 +52,8 @@ dependencies:
|
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '3.0'
|
41
|
-
description: If string, integer, symbol and nil values wanna be a boolean value,
|
42
|
-
can.
|
55
|
+
description: 'If string, integer, symbol and nil values wanna be a boolean value,
|
56
|
+
they can with the new #to_b method.'
|
43
57
|
email:
|
44
58
|
- prodis@gmail.com
|
45
59
|
executables: []
|
@@ -50,6 +64,7 @@ files:
|
|
50
64
|
- ".rspec"
|
51
65
|
- ".ruby-gemset.example"
|
52
66
|
- ".ruby-version.example"
|
67
|
+
- ".travis.yml"
|
53
68
|
- CHANGELOG.rdoc
|
54
69
|
- Gemfile
|
55
70
|
- README.rdoc
|
@@ -70,7 +85,8 @@ homepage: https://github.com/prodis/wannabe_bool
|
|
70
85
|
licenses:
|
71
86
|
- MIT
|
72
87
|
metadata: {}
|
73
|
-
post_install_message:
|
88
|
+
post_install_message: "\n Thank you for installing one more gem from a Brazilian
|
89
|
+
Ruby Developer.\n "
|
74
90
|
rdoc_options: []
|
75
91
|
require_paths:
|
76
92
|
- lib
|
@@ -89,8 +105,8 @@ rubyforge_project:
|
|
89
105
|
rubygems_version: 2.4.2
|
90
106
|
signing_key:
|
91
107
|
specification_version: 4
|
92
|
-
summary: If string, integer, symbol and nil values wanna be a boolean value, they
|
93
|
-
can.
|
108
|
+
summary: 'If string, integer, symbol and nil values wanna be a boolean value, they
|
109
|
+
can with the new #to_b method.'
|
94
110
|
test_files:
|
95
111
|
- spec/spec_helper.rb
|
96
112
|
- spec/wannabe_bool/boolean_spec.rb
|