ibm_watson 0.16.0 → 0.16.1

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: 6cc1b9f91b2361fcc08435b17ed79e5f7b969e31471fefa78150253b4f1bac00
4
- data.tar.gz: 5f56854edbe1136ba2211bb921efeb640646a38d56f751461c45ae75cd09b7a5
3
+ metadata.gz: 9d2c9980960aa7f5e93261dfd84391198197f4191ee2864507e184ee834a0b88
4
+ data.tar.gz: 987566c62ec16426e87ed44bd7b72bc30950b9ff4118b93c855822ced185f188
5
5
  SHA512:
6
- metadata.gz: cb694116948f8db7a8419428f4b81e2d5ed9244214f6ce336e447fdf0ffe1bfd699cc29e81d1b611aae217961abca06373b53ec133441ad995edbb98522d6097
7
- data.tar.gz: 9100b72cb2b7c7f64948e4a99b0a36f9f8c7e44671a1ee5915121274af995eb97eafcb54abaa845db1dbd94756bfb33f3611fae369e3c3b3e0cfa86000ce4144
6
+ metadata.gz: aef365e17e9e0eded4dc83e61284921de703d958f7ecc4748765804b160a1ef1980bbb45cf01bb008649cc05bf4b96269cfa0de4d8da3e5259dc064d90312704
7
+ data.tar.gz: c2ab26dfd878aeea7873a44d7dab5e0827b89af49f58a060b03e939303d39d3dfe63007278b0f40b9bb379551c75f689bfcfbbaf71553672c9b160792137a678
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IBMWatson
4
- VERSION = "0.16.0"
4
+ VERSION = "0.16.1"
5
5
  end
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 IBMCloudSdkCore::ApiException => e
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 IBMCloudSdkCore::ApiException => e
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 IBMCloudSdkCore::ApiException => e
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 IBMCloudSdkCore::ApiException => e
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.0
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-29 00:00:00.000000000 Z
11
+ date: 2019-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby