Skip to content

Commit

Permalink
Updated changelog for 0.12.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-mladenovic committed Oct 24, 2019
1 parent 887cb64 commit 4ab2326
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0
5.1
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
All changes to this project will be documented in this file.

#### 0.x Releases
- `0.12.x` Releases - [0.12.0](#0120)
- `0.11.x` Releases - [0.11.0](#0110)
- `0.10.x` Releases - [0.10.0](#0100)
- `0.9.x` Releases - [0.9.0](#090)
Expand All @@ -17,6 +18,21 @@ All changes to this project will be documented in this file.

---

## [0.12.0](https://github.com/commercetools/commercetools-ios-sdk/releases/tag/0.12.0)
Released on 2019-10-24.

#### Added
- Support for Customer Profile in a Specific Store
- Get Customer in a Store
- Create Customer (Sign Up) in a Store
- Authenticate Customer (Sign In) in a Store
- Update Customer in a Store
- Change Customer's Password in a Store
- Reset Customer's Password in a Store
- Verify Customer's Email in a Store
- Delete Customer in a Store
- Ability to set the global store key from the configuration `plist` file.

## [0.11.0](https://github.com/commercetools/commercetools-ios-sdk/releases/tag/0.11.0)
Released on 2019-08-29.

Expand Down
4 changes: 2 additions & 2 deletions Commercetools.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Commercetools"
s.version = "0.11.0"
s.version = "0.12.0"
s.summary = "The e-commerce Swift SDK from commercetools"
s.homepage = "https://github.com/commercetools/commercetools-ios-sdk"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -14,5 +14,5 @@ Pod::Spec.new do |s|
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.2'

s.swift_version = '5.0'
s.swift_version = '5.1'
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
### Requirements

- iOS 10.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 9.0+
- Xcode 11.0+
- Swift 5.1+

### CocoaPods
Expand Down
14 changes: 7 additions & 7 deletions Source/Cart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
query(storeKey: storeKey, predicates: predicates, sort: sort, expansion: expansion, limit: limit, offset: offset, result: result)
} else {
query(predicates: predicates, sort: sort, expansion: expansion, limit: limit, offset: offset, path: Self.path, result: result)
query(predicates: predicates, sort: sort, expansion: expansion, limit: limit, offset: offset, path: path, result: result)
}
}

Expand All @@ -50,7 +50,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
byId(id, storeKey: storeKey, expansion: expansion, result: result)
} else {
byId(id, expansion: expansion, path: Self.path, result: result)
byId(id, expansion: expansion, path: path, result: result)
}
}

Expand All @@ -65,7 +65,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
create(object, storeKey: storeKey, expansion: expansion, result: result)
} else {
create(object, expansion: expansion, path: Self.path, result: result)
create(object, expansion: expansion, path: path, result: result)
}
}

Expand All @@ -80,7 +80,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
create(object, storeKey: storeKey, expansion: expansion, result: result)
} else {
create(object, expansion: expansion, path: Self.path, result: result)
create(object, expansion: expansion, path: path, result: result)
}
}

Expand All @@ -97,7 +97,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
update(id, storeKey: storeKey, actions: actions, expansion: expansion, result: result)
} else {
update(id, actions: actions, expansion: expansion, path: Self.path, result: result)
update(id, actions: actions, expansion: expansion, path: path, result: result)
}

}
Expand All @@ -116,7 +116,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
update(id, storeKey: storeKey, version: version, actions: actions, expansion: expansion, result: result)
} else {
update(id, version: version, actions: actions, expansion: expansion, path: Self.path, result: result)
update(id, version: version, actions: actions, expansion: expansion, path: path, result: result)
}
}

