Skip to content

Commit

Permalink
Merge pull request #110 from OpenStack-mobile/develop
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
colemancda authored May 23, 2017
2 parents 9c7c00c + 1a13b0e commit 47dd0d9
Show file tree
Hide file tree
Showing 316 changed files with 5,675 additions and 6,102 deletions.
14 changes: 7 additions & 7 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
github "OpenStack-Mobile/SwiftFoundation" "Swift.2.2"
github "PureSwift/JSON" "master"
github "PureSwift/Predicate" "master"
github "OpenStack-Mobile/aerogear-ios-http" "master"
github "OpenStack-Mobile/aerogear-ios-oauth2" "openstack"
github "JonasGessner/JGProgressHUD"
github "OpenStack-Mobile/XLPagerTabStrip" "master"
github "xmartlabs/XLPagerTabStrip"
github "OpenStack-Mobile/SWRevealViewController" "master"
github "OpenStack-Mobile/R.swift.Library" "OpenStack"
github "mac-cain13/R.swift.Library"
github "OpenStack-Mobile/HanekeSwift" "master"
github "OpenStack-Mobile/KTCenterFlowLayout" "master"
github "OpenStack-Mobile/AFHorizontalDayPicker" "master"
github "OpenStack-Mobile/Cosmos" "swift-2.3"
github "OpenStack-Mobile/AHKActionSheet" "master"
github "OpenStack-Mobile/ImageSlideshow" "master"
github "marketplacer/Cosmos"
github "zvonicek/ImageSlideshow"
github "OpenStack-Mobile/XCDYouTubeKit"
github "OpenStack-Mobile/MTDates" "master"
github "OpenStack-mobile/SlackTextViewController"
github "OpenStack-Mobile/SlackTextViewController"
22 changes: 11 additions & 11 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
github "OpenStack-Mobile/AHKActionSheet" "4ac799305b10ac39306dfdf45a359f88c94cc41d"
github "OpenStack-Mobile/Cosmos" "2ee4a896fcbdc915e95bcb7456f996c27492fb34"
github "OpenStack-Mobile/HanekeSwift" "9854d345ecb620299b9c2eb1c2f94cbda6e692d6"
github "OpenStack-Mobile/ImageSlideshow" "38587ee81532ffafff989a18f45cb0be399fa078"
github "marketplacer/Cosmos" "9.0.0"
github "OpenStack-Mobile/HanekeSwift" "e97c06307fd8cd5b3a03875d0950d73db688f2bd"
github "zvonicek/ImageSlideshow" "1.3.0"
github "JonasGessner/JGProgressHUD" "v1.4.1"
github "PureSwift/JSON-C" "cb04249de9ed23ecc5e3ea772a4c6c46f86b3d86"
github "PureSwift/JSON" "e208ddd1df2749d4f2fc5bc2392d8bebd1edafb8"
github "OpenStack-Mobile/KTCenterFlowLayout" "603f33180563cfa4fcab99a0623bbde21e49665b"
github "OpenStack-Mobile/MTDates" "def729947a5f07d6440ce9b97f2761af299bc13c"
github "OpenStack-Mobile/R.swift.Library" "45bfbc29afc2ac9115187a4b4f869339f2447648"
github "AliSoftware/OHHTTPStubs" "6.0.0"
github "PureSwift/Predicate" "36141936dfcacd847f6b5a3a0a08b38e22354576"
github "mac-cain13/R.swift.Library" "v3.0.2"
github "OpenStack-Mobile/SWRevealViewController" "c3113e1508597ee2d9ea7081d97caa5117dddf00"
github "OpenStack-mobile/SlackTextViewController" "v1.9.5"
github "OpenStack-Mobile/SlackTextViewController" "v1.9.5"
github "OpenStack-Mobile/XCDYouTubeKit" "2.5.3"
github "OpenStack-Mobile/XLPagerTabStrip" "dd31ec30fc71d7cd534cf81662b9f1ff3875b7d0"
github "OpenStack-Mobile/aerogear-ios-http" "274b560fbf9fb902fbb329bdbd20a728521fd186"
github "xmartlabs/XLPagerTabStrip" "7.0.0"
github "OpenStack-Mobile/AFHorizontalDayPicker" "74c3521f935039b2b6e945380ecd06752076ec8a"
github "OpenStack-Mobile/SwiftFoundation" "6288d7a238fd503498fd26cf199c17ed3894c508"
github "OpenStack-Mobile/aerogear-ios-oauth2" "8a3a5599adea4586e28f0ac7a1540bbc09af4c8d"
github "OpenStack-Mobile/aerogear-ios-http" "baeeaf6947d1afb58e3235a732b50c5a58923cad"
github "OpenStack-Mobile/aerogear-ios-oauth2" "6a134a2e68ea612960ba10e18524280aa69ca356"
2 changes: 1 addition & 1 deletion OpenStack Summit/CoreSummit/Affiliation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2017 OpenStack. All rights reserved.
//

