ibm-watson-ruby 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b4b50c8ea12f50a97ee0b4ae90dda7421fb43a2653dd57fe85339ee13ce3461
4
- data.tar.gz: cd90a74e6e70b997e2ab0d8eb31fbc9a69f3db56d363f05c1d4a216972ad0ead
3
+ metadata.gz: '09f24414ae35c2ca3d88150cf9296e5196de54d1bc8558fe73546eae66819a5d'
4
+ data.tar.gz: 18d25add8a7a2e6fd8962649f55e12ef5b11e42859bb7c4691fd716784d9ebd2
5
5
  SHA512:
6
- metadata.gz: 659a5f47d074988c8625073cfc9a22f63f47bb969035db21587c19a68b1dbc38d375660fb7ace89cfa3a0487e02dddec0c9bc8e4e8f965001ab51cd12a6e1b60
7
- data.tar.gz: '01848851c458b159a1353acebf3451208751ee2da1db787154f3f8e99e04fd0dd182f1d3c6278e9d104f1843c17b1587bb3a93820ca3d47afec3c21e7a1b53b4'
6
+ metadata.gz: 404675a11ff0a78595dfed41029835bcf8aea8bc8f114978fe434a057333e6e4eb3a1486bfcbd3d7a636355935e87ba3424197486672501fcce597e43f7632a3
7
+ data.tar.gz: ca57c5e1a809115532162e90f1a54b8fb2214a8e230e69a0bb07f3a0f4720b74618271de810c358723a6e692ac6e52e99b2404ce8984309d44d5d37d17354583
@@ -60,7 +60,7 @@ module IBMWatson
60
60
  retry_maybe do
61
61
  result = connection.delete(path, *args)
62
62
  verify_http_result(result)
63
- JSON.parse(result.body)
63
+ JSON.parse(result.body) if result.body.present?
64
64
  end
65
65
  end
66
66
 
@@ -52,6 +52,12 @@ module IBMWatson
52
52
  end
53
53
  end
54
54
 
55
+ def delete_example(workspace_id:, intent:, example:)
56
+ handle_timeout do
57
+ delete "workspaces/#{workspace_id}/intents/#{intent}/examples/#{ERB::Util.url_encode(example)}?version=#{QUERY_VERSION}"
58
+ end
59
+ end
60
+
55
61
  def create_example(workspace_id:, intent:, example:)
56
62
  handle_timeout do
