much-boolean 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/much-boolean.rb +4 -4
- data/lib/much-boolean/version.rb +1 -1
- data/much-boolean.gemspec +18 -10
- data/test/helper.rb +2 -0
- data/test/support/factory.rb +2 -0
- data/test/unit/much-boolean_tests.rb +6 -4
- data/tmp/.gitkeep +0 -0
- metadata +19 -6
- data/.gitignore +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31b57226b8432f1c78168b0c3950d8893322a5a5a8f57d4f7de98b8520939e50
|
4
|
+
data.tar.gz: 3711bb88d85343a5719c5ef336efef354b175721f6054787447aea78fe12660f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76b209e1dfd48445a027782d6d50b0a9e226c53b5eb90023c1fafb19c59f3ccfc5d645aaa93ea8247de2bba5df03533874108240badbc973387063960d0a2c3d
|
7
|
+
data.tar.gz: 8e242bbaee178c378589332f8a363d780eb503fa65f0ec3deea3e959004f4547c443e4837490bf72be83b64675294c633852a014ba5f800c60cd7ba6dbfbd218
|
data/Gemfile
CHANGED
data/lib/much-boolean.rb
CHANGED
@@ -107,11 +107,11 @@ class MuchBoolean
|
|
107
107
|
@actual = self.class.convert(@given)
|
108
108
|
end
|
109
109
|
|
110
|
-
def ==(
|
111
|
-
if
|
112
|
-
|
110
|
+
def ==(other)
|
111
|
+
actual == if other.is_a?(MuchBoolean)
|
112
|
+
other.actual
|
113
113
|
else
|
114
|
-
|
114
|
+
other
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
data/lib/much-boolean/version.rb
CHANGED
data/much-boolean.gemspec
CHANGED
@@ -1,22 +1,30 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
2
4
|
lib = File.expand_path("../lib", __FILE__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
6
|
require "much-boolean/version"
|
5
7
|
|
6
8
|
Gem::Specification.new do |gem|
|
7
|
-
gem.name
|
8
|
-
gem.version
|
9
|
-
gem.authors
|
10
|
-
gem.email
|
11
|
-
|
12
|
-
gem.
|
13
|
-
|
14
|
-
gem.
|
9
|
+
gem.name = "much-boolean"
|
10
|
+
gem.version = MuchBoolean::VERSION
|
11
|
+
gem.authors = ["Kelly Redding", "Collin Redding"]
|
12
|
+
gem.email = ["kelly@kellyredding.com", "collin.redding@me.com "]
|
13
|
+
|
14
|
+
gem.summary =
|
15
|
+
"An API for friendly boolean conversion, interpretation, and handling."
|
16
|
+
gem.description =
|
17
|
+
"An API for friendly boolean conversion, interpretation, and handling."
|
18
|
+
|
19
|
+
gem.homepage = "https://github.com/redding/much-boolean"
|
20
|
+
gem.license = "MIT"
|
21
|
+
|
22
|
+
gem.files = `git ls-files | grep "^[^.]"`.split($INPUT_RECORD_SEPARATOR)
|
15
23
|
|
16
|
-
gem.files = `git ls-files`.split($/)
|
17
24
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
25
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
26
|
gem.require_paths = ["lib"]
|
20
27
|
|
21
|
-
gem.add_development_dependency("
|
28
|
+
gem.add_development_dependency("much-style-guide", ["~> 0.6.0"])
|
29
|
+
gem.add_development_dependency("assert", ["~> 2.19.3"])
|
22
30
|
end
|
data/test/helper.rb
CHANGED
data/test/support/factory.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "much-boolean"
|
3
5
|
|
4
6
|
class MuchBoolean
|
5
|
-
|
6
7
|
class UnitTests < Assert::Context
|
7
8
|
desc "MuchBoolean"
|
8
9
|
subject{ MuchBoolean }
|
@@ -132,9 +133,10 @@ class MuchBoolean
|
|
132
133
|
end
|
133
134
|
|
134
135
|
should "convert all other values as `true`" do
|
135
|
-
[Factory.string, Factory.integer, Factory.date, Factory.time]
|
136
|
-
|
137
|
-
|
136
|
+
[Factory.string, Factory.integer, Factory.date, Factory.time]
|
137
|
+
.each do |val|
|
138
|
+
assert_that(MuchBoolean.convert(val)).is_true
|
139
|
+
end
|
138
140
|
end
|
139
141
|
|
140
142
|
should "encode booleans as ones and zeros" do
|
data/tmp/.gitkeep
ADDED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: much-boolean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelly Redding
|
@@ -9,22 +9,36 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-01-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: much-style-guide
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.6.0
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.6.0
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: assert
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
17
31
|
requirements:
|
18
32
|
- - "~>"
|
19
33
|
- !ruby/object:Gem::Version
|
20
|
-
version: 2.19.
|
34
|
+
version: 2.19.3
|
21
35
|
type: :development
|
22
36
|
prerelease: false
|
23
37
|
version_requirements: !ruby/object:Gem::Requirement
|
24
38
|
requirements:
|
25
39
|
- - "~>"
|
26
40
|
- !ruby/object:Gem::Version
|
27
|
-
version: 2.19.
|
41
|
+
version: 2.19.3
|
28
42
|
description: An API for friendly boolean conversion, interpretation, and handling.
|
29
43
|
email:
|
30
44
|
- kelly@kellyredding.com
|
@@ -33,7 +47,6 @@ executables: []
|
|
33
47
|
extensions: []
|
34
48
|
extra_rdoc_files: []
|
35
49
|
files:
|
36
|
-
- ".gitignore"
|
37
50
|
- Gemfile
|
38
51
|
- LICENSE
|
39
52
|
- README.md
|
@@ -65,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
78
|
- !ruby/object:Gem::Version
|
66
79
|
version: '0'
|
67
80
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
81
|
+
rubygems_version: 3.2.4
|
69
82
|
signing_key:
|
70
83
|
specification_version: 4
|
71
84
|
summary: An API for friendly boolean conversion, interpretation, and handling.
|