import struct SwiftFoundation.Date
import struct Foundation.Date

public struct Affiliation: Unique {

Expand Down
14 changes: 7 additions & 7 deletions OpenStack Summit/CoreSummit/AffiliationJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2017 OpenStack. All rights reserved.
//

import SwiftFoundation
import JSON

public extension Affiliation {

Expand All @@ -18,14 +18,14 @@ public extension Affiliation {

extension Affiliation: JSONDecodable {

public init?(JSONValue: JSON.Value) {
public init?(json JSONValue: JSON.Value) {

guard let JSONObject = JSONValue.objectValue,
let identifier = JSONObject[JSONKey.id.rawValue]?.rawValue as? Int,
let identifier = JSONObject[JSONKey.id.rawValue]?.integerValue,
let isCurrent = JSONObject[JSONKey.is_current.rawValue]?.rawValue as? Bool,
let organizationJSON = JSONObject[JSONKey.organization.rawValue],
let organization = AffiliationOrganization(JSONValue: organizationJSON),
let member = JSONObject[JSONKey.owner_id.rawValue]?.rawValue as? Int
let organization = AffiliationOrganization(json: organizationJSON),
let member = JSONObject[JSONKey.owner_id.rawValue]?.integerValue
else { return nil }

self.identifier = identifier
Expand All @@ -35,7 +35,7 @@ extension Affiliation: JSONDecodable {

// optional values

if let startDate = JSONObject[JSONKey.start_date.rawValue]?.rawValue as? Int {
if let startDate = JSONObject[JSONKey.start_date.rawValue]?.integerValue {

self.start = Date(timeIntervalSince1970: TimeInterval(startDate))

Expand All @@ -44,7 +44,7 @@ extension Affiliation: JSONDecodable {
self.start = nil
}

if let endDate = JSONObject[JSONKey.end_date.rawValue]?.rawValue as? Int {
if let endDate = JSONObject[JSONKey.end_date.rawValue]?.integerValue {

self.end = Date(timeIntervalSince1970: TimeInterval(endDate))

Expand Down
20 changes: 10 additions & 10 deletions OpenStack Summit/CoreSummit/AffiliationManagedObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
//

import CoreData
import SwiftFoundation
import Foundation

public final class AffiliationManagedObject: Entity {

@NSManaged public var member: MemberManagedObject

@NSManaged public var start: NSDate?
@NSManaged public var start: Date?

@NSManaged public var end: NSDate?
@NSManaged public var end: Date?

@NSManaged public var isCurrent: Bool

Expand All @@ -26,14 +26,14 @@ extension Affiliation: CoreDataDecodable {

public init(managedObject: AffiliationManagedObject) {

self.identifier = managedObject.identifier
self.identifier = managedObject.id
self.isCurrent = managedObject.isCurrent
self.member = managedObject.member.identifier
self.member = managedObject.member.id
self.organization = AffiliationOrganization(managedObject: managedObject.organization)

if let startDate = managedObject.start {

self.start = Date(foundation: startDate)
self.start = startDate

} else {

Expand All @@ -42,7 +42,7 @@ extension Affiliation: CoreDataDecodable {

if let endDate = managedObject.end {

self.end = Date(foundation: endDate)
self.end = endDate

} else {

Expand All @@ -53,12 +53,12 @@ extension Affiliation: CoreDataDecodable {

extension Affiliation: CoreDataEncodable {

public func save(context: NSManagedObjectContext) throws -> AffiliationManagedObject {
public func save(_ context: NSManagedObjectContext) throws -> AffiliationManagedObject {

let managedObject = try cached(context)

managedObject.start = start?.toFoundation()
managedObject.end = end?.toFoundation()
managedObject.start = start
managedObject.end = end
managedObject.isCurrent = isCurrent
managedObject.member = try context.relationshipFault(member)
managedObject.organization = try context.relationshipFault(organization)
Expand Down
6 changes: 3 additions & 3 deletions OpenStack Summit/CoreSummit/AffiliationOrganizationJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2017 OpenStack. All rights reserved.
//

import SwiftFoundation
import JSON

public extension AffiliationOrganization {

Expand All @@ -18,10 +18,10 @@ public extension AffiliationOrganization {

extension AffiliationOrganization: JSONDecodable {

public init?(JSONValue: JSON.Value) {
public init?(json JSONValue: JSON.Value) {

guard let JSONObject = JSONValue.objectValue,
let identifier = JSONObject[JSONKey.id.rawValue]?.rawValue as? Int,
let identifier = JSONObject[JSONKey.id.rawValue]?.integerValue,
let name = JSONObject[JSONKey.name.rawValue]?.rawValue as? String
else { return nil }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ extension AffiliationOrganization: CoreDataDecodable {

public init(managedObject: AffiliationOrganizationManagedObject) {

self.identifier = managedObject.identifier
self.identifier = managedObject.id
self.name = managedObject.name
}
}

extension AffiliationOrganization: CoreDataEncodable {

public func save(context: NSManagedObjectContext) throws -> AffiliationOrganizationManagedObject {
public func save(_ context: NSManagedObjectContext) throws -> AffiliationOrganizationManagedObject {

let managedObject = try cached(context)

Expand Down
12 changes: 6 additions & 6 deletions OpenStack Summit/CoreSummit/AttendeeJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 OpenStack. All rights reserved.
//

import SwiftFoundation
import JSON

public extension Attendee {

Expand All @@ -18,15 +18,15 @@ public extension Attendee {

extension Attendee: JSONDecodable {

public init?(JSONValue: JSON.Value) {
public init?(json JSONValue: JSON.Value) {

guard let JSONObject = JSONValue.objectValue,
let identifier = JSONObject[JSONKey.id.rawValue]?.rawValue as? Int,
let member = JSONObject[JSONKey.member_id.rawValue]?.rawValue as? Int,
let identifier = JSONObject[JSONKey.id.rawValue]?.integerValue,
let member = JSONObject[JSONKey.member_id.rawValue]?.integerValue,
let scheduledEventsJSONArray = JSONObject[JSONKey.schedule.rawValue]?.arrayValue,
let scheduledEvents = Identifier.fromJSON(scheduledEventsJSONArray),
let scheduledEvents = Identifier.from(json: scheduledEventsJSONArray),
let ticketsJSONArray = JSONObject[JSONKey.tickets.rawValue]?.arrayValue,
let tickets = Identifier.fromJSON(ticketsJSONArray)
let tickets = Identifier.from(json: ticketsJSONArray)
else { return nil }

self.identifier = identifier
Expand Down
6 changes: 3 additions & 3 deletions OpenStack Summit/CoreSummit/AttendeeManagedObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ extension Attendee: CoreDataDecodable {

public init(managedObject: AttendeeManagedObject) {

self.identifier = managedObject.identifier
self.member = managedObject.member.identifier
self.identifier = managedObject.id
self.member = managedObject.member.id
self.tickets = managedObject.tickets.identifiers
self.schedule = managedObject.schedule.identifiers
}
}

extension Attendee: CoreDataEncodable {

public func save(context: NSManagedObjectContext) throws -> AttendeeManagedObject {
public func save(_ context: NSManagedObjectContext) throws -> AttendeeManagedObject {

let managedObject = try cached(context)

Expand Down
13 changes: 2 additions & 11 deletions OpenStack Summit/CoreSummit/CollectionType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@
// Copyright © 2016 OpenStack. All rights reserved.
//

public extension CollectionType {

@inline(__always)
func firstMatching(@noescape predicate: (Self.Generator.Element) throws -> Bool) rethrows -> Self.Generator.Element? {

guard let index = try self.indexOf(predicate)
else { return nil }

return self[index]
}
public extension Collection {

/// Attempt to reduce and convert the contents of the collection to another type.
func reduce<T>(to type: T.Type) -> [T] {
Expand All @@ -32,4 +23,4 @@ public extension CollectionType {

return newTypeArray
}
}
}
8 changes: 4 additions & 4 deletions OpenStack Summit/CoreSummit/CompanyJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 OpenStack. All rights reserved.
//

import SwiftFoundation
import JSON

public extension Company {

Expand All @@ -18,14 +18,14 @@ public extension Company {

extension Company: JSONDecodable {

public init?(JSONValue: JSON.Value) {
public init?(json JSONValue: JSON.Value) {

guard let JSONObject = JSONValue.objectValue,
let identifier = JSONObject[JSONKey.id.rawValue]?.rawValue as? Int,
let identifier = JSONObject[JSONKey.id.rawValue]?.integerValue,
let name = JSONObject[JSONKey.name.rawValue]?.rawValue as? String
else { return nil }

self.identifier = identifier
self.name = name
}
}
}
4 changes: 2 additions & 2 deletions OpenStack Summit/CoreSummit/CompanyManagedObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ extension Company: CoreDataDecodable {

public init(managedObject: CompanyManagedObject) {

self.identifier = managedObject.identifier
self.identifier = managedObject.id
self.name = managedObject.name
}
}

extension Company: CoreDataEncodable {

public func save(context: NSManagedObjectContext) throws -> CompanyManagedObject {
public func save(_ context: NSManagedObjectContext) throws -> CompanyManagedObject {

let managedObject = try cached(context)

Expand Down
Loading

0 comments on commit 47dd0d9

Please sign in to comment.