iron_bank 5.0.1 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/iron_bank/local.rb +12 -1
- data/lib/iron_bank/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2f3acd4487a9055c531b900c036ed447a4e927b3d252d402f17c564fa4437a6
|
4
|
+
data.tar.gz: 43527d8b678d5a51fbb8e3a47b29c01e49f2eb5b465f4e4f7448e0c74d40ab26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ded3330ecc633a5132bb893130099e9d87d75c40ece1375359cbfbc7e6066f3b2b6395c3bfd1176a325f657749247f70a77825ddf9e2c7165527122115293a7a
|
7
|
+
data.tar.gz: 71444baba4cb57bd4d81ab1e89499fe37d2d45b4d5e0f7f57d890f3b6854ec4ea5428db7ff0d31a20f09eb6fb791c80bbb1b1b0485942f3e147b5213c9dbec20
|
data/Gemfile.lock
CHANGED
data/lib/iron_bank/local.rb
CHANGED
@@ -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?
|
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
|
data/lib/iron_bank/version.rb
CHANGED
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
|
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-
|
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
|
-
|
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.
|