nobrainer-rspec 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/matchers/have_index_for.rb +2 -2
- data/lib/nobrainer/rspec/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a085f3d69d83e7deb6a1278c422ff1d0206884838aba9554567bb33947c2f2ec
|
4
|
+
data.tar.gz: 44c49d5de1198e404b47d724bc2d2763bee893067c50a53be3cf3a6076cfb124
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4abda54b105aec54fbf7f36aa3f99d0341a839edf270f1f9d499beed4b6115e4d7162208e53d84290ba31bec7dc4540a1f3d023f177ace45adae676efba15419
|
7
|
+
data.tar.gz: d6b1bb509c8376652546134665d442c70ac6dab87f2995db0b8f64ae4d2f68b56505b4d2cf9aab5fe734d47831259bacfab84cf133260175d72694c69bab8a52
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
9
|
|
10
|
+
## [1.1.2] - 2022-05-09
|
11
|
+
### Fixed
|
12
|
+
- have_index_for with a coupound index
|
13
|
+
|
10
14
|
## [1.1.1] - 2021-02-09
|
11
15
|
### Fixed
|
12
16
|
- error on generating failure description #1
|
@@ -40,7 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
40
44
|
- validate_format_of
|
41
45
|
- validate_numericality_of
|
42
46
|
|
43
|
-
[Unreleased]: https://gitlab.com/zedtux/nobrainer-rspec/-/compare/v1.1.
|
47
|
+
[Unreleased]: https://gitlab.com/zedtux/nobrainer-rspec/-/compare/v1.1.2...master
|
48
|
+
[1.1.2]: https://gitlab.com/zedtux/nobrainer-rspec/-/compare/v1.1.1...v1.1.2
|
44
49
|
[1.1.1]: https://gitlab.com/zedtux/nobrainer-rspec/-/compare/v1.1.0...v1.1.1
|
45
50
|
[1.1.0]: https://gitlab.com/zedtux/nobrainer-rspec/-/compare/v1.0.1...v1.1.0
|
46
51
|
[1.0.1]: https://gitlab.com/zedtux/nobrainer-rspec/-/compare/v1.0.0...v1.0.1
|
@@ -68,7 +68,7 @@ module NoBrainer
|
|
68
68
|
class HaveIndexFor # :nodoc:
|
69
69
|
def initialize(*attrs)
|
70
70
|
@attributes = attrs.collect do |attributes|
|
71
|
-
if attributes.is_a?(
|
71
|
+
if attributes.is_a?(Enumerable)
|
72
72
|
attributes.collect(&:to_sym)
|
73
73
|
else
|
74
74
|
attributes.to_sym
|
@@ -90,7 +90,7 @@ module NoBrainer
|
|
90
90
|
@klass = klass.is_a?(Class) ? klass : klass.class
|
91
91
|
@errors = []
|
92
92
|
@attributes.each do |attr|
|
93
|
-
if attr.is_a?(
|
93
|
+
if attr.is_a?(Enumerable)
|
94
94
|
missing_fields = attr - @klass.fields.keys
|
95
95
|
if missing_fields.empty?
|
96
96
|
index_key = @index_name || attr.join('_').to_sym
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nobrainer-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Hain
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nobrainer
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
rubygems_version: 3.1.
|
154
|
+
rubygems_version: 3.1.6
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: RSpec matchers for Nobrainer
|