Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Move routes to own pod #2317

Merged
merged 1 commit into from
Oct 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/Systems/AppRouter/AppController+SetupRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import GitHawkRoutes

extension AppController {

Expand Down
1 change: 1 addition & 0 deletions Classes/Systems/AppRouter/AppController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import UIKit
import GitHubSession
import GitHubAPI
import GitHawkRoutes

final class AppController: NSObject, LoginSplashViewControllerDelegate, GitHubSessionListener {

Expand Down
10 changes: 1 addition & 9 deletions Classes/Systems/AppRouter/BookmarkShortcutRoute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@

import Foundation
import GitHubSession

struct BookmarkShortcutRoute: Routable {
static func from(params: [String: String]) -> BookmarkShortcutRoute? {
return BookmarkShortcutRoute()
}
static var path: String {
return "com.githawk.shortcut.bookmark"
}
}
import GitHawkRoutes

extension BookmarkShortcutRoute: RoutePerformable {
func perform(
Expand Down
24 changes: 1 addition & 23 deletions Classes/Systems/AppRouter/IssueNotificationRoute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,7 @@

import Foundation
import GitHubSession

struct IssueNotificationRoute: Routable {
let owner: String
let repo: String
let number: Int
static func from(params: [String: String]) -> IssueNotificationRoute? {
guard let owner = params["owner"],
let repo = params["repo"],
let number = (params["number"] as NSString?)?.integerValue
else { return nil }
return IssueNotificationRoute(owner: owner, repo: repo, number: number)
}
static var path: String {
return "com.githawk.issue-notifications"
}
var encoded: [String: String] {
return [
"owner": owner,
"repo": repo,
"number": "\(number)"
]
}
}
import GitHawkRoutes

extension IssueNotificationRoute: RoutePerformable {
func perform(
Expand Down
10 changes: 1 addition & 9 deletions Classes/Systems/AppRouter/SearchShortcutRoute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@

import UIKit
import GitHubSession

struct SearchShortcutRoute: Routable {
static func from(params: [String: String]) -> SearchShortcutRoute? {
return SearchShortcutRoute()
}
static var path: String {
return "com.githawk.shortcut.search"
}
}
import GitHawkRoutes

extension SearchShortcutRoute: RoutePerformable {
func perform(
Expand Down
15 changes: 1 addition & 14 deletions Classes/Systems/AppRouter/SwitchAccountShortcutRoute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,7 @@

import Foundation
import GitHubSession

struct SwitchAccountShortcutRoute: Routable {
let username: String
static func from(params: [String: String]) -> SwitchAccountShortcutRoute? {
guard let username = params["username"] else { return nil }
return SwitchAccountShortcutRoute(username: username)
}
var encoded: [String: String] {
return ["username": username]
}
static var path: String {
return "com.githawk.shortcut.switch"
}
}
import GitHawkRoutes

extension SwitchAccountShortcutRoute: RoutePerformable {
func perform(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UserNotifications
import GitHawkRoutes

let UNNotificationContentRoutePathKey = "path"

Expand Down
1 change: 1 addition & 0 deletions Classes/Systems/BadgeNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UIKit
import UserNotifications
import GitHubAPI
import GitHubSession
import GitHawkRoutes

final class BadgeNotifications {

Expand Down
1 change: 1 addition & 0 deletions Classes/Systems/ShortcutHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import Foundation
import GitHubSession
import GitHawkRoutes

extension UIApplicationShortcutItem {

Expand Down
8 changes: 4 additions & 4 deletions Freetime.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
290CA76621697A7900DE04F8 /* AppSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA76521697A7900DE04F8 /* AppSplitViewController.swift */; };
290CA768216984F000DE04F8 /* Client+GithubUserSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA767216984F000DE04F8 /* Client+GithubUserSession.swift */; };
290CA76A216AC82700DE04F8 /* SearchShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA769216AC82700DE04F8 /* SearchShortcutRoute.swift */; };
290CA76E216AE8FA00DE04F8 /* Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA76D216AE8FA00DE04F8 /* Routable.swift */; };
290CA770216AE91300DE04F8 /* UITabBarController+SelectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA76F216AE91300DE04F8 /* UITabBarController+SelectType.swift */; };
290CA772216AE93E00DE04F8 /* SwitchAccountShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA771216AE93E00DE04F8 /* SwitchAccountShortcutRoute.swift */; };
290CA774216AE94D00DE04F8 /* BookmarkShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290CA773216AE94D00DE04F8 /* BookmarkShortcutRoute.swift */; };
Expand Down Expand Up @@ -558,7 +557,6 @@
290CA76521697A7900DE04F8 /* AppSplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSplitViewController.swift; sourceTree = "<group>"; };
290CA767216984F000DE04F8 /* Client+GithubUserSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Client+GithubUserSession.swift"; sourceTree = "<group>"; };
290CA769216AC82700DE04F8 /* SearchShortcutRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchShortcutRoute.swift; sourceTree = "<group>"; };
290CA76D216AE8FA00DE04F8 /* Routable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Routable.swift; sourceTree = "<group>"; };
290CA76F216AE91300DE04F8 /* UITabBarController+SelectType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITabBarController+SelectType.swift"; sourceTree = "<group>"; };
290CA771216AE93E00DE04F8 /* SwitchAccountShortcutRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwitchAccountShortcutRoute.swift; sourceTree = "<group>"; };
290CA773216AE94D00DE04F8 /* BookmarkShortcutRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkShortcutRoute.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1109,7 +1107,6 @@
290CA76521697A7900DE04F8 /* AppSplitViewController.swift */,
290CA773216AE94D00DE04F8 /* BookmarkShortcutRoute.swift */,
29A10540216D912F004734A0 /* IssueNotificationRoute.swift */,
290CA76D216AE8FA00DE04F8 /* Routable.swift */,
290CA777216AFAE600DE04F8 /* RoutePerformable.swift */,
290CA769216AC82700DE04F8 /* SearchShortcutRoute.swift */,
290CA771216AE93E00DE04F8 /* SwitchAccountShortcutRoute.swift */,
Expand Down Expand Up @@ -2531,6 +2528,7 @@
"${BUILT_PRODUCTS_DIR}/FLEX/FLEX.framework",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FlatCache/FlatCache.framework",
"${BUILT_PRODUCTS_DIR}/GitHawkRoutes/GitHawkRoutes.framework",
"${BUILT_PRODUCTS_DIR}/GitHubAPI-iOS/GitHubAPI.framework",
"${BUILT_PRODUCTS_DIR}/GitHubSession-iOS/GitHubSession.framework",
"${BUILT_PRODUCTS_DIR}/HTMLString/HTMLString.framework",
Expand Down Expand Up @@ -2562,6 +2560,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FLEX.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FlatCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GitHawkRoutes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GitHubAPI.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GitHubSession.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HTMLString.framework",
Expand Down Expand Up @@ -2663,6 +2662,7 @@
"${BUILT_PRODUCTS_DIR}/FLEX/FLEX.framework",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FlatCache/FlatCache.framework",
"${BUILT_PRODUCTS_DIR}/GitHawkRoutes/GitHawkRoutes.framework",
"${BUILT_PRODUCTS_DIR}/GitHubAPI-iOS/GitHubAPI.framework",
"${BUILT_PRODUCTS_DIR}/GitHubSession-iOS/GitHubSession.framework",
"${BUILT_PRODUCTS_DIR}/HTMLString/HTMLString.framework",
Expand Down Expand Up @@ -2695,6 +2695,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FLEX.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FlatCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GitHawkRoutes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GitHubAPI.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GitHubSession.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HTMLString.framework",
Expand Down Expand Up @@ -2997,7 +2998,6 @@
29D548CB1FA27FE900F8E46F /* UINavigationItem+TitleSubtitle.swift in Sources */,
299A04A11FAE86B0003C2450 /* IssueReviewViewCommentsCell.swift in Sources */,
7BF2239D1F91056C006CC9A2 /* File+Filename.swift in Sources */,
290CA76E216AE8FA00DE04F8 /* Routable.swift in Sources */,
2924C18120D5B29800FCFCFF /* MilestonesViewController.swift in Sources */,
29A1950A1EC78B4800C3E289 /* NotificationType+Icon.swift in Sources */,
29A1950C1EC7901400C3E289 /* NotificationType.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def testing_pods
pod 'ContextMenu', :git => 'https://github.com/GitHawkApp/ContextMenu.git', :branch => 'master'
pod 'cmark-gfm-swift', :git => 'https://github.com/GitHawkApp/cmark-gfm-swift.git', :branch => 'master'
pod 'Squawk', :git => 'https://github.com/GitHawkApp/Squawk.git', :branch => 'master'
pod 'GitHawkRoutes', :git => 'https://github.com/GitHawkApp/GitHawkRoutes.git', :branch => 'master'

# debugging pods
pod 'FLEX', '~> 2.0', :configurations => ['Debug', 'TestFlight']
Expand Down
11 changes: 10 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PODS:
- FMDB (2.7.2):
- FMDB/standard (= 2.7.2)
- FMDB/standard (2.7.2)
- GitHawkRoutes (0.1.0)
- GitHubAPI (0.1.0):
- Alamofire (~> 4.4.0)
- Apollo (~> 0.8.0)
Expand Down Expand Up @@ -70,6 +71,7 @@ DEPENDENCIES:
- FlatCache (from `https://github.com/GitHawkApp/FlatCache.git`, branch `master`)
- FLEX (~> 2.0)
- FMDB
- GitHawkRoutes (from `https://github.com/GitHawkApp/GitHawkRoutes.git`, branch `master`)
- GitHubAPI (from `Local Pods/GitHubAPI`)
- GitHubSession (from `Local Pods/GitHubSession`)
- Highlightr (from `https://github.com/GitHawkApp/Highlightr.git`, branch `master`)
Expand Down Expand Up @@ -122,6 +124,9 @@ EXTERNAL SOURCES:
FlatCache:
:branch: master
:git: https://github.com/GitHawkApp/FlatCache.git
GitHawkRoutes:
:branch: master
:git: https://github.com/GitHawkApp/GitHawkRoutes.git
GitHubAPI:
:path: Local Pods/GitHubAPI
GitHubSession:
Expand Down Expand Up @@ -156,6 +161,9 @@ CHECKOUT OPTIONS:
FlatCache:
:commit: beb697643eea11f40bb66683d1576a2772080d9d
:git: https://github.com/GitHawkApp/FlatCache.git
GitHawkRoutes:
:commit: 33ecf4eaba9f472e307421a5b23a596b2fd93821
:git: https://github.com/GitHawkApp/GitHawkRoutes.git
Highlightr:
:commit: 4f7e90477619b8dc4b9e641efd10952c22150c5c
:git: https://github.com/GitHawkApp/Highlightr.git
Expand Down Expand Up @@ -187,6 +195,7 @@ SPEC CHECKSUMS:
FlatCache: e67d3d45a0f76b93e66883b802051dcbf9d50649
FLEX: bd1a39e55b56bb413b6f1b34b3c10a0dc44ef079
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
GitHawkRoutes: 9cfcc0f40d1971e5ee649e62b1f2c222461698a5
GitHubAPI: 44a907f9699210536d65179d3d0dc0dc70dde7a1
GitHubSession: 60c7bbd84fb915a0bd911a367c9661418ccfd7ae
Highlightr: 70c4df19e4aa55aa1b4387fb98182abce1dec9da
Expand All @@ -206,6 +215,6 @@ SPEC CHECKSUMS:
Tabman: 69ce69b44cec1ad693b82c24cdbdf0c45915668c
TUSafariActivity: afc55a00965377939107ce4fdc7f951f62454546

PODFILE CHECKSUM: cd04a784668fade26d053b1f1a225f3c76449423
PODFILE CHECKSUM: ad1a1bfa60ab2cc8e941a4bddf5239063f1bdeee

COCOAPODS: 1.5.3
25 changes: 25 additions & 0 deletions Pods/GitHawkRoutes/GitHawkRoutes/BookmarkShortcutRoute.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions Pods/GitHawkRoutes/GitHawkRoutes/IssueNotificationRoute.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions Pods/GitHawkRoutes/GitHawkRoutes/SearchShortcutRoute.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions Pods/GitHawkRoutes/GitHawkRoutes/SwitchAccountShortcutRoute.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading