iron_bank 5.0.1 → 5.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce988cb6ec663ee502438e548d5296014a498838cd64cc17082859e52ccbfe33
4
- data.tar.gz: 8ca42b78ae0f4049d6c38b1409faf11200effcde7b1753ce867c1afab63d4476
3
+ metadata.gz: d2f3acd4487a9055c531b900c036ed447a4e927b3d252d402f17c564fa4437a6
4
+ data.tar.gz: 43527d8b678d5a51fbb8e3a47b29c01e49f2eb5b465f4e4f7448e0c74d40ab26
5
5
  SHA512:
6
- metadata.gz: 394b9e2617481f3e966b34f0dc4af247c478e8b630c15a9d1cca76761bcb05d313a1f1e48321fed58f34fdfe33ef55f1ef32a0acc520c2c2483f2d4ca90b854e
7
- data.tar.gz: 00f0e124269a4a4b7eb9fc8ba9a827a25e69bb3a0e689395f0f38fca0936a68f8756a4d655b99f250ad577a5feff4b83db4921c8a470953fa8831047e30a4c30
6
+ metadata.gz: ded3330ecc633a5132bb893130099e9d87d75c40ece1375359cbfbc7e6066f3b2b6395c3bfd1176a325f657749247f70a77825ddf9e2c7165527122115293a7a
7
+ data.tar.gz: 71444baba4cb57bd4d81ab1e89499fe37d2d45b4d5e0f7f57d890f3b6854ec4ea5428db7ff0d31a20f09eb6fb791c80bbb1b1b0485942f3e147b5213c9dbec20
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_bank (5.0.1)
4
+ iron_bank (5.1.0)
5
5
  faraday (~> 1)
6
6
  faraday_middleware (~> 1)
7
7
  nokogiri (~> 1)
@@ -25,7 +25,9 @@ module IronBank
25
25
 
26
26
  def where(conditions, limit: IronBank::Actions::Query::DEFAULT_ZUORA_LIMIT)
27
27
  records = store.values.select do |record|
28
- conditions.all? { |field, value| record.public_send(field) == value }
28
+ conditions.all? do |field, match_value|
29
+ value_matches?(record.public_send(field), match_value)
30
+ end
29
31
  end
30
32
 
31
33
  records.any? ? records : super
@@ -81,5 +83,14 @@ module IronBank
81
83
  IronBank.configuration.export_directory
82
84
  )
83
85
  end
86
+
87
+ # :reek:UtilityFunction
88
+ def value_matches?(record_value, match_value)
89
+ if match_value.is_a? Array
90
+ match_value.include? record_value
91
+ else
92
+ record_value == match_value
93
+ end
94
+ end
84
95
  end
85
96
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronBank
4
- VERSION = "5.0.1"
4
+ VERSION = "5.1.0"
5
5
  API_VERSION = "v1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Pham
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2020-08-17 00:00:00.000000000 Z
14
+ date: 2020-09-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bump
@@ -352,8 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
352
  - !ruby/object:Gem::Version
353
353
  version: '0'
354
354
  requirements: []
355
- rubyforge_project:
356
- rubygems_version: 2.7.6.2
355
+ rubygems_version: 3.1.3
357
356
  signing_key:
358
357
  specification_version: 4
359
358
  summary: An opinionated Ruby interface to the Zuora API.