reso_transport 1.2.0 → 1.3.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/reso_transport/query.rb +5 -5
- data/lib/reso_transport/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2335572f0d3ef63bfcf2ffde2ce74aad86b843d8b540fbe891e8a34edb9df9d7
|
4
|
+
data.tar.gz: f017cccca468e854956b34382082bd64ad2b211bf78553e60420d34bff99564c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb24dda1feaf4fae8aad65b0a8167d43fd5846ec5b1e3f323702a841440904e3e76d13b49dd0d27d875f9cca75a4364fe0708d39f353005985a68ecaea5d213c
|
7
|
+
data.tar.gz: '093d5d225e02b7fb37de029f8c949b54f225187384e30231db4ceb0ac71c00f6b1609e488d17f24c2f8ddd2dc916b91fc7c6a78b4c6f56ecfc675bfa448ffdfc'
|
data/Gemfile.lock
CHANGED
data/lib/reso_transport/query.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module ResoTransport
|
2
2
|
Query = Struct.new(:resource) do
|
3
3
|
|
4
|
-
def all(&block)
|
4
|
+
def all(*contexts, &block)
|
5
5
|
new_query_context('and')
|
6
6
|
instance_eval(&block)
|
7
7
|
clear_query_context
|
@@ -117,17 +117,17 @@ module ResoTransport
|
|
117
117
|
global = groups.delete(:global)
|
118
118
|
filter_groups = groups.values
|
119
119
|
|
120
|
-
|
120
|
+
filter_chunks = []
|
121
121
|
|
122
122
|
if global && global[:criteria]&.any?
|
123
|
-
|
123
|
+
filter_chunks << global[:criteria].join(" #{global[:context]} ")
|
124
124
|
end
|
125
125
|
|
126
|
-
|
126
|
+
filter_chunks << filter_groups.map do |g|
|
127
127
|
"(#{g[:criteria].join(" #{g[:context]} ")})"
|
128
128
|
end.join(" and ")
|
129
129
|
|
130
|
-
|
130
|
+
filter_chunks.reject {|c| c == ""}.join(" and ")
|
131
131
|
end
|
132
132
|
|
133
133
|
def compile_params
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reso_transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Druse
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|