swiftype-enterprise 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/swiftype-enterprise/client.rb +8 -13
- data/lib/swiftype-enterprise/configuration.rb +1 -1
- data/lib/swiftype-enterprise/version.rb +1 -1
- data/spec/client_spec.rb +5 -8
- data/spec/fixtures/vcr/async_create_or_update_document_success.yml +53 -0
- data/spec/fixtures/vcr/destroy_documents_success.yml +53 -0
- data/spec/fixtures/vcr/document_receipts_multiple.yml +53 -0
- data/spec/fixtures/vcr/document_receipts_multiple_complete.yml +24 -74
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13640af8a58d3cb8fef7071820c89d500080ffe6
|
4
|
+
data.tar.gz: 73479440223ab3e6e351e5b22b070900ac773bec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 345e4c21103f21b409192b5244c2a91bbc00b8f9f83d326ff82f096fef09dc56857b659ab042e8763cd59b3e80fe592029966632671f573e7d45a8a1842658e4
|
7
|
+
data.tar.gz: 6d68325da52b1c269835d875530f3ac87ce7755ddc162992b7a52cc57333b10745b791f8a286c79d1bad4e7f3f1d579fcbb58c6b77fb3af1174ce12293c53736
|
@@ -71,6 +71,7 @@ module SwiftypeEnterprise
|
|
71
71
|
#
|
72
72
|
# @return [Array<Hash>] an Array of processed Document Receipt hashes
|
73
73
|
#
|
74
|
+
# @raise [SwiftypeEnterprise::InvalidDocument] when a single document is missing required fields or contains unsupported fields
|
74
75
|
# @raise [Timeout::Error] when timeout expires waiting for receipts
|
75
76
|
def index_documents(content_source_key, documents, options = {})
|
76
77
|
documents = Array(documents).map! { |document| validate_and_normalize_document(document) }
|
@@ -92,6 +93,8 @@ module SwiftypeEnterprise
|
|
92
93
|
# @param [Hash] options additional options
|
93
94
|
#
|
94
95
|
# @return [Array<String>] an Array of Document Receipt IDs pending completion
|
96
|
+
#
|
97
|
+
# @raise [SwiftypeEnterprise::InvalidDocument] when a single document is missing required fields or contains unsupported fields
|
95
98
|
def async_index_documents(content_source_key, documents, options = {})
|
96
99
|
documents = Array(documents).map! { |document| validate_and_normalize_document(document) }
|
97
100
|
|
@@ -116,22 +119,14 @@ module SwiftypeEnterprise
|
|
116
119
|
|
117
120
|
def validate_and_normalize_document(document)
|
118
121
|
document = Utils.stringify_keys(document)
|
119
|
-
|
122
|
+
document_keys = document.keys.to_set
|
123
|
+
missing_keys = REQUIRED_TOP_LEVEL_KEYS - document_keys
|
120
124
|
raise SwiftypeEnterprise::InvalidDocument.new("missing required fields (#{missing_keys.to_a.join(', ')})") if missing_keys.any?
|
121
125
|
|
122
|
-
|
123
|
-
|
124
|
-
body_content = [document.delete('body')]
|
125
|
-
document.each do |key, value|
|
126
|
-
if CORE_TOP_LEVEL_KEYS.include?(key)
|
127
|
-
normalized_document[key] = value
|
128
|
-
else
|
129
|
-
body_content << "#{key}: #{value}"
|
130
|
-
end
|
131
|
-
end
|
132
|
-
normalized_document['body'] = body_content.join("\n")
|
126
|
+
surplus_keys = document_keys - CORE_TOP_LEVEL_KEYS
|
127
|
+
raise SwiftypeEnterprise::InvalidDocument.new("unsupported fields supplied (#{surplus_keys.to_a.join(', ')}), supported fields are (#{CORE_TOP_LEVEL_KEYS.to_a.join(', ')})") if surplus_keys.any?
|
133
128
|
|
134
|
-
|
129
|
+
document
|
135
130
|
end
|
136
131
|
end
|
137
132
|
|
@@ -4,7 +4,7 @@ require 'swiftype-enterprise/version'
|
|
4
4
|
module SwiftypeEnterprise
|
5
5
|
module Configuration
|
6
6
|
DEFAULT_ENDPOINT = "https://api.swiftype.com/api/v1/"
|
7
|
-
DEFAULT_USER_AGENT = "
|
7
|
+
DEFAULT_USER_AGENT = "swiftype-enterprise-ruby/#{SwiftypeEnterprise::VERSION}"
|
8
8
|
|
9
9
|
VALID_OPTIONS_KEYS = [
|
10
10
|
:access_token,
|
data/spec/client_spec.rb
CHANGED
@@ -76,17 +76,14 @@ describe SwiftypeEnterprise::Client do
|
|
76
76
|
documents = [{'external_id'=>'INscMGmhmX4', 'url' => 'http://www.youtube.com/watch?v=v1uyQZNg2vE'}]
|
77
77
|
expect do
|
78
78
|
client.index_documents(content_source_key, documents)
|
79
|
-
end.to raise_error(SwiftypeEnterprise::InvalidDocument)
|
79
|
+
end.to raise_error(SwiftypeEnterprise::InvalidDocument, 'missing required fields (title, body)')
|
80
80
|
end
|
81
81
|
|
82
|
-
it 'should
|
82
|
+
it 'should reject non-core document fields' do
|
83
83
|
documents.first['a_new_field'] = 'some value'
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
expect(response.map { |a| a["status"] }).to eq(["complete", "complete"])
|
88
|
-
end
|
89
|
-
end
|
84
|
+
expect {
|
85
|
+
client.index_documents(content_source_key, documents)
|
86
|
+
}.to raise_error(SwiftypeEnterprise::InvalidDocument, 'unsupported fields supplied (a_new_field), supported fields are (external_id, url, title, body, created_at, updated_at, type)')
|
90
87
|
end
|
91
88
|
end
|
92
89
|
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3002/api/v1/ent/sources/59542d332139de0acacc7dd4/documents/bulk_create.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '[{"external_id":"INscMGmhmX4","url":"http://www.youtube.com/watch?v=v1uyQZNg2vE","title":"The
|
9
|
+
Original Grumpy Cat","body":"this is a test"},{"external_id":"JNDFojsd02","url":"http://www.youtube.com/watch?v=tsdfhk2j","title":"Another
|
10
|
+
Grumpy Cat","body":"this is also a test"}]'
|
11
|
+
headers:
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- SwiftypeEnterprise-Ruby/1.0.0
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
Authorization:
|
21
|
+
- Bearer cGUN-vBokevBhhzyA669
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 202
|
25
|
+
message: Accepted
|
26
|
+
headers:
|
27
|
+
X-Frame-Options:
|
28
|
+
- SAMEORIGIN
|
29
|
+
X-Xss-Protection:
|
30
|
+
- 1; mode=block
|
31
|
+
X-Content-Type-Options:
|
32
|
+
- nosniff
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
Cache-Control:
|
36
|
+
- no-cache
|
37
|
+
Set-Cookie:
|
38
|
+
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWE4NGIxMjQ0YjgzNzYwOWU2NzljZGYyMjkwYzM2ODA4BjsAVA%3D%3D--d0ca869176aa0b9f3d57baf66152897d305fabae;
|
39
|
+
path=/; expires=Mon, 05 Jul 2027 17:52:09 -0000; HttpOnly
|
40
|
+
X-Request-Id:
|
41
|
+
- '09b779a9-1704-46e7-991d-9e92e67b0001'
|
42
|
+
X-Runtime:
|
43
|
+
- '0.115497'
|
44
|
+
Connection:
|
45
|
+
- close
|
46
|
+
Server:
|
47
|
+
- thin 1.5.0 codename Knife
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '{"batch_link":"http://localhost:3002/api/v1/ent/document_receipts/bulk_show?ids=595d27492139de865a19820e%2C595d27492139de865a198210","document_receipts":[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Wed, 05 Jul 2017 17:52:09 GMT
|
53
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3002/api/v1/ent/sources/59542d332139de0acacc7dd4/documents/bulk_destroy.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '["INscMGmhmX4"]'
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- SwiftypeEnterprise-Ruby/1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Authorization:
|
19
|
+
- Bearer cGUN-vBokevBhhzyA669
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Etag:
|
34
|
+
- W/"ab494a471abdde82a270b9d9562b7bb9"
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTQ5ZGE4NjY4ZjZmY2Q2OTM2MGM0OTIyMDFkNmRmMzFlBjsAVA%3D%3D--75e0f9002e5f32100e4814a9dc015ffd43a5b6eb;
|
39
|
+
path=/; expires=Mon, 05 Jul 2027 17:52:12 -0000; HttpOnly
|
40
|
+
X-Request-Id:
|
41
|
+
- ec1754ea-5fa3-474f-87ba-e754e4c62553
|
42
|
+
X-Runtime:
|
43
|
+
- '1.367282'
|
44
|
+
Connection:
|
45
|
+
- close
|
46
|
+
Server:
|
47
|
+
- thin 1.5.0 codename Knife
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '[{"external_id":"INscMGmhmX4","success":true}]'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Wed, 05 Jul 2017 17:52:12 GMT
|
53
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- "*/*"
|
14
|
+
User-Agent:
|
15
|
+
- SwiftypeEnterprise-Ruby/1.0.0
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Authorization:
|
19
|
+
- Bearer cGUN-vBokevBhhzyA669
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Etag:
|
34
|
+
- W/"36a13162024b5c94fb2119b3184343d9"
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTkzNTQyODIzMTc0YTRjZDViYjZlYjA0OWMzY2U1ZjBlBjsAVA%3D%3D--e1d100ba4dab5934527ac0ff12a0ac5daf5156df;
|
39
|
+
path=/; expires=Mon, 05 Jul 2027 17:52:09 -0000; HttpOnly
|
40
|
+
X-Request-Id:
|
41
|
+
- a8fada16-131d-4a45-bc5c-72e0218a17df
|
42
|
+
X-Runtime:
|
43
|
+
- '0.131438'
|
44
|
+
Connection:
|
45
|
+
- close
|
46
|
+
Server:
|
47
|
+
- thin 1.5.0 codename Knife
|
48
|
+
body:
|
49
|
+
encoding: UTF-8
|
50
|
+
string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Wed, 05 Jul 2017 17:52:09 GMT
|
53
|
+
recorded_with: VCR 3.0.3
|
@@ -1,58 +1,8 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://localhost:3002/api/v1/ent/sources/59542d332139de0acacc7dd4/documents/bulk_create.json
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: '[{"external_id":"INscMGmhmX4","url":"http://www.youtube.com/watch?v=v1uyQZNg2vE","title":"The
|
9
|
-
Original Grumpy Cat","body":"this is a test\na_new_field: some value"},{"external_id":"JNDFojsd02","url":"http://www.youtube.com/watch?v=tsdfhk2j","title":"Another
|
10
|
-
Grumpy Cat","body":"this is also a test"}]'
|
11
|
-
headers:
|
12
|
-
Accept-Encoding:
|
13
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
-
Accept:
|
15
|
-
- "*/*"
|
16
|
-
User-Agent:
|
17
|
-
- SwiftypeEnterprise-Ruby/1.0.0
|
18
|
-
Content-Type:
|
19
|
-
- application/json
|
20
|
-
Authorization:
|
21
|
-
- Bearer cGUN-vBokevBhhzyA669
|
22
|
-
response:
|
23
|
-
status:
|
24
|
-
code: 202
|
25
|
-
message: Accepted
|
26
|
-
headers:
|
27
|
-
X-Frame-Options:
|
28
|
-
- SAMEORIGIN
|
29
|
-
X-Xss-Protection:
|
30
|
-
- 1; mode=block
|
31
|
-
X-Content-Type-Options:
|
32
|
-
- nosniff
|
33
|
-
Content-Type:
|
34
|
-
- application/json; charset=utf-8
|
35
|
-
Cache-Control:
|
36
|
-
- no-cache
|
37
|
-
Set-Cookie:
|
38
|
-
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTczZTBhZmUyNGMyMDJiMTAzMWNjZDlkMDY3ODQ2YzcyBjsAVA%3D%3D--c82c5b797014cbda84cdf73408fe2af71a00986c;
|
39
|
-
path=/; expires=Wed, 30 Jun 2027 00:36:47 -0000; HttpOnly
|
40
|
-
X-Request-Id:
|
41
|
-
- 7add3a71-5e8a-4a37-bacc-58b2114be10e
|
42
|
-
X-Runtime:
|
43
|
-
- '1.914340'
|
44
|
-
Connection:
|
45
|
-
- close
|
46
|
-
Server:
|
47
|
-
- thin 1.5.0 codename Knife
|
48
|
-
body:
|
49
|
-
encoding: UTF-8
|
50
|
-
string: '{"batch_link":"http://localhost:3002/api/v1/ent/document_receipts/bulk_show?ids=59559d1d2139deb77b971ae4%2C59559d1e2139deb77b971ae6","document_receipts":[{"id":"59559d1d2139deb77b971ae4","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/59559d1d2139deb77b971ae4"}},{"id":"59559d1e2139deb77b971ae6","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/59559d1e2139deb77b971ae6"}}]}'
|
51
|
-
http_version:
|
52
|
-
recorded_at: Fri, 30 Jun 2017 00:36:47 GMT
|
53
3
|
- request:
|
54
4
|
method: get
|
55
|
-
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=
|
5
|
+
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
|
56
6
|
body:
|
57
7
|
encoding: US-ASCII
|
58
8
|
string: ''
|
@@ -81,28 +31,28 @@ http_interactions:
|
|
81
31
|
Content-Type:
|
82
32
|
- application/json; charset=utf-8
|
83
33
|
Etag:
|
84
|
-
- W/"
|
34
|
+
- W/"36a13162024b5c94fb2119b3184343d9"
|
85
35
|
Cache-Control:
|
86
36
|
- max-age=0, private, must-revalidate
|
87
37
|
Set-Cookie:
|
88
|
-
- _st_main_session=
|
89
|
-
path=/; expires=
|
38
|
+
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJWFiNmUxNjI2YTMyMzViNGEwNjRlZGRkYWIxMTRmMDZkBjsAVA%3D%3D--500b4e7e09c7aa8cd43a00231aa876e1eeb97817;
|
39
|
+
path=/; expires=Mon, 05 Jul 2027 17:52:10 -0000; HttpOnly
|
90
40
|
X-Request-Id:
|
91
|
-
-
|
41
|
+
- 929764cb-27b1-4e72-89f8-336ecef668f3
|
92
42
|
X-Runtime:
|
93
|
-
- '0.
|
43
|
+
- '0.195985'
|
94
44
|
Connection:
|
95
45
|
- close
|
96
46
|
Server:
|
97
47
|
- thin 1.5.0 codename Knife
|
98
48
|
body:
|
99
49
|
encoding: UTF-8
|
100
|
-
string: '[{"id":"
|
50
|
+
string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
|
101
51
|
http_version:
|
102
|
-
recorded_at:
|
52
|
+
recorded_at: Wed, 05 Jul 2017 17:52:10 GMT
|
103
53
|
- request:
|
104
54
|
method: get
|
105
|
-
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=
|
55
|
+
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
|
106
56
|
body:
|
107
57
|
encoding: US-ASCII
|
108
58
|
string: ''
|
@@ -131,28 +81,28 @@ http_interactions:
|
|
131
81
|
Content-Type:
|
132
82
|
- application/json; charset=utf-8
|
133
83
|
Etag:
|
134
|
-
- W/"
|
84
|
+
- W/"36a13162024b5c94fb2119b3184343d9"
|
135
85
|
Cache-Control:
|
136
86
|
- max-age=0, private, must-revalidate
|
137
87
|
Set-Cookie:
|
138
|
-
- _st_main_session=
|
139
|
-
path=/; expires=
|
88
|
+
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTkyMWYxZmY1YmUyYmFkMTZmZWY5ZjViNDQzZjY1ZTYzBjsAVA%3D%3D--07ecadd344a6bff7cac53924f2021d0ea9950cf8;
|
89
|
+
path=/; expires=Mon, 05 Jul 2027 17:52:10 -0000; HttpOnly
|
140
90
|
X-Request-Id:
|
141
|
-
-
|
91
|
+
- 806c4572-464b-413f-8a72-68d2bf9c0419
|
142
92
|
X-Runtime:
|
143
|
-
- '0.
|
93
|
+
- '0.124933'
|
144
94
|
Connection:
|
145
95
|
- close
|
146
96
|
Server:
|
147
97
|
- thin 1.5.0 codename Knife
|
148
98
|
body:
|
149
99
|
encoding: UTF-8
|
150
|
-
string: '[{"id":"
|
100
|
+
string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"pending","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
|
151
101
|
http_version:
|
152
|
-
recorded_at:
|
102
|
+
recorded_at: Wed, 05 Jul 2017 17:52:10 GMT
|
153
103
|
- request:
|
154
104
|
method: get
|
155
|
-
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=
|
105
|
+
uri: http://localhost:3002/api/v1/ent/document_receipts/bulk_show.json?ids=595d27492139de865a19820e,595d27492139de865a198210
|
156
106
|
body:
|
157
107
|
encoding: US-ASCII
|
158
108
|
string: ''
|
@@ -181,23 +131,23 @@ http_interactions:
|
|
181
131
|
Content-Type:
|
182
132
|
- application/json; charset=utf-8
|
183
133
|
Etag:
|
184
|
-
- W/"
|
134
|
+
- W/"a66e0556584fc4e277f2cf614f413938"
|
185
135
|
Cache-Control:
|
186
136
|
- max-age=0, private, must-revalidate
|
187
137
|
Set-Cookie:
|
188
|
-
- _st_main_session=
|
189
|
-
path=/; expires=
|
138
|
+
- _st_main_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiJTE2N2IzMDY4NjY3NWFkMDYyNWM4OGI3OTQ2MDRkNTgxBjsAVA%3D%3D--1110c02d4c67762f709f53e3556a75abdb11c408;
|
139
|
+
path=/; expires=Mon, 05 Jul 2027 17:52:10 -0000; HttpOnly
|
190
140
|
X-Request-Id:
|
191
|
-
-
|
141
|
+
- 9858a835-0799-421e-a860-0b261f685a61
|
192
142
|
X-Runtime:
|
193
|
-
- '0.
|
143
|
+
- '0.452000'
|
194
144
|
Connection:
|
195
145
|
- close
|
196
146
|
Server:
|
197
147
|
- thin 1.5.0 codename Knife
|
198
148
|
body:
|
199
149
|
encoding: UTF-8
|
200
|
-
string: '[{"id":"
|
150
|
+
string: '[{"id":"595d27492139de865a19820e","external_id":"INscMGmhmX4","status":"complete","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a19820e"}},{"id":"595d27492139de865a198210","external_id":"JNDFojsd02","status":"complete","errors":[],"links":{"document_receipt":"http://localhost:3002/api/v1/ent/document_receipts/595d27492139de865a198210"}}]'
|
201
151
|
http_version:
|
202
|
-
recorded_at:
|
152
|
+
recorded_at: Wed, 05 Jul 2017 17:52:10 GMT
|
203
153
|
recorded_with: VCR 3.0.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swiftype-enterprise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quin Hoxie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -89,6 +89,9 @@ files:
|
|
89
89
|
- lib/swiftype-enterprise/version.rb
|
90
90
|
- spec/client_spec.rb
|
91
91
|
- spec/configuration_spec.rb
|
92
|
+
- spec/fixtures/vcr/async_create_or_update_document_success.yml
|
93
|
+
- spec/fixtures/vcr/destroy_documents_success.yml
|
94
|
+
- spec/fixtures/vcr/document_receipts_multiple.yml
|
92
95
|
- spec/fixtures/vcr/document_receipts_multiple_complete.yml
|
93
96
|
- spec/spec_helper.rb
|
94
97
|
- swiftype-enterprise.gemspec
|
@@ -111,12 +114,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
114
|
version: '0'
|
112
115
|
requirements: []
|
113
116
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.6.11
|
115
118
|
signing_key:
|
116
119
|
specification_version: 4
|
117
120
|
summary: Official gem for accessing the Swiftype Enterprise API
|
118
121
|
test_files:
|
119
122
|
- spec/client_spec.rb
|
120
123
|
- spec/configuration_spec.rb
|
124
|
+
- spec/fixtures/vcr/async_create_or_update_document_success.yml
|
125
|
+
- spec/fixtures/vcr/destroy_documents_success.yml
|
126
|
+
- spec/fixtures/vcr/document_receipts_multiple.yml
|
121
127
|
- spec/fixtures/vcr/document_receipts_multiple_complete.yml
|
122
128
|
- spec/spec_helper.rb
|