57
63
  params = {
@@ -1,3 +1,3 @@
1
1
  module IBMWatson
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -102,4 +102,12 @@ describe IBMWatson::Conversation::Service, record: :once do
102
102
  subject.create_example(workspace_id: workspace_id, intent: intent, example: example)
103
103
  end
104
104
  end
105
+
106
+ describe "#delete_example", record: :all do
107
+ let(:intent) { "anything_else" }
108
+ let(:example) { "You wanted anything else?" }
109
+ example do
110
+ subject.delete_example(workspace_id: workspace_id, intent: intent, example: example)
111
+ end
112
+ end
105
113
  end
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://gateway.watsonplatform.net/conversation/api/v1/workspaces/a6d0e62a-2b11-4e42-9750-238167d13d70/intents/anything_else/examples/You%20wanted%20anything%20else%3F?version=2017-02-03
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json; charset=UTF-8
12
+ Accept:
13
+ - application/json
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ X-Backside-Transport:
20
+ - OK OK
21
+ X-Content-Type-Options:
22
+ - nosniff
23
+ X-Download-Options:
24
+ - noopen
25
+ X-Ratelimit-Reset:
26
+ - '1522450257'
27
+ X-Frame-Options:
28
+ - SAMEORIGIN
29
+ Strict-Transport-Security:
30
+ - max-age=31536000;
31
+ X-Ratelimit-Remaining:
32
+ - '994'
33
+ X-Dns-Prefetch-Control:
34
+ - 'off'
35
+ X-Ratelimit-Limit:
36
+ - '1000'
37
+ X-Xss-Protection:
38
+ - 1; mode=block
39
+ Content-Type:
40
+ - application/json;charset=utf-8
41
+ Server:
42
+ - "-"
43
+ X-Global-Transaction-Id:
44
+ - 7ecac92c5abebc0c19dd6215
45
+ X-Dp-Watson-Tran-Id:
46
+ - gateway01-433938965
47
+ Vary:
48
+ - Accept-Encoding
49
+ Date:
50
+ - Fri, 30 Mar 2018 22:37:00 GMT
51
+ Content-Length:
52
+ - '2'
53
+ Connection:
54
+ - keep-alive
55
+ Set-Cookie:
56
+ - Watson-DPAT=4VAYGVR%2BOA%2BzUY%2FHCCp6zzNafMByvND4IQP%2FVb0SMxIuEYl1JMz9LHAu8KsDmkm9xsLf78siaAxa5NKoH%2FWc8PY%2Bgw3V97Djr70%2F%2BU9rPdhNQxRuO8KAmQhYLRfkprUZY9fdSfe4%2FSqi9m84ALBXAiBND3txgO%2F5yyqmx9mS5N%2B0GkBeMoJiIuOnyYxX2%2Fng99BpR9FDKJ0T777Zr4PMlFctAcOgceAsfaBs3Wvza8AFw%2B2nI3Ey9Vn8qMtAmUVkCHb6rlOUj%2FI1RUnJ4ySj8l%2F%2FuG%2FvijRqfo43d2JXO%2FFxDE7PMEwUXeYulnTJ3v%2FkaL2rP1TD0b1a4IehVn2bgHnCiCVvP5ydzyy9ZLlCS2k3pjBSwMMXMpWcDRAmrIl%2FlxfT4fT%2BAgf291hYGihtp3%2FIImg2duZmymQSjZhUJr8wsWyz1bFhvH7EYsofpjEzJWaYvojFGnnI54DgZPzmDoGYfgOZeZXFzHKJVeCQ9UnrChY323Dkgic8Os%2BjqD1no9CZOjpOOl4JGtzUTlrUphc6bxqUfQX0JdyuxTKCweL8%2BRYzioxxKS456%2BhmAmrqa3CwW6%2BpePQNiF7wtazi%2Frsh8noiuY2JrOGtK4KgY9PpkdpGSZNAqAhzKSm0HczehFkSt0mxlQCUcFO%2B1yhzYiJKobUCz2UpyhMTtrUXv3y0p1y6wvjaFJ%2FTGiwnY%2F32Cv9B4A7kky9TuuJ9Bze0fpiubPDErjXoYriN8%2BiEruZ2mlRvy2u01NUjiRuiAzNUVejtavw9lDy3Yyx01F%2BobJ4qKvkrW1WPjslq7FnQ93TFW65zkx9Nxuq2ZGqZmV1PRCI2J7h1ErAXASPzVto3ikheg2rVq5iobhmFBYpl61B9mer1GGWahGca9IJftDi72u%2FVJE5qfhCk6MxRTdPnKQYhTCEOZmtrqvY7beM%2FyGr628UKZjJdiNXP8F3GTwOXRnLTJQzwgiTrHbfXX6CbEXSwY%2BEu%2FuB8R8JAZNRhYzpMqu3eIUfT%2FntLxEK2CWrBbZCGJviOf%2BGbGwe6QXhiq2EBHBu%2BaMfljGraxQoiDOAgPkJatXfm9j%2BwCN4nRvkrTrP30bO5%2Fn8%3D;
57
+ path=/conversation/api; secure; HttpOnly
58
+ body:
59
+ encoding: UTF-8
60
+ string: "{}"
61
+ http_version:
62
+ recorded_at: Fri, 30 Mar 2018 22:37:00 GMT
63
+ recorded_with: VCR 4.0.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm-watson-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Whillock
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-21 00:00:00.000000000 Z
12
+ date: 2018-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -230,6 +230,7 @@ files:
230
230
  - spec/spec_helper.rb
231
231
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_create_example_.yml
232
232
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_create_workspace_.yml
233
+ - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_delete_example_.yml
233
234
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_delete_workspace_.yml
234
235
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_list_workspaces_.yml
235
236
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_message_.yml
@@ -256,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
257
  version: '0'
257
258
  requirements: []
258
259
  rubyforge_project:
259
- rubygems_version: 2.7.3
260
+ rubygems_version: 2.7.6
260
261
  signing_key:
261
262
  specification_version: 4
262
263
  summary: IBM Watson services in ruby
@@ -267,6 +268,7 @@ test_files:
267
268
  - spec/spec_helper.rb
268
269
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_create_example_.yml
269
270
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_create_workspace_.yml
271
+ - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_delete_example_.yml
270
272
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_delete_workspace_.yml
271
273
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_list_workspaces_.yml
272
274
  - spec/vcr_cassettes/ibm_watson/conversation/service/ibm_watson_conversation_service_message_.yml