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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b45ccf4b5c9867e0b0321837c60b9d02132500287e4c7b8da0f4778055f187eb
4
- data.tar.gz: 6bf1974a3a47e6992436a44189cec2d3b0d09111b5db8b9460962395699fd2d1
3
+ metadata.gz: 2335572f0d3ef63bfcf2ffde2ce74aad86b843d8b540fbe891e8a34edb9df9d7
4
+ data.tar.gz: f017cccca468e854956b34382082bd64ad2b211bf78553e60420d34bff99564c
5
5
  SHA512:
6
- metadata.gz: 0b370d94911dc23c85ed636fa8ec498755e9f45dc1c9bbf881fad758f1441b68c166ead9e9011a31835437efcf2cb46b97a5b2ecc4ed1c45e4889ebf32b0e5b7
7
- data.tar.gz: d0a446c18da53056591f581ec613d44727a01269fc8de44001611100c5208457168d89c6a882b4ba7c8aa3b1a8b2e84a77f7bd1e4597b4bc90f4b0fddf3f94e3
6
+ metadata.gz: bb24dda1feaf4fae8aad65b0a8167d43fd5846ec5b1e3f323702a841440904e3e76d13b49dd0d27d875f9cca75a4364fe0708d39f353005985a68ecaea5d213c
7
+ data.tar.gz: '093d5d225e02b7fb37de029f8c949b54f225187384e30231db4ceb0ac71c00f6b1609e488d17f24c2f8ddd2dc916b91fc7c6a78b4c6f56ecfc675bfa448ffdfc'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reso_transport (1.1.0)
4
+ reso_transport (1.2.0)
5
5
  faraday (~> 0.15.0)
6
6
 
7
7
  GEM
@@ -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
- filter_string = ""
120
+ filter_chunks = []
121
121
 
122
122
  if global && global[:criteria]&.any?
123
- filter_string << global[:criteria].join(" #{global[:context]} ")
123
+ filter_chunks << global[:criteria].join(" #{global[:context]} ")
124
124
  end
125
125
 
126
- filter_string << filter_groups.map do |g|
126
+ filter_chunks << filter_groups.map do |g|
127
127
  "(#{g[:criteria].join(" #{g[:context]} ")})"
128
128
  end.join(" and ")
129
129
 
130
- filter_string
130
+ filter_chunks.reject {|c| c == ""}.join(" and ")
131
131
  end
132
132
 
133
133
  def compile_params
@@ -1,3 +1,3 @@
1
1
  module ResoTransport
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
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.2.0
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-04 00:00:00.000000000 Z
11
+ date: 2020-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday