appbaseio 0.0.2 → 0.0.3

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: 8d6ce66665f56b8ee3f30b7ac29c3b8923e26eb5
4
- data.tar.gz: bf67752d05ce65f5b7813c5eb2fac2a5720bba16
3
+ metadata.gz: 35eb8d6451b34cb677d332f5798bb39c5925a74e
4
+ data.tar.gz: c65d40b90dce3e118eb5ec65da0842ef9a1f7c04
5
5
  SHA512:
6
- metadata.gz: 16618936dcfe794fd82e1154811df965bf6f6af89198ec866b08138cc006ae52673277ff2507990fa3e09e07cac890ea4bf29dd7c66d5f86e959e79f28a48fd9
7
- data.tar.gz: 73fb69a61133ca4ba1845d8b392b3606096c6e47f813b12887244f19632215ef4f7751a8090c9e2d4acf43fab1facdbe9a8e8975e0beedd77f355b0819903d8e
6
+ metadata.gz: aabcdf83268f40b7831519c4819a9979a61230a3663915dc439f09b3e4b4ec9e5176b1ad2ce36f03f7dfaa75bad5bdd7f93f6c8c7d0e077bb5fabbc2e947ef80
7
+ data.tar.gz: 304dc59ee25b7632c7f3ae80237550c39132cdf7960089606e68eee4974a2a74cde924ceb2e5e7710b3d8291d224d663561116db54d6a25754ee695e494a451e
@@ -0,0 +1,82 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://api.appbase.io/testapp/v2/test_api/notebook/~properties
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"data":{"foo":"some joke"}}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Content-Type:
13
+ - application/json
14
+ Appbase-Secret:
15
+ - c1506ccb1db1ef61dc07f3546decf281
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Access-Control-Allow-Credentials:
26
+ - 'true'
27
+ Cache-Control:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json
31
+ Content-Length:
32
+ - '87'
33
+ Date:
34
+ - Wed, 11 Feb 2015 03:18:56 GMT
35
+ Connection:
36
+ - keep-alive
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"foo":"some joke","timestamp":1423624736692,"_id":"test_api`54d48a22b984f4bd156a7c61"}'
40
+ http_version:
41
+ recorded_at: Fri, 06 Feb 2015 07:12:00 GMT
42
+ - request:
43
+ method: post
44
+ uri: https://api.appbase.io/testapp/v2/test_api/~search
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"query":{"text":"joke","properties":["foo"]}}'
48
+ headers:
49
+ User-Agent:
50
+ - Faraday v0.9.1
51
+ Content-Type:
52
+ - application/json
53
+ Appbase-Secret:
54
+ - c1506ccb1db1ef61dc07f3546decf281
55
+ Accept-Encoding:
56
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
+ Accept:
58
+ - "*/*"
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ Access-Control-Allow-Credentials:
65
+ - 'true'
66
+ Cache-Control:
67
+ - no-cache
68
+ Content-Type:
69
+ - application/json
70
+ Content-Length:
71
+ - '120'
72
+ Date:
73
+ - Wed, 11 Feb 2015 03:18:58 GMT
74
+ Connection:
75
+ - keep-alive
76
+ body:
77
+ encoding: UTF-8
78
+ string: '[{"_id":"test_api`54d48a22b984f4bd156a7c61","timestamp":1423624736692,"rootPath":"test_api/notebook","foo":"some
79
+ joke"}]'
80
+ http_version:
81
+ recorded_at: Fri, 06 Feb 2015 07:12:00 GMT
82
+ recorded_with: VCR 2.9.3
@@ -34,7 +34,7 @@ module Appbaseio
34
34
  def rest_client
35
35
  Faraday.new(url: "https://"+server_host) do |faraday|
36
36
  #faraday.request :url_encoded
37
- faraday.response :logger
37
+ #faraday.response :logger
38
38
  faraday.request :json
39
39
  faraday.response :json
40
40
  faraday.response :mashify
@@ -1,3 +1,3 @@
1
1
  module Appbaseio
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -31,16 +31,13 @@ describe Appbaseio::Client do
31
31
  end
32
32
  end
33
33
 
34
- it "search vertices" do
35
-
36
- end
37
-
38
34
  it "search vertex" do
39
35
  VCR.use_cassette('search vertex') do
40
36
  subject.create_properties vertex: 'notebook', data: {foo: 'some joke'}
41
- resp = subject.read_search data: {query: {text: 'some joke', properties: ["foo"]}}
37
+ resp = subject.read_search data: {query: {text: 'joke', properties: ["foo"]}}
42
38
 
43
- expect(resp.status).to be 204
39
+ expect(resp.status).to be 200
40
+ expect(resp.body[0]).to include "foo" => 'some joke'
44
41
  end
45
42
  end
46
43
  it "create vertex" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appbaseio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ruan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-06 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus
@@ -185,6 +185,7 @@ files:
185
185
  - fixtures/vcr_cassettes/list_all_vertex_in_a_namespace.yml
186
186
  - fixtures/vcr_cassettes/read_edges.yml
187
187
  - fixtures/vcr_cassettes/read_vertex.yml
188
+ - fixtures/vcr_cassettes/search_vertex.yml
188
189
  - lib/appbaseio.rb
189
190
  - lib/appbaseio/auth_middleware.rb
190
191
  - lib/appbaseio/client.rb