Skip to content

Commit

Permalink
Merge pull request #7 from kizitonwose/dev
Browse files Browse the repository at this point in the history
Release version 1.0.3

Co-authored-by:  <shaoxiaof@hotmail.com>
  • Loading branch information
kizitonwose committed Mar 17, 2019
2 parents e9575b1 + 148d589 commit adcb773
Show file tree
Hide file tree
Showing 24 changed files with 324 additions and 151 deletions.
6 changes: 3 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ platform :osx, '10.11'

target 'Pods Updater' do
use_frameworks!
pod 'RxSwift', '4.1.2'
pod 'RxCocoa', '4.1.2'
pod 'Highlightr', '2.0.1'
pod 'RxSwift', '4.4.2'
pod 'RxCocoa', '4.4.2'
pod 'Highlightr', '2.1.0'
end
28 changes: 16 additions & 12 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
PODS:
- Highlightr (2.0.1)
- RxCocoa (4.1.2):
- RxSwift (~> 4.0)
- RxSwift (4.1.2)
- Highlightr (2.1.0)
- RxAtomic (4.4.2)
- RxCocoa (4.4.2):
- RxSwift (>= 4.4.2, ~> 4.4)
- RxSwift (4.4.2):
- RxAtomic (>= 4.4.2, ~> 4.4)

DEPENDENCIES:
- Highlightr (= 2.0.1)
- RxCocoa (= 4.1.2)
- RxSwift (= 4.1.2)
- Highlightr (= 2.1.0)
- RxCocoa (= 4.4.2)
- RxSwift (= 4.4.2)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Highlightr
- RxAtomic
- RxCocoa
- RxSwift

SPEC CHECKSUMS:
Highlightr: 65655134dd0d5e1320afdd8a9d880c9e9dc0b437
RxCocoa: d88ba0f1f6abf040011a9eb4b539324fc426843a
RxSwift: e49536837d9901277638493ea537394d4b55f570
Highlightr: 595f3e100737c8de41113385da8bd0b5b65212c6
RxAtomic: d00e97c10db88c6f08540e0bf2752fc5a2404167
RxCocoa: 477990dc3b4c3ff55fb0ac77e1cc06244e0aaec8
RxSwift: 74c29b693c8e42b0f64400e8b06564575742d649

PODFILE CHECKSUM: 854db6e809c8b5fdb69683c2f2273956d36cb72a
PODFILE CHECKSUM: f9e4eaf4965ce600516e9b1dd618fb323a7e1bf0

