utilise 0.2.0 → 0.3.0.pre.alpha.pre.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/README.md +2 -2
- data/lib/utilise/bool.rb +2 -2
- data/lib/utilise/version.rb +1 -1
- data/spec/string_spec.rb +8 -0
- metadata +17 -18
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmNkNjAxYjk5N2E4NTc4ZTI4YjAzMmU2NDE0NTY2MGM5Zjc1NDRhMg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YjE2ODE0Y2E4OGY1MzFhOGRhZmViM2UxMWRhNjRjZGUyOGMxN2E0NQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OWRlYjcxNTRjODA3YTdmZjE2ZTg1NGQ1NDg4ZDRmZGE1NjFlZDRiNTMzYzgy
|
10
|
+
MjRjNWIxNmQwMzdlYTRlOWY3NTQyNGRhNGM4MDA4NDkzMzc1YjI2ZTZhODA3
|
11
|
+
NGQ4OTNiNTMxOWE1NmRlYzBlY2IxMjFhZTA4M2RkOTRmY2FlMGE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NDE3ZjlhOGMzYjIxNjg4NjFiNDVmYjMzNDZlMzA2MzNiMzFiNTI5ZDEwOWU5
|
14
|
+
OThjOTg1NDc1NTNjZjg5ZjNjOTIyZmFjMjFhZGIyMGRjODM3MWJmMDIzNTU3
|
15
|
+
YTZhNmUwMDc4ODUxZTcyNzAwMzVlNWY1NGVkMDRmY2RjNTkwNmU=
|
data/README.md
CHANGED
data/lib/utilise/bool.rb
CHANGED
@@ -44,9 +44,9 @@ module Utilise
|
|
44
44
|
# @returns [Boolean] true/false returned
|
45
45
|
def bool_it object
|
46
46
|
case object.to_s
|
47
|
-
when
|
47
|
+
when /^true$/i, /^yes$/i, /^t$/i, /^1$/i
|
48
48
|
true
|
49
|
-
when
|
49
|
+
when /^false$/i, /^no$/i, /^f$/i, /^0$/i
|
50
50
|
false
|
51
51
|
end
|
52
52
|
end
|
data/lib/utilise/version.rb
CHANGED
data/spec/string_spec.rb
CHANGED
@@ -33,5 +33,13 @@ describe String do
|
|
33
33
|
it "returns false when 0" do
|
34
34
|
expect('0'.to_bool).to be false
|
35
35
|
end
|
36
|
+
|
37
|
+
it "returns nil when positive" do
|
38
|
+
expect('positive'.to_bool).to be nil
|
39
|
+
end
|
40
|
+
|
41
|
+
it "returns nil when negative" do
|
42
|
+
expect('negative'.to_bool).to be nil
|
43
|
+
end
|
36
44
|
end
|
37
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utilise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0.pre.alpha.pre.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Slaughter
|
@@ -14,42 +14,42 @@ dependencies:
|
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>='
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
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
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: yard
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - '>='
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
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
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coveralls
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
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
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -66,19 +66,19 @@ dependencies:
|
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.13.0
|
69
|
-
description: 'Extends a few ruby classes with helpful tools, currently: X.to_bool'
|
69
|
+
description: ! 'Extends a few ruby classes with helpful tools, currently: X.to_bool'
|
70
70
|
email: b.p.slaughter@gmail.com
|
71
71
|
executables: []
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
|
-
- README.md
|
76
75
|
- License.md
|
76
|
+
- README.md
|
77
|
+
- lib/utilise.rb
|
77
78
|
- lib/utilise/bool.rb
|
78
79
|
- lib/utilise/matchers.rb
|
79
80
|
- lib/utilise/time.rb
|
80
81
|
- lib/utilise/version.rb
|
81
|
-
- lib/utilise.rb
|
82
82
|
- spec/array_spec.rb
|
83
83
|
- spec/fixnum_spec.rb
|
84
84
|
- spec/hash_spec.rb
|
@@ -97,27 +97,26 @@ require_paths:
|
|
97
97
|
- lib
|
98
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - '>='
|
100
|
+
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- - '
|
105
|
+
- - ! '>'
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
107
|
+
version: 1.3.1
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.2.2
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Utilises a few extra tools
|
114
114
|
test_files:
|
115
115
|
- spec/array_spec.rb
|
116
116
|
- spec/fixnum_spec.rb
|
117
|
+
- spec/time_spec.rb
|
118
|
+
- spec/object_spec.rb
|
117
119
|
- spec/hash_spec.rb
|
120
|
+
- spec/symbol_spec.rb
|
118
121
|
- spec/helper.rb
|
119
|
-
- spec/object_spec.rb
|
120
122
|
- spec/string_spec.rb
|
121
|
-
- spec/symbol_spec.rb
|
122
|
-
- spec/time_spec.rb
|
123
|
-
has_rdoc:
|