rspec-dry-struct 0.3.0 → 0.4.0
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 +5 -5
- data/README.md +1 -1
- data/lib/rspec/dry/struct/matcher.rb +4 -6
- data/lib/rspec/dry/struct/version.rb +1 -1
- data/rspec-dry-struct.gemspec +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f38ccabc288f56d7173f46c1fc665b0d86286707381f0f2e3c2bc679c34bb682
|
|
4
|
+
data.tar.gz: 1469179551f6e6a1563a335f8cee230030aa7512c554630710b853c748aa90d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6189a2a9309600751857481b06466e3e3dc6acd9f69fd8356080e2bdf12dc77ac609c587373a05d2d4fd6a0660ad6e26adea16852fc732e256eebdeb02bda132
|
|
7
|
+
data.tar.gz: 91f25841a7f0ae76fa7fc3f12ad03927cebfe4fb5dda94b490ab8efb8e407235b7d5457048b03337846e111ced95e63e1e2bb64e07ad3d82feb594900aaccb05
|
data/README.md
CHANGED
|
@@ -76,5 +76,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
76
76
|
|
|
77
77
|
## Contributing
|
|
78
78
|
|
|
79
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
79
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Kukunin/rspec-dry-struct.
|
|
80
80
|
|
|
@@ -11,8 +11,10 @@ module RSpec
|
|
|
11
11
|
|
|
12
12
|
def matches?(actual)
|
|
13
13
|
@actual = actual
|
|
14
|
-
@actual_attribute = actual.schema
|
|
15
|
-
|
|
14
|
+
@actual_attribute = actual.schema.key(@attr_name).type
|
|
15
|
+
correct_attr_type?
|
|
16
|
+
rescue KeyError
|
|
17
|
+
false
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
def description
|
|
@@ -30,10 +32,6 @@ module RSpec
|
|
|
30
32
|
|
|
31
33
|
private
|
|
32
34
|
|
|
33
|
-
def attr_present?
|
|
34
|
-
!@actual_attribute.nil?
|
|
35
|
-
end
|
|
36
|
-
|
|
37
35
|
def correct_attr_type?
|
|
38
36
|
@attr_type.nil? || @actual_attribute == @attr_type
|
|
39
37
|
end
|
data/rspec-dry-struct.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
|
|
12
12
|
spec.summary = 'RSpec matcher for dry-struct gem'
|
|
13
13
|
spec.description = 'RSpec `have_attribute` matcher for dry-struct gem'
|
|
14
|
-
spec.homepage = 'https://github.com/
|
|
14
|
+
spec.homepage = 'https://github.com/Kukunin/rspec-dry-struct'
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
17
17
|
f.match(%r{^(test|spec|features)/})
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-dry-struct
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey Kukunin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -101,7 +101,7 @@ files:
|
|
|
101
101
|
- lib/rspec/dry/struct/matcher.rb
|
|
102
102
|
- lib/rspec/dry/struct/version.rb
|
|
103
103
|
- rspec-dry-struct.gemspec
|
|
104
|
-
homepage: https://github.com/
|
|
104
|
+
homepage: https://github.com/Kukunin/rspec-dry-struct
|
|
105
105
|
licenses: []
|
|
106
106
|
metadata: {}
|
|
107
107
|
post_install_message:
|
|
@@ -119,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
|
-
|
|
123
|
-
rubygems_version: 2.5.1
|
|
122
|
+
rubygems_version: 3.0.3
|
|
124
123
|
signing_key:
|
|
125
124
|
specification_version: 4
|
|
126
125
|
summary: RSpec matcher for dry-struct gem
|