query-interface-client 1.0.1 → 1.0.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
  SHA1:
3
- metadata.gz: 1de90e97a3cf9d375a5168dca8bb9aeb7363c152
4
- data.tar.gz: 0e829e485816ebefdc72ffb325e79413ee451036
3
+ metadata.gz: 9d2940db3aeda8e9d41919ed35821db3bad58e9e
4
+ data.tar.gz: 2beaf61a03f18c5b92db7003471fb34531db16bb
5
5
  SHA512:
6
- metadata.gz: 21062e0c9e0ccf4d841fccac28d38112fe37ec68db58f6bd6f3055882bf99317f59e15e9ca0a6ee4e3da8e88184c58b3627ef55e679a43346259803d01378398
7
- data.tar.gz: 76dbea21f9561961a0bffa363e8ff8cb8c62877ce01857a65527ca5ed30eb1141ec6cf2ca8ae9aa319ead1628b9aa7524f71f945488748138346e0701d89d582
6
+ metadata.gz: f23ad9afed79d725613140594391b2d8edb6a24babcd5d5eb2ddd170d3f5d7358110c8fb32429abd2a9d24cfd08600e6b464549eb185e15a555d76152e097311
7
+ data.tar.gz: 3ffc93a3916af3fb6369ad971b874d4c2302f765092f30d199d6402d367b743eb7f7f9c68b7aa66fa8f2749a4e9ef06d21ae370e3b0be1c6d2d3d62377cd557d
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gem 'her'
4
+ gem 'json'
4
5
  gem 'will_paginate'
5
6
  gem 'activesupport', require: false
6
7
 
data/Gemfile.lock CHANGED
@@ -22,6 +22,7 @@ GEM
22
22
  faraday (~> 0.8)
23
23
  multi_json (~> 1.7)
24
24
  i18n (0.6.4)
25
+ json (1.8.1)
25
26
  minitest (4.7.5)
26
27
  multi_json (1.7.7)
27
28
  multipart-post (1.2.0)
@@ -50,6 +51,7 @@ DEPENDENCIES
50
51
  activesupport
51
52
  autotest-standalone
52
53
  her
54
+ json
53
55
  rake
54
56
  rspec
55
57
  simplecov
@@ -124,7 +124,7 @@ module QueryInterface
124
124
  end
125
125
 
126
126
  def do_raw_query
127
- self.model.get_raw(:query, transformations: self.transformations)
127
+ self.model.get_raw(:query, transformations: JSON.dump(self.transformations))
128
128
  end
129
129
 
130
130
  def first(*args)
@@ -1,7 +1,7 @@
1
1
  module QueryInterface
2
2
  module Client
3
3
 
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
 
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
+ require 'json'
1
2
  require 'will_paginate/array'
2
-
3
3
  require 'active_support/core_ext/string'
4
4
 
5
5
  require 'query-interface-client/lazy_query'
@@ -155,7 +155,7 @@ describe QueryInterface::Client::LazyQuery do
155
155
  context "without instance set" do
156
156
  before do
157
157
  model.should_receive(:get_raw)
158
- .with(:query, transformations: self.transformations)
158
+ .with(:query, transformations: JSON.dump(self.transformations))
159
159
  .and_return({parsed_data: {data: ["result object"]}})
160
160
  model.stub(:new_collection).and_return(["result object"])
161
161
  end
@@ -250,7 +250,7 @@ describe QueryInterface::Client::LazyQuery do
250
250
  context "do queries" do
251
251
  it "queries the api raw" do
252
252
  query = subject.new(model)
253
- model.should_receive(:get_raw).with(:query, transformations: [])
253
+ model.should_receive(:get_raw).with(:query, transformations: "[]")
254
254
  query.do_raw_query
255
255
  end
256
256
 
@@ -296,7 +296,7 @@ describe QueryInterface::Client::LazyQuery do
296
296
  let(:result) { double("result") }
297
297
  before do
298
298
  model.should_receive(:get_raw)
299
- .with(:query, transformations: self.transformations)
299
+ .with(:query, transformations: JSON.dump(self.transformations))
300
300
  .and_return({parsed_data: {data: ["result object"]}})
301
301
  model.stub(:new_collection).and_return(result)
302
302
  end
@@ -312,7 +312,7 @@ describe QueryInterface::Client::LazyQuery do
312
312
  let(:result) { double("result") }
313
313
  before do
314
314
  model.should_receive(:get_raw)
315
- .with(:query, transformations: self.transformations)
315
+ .with(:query, transformations: JSON.dump(self.transformations))
316
316
  .and_return({parsed_data: {data: ["result object"]}})
317
317
  model.stub(:new_collection).and_return(result)
318
318
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query-interface-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Kopecky <andreas.kopecky@radarservices.com>
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-03 00:00:00.000000000 Z
13
+ date: 2014-02-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: her