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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8a90150d10d89c6e071d2a8c7e65c431c6a3ffae7b1139e847bc04c7e4b9b33
4
- data.tar.gz: 6d5d835082bb4c8334e126d9f1ade2464e4fe4ab5b39f0acccb16101c37c9723
3
+ metadata.gz: a085f3d69d83e7deb6a1278c422ff1d0206884838aba9554567bb33947c2f2ec
4
+ data.tar.gz: 44c49d5de1198e404b47d724bc2d2763bee893067c50a53be3cf3a6076cfb124
5
5
  SHA512:
6
- metadata.gz: e2559568fb6287d1ee256e33418deb69c7d75ea69369683180f610faef63c65c6ef1b4b0ff5d0111905943a0bb04cdab3f9f6b418b4629c678f0e40018ad4112
7
- data.tar.gz: 34575fb6c93099bfa457b1e915ce87834d092fc84c208694d0b44cbd0069706d7f69acb3c57ea596c67239cb0dc6e9ebe8bd15940908d8af02ead0459a03fc1a
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.1...master
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?(Array)
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?(Array)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module NoBrainer
4
4
  module RSpec
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.2'
6
6
  end
7
7
  end
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.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: 2021-02-09 00:00:00.000000000 Z
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.4
154
+ rubygems_version: 3.1.6
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: RSpec matchers for Nobrainer