bools 0.5.0 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/README.md +12 -12
  4. data/bools.gemspec +1 -1
  5. data/lib/bools.rb +1 -1
  6. metadata +6 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18bb7c86f9e8d827350e3a5eca69da9bf8178693a11b04f09dea813210652ca3
4
- data.tar.gz: dcbfc9eec87c102073c9d50867d61f23800bff32a24802ced02ff0de37941f58
3
+ metadata.gz: 21404a36bf997a6e2d4beb40097d9524437144002ddeb48518ce6ae3a19ab24b
4
+ data.tar.gz: 5e1a3a51309ced9c2409756cc1431eb47f7070feada570cb7c7664a4f33a21b3
5
5
  SHA512:
6
- metadata.gz: 2c0336d44e61cae6e0585dba03d4e887f3971c33827e54d986f86f11873322193f436c4b56eeae2c29564d8cf6513a5f9166cbdb6491c231567b165af02b7da6
7
- data.tar.gz: 515c8ba0a643ea29f3272aae08e94ba426114631720bdf824901056a175615977080df709eb0c1f8381ec0413e281c15a994f71bc8a787658b94f93d28c78b32
6
+ metadata.gz: 49a7863e6a368e7fd943eecf95ce3d921dae5557ee271a237cc977b59a50f307a4c6a5d3e6df0af39c7e2bb291260cd1f976a840d70792179fb56746375a724c
7
+ data.tar.gz: 80f8636a6fe334747f38ebba686d61906ff0f3aca915473995023652d2357056fd09e501cf06da8f9af3b3b1ddb6fe1f7cee10271b4191098df1e132551e6907
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5
1
+ 3.1.2
data/README.md CHANGED
@@ -17,7 +17,7 @@ This small file:
17
17
  ```ruby
18
18
  require 'bools'
19
19
 
20
- def test(a, b, c, d)
20
+ def test(a, b, c)
21
21
  a == c
22
22
  end
23
23
  ```
@@ -25,19 +25,19 @@ end
25
25
  Produces the following:
26
26
 
27
27
  ```
28
- a b c d | result
29
- --------+-------
30
- 0 0 0 0 | 1
31
- 0 0 0 1 | 1
32
- 0 0 1 0 | 0
33
- 0 0 1 1 | 0
34
- 0 1 0 0 | 1
35
- 0 1 0 1 | 1
36
- 0 1 1 0 | 0
37
- 0 1 1 1 | 0
28
+ a b c | result
29
+ ------+-------
30
+ 0 0 0 | 1
31
+ 0 0 1 | 1
32
+ 0 1 0 | 0
33
+ 0 1 1 | 0
34
+ 1 0 0 | 1
35
+ 1 0 1 | 1
36
+ 1 1 0 | 0
37
+ 1 1 1 | 0
38
38
  ```
39
39
 
40
- Notice that 4 booleans are checked, since there are 4 input variables.
40
+ Notice that 3 booleans are checked, since there are 3 input variables.
41
41
 
42
42
  ## Why?
43
43
 
data/bools.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "bools"
5
- s.version = "0.5.0"
5
+ s.version = "0.5.2"
6
6
  s.author = "Steve Shreeve"
7
7
  s.email = "steve.shreeve@gmail.com"
8
8
  s.summary = "Bools is a Ruby gem that makes it easy to evaluate boolean conditionals"
data/lib/bools.rb CHANGED
@@ -4,7 +4,7 @@ def bools!
4
4
  puts
5
5
  puts [*list, '|', 'result'] * ' '
6
6
  puts ['--' * list.size, '-' * 6] * '+-'
7
- (vars << 1).times do |i|
7
+ (1 << vars).times do |i|
8
8
  list = ("%0*b" % [vars, i]).split('')
9
9
  vals = list.map {|item| item == '1'}
10
10
  resu = !!test(*vals) ? '1' : '0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2022-10-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Write one method and bools will test all input combinations
14
14
  email: steve.shreeve@gmail.com
@@ -26,7 +26,7 @@ homepage: https://github.com/shreeve/bools
26
26
  licenses:
27
27
  - MIT
28
28
  metadata: {}
29
- post_install_message:
29
+ post_install_message:
30
30
  rdoc_options: []
31
31
  require_paths:
32
32
  - lib
@@ -41,9 +41,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  requirements: []
44
- rubyforge_project:
45
- rubygems_version: 2.7.7
46
- signing_key:
44
+ rubygems_version: 3.3.7
45
+ signing_key:
47
46
  specification_version: 4
48
47
  summary: Bools is a Ruby gem that makes it easy to evaluate boolean conditionals
49
48
  test_files: []