shape_of 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shape_of.rb +6 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6029b808200bb28201b18af2fac69cdd6c7ef68a27c55d7c94d95ee459dcdc3e
4
- data.tar.gz: 7a07a494f474b3ed1fb1f33d0f6f6633b5e2c1a27b69abe3f37cbcba7c60cb86
3
+ metadata.gz: 0f32c3530c617efc49481f9e952d30996e62b429f591f28bad0b9c9bfaa161da
4
+ data.tar.gz: b33c421e8bfac97b74e58970a7cacd6eb4ccc55c60637a5410ba4f688286a1a6
5
5
  SHA512:
6
- metadata.gz: 1874ea9da0b26864298dd7b9ccd5874fa39301c05c83e83ec18d4943726c6a58c877bed7e2fdafb5ad64cdbb40afe3a5611673e591a97315265644cd05741b8c
7
- data.tar.gz: b9c36bdcc7fb8b5ef7f5913e7ec5fd34cbfc9dbffc5e8bd7a058f54f0ace2adafa9ed937a710a5780a3755b785a456d571af4bd67140d095d0de8c4d3d8df989
6
+ metadata.gz: 0bc0af5a46a7a8285ecebd29f76c2146032043346cc4604750835521f885062662732129fb807ea7059d815d9f90571abab52d3b84764a5886268303f1ed9882
7
+ data.tar.gz: d18852f3ba98bfde393ad39466d4860b0c6eff6aa643d16fb237dba4170b1c46a5fd11abcb7cbbe3450376e7f8ba4799f075b9339c6dfeab8f70cc689189494e
data/lib/shape_of.rb CHANGED
@@ -89,11 +89,11 @@ module ShapeOf
89
89
  module Assertions
90
90
  def assert_shape_of(object, shape)
91
91
  if shape.respond_to? :shape_of?
92
- assert shape.shape_of? object
92
+ assert_operator shape, :shape_of?, object
93
93
  elsif shape.instance_of? ::Array
94
- assert Array[shape.first].shape_of? object
94
+ assert_operator Array[shape.first], :shape_of?, object
95
95
  elsif shape.instance_of? ::Hash
96
- assert Hash[shape].shape_of? object
96
+ assert_operator Hash[shape], :shape_of?, object
97
97
  else
98
98
  raise TypeError, "Expected #{Shape.inspect}, an #{::Array.inspect}, or a #{::Hash.inspect} as the shape"
99
99
  end
@@ -101,11 +101,11 @@ module ShapeOf
101
101
 
102
102
  def refute_shape_of(object, shape)
103
103
  if shape.respond_to? :shape_of?
104
- refute shape.shape_of? object
104
+ refute_operator shape, :shape_of?, object
105
105
  elsif shape.instance_of? ::Array
106
- refute Array[shape.first].shape_of? object
106
+ refute_operator Array[shape.first], :shape_of?, object
107
107
  elsif shape.instance_of? ::Hash
108
- refute Hash[shape].shape_of? object
108
+ refute_operator Hash[shape], :shape_of?, object
109
109
  else
110
110
  raise TypeError, "Expected #{Shape.inspect}, an #{::Array.inspect}, or a #{::Hash.inspect} as the shape"
111
111
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shape_of
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Isom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-15 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest