diff --git a/Pods Updater.xcodeproj/project.pbxproj b/Pods Updater.xcodeproj/project.pbxproj index ff417f6..7c94f53 100644 --- a/Pods Updater.xcodeproj/project.pbxproj +++ b/Pods Updater.xcodeproj/project.pbxproj @@ -24,11 +24,11 @@ 50197FEA2024788A0016860D /* CommandViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50197FE92024788A0016860D /* CommandViewController.swift */; }; 502F6814202483C600FFEDF2 /* CommandContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502F6813202483C600FFEDF2 /* CommandContract.swift */; }; 502F6816202483E800FFEDF2 /* CommandPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502F6815202483E800FFEDF2 /* CommandPresenter.swift */; }; - 5043610F20233D8900BC852E /* PodfileContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5043610E20233D8900BC852E /* PodfileContract.swift */; }; - 5043611120233D9400BC852E /* PodfilePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5043611020233D9400BC852E /* PodfilePresenter.swift */; }; + 5043610F20233D8900BC852E /* PodfileFixContract.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5043610E20233D8900BC852E /* PodfileFixContract.swift */; }; + 5043611120233D9400BC852E /* PodfileFixPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5043611020233D9400BC852E /* PodfileFixPresenter.swift */; }; 504361142023565000BC852E /* NSStoryboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504361132023565000BC852E /* NSStoryboard.swift */; }; 5079FA862022710500E752A1 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5079FA852022710500E752A1 /* Error.swift */; }; - 5079FA89202323F600E752A1 /* PodfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5079FA88202323F500E752A1 /* PodfileViewController.swift */; }; + 5079FA89202323F600E752A1 /* PodfileFixViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5079FA88202323F500E752A1 /* PodfileFixViewController.swift */; }; 508DEDE02025EF7F005413D0 /* UserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 508DEDDF2025EF7F005413D0 /* UserDefaults.swift */; }; 50C0652F201F7B4400D7B8D3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C0652E201F7B4400D7B8D3 /* AppDelegate.swift */; }; 50C06531201F7B4400D7B8D3 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C06530201F7B4400D7B8D3 /* HomeViewController.swift */; }; @@ -57,11 +57,11 @@ 50197FE92024788A0016860D /* CommandViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandViewController.swift; sourceTree = ""; }; 502F6813202483C600FFEDF2 /* CommandContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandContract.swift; sourceTree = ""; }; 502F6815202483E800FFEDF2 /* CommandPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandPresenter.swift; sourceTree = ""; }; - 5043610E20233D8900BC852E /* PodfileContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileContract.swift; sourceTree = ""; }; - 5043611020233D9400BC852E /* PodfilePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfilePresenter.swift; sourceTree = ""; }; + 5043610E20233D8900BC852E /* PodfileFixContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileFixContract.swift; sourceTree = ""; }; + 5043611020233D9400BC852E /* PodfileFixPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileFixPresenter.swift; sourceTree = ""; }; 504361132023565000BC852E /* NSStoryboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSStoryboard.swift; sourceTree = ""; }; 5079FA852022710500E752A1 /* Error.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Error.swift; sourceTree = ""; }; - 5079FA88202323F500E752A1 /* PodfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileViewController.swift; sourceTree = ""; }; + 5079FA88202323F500E752A1 /* PodfileFixViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileFixViewController.swift; sourceTree = ""; }; 508DEDDF2025EF7F005413D0 /* UserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaults.swift; sourceTree = ""; }; 50C0652B201F7B4400D7B8D3 /* Pods Updater.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Pods Updater.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 50C0652E201F7B4400D7B8D3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -113,7 +113,7 @@ 50197FE82024785A0016860D /* Command */, 50197FE520236A120016860D /* Custom */, 5043611220233DA300BC852E /* Home */, - 5079FA872023235500E752A1 /* Podfile */, + 5079FA872023235500E752A1 /* PodfileFix */, 50C06534201F7B4400D7B8D3 /* Main.storyboard */, 50131D1920208349008C73B7 /* Windows.swift */, 50131D2220209FEE008C73B7 /* BaseMVP.swift */, @@ -153,14 +153,14 @@ path = Home; sourceTree = ""; }; - 5079FA872023235500E752A1 /* Podfile */ = { + 5079FA872023235500E752A1 /* PodfileFix */ = { isa = PBXGroup; children = ( - 5079FA88202323F500E752A1 /* PodfileViewController.swift */, - 5043610E20233D8900BC852E /* PodfileContract.swift */, - 5043611020233D9400BC852E /* PodfilePresenter.swift */, + 5079FA88202323F500E752A1 /* PodfileFixViewController.swift */, + 5043610E20233D8900BC852E /* PodfileFixContract.swift */, + 5043611020233D9400BC852E /* PodfileFixPresenter.swift */, ); - path = Podfile; + path = PodfileFix; sourceTree = ""; }; 50C06522201F7B4400D7B8D3 = { @@ -339,7 +339,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5043610F20233D8900BC852E /* PodfileContract.swift in Sources */, + 5043610F20233D8900BC852E /* PodfileFixContract.swift in Sources */, 50131D0920206AED008C73B7 /* PodsTableView.swift in Sources */, 50197FEA2024788A0016860D /* CommandViewController.swift in Sources */, 50131D1F20209F79008C73B7 /* HomeContract.swift in Sources */, @@ -355,8 +355,8 @@ 50131D1020206DFA008C73B7 /* DataSource.swift in Sources */, 508DEDE02025EF7F005413D0 /* UserDefaults.swift in Sources */, 50131D252020CCA3008C73B7 /* CommandLine.swift in Sources */, - 5079FA89202323F600E752A1 /* PodfileViewController.swift in Sources */, - 5043611120233D9400BC852E /* PodfilePresenter.swift in Sources */, + 5079FA89202323F600E752A1 /* PodfileFixViewController.swift in Sources */, + 5043611120233D9400BC852E /* PodfileFixPresenter.swift in Sources */, 502F6816202483E800FFEDF2 /* CommandPresenter.swift in Sources */, 50131D0D20206BFB008C73B7 /* Pod.swift in Sources */, 50131D1220206E05008C73B7 /* Repository.swift in Sources */, diff --git a/Pods Updater/AppDelegate.swift b/Pods Updater/AppDelegate.swift index 56f41e1..a27ffe9 100644 --- a/Pods Updater/AppDelegate.swift +++ b/Pods Updater/AppDelegate.swift @@ -23,7 +23,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { } } -// Only used by the PodfileViewController to show save success message since the PodfileViewController is dismissed +// Only used by the PodfileFixViewController to show save success message since the PodfileFixViewController is dismissed // immediately and NotificationCenter needs a delegate to present a Notification when the app is in front. extension AppDelegate: NSUserNotificationCenterDelegate { func userNotificationCenter(_ center: NSUserNotificationCenter, diff --git a/Pods Updater/UI/Base.lproj/Main.storyboard b/Pods Updater/UI/Base.lproj/Main.storyboard index 7954573..afb76d6 100644 --- a/Pods Updater/UI/Base.lproj/Main.storyboard +++ b/Pods Updater/UI/Base.lproj/Main.storyboard @@ -703,10 +703,10 @@ - + - + diff --git a/Pods Updater/UI/Home/HomeViewController.swift b/Pods Updater/UI/Home/HomeViewController.swift index 3172050..8692fcb 100644 --- a/Pods Updater/UI/Home/HomeViewController.swift +++ b/Pods Updater/UI/Home/HomeViewController.swift @@ -119,7 +119,7 @@ extension HomeViewController: HomeContract.View { } func showPodCleanUpResult(_ result: PodFileCleanResult) { - let podfileVC = storyboard!.instantiatePodfileViewController(with: result) + let podfileVC = storyboard!.instantiatePodfileFixViewController(with: result) presentAsModalWindow(podfileVC) } diff --git a/Pods Updater/UI/Podfile/PodfileContract.swift b/Pods Updater/UI/PodfileFix/PodfileFixContract.swift similarity index 51% rename from Pods Updater/UI/Podfile/PodfileContract.swift rename to Pods Updater/UI/PodfileFix/PodfileFixContract.swift index be7a2e4..0934cd0 100644 --- a/Pods Updater/UI/Podfile/PodfileContract.swift +++ b/Pods Updater/UI/PodfileFix/PodfileFixContract.swift @@ -1,5 +1,5 @@ // -// PodfileContract.swift +// PodfileFixContract.swift // Pods Updater // // Created by Kizito Nwose on 01/02/2018. @@ -8,16 +8,16 @@ import Foundation -struct PodfileContract { - typealias View = _PodfileView - typealias Presenter = _PodfilePresenter +struct PodfileFixContract { + typealias View = _PodfileFixView + typealias Presenter = _PodfileFixPresenter } -protocol _PodfileView: BaseContract.View { +protocol _PodfileFixView: BaseContract.View { func showPodfileSaveSuccess() func showPodfileSaveError() } -protocol _PodfilePresenter: BaseContract.Presenter { +protocol _PodfileFixPresenter: BaseContract.Presenter { func updatePodFileWitNewData() } diff --git a/Pods Updater/UI/Podfile/PodfilePresenter.swift b/Pods Updater/UI/PodfileFix/PodfileFixPresenter.swift similarity index 79% rename from Pods Updater/UI/Podfile/PodfilePresenter.swift rename to Pods Updater/UI/PodfileFix/PodfileFixPresenter.swift index 78388d4..e7cf469 100644 --- a/Pods Updater/UI/Podfile/PodfilePresenter.swift +++ b/Pods Updater/UI/PodfileFix/PodfileFixPresenter.swift @@ -1,5 +1,5 @@ // -// PodfilePresenter.swift +// PodfileFixPresenter.swift // Pods Updater // // Created by Kizito Nwose on 01/02/2018. @@ -9,14 +9,14 @@ import Foundation import RxSwift -class PodfilePresenter: PodfileContract.Presenter { +class PodfileFixPresenter: PodfileFixContract.Presenter { - private weak var view : PodfileContract.View? + private weak var view : PodfileFixContract.View? private var disposeBag = DisposeBag() private var source: DataSource var result: PodFileCleanResult - init(view: PodfileContract.View, source: DataSource, result: PodFileCleanResult) { + init(view: PodfileFixContract.View, source: DataSource, result: PodFileCleanResult) { self.source = source self.view = view self.result = result diff --git a/Pods Updater/UI/Podfile/PodfileViewController.swift b/Pods Updater/UI/PodfileFix/PodfileFixViewController.swift similarity index 93% rename from Pods Updater/UI/Podfile/PodfileViewController.swift rename to Pods Updater/UI/PodfileFix/PodfileFixViewController.swift index 1af7e70..126c829 100644 --- a/Pods Updater/UI/Podfile/PodfileViewController.swift +++ b/Pods Updater/UI/PodfileFix/PodfileFixViewController.swift @@ -1,5 +1,5 @@ // -// PodfileViewController.swift +// PodfileFixViewController.swift // Pods Updater // // Created by Kizito Nwose on 01/02/2018. @@ -11,7 +11,7 @@ import Highlightr import RxSwift import RxCocoa -class PodfileViewController: NSViewController { +class PodfileFixViewController: NSViewController { var result: PodFileCleanResult? @IBOutlet weak var themeChoiceButton: NSPopUpButton! @@ -19,7 +19,7 @@ class PodfileViewController: NSViewController { @IBOutlet weak var newPodfileTextView: NSTextView! @IBOutlet weak var saveButton: NSButton! @IBOutlet weak var cancelButton: NSButton! - fileprivate var presenter: PodfileContract.Presenter! + fileprivate var presenter: PodfileFixContract.Presenter! fileprivate let disposeBag = DisposeBag() fileprivate let highlighter = Highlightr() private let writeErrorAert: NSAlert = { @@ -34,7 +34,7 @@ class PodfileViewController: NSViewController { override func viewDidLoad() { super.viewDidLoad() setupViews() - presenter = PodfilePresenter(view: self, source: Repository.instance, result: result!) + presenter = PodfileFixPresenter(view: self, source: Repository.instance, result: result!) } override func viewDidAppear() { @@ -46,8 +46,8 @@ class PodfileViewController: NSViewController { } } -// MARK:- PodfileContract.View -extension PodfileViewController: PodfileContract.View { +// MARK:- PodfileFixContract.View +extension PodfileFixViewController: PodfileFixContract.View { func showPodfileSaveSuccess() { let notification = NSUserNotification() notification.title = "Success!" @@ -67,7 +67,7 @@ extension PodfileViewController: PodfileContract.View { } //MARK: Setup -extension PodfileViewController { +extension PodfileFixViewController { func setupViews() { // Setup buttons first so text view color will match theme button's current selection diff --git a/Pods Updater/Utils/NSStoryboard.swift b/Pods Updater/Utils/NSStoryboard.swift index a7edde2..358d523 100644 --- a/Pods Updater/Utils/NSStoryboard.swift +++ b/Pods Updater/Utils/NSStoryboard.swift @@ -17,15 +17,15 @@ extension NSStoryboard { return vc } - func instantiatePodfileViewController(with result: PodFileCleanResult) -> PodfileViewController { - let vc = instantiateController(withIdentifier: .podfileViewController) as! PodfileViewController + func instantiatePodfileFixViewController(with result: PodFileCleanResult) -> PodfileFixViewController { + let vc = instantiateController(withIdentifier: .podfileFixViewController) as! PodfileFixViewController vc.result = result return vc } } extension NSStoryboard.SceneIdentifier { - public static let podfileViewController = "PodfileViewController" + public static let podfileFixViewController = "PodfileFixViewController" public static let commandViewController = "CommandViewController" }