Skip to content

Commit

Permalink
Merge pull request #978 from watson-developer-cloud/release/july-2019
Browse files Browse the repository at this point in the history
Release/july 2019
  • Loading branch information
jeff-arn authored Jul 31, 2019
2 parents fe0afa7 + bee28d9 commit 8557e66
Show file tree
Hide file tree
Showing 189 changed files with 758 additions and 355 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
- stage: test Linux
script: ./Scripts/travis/test-Linux.sh
os: linux
dist: xenial
- stage: test macOS
script: ./Scripts/travis/test-macOS.sh
os: osx
Expand All @@ -18,4 +19,4 @@ jobs:
- stage: publish documentation
script: ./Scripts/travis/publish-documentation.sh
os: osx
if: branch = master
if: branch = master
34 changes: 27 additions & 7 deletions Scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,45 @@
####################

# the device to build for
DESTINATION="OS=11.4,name=iPhone X"
DESTINATION="OS=12.1,name=iPhone X"

# Build an array of tests to suppress
# this environment variable is set within
# Travis
IFS=","
read -ra SUPPRESS_TEST <<< $TESTS_TO_SUPPRESS
unset IFS

# the schemes to build, which must be invoked from the root directory of the project
SCHEMES=$(xcodebuild -list | awk 'schemes { if (NF>0) { print $1 } } /Schemes:$/ { schemes = 1 }')

####################
# Build and Test
####################

# set a pipeline's return status to the value of the last (rightmost) commmand
# to exit with a non-zero status, or zero if all commands exited successfully
# (required to check status code when using xcpretty)
set -o pipefail

# Make sure RC is not set from the parent environment
unset RC

# build each scheme
for SCHEME in ${SCHEMES}; do
# if the scheme name matches a scheme name that was passed in
# with the command, we want to suppress it
SHOULD_SUPPRESS=false
for SUPPRESSED_TEST_SUITE in ${SUPPRESS_TEST[@]}; do
if [ $SCHEME == $SUPPRESSED_TEST_SUITE ]; then
SHOULD_SUPPRESS=true
fi
done

# if the current scheme matched our suppress schemes
# disable pipefail
# otherwise, enable it
if [ $SHOULD_SUPPRESS == true ]; then
echo "Suppressing test suite errors for $SCHEME"
set +o pipefail
else
set -o pipefail
fi

xcodebuild -scheme "$SCHEME" -destination "$DESTINATION" test | xcpretty || RC=${RC:-$?}
done

Expand Down
10 changes: 4 additions & 6 deletions Scripts/travis/test-Linux.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Run integration tests on Linux

set -e

sudo apt-get -qq update -y
wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz -q
tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz
export PATH=swift-4.1-RELEASE-ubuntu14.04/usr/bin:$PATH
wget https://swift.org/builds/swift-4.2.4-release/ubuntu1604/swift-4.2.4-RELEASE/swift-4.2.4-RELEASE-ubuntu16.04.tar.gz -q
tar xzf swift-4.2.4-RELEASE-ubuntu16.04.tar.gz
export PATH=swift-4.2.4-RELEASE-ubuntu16.04/usr/bin:$PATH

# Decrypt credentials files
openssl aes-256-cbc -K $encrypted_d84ac0b7eb5c_key -iv $encrypted_d84ac0b7eb5c_iv -in Source/SupportingFiles/WatsonCredentials.swift.enc -out Source/SupportingFiles/WatsonCredentials.swift -d
openssl aes-256-cbc -K $encrypted_d84ac0b7eb5c_key -iv $encrypted_d84ac0b7eb5c_iv -in Tests/CompareComplyV1Tests/Resources/cloud-object-storage-credentials-input.json.enc -out Tests/CompareComplyV1Tests/Resources/cloud-object-storage-credentials-input.json -d
openssl aes-256-cbc -K $encrypted_d84ac0b7eb5c_key -iv $encrypted_d84ac0b7eb5c_iv -in Tests/CompareComplyV1Tests/Resources/cloud-object-storage-credentials-output.json.enc -out Tests/CompareComplyV1Tests/Resources/cloud-object-storage-credentials-output.json -d

swift build
# swift test
# swift test
2 changes: 1 addition & 1 deletion Scripts/travis/test-macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ pod repo update master --silent # Gets the latest version of RestKit
carthage bootstrap --platform iOS

