Skip to content

Commit

Permalink
Rename Podfile feature to PodfileFix for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
kizitonwose committed Mar 17, 2019
1 parent 0645911 commit bbc5a63
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 39 deletions.
30 changes: 15 additions & 15 deletions Pods Updater.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -57,11 +57,11 @@
50197FE92024788A0016860D /* CommandViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandViewController.swift; sourceTree = "<group>"; };
502F6813202483C600FFEDF2 /* CommandContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandContract.swift; sourceTree = "<group>"; };
502F6815202483E800FFEDF2 /* CommandPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommandPresenter.swift; sourceTree = "<group>"; };
5043610E20233D8900BC852E /* PodfileContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileContract.swift; sourceTree = "<group>"; };
5043611020233D9400BC852E /* PodfilePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfilePresenter.swift; sourceTree = "<group>"; };
5043610E20233D8900BC852E /* PodfileFixContract.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileFixContract.swift; sourceTree = "<group>"; };
5043611020233D9400BC852E /* PodfileFixPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileFixPresenter.swift; sourceTree = "<group>"; };
504361132023565000BC852E /* NSStoryboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSStoryboard.swift; sourceTree = "<group>"; };
5079FA852022710500E752A1 /* Error.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Error.swift; sourceTree = "<group>"; };
5079FA88202323F500E752A1 /* PodfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileViewController.swift; sourceTree = "<group>"; };
5079FA88202323F500E752A1 /* PodfileFixViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodfileFixViewController.swift; sourceTree = "<group>"; };
508DEDDF2025EF7F005413D0 /* UserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaults.swift; sourceTree = "<group>"; };
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 = "<group>"; };
Expand Down Expand Up @@ -113,7 +113,7 @@
50197FE82024785A0016860D /* Command */,
50197FE520236A120016860D /* Custom */,
5043611220233DA300BC852E /* Home */,
5079FA872023235500E752A1 /* Podfile */,
5079FA872023235500E752A1 /* PodfileFix */,
50C06534201F7B4400D7B8D3 /* Main.storyboard */,
50131D1920208349008C73B7 /* Windows.swift */,
50131D2220209FEE008C73B7 /* BaseMVP.swift */,
Expand Down Expand Up @@ -153,14 +153,14 @@
path = Home;
sourceTree = "<group>";
};
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 = "<group>";
};
50C06522201F7B4400D7B8D3 = {
Expand Down Expand Up @@ -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 */,
Expand All @@ -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 */,
Expand Down
2 changes: 1 addition & 1 deletion Pods Updater/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Pods Updater/UI/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,10 @@
</objects>
<point key="canvasLocation" x="134" y="293"/>
</scene>
<!--Podfile View Controller-->
<!--Podfile Fix View Controller-->
<scene sceneID="mYX-zY-0cZ">
<objects>
<viewController identifier="PodfileViewController" storyboardIdentifier="PodfileViewController" id="EeV-ae-hGI" customClass="PodfileViewController" customModule="Pods_Updater" customModuleProvider="target" sceneMemberID="viewController">
<viewController identifier="PodfileFixViewController" storyboardIdentifier="PodfileFixViewController" id="EeV-ae-hGI" customClass="PodfileFixViewController" customModule="Pods_Updater" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="vFU-gr-lJx">
<rect key="frame" x="0.0" y="0.0" width="528" height="424"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down
2 changes: 1 addition & 1 deletion Pods Updater/UI/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// PodfileContract.swift
// PodfileFixContract.swift
// Pods Updater
//
// Created by Kizito Nwose on 01/02/2018.
Expand All @@ -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()
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// PodfilePresenter.swift
// PodfileFixPresenter.swift
// Pods Updater
//
// Created by Kizito Nwose on 01/02/2018.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// PodfileViewController.swift
// PodfileFixViewController.swift
// Pods Updater
//
// Created by Kizito Nwose on 01/02/2018.
Expand All @@ -11,15 +11,15 @@ import Highlightr
import RxSwift
import RxCocoa

class PodfileViewController: NSViewController {
class PodfileFixViewController: NSViewController {

var result: PodFileCleanResult?
@IBOutlet weak var themeChoiceButton: NSPopUpButton!
@IBOutlet weak var oldPodfileTextView: NSTextView!
@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 = {
Expand All @@ -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() {
Expand All @@ -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!"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Pods Updater/Utils/NSStoryboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit bbc5a63

Please sign in to comment.