to_bool_extension 0.0.1 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d382bbf883300d96f662ccb7d7c045554157ec2979c703a69708cf86baaf971
4
- data.tar.gz: e95926737f129efc188cf97e5305660af754f5e452278187ea74f81fb003aa90
3
+ metadata.gz: 3382fec356f66dafe99435cb1aef30f87342a194bc7697958045fb730ade6578
4
+ data.tar.gz: ce3569e026ef3ead8fa7818719b19028fc212fa24e80eab77b12ccaa22332726
5
5
  SHA512:
6
- metadata.gz: 0547da445c45cfc702e29f0ebee37900e97fb75a2804a60f913a61bbeead83eb0551e859449a2aaa038a13fa94f2d82d4f2fe3830483d45ccab4d26bfcf15fef
7
- data.tar.gz: 99349dfd8f855f53390323330e124b1ff61c467ac4cb434597df5a9e42f8c6d632347533364973516c2c636752a09460ea53c4690ae7b0701ffbb9257d928b2f
6
+ metadata.gz: 9f373ff51d750c998d0ae2fe9931188e49ed57cb77497172c686f7b7525b555d0ae3e8391e8f1b44fc26cea5d751fbd91bbad10f9d409ea0bd52360f46332832
7
+ data.tar.gz: f35d37781a5364816e698c02a51c669addcf4f5587b9b7bc0a2d3f6c11a188e45bc5bb4b77f715120c458ac335b1fd73395458530690049ffa9460609f410ce5
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 0.0.5 (2022-03-30)
5
+ ------------------
6
+
7
+ * Version bump. Missed a version bump
8
+
9
+ 0.0.4 (2022-03-30)
10
+ ------------------
11
+
12
+ * Version bump. Removed unused gems
13
+
14
+ 0.0.3 (2022-03-30)
15
+ ------------------
16
+
17
+ * Version bump
18
+
19
+ 0.0.2 (2022-03-30)
20
+ ------------------
21
+
22
+ * Version bump to push core
23
+
4
24
  0.0.1 (2022-03-28)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.5
@@ -1,22 +1,36 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class TrueClass
3
+ TrueClass.class_eval do
4
4
  # :nodoc:
5
5
  def to_bool
6
6
  true
7
7
  end
8
8
  end
9
9
 
10
- class FalseClass
10
+ FalseClass.class_eval do
11
11
  # :nodoc:
12
12
  def to_bool
13
13
  false
14
14
  end
15
15
  end
16
16
 
17
- class NilClass
17
+ NilClass.class_eval do
18
18
  # :nodoc:
19
19
  def to_bool
20
20
  false
21
21
  end
22
22
  end
23
+
24
+ String.class_eval do
25
+ # :nodoc:
26
+ def to_bool
27
+ match?(/^(true|1|t|y|yes)$/i)
28
+ end
29
+ end
30
+
31
+ Numeric.class_eval do
32
+ # :nodoc:
33
+ def to_bool
34
+ to_s.to_bool
35
+ end
36
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_bool_extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Wyatt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -44,5 +44,5 @@ requirements: []
44
44
  rubygems_version: 3.2.15
45
45
  signing_key:
46
46
  specification_version: 4
47
- summary: Adds `to_bool` methods to `TrueClass`, `FalseClass`, and `NilClass`
47
+ summary: Adds `to_bool` method to `TrueClass`, `FalseClass`, and `NilClass`
48
48
  test_files: []