picky-client 4.2.1 → 4.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ require 'rack'
4
+ require 'picky-client/spec'
5
+
6
+ require 'sinatra'
7
+
8
+ describe Picky::TestClient do
9
+
10
+ class TestApplication < Sinatra::Application
11
+
12
+ get '/some/path' do
13
+ '{"allocations":[["boooookies",0.0,1,[["title","hell","hell"]],[313]]],"offset":0,"duration":0.000584,"total":1}'
14
+ end
15
+
16
+ end
17
+
18
+ let(:client) { described_class.new(TestApplication, :path => '/some/path') }
19
+
20
+ context 'search' do
21
+ it 'does extract the hash' do
22
+ client.search('unimportant').should == { :allocations => [['boooookies', 0.0, 1, [['title', 'hell', 'hell']], [313]]], :offset => 0, :duration => 0.000584, :total => 1 }
23
+ end
24
+ it 'does extend the result with convenience methods' do
25
+ client.search('unimportant').total.should == 1
26
+ end
27
+ end
28
+
29
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 4.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-01 00:00:00.000000000 Z
12
+ date: 2012-02-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yajl-ruby
16
- requirement: &70185706477660 !ruby/object:Gem::Requirement
16
+ requirement: &70094571095540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.7.8
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70185706477660
24
+ version_requirements: *70094571095540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &70185706476620 !ruby/object:Gem::Requirement
27
+ requirement: &70094571093140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 3.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70185706476620
35
+ version_requirements: *70094571093140
36
36
  description: Picky Client
37
37
  email: florian.hanke+picky-client@gmail.com
38
38
  executables: []
@@ -68,6 +68,7 @@ files:
68
68
  - spec/picky-client/convenience_spec.rb
69
69
  - spec/picky-client/extensions/object_spec.rb
70
70
  - spec/picky-client/helper_spec.rb
71
+ - spec/picky-client/spec/test_client_integration_spec.rb
71
72
  - spec/picky-client/spec/test_client_spec.rb
72
73
  homepage: http://floere.github.com/picky
73
74
  licenses: []
@@ -101,4 +102,5 @@ test_files:
101
102
  - spec/picky-client/convenience_spec.rb
102
103
  - spec/picky-client/extensions/object_spec.rb
103
104
  - spec/picky-client/helper_spec.rb
105
+ - spec/picky-client/spec/test_client_integration_spec.rb
104
106
  - spec/picky-client/spec/test_client_spec.rb