ibm_watson 0.16.0 → 0.16.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d2c9980960aa7f5e93261dfd84391198197f4191ee2864507e184ee834a0b88
|
4
|
+
data.tar.gz: 987566c62ec16426e87ed44bd7b72bc30950b9ff4118b93c855822ced185f188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aef365e17e9e0eded4dc83e61284921de703d958f7ecc4748765804b160a1ef1980bbb45cf01bb008649cc05bf4b96269cfa0de4d8da3e5259dc064d90312704
|
7
|
+
data.tar.gz: c2ab26dfd878aeea7873a44d7dab5e0827b89af49f58a060b03e939303d39d3dfe63007278b0f40b9bb379551c75f689bfcfbbaf71553672c9b160792137a678
|
data/lib/ibm_watson/version.rb
CHANGED
data/lib/ibm_watson.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require("ibm_cloud_sdk_core")
|
4
|
+
|
3
5
|
# Module for the Watson APIs
|
4
6
|
module IBMWatson
|
7
|
+
ApiException = IBMCloudSdkCore::ApiException
|
8
|
+
DetailedResponse = IBMCloudSdkCore::DetailedResponse
|
9
|
+
IAMTokenManager = IBMCloudSdkCore::IAMTokenManager
|
10
|
+
|
5
11
|
require_relative("./ibm_watson/personality_insights_v3.rb")
|
6
12
|
require_relative("./ibm_watson/tone_analyzer_v3.rb")
|
7
13
|
require_relative("./ibm_watson/assistant_v1.rb")
|
@@ -706,7 +706,7 @@ if !ENV["ASSISTANT_IAM_URL"].nil? && !ENV["ASSISTANT_IAM_APIKEY"].nil?
|
|
706
706
|
begin
|
707
707
|
service.iam_apikey(iam_apikey: "bogus_api_key")
|
708
708
|
service.list_workspaces
|
709
|
-
rescue
|
709
|
+
rescue IBMWatson::ApiException => e
|
710
710
|
assert_equal("Provided API key could not be found", e.info["errorMessage"])
|
711
711
|
error_received = true
|
712
712
|
end
|
@@ -101,7 +101,7 @@ class AssistantV1Test < Minitest::Test
|
|
101
101
|
workspace_id: "boguswid",
|
102
102
|
text: "I want financial advice today."
|
103
103
|
)
|
104
|
-
rescue
|
104
|
+
rescue IBMWatson::ApiException => e
|
105
105
|
assert_equal(error_code, e.code)
|
106
106
|
assert_equal(error_msg, e.error)
|
107
107
|
assert(e.to_s.instance_of?(String))
|
@@ -138,7 +138,7 @@ class AssistantV1Test < Minitest::Test
|
|
138
138
|
workspace_id: "boguswid",
|
139
139
|
text: "I want financial advice today."
|
140
140
|
)
|
141
|
-
rescue
|
141
|
+
rescue IBMWatson::ApiException => e
|
142
142
|
assert_equal(error_code, e.code)
|
143
143
|
assert_equal(error_msg, e.error)
|
144
144
|
end
|
@@ -135,7 +135,7 @@ class ToneAnalyzerV3Test < Minitest::Test
|
|
135
135
|
)
|
136
136
|
begin
|
137
137
|
service.tone(tone_input: text, content_type: "application/json")
|
138
|
-
rescue
|
138
|
+
rescue IBMWatson::ApiException => e
|
139
139
|
assert_equal(error_code, e.code)
|
140
140
|
assert_equal(error_message, e.error)
|
141
141
|
assert_equal("C00012", e.info["sub_code"])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm_watson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Nussbaum
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03
|
11
|
+
date: 2019-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|