Skip to content

Commit

Permalink
Merge pull request #962 from watson-developer-cloud/develop
Browse files Browse the repository at this point in the history
Release 2.0.2
  • Loading branch information
Mike Kistler authored Apr 15, 2019
2 parents 9f653e0 + 7dc77b7 commit 747816c
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

## 2.0.2 (https://github.com/watson-developer-cloud/swift-sdk/compare/2.0.1...2.0.2) (2019-04-15)

### Bug Fixes

* core: Look for iam_apikey in credential file with IAM auth (689d748 (https://github.com/watson-developer-cloud/swift-sdk/commit/689d748))
* Fix swiftlint errors (9b12dba (https://github.com/watson-developer-cloud/swift-sdk/commit/9b12dba))

# [2.0.1](https://github.com/watson-developer-cloud/swift-sdk/compare/2.0.0...2.0.1) (2019-04-07)


Expand Down
19 changes: 12 additions & 7 deletions Scripts/travis/publish-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@

set -e

gem install jazzy --silent
if [ "$is_travis" = "TRAVIS" ]; then
gem install jazzy

# Configure Travis to be able to push to the Github repo
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
git remote rm origin
git remote add origin https://watson-developer-cloud:${GH_TOKEN}@github.com/watson-developer-cloud/swift-sdk.git
fi

# Configure Travis to be able to push to the Github repo
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
git remote rm origin
git remote add origin https://watson-developer-cloud:${GH_TOKEN}@github.com/watson-developer-cloud/swift-sdk.git
git fetch
git checkout master
latestVersion=$(git describe --abbrev=0 --tags)
Expand All @@ -20,6 +23,8 @@ latestVersion=$(git describe --abbrev=0 --tags)

# Push newly-generated docs to the gh-pages branch
git checkout --track origin/gh-pages
# Delete old docs
rm -rf css img js services
cp -r gh-pages/* .
rm -rf gh-pages/
git add .
Expand Down
3 changes: 3 additions & 0 deletions Source/SpeechToTextV1/WebSockets/RecognizeCallback.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import Foundation

public struct RecognizeCallback {
/// Allows you to set up callback in application to use microphone streaming results.
public init() {
}

/// Invoked when transcription results are received for a recognition request.
public var onResults: ((SpeechRecognitionResults) -> Void)?
Expand Down
3 changes: 2 additions & 1 deletion Source/SupportingFiles/Shared.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ internal struct Shared {
static let username = "username"
static let password = "password"
static let apiKey = "apikey"
static let iamApiKey = "iam_apikey"
static let iamURL = "iam_url"
static let icpPrefix = "icp-"
}
Expand Down Expand Up @@ -85,7 +86,7 @@ internal struct Shared {
/// Get the auth method based on the provided credentials
static func getAuthMethod(from credentials: [String: String]) -> AuthenticationMethod? {
// Get the appropriate auth method for the provided credentials
if let apiKey = credentials[Constant.apiKey] {
if let apiKey = (credentials[Constant.apiKey] ?? credentials[Constant.iamApiKey]) {
let iamURL = credentials[Constant.iamURL]
return getAuthMethod(apiKey: apiKey, iamURL: iamURL)
} else if let username = credentials[Constant.username],
Expand Down
2 changes: 1 addition & 1 deletion Source/VisualRecognitionV3/VisualRecognition+CoreML.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ extension VisualRecognition {
} else {
classifiedImages = nil
}
var error: WatsonError? = nil
var error: WatsonError?
if !errors.isEmpty {
error = WatsonError.other(message: "Local classification failed: \(errors[0].localizedDescription)", metadata: nil)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/AssistantV1Tests/AssistantTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import XCTest
import Foundation
@testable import AssistantV1
import AssistantV1
import RestKit

class AssistantTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/DiscoveryV1Tests/DiscoveryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import XCTest
import Foundation
@testable import DiscoveryV1
import DiscoveryV1
import RestKit

class DiscoveryTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SpeechToTextV1Tests/SpeechToTextRecognizeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import XCTest
import Foundation
import RestKit
@testable import SpeechToTextV1
import SpeechToTextV1

class SpeechToTextRecognizeTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import XCTest
import Foundation
@testable import VisualRecognitionV3
import VisualRecognitionV3
import RestKit

class VisualRecognitionTests: XCTestCase {
Expand Down

0 comments on commit 747816c

Please sign in to comment.