Expand All @@ -134,7 +134,7 @@ public struct Cart: QueryEndpoint, ByIdEndpoint, CreateEndpoint, UpdateEndpoint,
if let storeKey = Config.currentConfig?.storeKey {
delete(id, storeKey: storeKey, version: version, expansion: expansion, result: result)
} else {
delete(id, version: version, expansion: expansion, path: Self.path, result: result)
delete(id, version: version, expansion: expansion, path: path, result: result)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class Config {
public convenience init?(path: String, loggingEnabled: Bool = true, logLevel: LogLevel = .debug) {
var plistFileName = path
if plistFileName.hasSuffix(".plist") {
plistFileName.removeSubrange(String.Index(encodedOffset: plistFileName.count - 6)...)
plistFileName.removeLast(6)
}

guard let path = Bundle.main.path(forResource: plistFileName, ofType: "plist"),
Expand Down
4 changes: 2 additions & 2 deletions Source/Customer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public class Customer: Endpoint, Codable {
// MARK: - Helpers

private static func customerProfileAction<T: Codable>(method: HTTPMethod, basePath: String? = nil, expansion: [String]? = nil,
storeKeyPathParameter: String?, urlParameters: [String: String] = [:],
json: [String: Any]? = nil, result: @escaping (Result<T>) -> Void) {
storeKeyPathParameter: String?, urlParameters: [String: String] = [:],
json: [String: Any]? = nil, result: @escaping (Result<T>) -> Void) {

requestWithTokenAndPath(result: result) { token, path in
let storeKey = storeKeyPathParameter ?? Config.currentConfig?.storeKey
Expand Down
6 changes: 3 additions & 3 deletions Source/Endpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public extension Endpoint {
guard !relativePath.isEmpty else { return "\(apiUrl)\(projectKey)/" }
var normalizedPath = relativePath
if normalizedPath.hasPrefix("/") {
normalizedPath.remove(at: String.Index(encodedOffset: 0))
normalizedPath.removeFirst()
}
return "\(apiUrl)\(projectKey)/\(normalizedPath)" + (path.hasSuffix("/") ? "" : "/")
}
Expand All @@ -60,7 +60,7 @@ public extension Endpoint {
if let expansion = expansion?.map({ $0.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlPathAllowed) ?? "" }), expansion.count > 0 {
var pathWithExpansion = path
if pathWithExpansion.hasSuffix("/") {
pathWithExpansion.remove(at: String.Index(encodedOffset: pathWithExpansion.count - 1))
pathWithExpansion.removeLast()
}
pathWithExpansion += "?expand=" + expansion.joined(separator: "&expand=")
return pathWithExpansion
Expand Down Expand Up @@ -220,7 +220,7 @@ public extension MLEndpoint {
if let config = Config.currentConfig, let apiUrl = config.machineLearningApiUrl, let projectKey = config.projectKey {
var normalizedPath = path
if normalizedPath.hasPrefix("/") {
normalizedPath.remove(at: String.Index(encodedOffset: 0))
normalizedPath.removeFirst()
}
return "\(apiUrl)\(projectKey)/\(normalizedPath)"
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Info-tvOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.11.0</string>
<string>0.12.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Source/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.11.0</string>
<string>0.12.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
8 changes: 4 additions & 4 deletions Source/Order.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public struct Order: QueryEndpoint, ByIdEndpoint, CreateEndpoint, Codable {
if let storeKey = Config.currentConfig?.storeKey {
query(storeKey: storeKey, predicates: predicates, sort: sort, expansion: expansion, limit: limit, offset: offset, result: result)
} else {
query(predicates: predicates, sort: sort, expansion: expansion, limit: limit, offset: offset, path: Self.path, result: result)
query(predicates: predicates, sort: sort, expansion: expansion, limit: limit, offset: offset, path: path, result: result)
}
}

Expand All @@ -88,7 +88,7 @@ public struct Order: QueryEndpoint, ByIdEndpoint, CreateEndpoint, Codable {
if let storeKey = Config.currentConfig?.storeKey {
byId(id, storeKey: storeKey, expansion: expansion, result: result)
} else {
byId(id, expansion: expansion, path: Self.path, result: result)
byId(id, expansion: expansion, path: path, result: result)
}
}

Expand All @@ -103,7 +103,7 @@ public struct Order: QueryEndpoint, ByIdEndpoint, CreateEndpoint, Codable {
if let storeKey = Config.currentConfig?.storeKey {
create(object, storeKey: storeKey, expansion: expansion, result: result)
} else {
create(object, expansion: expansion, path: Self.path, result: result)
create(object, expansion: expansion, path: path, result: result)
}
}

Expand All @@ -118,7 +118,7 @@ public struct Order: QueryEndpoint, ByIdEndpoint, CreateEndpoint, Codable {
if let storeKey = Config.currentConfig?.storeKey {
create(object, storeKey: storeKey, expansion: expansion, result: result)
} else {
create(object, expansion: expansion, path: Self.path, result: result)
create(object, expansion: expansion, path: path, result: result)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/UpdateEndpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public extension UpdateEndpoint {
public extension JSONRepresentable {
func filterJSON(parameters: [String: Any?]) -> [String: Any]? {
let filteredParameters = parameters.filter({ $0.value != nil })
return filteredParameters
return filteredParameters as [String : Any]
}
}

Expand Down

0 comments on commit 4ab2326

Please sign in to comment.