COCOAPODS: 1.5.2
COCOAPODS: 1.6.1
69 changes: 40 additions & 29 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 */; };
504361142023565000BC852E /* NSStoryboardExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504361132023565000BC852E /* NSStoryboardExtensions.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>"; };
504361132023565000BC852E /* NSStoryboardExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSStoryboardExtensions.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 All @@ -85,16 +85,26 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
50131D0E20206DCA008C73B7 /* Source */ = {
4650C1AD223D4A33000FA3B3 /* Utils */ = {
isa = PBXGroup;
children = (
504361132023565000BC852E /* NSStoryboard.swift */,
508DEDDF2025EF7F005413D0 /* UserDefaults.swift */,
50131D15202070E8008C73B7 /* Extensions.swift */,
);
path = Utils;
sourceTree = "<group>";
};
50131D0E20206DCA008C73B7 /* Data */ = {
isa = PBXGroup;
children = (
50131D242020CCA3008C73B7 /* CommandLine.swift */,
50131D0C20206BFB008C73B7 /* Pod.swift */,
50131D0F20206DFA008C73B7 /* DataSource.swift */,
50131D1120206E05008C73B7 /* Repository.swift */,
5079FA852022710500E752A1 /* Error.swift */,
508DEDDF2025EF7F005413D0 /* UserDefaults.swift */,
);
path = Source;
path = Data;
sourceTree = "<group>";
};
50131D1B20208EAB008C73B7 /* UI */ = {
Expand All @@ -103,11 +113,10 @@
50197FE82024785A0016860D /* Command */,
50197FE520236A120016860D /* Custom */,
5043611220233DA300BC852E /* Home */,
5079FA872023235500E752A1 /* Podfile */,
5079FA872023235500E752A1 /* PodfileFix */,
50C06534201F7B4400D7B8D3 /* Main.storyboard */,
50131D1920208349008C73B7 /* Windows.swift */,
50131D2220209FEE008C73B7 /* BaseMVP.swift */,
504361132023565000BC852E /* NSStoryboardExtensions.swift */,
);
path = UI;
sourceTree = "<group>";
Expand Down Expand Up @@ -144,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 All @@ -176,13 +185,12 @@
isa = PBXGroup;
children = (
50131D1B20208EAB008C73B7 /* UI */,
50131D0E20206DCA008C73B7 /* Source */,
50131D0E20206DCA008C73B7 /* Data */,
4650C1AD223D4A33000FA3B3 /* Utils */,
50C0652E201F7B4400D7B8D3 /* AppDelegate.swift */,
50C06532201F7B4400D7B8D3 /* Assets.xcassets */,
50C06537201F7B4400D7B8D3 /* Info.plist */,
50C06538201F7B4400D7B8D3 /* Pods_Updater.entitlements */,
50131D15202070E8008C73B7 /* Extensions.swift */,
50131D242020CCA3008C73B7 /* CommandLine.swift */,
);
path = "Pods Updater";
sourceTree = "<group>";
Expand Down Expand Up @@ -238,6 +246,7 @@
TargetAttributes = {
50C0652A201F7B4400D7B8D3 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1010;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
Expand Down Expand Up @@ -287,20 +296,22 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Pods Updater/Pods-Pods Updater-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-Pods Updater/Pods-Pods Updater-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Highlightr/Highlightr.framework",
"${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Highlightr.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Pods Updater/Pods-Pods Updater-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Pods Updater/Pods-Pods Updater-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6CCF8D0DC9E47F931A852CC0 /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -328,24 +339,24 @@
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 */,
50131D1A20208349008C73B7 /* Windows.swift in Sources */,
5079FA862022710500E752A1 /* Error.swift in Sources */,
50197FE720236A430016860D /* SynchronizedScrollView.swift in Sources */,
50131D2320209FEE008C73B7 /* BaseMVP.swift in Sources */,
504361142023565000BC852E /* NSStoryboardExtensions.swift in Sources */,
504361142023565000BC852E /* NSStoryboard.swift in Sources */,
50C06531201F7B4400D7B8D3 /* HomeViewController.swift in Sources */,
50C0652F201F7B4400D7B8D3 /* AppDelegate.swift in Sources */,
502F6814202483C600FFEDF2 /* CommandContract.swift in Sources */,
50131D2120209F86008C73B7 /* HomePresenter.swift in Sources */,
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 Expand Up @@ -490,7 +501,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = com.kizitonwose.podsupdater;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -507,7 +518,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = com.kizitonwose.podsupdater;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "50C0652A201F7B4400D7B8D3"
BuildableName = "Pods Updater.app"
BlueprintName = "Pods Updater"
ReferencedContainer = "container:Pods Updater.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "50C0652A201F7B4400D7B8D3"
BuildableName = "Pods Updater.app"
BlueprintName = "Pods Updater"
ReferencedContainer = "container:Pods Updater.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "50C0652A201F7B4400D7B8D3"
BuildableName = "Pods Updater.app"
BlueprintName = "Pods Updater"
ReferencedContainer = "container:Pods Updater.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "50C0652A201F7B4400D7B8D3"
BuildableName = "Pods Updater.app"
BlueprintName = "Pods Updater"
ReferencedContainer = "container:Pods Updater.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
8 changes: 6 additions & 2 deletions Pods Updater/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
return true
}

func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
}

// Only used by the PodfileViewController to show save success message since the PodfileViewController is dismissed
// immediately and NotificationCenter needs a delegate to present a Notification when the app is in front.
// 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,
shouldPresent notification: NSUserNotification) -> Bool {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import RxSwift

protocol DataSource {
func findVersionsForPodfile(at url: URL, onlyNew: Bool) -> Observable<ProgressResult<PodfileVersionCheckResult>>
func findVersionsForPodfile(at url: URL) -> Observable<ProgressResult<PodfileVersionCheckResult>>
func getProjectNameForPodfile(at url: URL) -> String
func setVersion(_ version: String, forPod pod: Pod, inPodfile url: URL)
func cleanUpPodfile(at url: URL) -> Single<PodFileCleanResult>
Expand Down
File renamed without changes.
11 changes: 8 additions & 3 deletions Pods Updater/Source/Pod.swift → Pods Updater/Data/Pod.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ public struct Pod: Equatable {
var name = ""
// The line where this pod is declared
var lineIndex = -1
// Holds the line numbers for other declarations of this same pod on the Podfile
// Holds the line numbers for other declarations of this same pod in the
// Podfile(e.g a different target). Used when updating pod versions.
var otherLineIndices = [Int]()
// Current version of this pod
var currentVersion = ""
// Available versions of this pod to choose from
var availableVersions = [String]()
// Versions of this pod to choose from depending on constraints.
// Will contain only newer versions if "show only newer versions" is selected.
// Will be equal to `allVersions` property otherwise.
var selectableVersions = [String]()
// All versions of this pod
var allVersions = [String]()
// If this is a subspec (e.g pod 'EVReflection/Alamofire')
var isSubSpec: Bool {
return name.contains("/")
Expand Down
Loading

0 comments on commit adcb773

Please sign in to comment.