./Scripts/pod-lint.sh
# ./Scripts/run-tests.sh
./Scripts/run-tests.sh
7 changes: 5 additions & 2 deletions Source/AssistantV1/Assistant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public class Assistant {

#if !os(Linux)
/**
Allow network requests to a server without verification of the server certificate.
**IMPORTANT**: This should ONLY be used if truly intended, as it is unsafe otherwise.
Allow network requests to a server without verification of the server certificate.
**IMPORTANT**: This should ONLY be used if truly intended, as it is unsafe otherwise.
*/
public func disableSSLVerification() {
session = InsecureConnection.session()
Expand Down Expand Up @@ -162,6 +162,9 @@ public class Assistant {
Get response to user input.

Send user input to a workspace and receive a response.
**Note:** For most applications, there are significant advantages to using the v2 runtime API instead. These
advantages include ease of deployment, automatic state management, versioning, and search capabilities. For more
information, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-api-overview).
There is no rate limit for this operation.

- parameter workspaceID: Unique identifier of the workspace.
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/CaptureGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public struct CaptureGroup: Codable, Equatable {
input text.

- returns: An initialized `CaptureGroup`.
*/
*/
public init(
group: String,
location: [Int]? = nil
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/Context.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2016, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,7 +56,7 @@ public struct Context: Codable, Equatable {
- parameter metadata: Metadata related to the message.

- returns: An initialized `Context`.
*/
*/
public init(
conversationID: String? = nil,
system: SystemResponse? = nil,
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/Counterexample.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2019.
* (C) Copyright IBM Corp. 2017, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,7 +54,7 @@ public struct Counterexample: Codable, Equatable {
- parameter updated: The timestamp for the most recent update to the object.

- returns: An initialized `Counterexample`.
*/
*/
public init(
text: String,
created: Date? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/CreateEntity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public struct CreateEntity: Codable, Equatable {
- parameter values: An array of objects describing the entity values.

- returns: An initialized `CreateEntity`.
*/
*/
public init(
entity: String,
description: String? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/CreateIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public struct CreateIntent: Codable, Equatable {
- parameter examples: An array of user input examples for the intent.

- returns: An initialized `CreateIntent`.
*/
*/
public init(
intent: String,
description: String? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/CreateValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public struct CreateValue: Codable, Equatable {
- parameter updated: The timestamp for the most recent update to the object.

- returns: An initialized `CreateValue`.
*/
*/
public init(
value: String,
metadata: [String: JSON]? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/CreateWorkspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ internal struct CreateWorkspace: Codable, Equatable {
input.

- returns: An initialized `CreateWorkspace`.
*/
*/
public init(
name: String? = nil,
description: String? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/DialogNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public struct DialogNode: Codable, Equatable {
- parameter updated: The timestamp for the most recent update to the object.

- returns: An initialized `DialogNode`.
*/
*/
public init(
dialogNode: String,
description: String? = nil,
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/DialogNodeAction.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2017, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,7 +75,7 @@ public struct DialogNodeAction: Codable, Equatable {
credentials for the action.

- returns: An initialized `DialogNodeAction`.
*/
*/
public init(
name: String,
resultVariable: String,
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/DialogNodeNextStep.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2018, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -128,7 +128,7 @@ public struct DialogNodeNextStep: Codable, Equatable {
- parameter selector: Which part of the dialog node to process next.

- returns: An initialized `DialogNodeNextStep`.
*/
*/
public init(
behavior: String,
dialogNode: String? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/DialogNodeOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public struct DialogNodeOutput: Codable, Equatable {
- parameter modifiers: Options that modify how specified output is handled.

- returns: An initialized `DialogNodeOutput`.
*/
*/
public init(
generic: [DialogNodeOutputGeneric]? = nil,
modifiers: DialogNodeOutputModifiers? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/DialogNodeOutputGeneric.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public struct DialogNodeOutputGeneric: Codable, Equatable {
conversation. Valid only when **reponse_type**=`connect_to_agent`.

- returns: An initialized `DialogNodeOutputGeneric`.
*/
*/
public init(
responseType: String,
values: [DialogNodeOutputTextValuesElement]? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/DialogNodeOutputModifiers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct DialogNodeOutputModifiers: Codable, Equatable {
specified values.

- returns: An initialized `DialogNodeOutputModifiers`.
*/
*/
public init(
overwrite: Bool? = nil
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2018, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,7 @@ public struct DialogNodeOutputOptionsElement: Codable, Equatable {
selects the corresponding option.

- returns: An initialized `DialogNodeOutputOptionsElement`.
*/
*/
public init(
label: String,
value: DialogNodeOutputOptionsElementValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct DialogNodeOutputOptionsElementValue: Codable, Equatable {
to user input** method.

- returns: An initialized `DialogNodeOutputOptionsElementValue`.
*/
*/
public init(
input: MessageInput? = nil,
intents: [RuntimeIntent]? = nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public struct DialogNodeOutputTextValuesElement: Codable, Equatable {
or other special characters, if supported by the channel.

- returns: An initialized `DialogNodeOutputTextValuesElement`.
*/
*/
public init(
text: String? = nil
)
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/DialogNodeVisitedDetails.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2018, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,7 +49,7 @@ public struct DialogNodeVisitedDetails: Codable, Equatable {
- parameter conditions: The conditions that trigger the dialog node.

- returns: An initialized `DialogNodeVisitedDetails`.
*/
*/
public init(
dialogNode: String? = nil,
title: String? = nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public struct DialogRuntimeResponseGeneric: Codable, Equatable {
users.

- returns: An initialized `DialogRuntimeResponseGeneric`.
*/
*/
public init(
responseType: String,
text: String? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/DialogSuggestion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public struct DialogSuggestion: Codable, Equatable {
property is populated using the value of the dialog node's **user_label** property.

- returns: An initialized `DialogSuggestion`.
*/
*/
public init(
label: String,
value: DialogSuggestionValue,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/DialogSuggestionValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct DialogSuggestionValue: Codable, Equatable {
- parameter entities: An array of entities to be sent along with the user input.

- returns: An initialized `DialogSuggestionValue`.
*/
*/
public init(
input: MessageInput? = nil,
intents: [RuntimeIntent]? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/Entity.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2019.
* (C) Copyright IBM Corp. 2016, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/Example.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2019.
* (C) Copyright IBM Corp. 2017, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,7 +60,7 @@ public struct Example: Codable, Equatable {
- parameter updated: The timestamp for the most recent update to the object.

- returns: An initialized `Example`.
*/
*/
public init(
text: String,
mentions: [Mention]? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/Intent.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018, 2019.
* (C) Copyright IBM Corp. 2016, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/Log.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corporation 2019
* (C) Copyright IBM Corp. 2018, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Source/AssistantV1/Models/LogMessage.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2018, 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,7 +58,7 @@ public struct LogMessage: Codable, Equatable {
- parameter msg: The text of the log message.

- returns: An initialized `LogMessage`.
*/
*/
public init(
level: String,
msg: String,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssistantV1/Models/LogPagination.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2018.
* (C) Copyright IBM Corp. 2017, 2018.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 8557e66

Please sign in to comment.