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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1fc3165719932c28dd78776ec526e4f0f0b72b61f987271396003e2e17a4354
4
- data.tar.gz: 190c8c50385772aa25101e0a2a2e04948d56ae9df8056a3c57f1e74dc4b99fb2
3
+ metadata.gz: 31b57226b8432f1c78168b0c3950d8893322a5a5a8f57d4f7de98b8520939e50
4
+ data.tar.gz: 3711bb88d85343a5719c5ef336efef354b175721f6054787447aea78fe12660f
5
5
  SHA512:
6
- metadata.gz: e5596cac8da12906767898be162b6dae6f03f64f63e72c882907b03a4819f04241596d299ae6485c01595d87362852621d93f2bedd985e6e41b54a4cfa863aca
7
- data.tar.gz: ace459e19aeebf53ad35c5a69f13c6d07cf1d6b56c2dc47c9ff011909239d0f337d61cbbe9a36670e0f3f7259ad0bc783c93a27c703fc2da2f17eab7dc38dfa0
6
+ metadata.gz: 76b209e1dfd48445a027782d6d50b0a9e226c53b5eb90023c1fafb19c59f3ccfc5d645aaa93ea8247de2bba5df03533874108240badbc973387063960d0a2c3d
7
+ data.tar.gz: 8e242bbaee178c378589332f8a363d780eb503fa65f0ec3deea3e959004f4547c443e4837490bf72be83b64675294c633852a014ba5f800c60cd7ba6dbfbd218
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  ruby "~> 2.5"
@@ -107,11 +107,11 @@ class MuchBoolean
107
107
  @actual = self.class.convert(@given)
108
108
  end
109
109
 
110
- def ==(other_boolean)
111
- if other_boolean.kind_of?(MuchBoolean)
112
- self.actual == other_boolean.actual
110
+ def ==(other)
111
+ actual == if other.is_a?(MuchBoolean)
112
+ other.actual
113
113
  else
114
- self.actual == other_boolean
114
+ other
115
115
  end
116
116
  end
117
117
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class MuchBoolean
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -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 = "much-boolean"
8
- gem.version = MuchBoolean::VERSION
9
- gem.authors = ["Kelly Redding", "Collin Redding"]
10
- gem.email = ["kelly@kellyredding.com", "collin.redding@me.com "]
11
- gem.summary = "An API for friendly boolean conversion, interpretation, and handling."
12
- gem.description = "An API for friendly boolean conversion, interpretation, and handling."
13
- gem.homepage = "https://github.com/redding/much-boolean"
14
- gem.license = "MIT"
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("assert", ["~> 2.19.0"])
28
+ gem.add_development_dependency("much-style-guide", ["~> 0.6.0"])
29
+ gem.add_development_dependency("assert", ["~> 2.19.3"])
22
30
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # this file is automatically required when you run `assert`
2
4
  # put any test helpers here
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "assert/factory"
2
4
 
3
5
  module Factory
@@ -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].each do |val|
136
- assert_that(MuchBoolean.convert(val)).is_true
137
- end
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
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.0
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: 2020-12-30 00:00:00.000000000 Z
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.0
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.0
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.1.2
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.
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- *.gem
2
- *.log
3
- *.rbc
4
- .rbx/
5
- .bundle
6
- .config
7
- .yardoc
8
- Gemfile.lock
9
- InstalledFiles
10
- _yardoc
11
- coverage
12
- doc/
13
- lib/bundler/man
14
- pkg
15
- rdoc
16
- spec/reports
17
- test/tmp
18
- test/version_tmp
19
- tmp