From 0c17d0a6c1cecca50ba6db398d1ed3d550191e48 Mon Sep 17 00:00:00 2001 From: Yuki Nagai Date: Thu, 28 Jul 2016 21:54:00 +0900 Subject: [PATCH] v2.0.0 --- Cartfile | 2 +- Cartfile.resolved | 2 +- Carthage/Checkouts/FileKit/.gitignore | 126 ++- Carthage/Checkouts/FileKit/.swiftlint.yml | 16 +- Carthage/Checkouts/FileKit/Carthage/Build | 1 - .../FileKit/FileKit.playground/Contents.swift | 16 + .../FileKit.playground/contents.xcplayground | 4 + Carthage/Checkouts/FileKit/FileKit.podspec | 2 +- .../FileKit/FileKit.xcodeproj/project.pbxproj | 142 +-- .../xcschemes/FileKit-OSX.xcscheme | 99 --- .../xcschemes/FileKit-iOS.xcscheme | 80 -- .../xcschemes/FileKit-tvOS.xcscheme | 80 -- .../xcschemes/FileKit-watchOS.xcscheme | 80 -- .../xcschemes/FileKitTests.xcscheme | 57 -- Carthage/Checkouts/FileKit/Package.swift | 32 + Carthage/Checkouts/FileKit/README.md | 2 +- .../{FileKit/Core => Sources}/ArrayFile.swift | 0 .../{FileKit/Core => Sources}/DataFile.swift | 2 +- .../{FileKit/Core => Sources}/DataType.swift | 2 +- .../Core => Sources}/DictionaryFile.swift | 0 .../DirectoryEnumerator.swift | 2 +- .../FileKit/Sources/DispatchEvent.swift | 110 +++ .../FileKit/Sources/DispatchWatcher.swift | 353 ++++++++ .../{FileKit/Core => Sources}/File.swift | 29 +- .../{FileKit/Core => Sources}/FileKit.swift | 6 +- .../Core => Sources}/FileKitError.swift | 5 + .../Core => Sources}/FilePermissions.swift | 0 .../Core => Sources}/FileProtection.swift | 6 +- .../Core => Sources}/FileSystemEvent.swift | 1 - .../FileSystemEventStream.swift | 30 +- .../Core => Sources}/FileSystemWatcher.swift | 133 ++- .../{FileKit/Core => Sources}/FileType.swift | 0 .../Image+FileKit.swift | 22 +- .../{FileKit/Core => Sources}/ImageFile.swift | 0 .../NSArray+FileKit.swift | 2 +- .../NSBundle+FileKit.swift | 2 +- .../NSData+FileKit.swift | 4 +- .../NSDictionary+FileKit.swift | 2 +- .../NSString+FileKit.swift | 0 .../{FileKit/Core => Sources}/Operators.swift | 38 +- .../{FileKit/Core => Sources}/Path.swift | 433 +++++++-- .../Process+FileKit.swift | 0 .../FileKit/Sources/RelativePathType.swift | 29 + .../String+FileKit.swift | 4 +- .../{FileKit/Core => Sources}/TextFile.swift | 4 +- .../FileKit/{FileKit => Support}/Info.plist | 0 .../Date+FileKit.swift | 0 .../FileKitTests.swift | 2 +- .../{FileKitTests => Tests}/Info.plist | 0 Carthage/Checkouts/PrettyColors/.gitignore | 28 - Carthage/Checkouts/PrettyColors/.gitmodules | 3 - .../PrettyColors/PrettyColors.podspec | 16 - .../PrettyColors.xcodeproj/project.pbxproj | 819 ------------------ .../contents.xcworkspacedata | 7 - .../xcschemes/PrettyColors Mac.xcscheme | 113 --- .../xcschemes/PrettyColors iOS.xcscheme | 113 --- Carthage/Checkouts/PrettyColors/README.md | 58 -- .../PrettyColors/Source/Color/Color.swift | 21 - .../Source/Color/EightBitColor.swift | 32 - .../PrettyColors/Source/Color/Named.swift | 63 -- .../PrettyColors/Source/Color/Wrap.swift | 275 ------ .../PrettyColors/Source/ECMA 48.swift | 55 -- .../PrettyColors/Source/PrettyColors.h | 12 - .../PrettyColors/Source/StyleParameter.swift | 48 - .../Configuration/Base/Common.xcconfig | 174 ---- .../Base/Configurations/Debug.xcconfig | 43 - .../Base/Configurations/Profile.xcconfig | 27 - .../Base/Configurations/Release.xcconfig | 33 - .../Base/Configurations/Test.xcconfig | 10 - .../Base/Targets/Application.xcconfig | 12 - .../Base/Targets/Framework.xcconfig | 26 - .../Base/Targets/StaticLibrary.xcconfig | 26 - .../Mac OS X/Mac-Application.xcconfig | 15 - .../Configuration/Mac OS X/Mac-Base.xcconfig | 19 - .../Mac OS X/Mac-DynamicLibrary.xcconfig | 18 - .../Mac OS X/Mac-Framework.xcconfig | 11 - .../Mac OS X/Mac-StaticLibrary.xcconfig | 11 - .../Supporting Files/Configuration/README.md | 13 - .../iOS/iOS-Application.xcconfig | 11 - .../Configuration/iOS/iOS-Base.xcconfig | 15 - .../Configuration/iOS/iOS-Framework.xcconfig | 11 - .../iOS/iOS-StaticLibrary.xcconfig | 14 - .../PrettyColors/Supporting Files/Info.plist | 28 - .../PrettyColors/Tests/Equality.swift | 97 --- .../Tests/PrettyColorsTests.swift | 398 --------- .../Tests/Supporting Files/Info.plist | 24 - Example/.gitignore | 2 - Example/Cartfile | 4 - Example/Cartfile.resolved | 4 - Example/Example.xcodeproj/project.pbxproj | 272 ++---- .../contents.xcworkspacedata | 10 - Example/Example/AppDelegate.swift | 2 +- Example/Example/Base.lproj/Main.storyboard | 9 +- .../Settings.bundle/Acknowledgements.plist | 528 +++-------- .../Example/Settings.bundle/LisenceList.plist | 791 ----------------- Example/Example/Settings.bundle/Root.plist | 2 +- Example/Example/ViewController.swift | 2 +- .../LICENSE.md => Example/Licenses/APIKit.txt | 4 +- .../Licenses/Acknowledgements.plist | 8 +- Example/Licenses/Alamofire.txt | 19 + Example/Licenses/JASON.txt | 19 + Example/Licenses/R.swift.txt | 24 + Example/Licenses/RxSwift.txt | 7 + Example/Licenses/SnapKit.txt | 19 + Example/Licenses/SwiftyUserDefaults.txt | 21 + Example/Licenses/Xcode.swift.txt | 21 + Example/Licenses/realm-cocoa.txt | 269 ++++++ Example/Podfile | 5 - Example/Podfile.lock | 13 - README.md | 15 +- Thankios.xcodeproj/project.pbxproj | 188 +--- .../xcshareddata/xcschemes/Thankios.xcscheme | 18 +- .../xcschemes/ThankiosKit.xcscheme | 80 -- Thankios.xcworkspace/contents.xcworkspacedata | 3 - Thankios/Components.plist | 6 - Thankios/main.swift | 3 +- ThankiosKit/Managers/CarthageManager.swift | 42 - ThankiosKit/Managers/CocoaPodsManager.swift | 37 - ThankiosKit/Models/InputForm.swift | 20 - ThankiosKit/Models/Library.swift | 24 - ThankiosKit/Models/Project.swift | 58 -- ThankiosKit/Protocols/ManagerProtocol.swift | 13 - ThankiosKit/ThankiosKit.swift | 43 + ThankiosKitTests/Info.plist | 24 - ThankiosKitTests/ThankiosKitTests.swift | 36 - 125 files changed, 1930 insertions(+), 5396 deletions(-) delete mode 120000 Carthage/Checkouts/FileKit/Carthage/Build create mode 100644 Carthage/Checkouts/FileKit/FileKit.playground/Contents.swift create mode 100644 Carthage/Checkouts/FileKit/FileKit.playground/contents.xcplayground delete mode 100644 Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-OSX.xcscheme delete mode 100644 Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-iOS.xcscheme delete mode 100644 Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-tvOS.xcscheme delete mode 100644 Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-watchOS.xcscheme delete mode 100644 Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKitTests.xcscheme create mode 100644 Carthage/Checkouts/FileKit/Package.swift rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/ArrayFile.swift (100%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/DataFile.swift (96%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/DataType.swift (98%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/DictionaryFile.swift (100%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/DirectoryEnumerator.swift (96%) create mode 100644 Carthage/Checkouts/FileKit/Sources/DispatchEvent.swift create mode 100644 Carthage/Checkouts/FileKit/Sources/DispatchWatcher.swift rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/File.swift (89%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileKit.swift (93%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileKitError.swift (94%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FilePermissions.swift (100%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileProtection.swift (97%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileSystemEvent.swift (99%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileSystemEventStream.swift (98%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileSystemWatcher.swift (82%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/FileType.swift (100%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/Image+FileKit.swift (77%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/ImageFile.swift (100%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/NSArray+FileKit.swift (95%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/NSBundle+FileKit.swift (96%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/NSData+FileKit.swift (91%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/NSDictionary+FileKit.swift (94%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/NSString+FileKit.swift (100%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/Operators.swift (93%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/Path.swift (65%) rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/Process+FileKit.swift (100%) create mode 100644 Carthage/Checkouts/FileKit/Sources/RelativePathType.swift rename Carthage/Checkouts/FileKit/{FileKit/Extensions => Sources}/String+FileKit.swift (96%) rename Carthage/Checkouts/FileKit/{FileKit/Core => Sources}/TextFile.swift (98%) rename Carthage/Checkouts/FileKit/{FileKit => Support}/Info.plist (100%) rename Carthage/Checkouts/FileKit/{FileKitTests => Tests}/Date+FileKit.swift (100%) rename Carthage/Checkouts/FileKit/{FileKitTests => Tests}/FileKitTests.swift (99%) rename Carthage/Checkouts/FileKit/{FileKitTests => Tests}/Info.plist (100%) delete mode 100644 Carthage/Checkouts/PrettyColors/.gitignore delete mode 100644 Carthage/Checkouts/PrettyColors/.gitmodules delete mode 100644 Carthage/Checkouts/PrettyColors/PrettyColors.podspec delete mode 100644 Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.pbxproj delete mode 100644 Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors Mac.xcscheme delete mode 100644 Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors iOS.xcscheme delete mode 100644 Carthage/Checkouts/PrettyColors/README.md delete mode 100644 Carthage/Checkouts/PrettyColors/Source/Color/Color.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Source/Color/EightBitColor.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Source/Color/Named.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Source/Color/Wrap.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Source/ECMA 48.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Source/PrettyColors.h delete mode 100644 Carthage/Checkouts/PrettyColors/Source/StyleParameter.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Common.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Debug.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Profile.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Release.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Test.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Application.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Framework.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/StaticLibrary.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Application.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Base.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-DynamicLibrary.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Framework.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-StaticLibrary.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/README.md delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Application.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Base.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Framework.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-StaticLibrary.xcconfig delete mode 100644 Carthage/Checkouts/PrettyColors/Supporting Files/Info.plist delete mode 100644 Carthage/Checkouts/PrettyColors/Tests/Equality.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Tests/PrettyColorsTests.swift delete mode 100644 Carthage/Checkouts/PrettyColors/Tests/Supporting Files/Info.plist delete mode 100644 Example/.gitignore delete mode 100644 Example/Cartfile delete mode 100644 Example/Cartfile.resolved delete mode 100644 Example/Example.xcworkspace/contents.xcworkspacedata delete mode 100644 Example/Example/Settings.bundle/LisenceList.plist rename Carthage/Checkouts/PrettyColors/LICENSE.md => Example/Licenses/APIKit.txt (93%) rename Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings => Example/Licenses/Acknowledgements.plist (54%) create mode 100644 Example/Licenses/Alamofire.txt create mode 100644 Example/Licenses/JASON.txt create mode 100644 Example/Licenses/R.swift.txt create mode 100644 Example/Licenses/RxSwift.txt create mode 100644 Example/Licenses/SnapKit.txt create mode 100644 Example/Licenses/SwiftyUserDefaults.txt create mode 100644 Example/Licenses/Xcode.swift.txt create mode 100644 Example/Licenses/realm-cocoa.txt delete mode 100644 Example/Podfile delete mode 100644 Example/Podfile.lock delete mode 100644 Thankios.xcodeproj/xcshareddata/xcschemes/ThankiosKit.xcscheme delete mode 100644 ThankiosKit/Managers/CarthageManager.swift delete mode 100644 ThankiosKit/Managers/CocoaPodsManager.swift delete mode 100644 ThankiosKit/Models/InputForm.swift delete mode 100644 ThankiosKit/Models/Library.swift delete mode 100644 ThankiosKit/Models/Project.swift delete mode 100644 ThankiosKit/Protocols/ManagerProtocol.swift create mode 100644 ThankiosKit/ThankiosKit.swift delete mode 100644 ThankiosKitTests/Info.plist delete mode 100644 ThankiosKitTests/ThankiosKitTests.swift diff --git a/Cartfile b/Cartfile index a233a14..4a041cc 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -github "nvzqz/FileKit" "develop" +github "nvzqz/FileKit" github "jdhealy/PrettyColors" diff --git a/Cartfile.resolved b/Cartfile.resolved index 4613fd2..07cc568 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "nvzqz/FileKit" "020e322f586d573668a846a5f2b9eee26beb2ca2" +github "nvzqz/FileKit" "v3.0.0" github "jdhealy/PrettyColors" "v3.0.2" diff --git a/Carthage/Checkouts/FileKit/.gitignore b/Carthage/Checkouts/FileKit/.gitignore index cbc8fdf..4fa7f18 100644 --- a/Carthage/Checkouts/FileKit/.gitignore +++ b/Carthage/Checkouts/FileKit/.gitignore @@ -1,4 +1,5 @@ -# Created by https://www.gitignore.io/api/xcode,appcode,osx + +# Created by https://www.gitignore.io/api/xcode,appcode,swift,osx ### Xcode ### # Xcode @@ -7,7 +8,7 @@ ## Build generated build/ -DerivedData +DerivedData/ ## Various settings *.pbxuser @@ -18,44 +19,41 @@ DerivedData !default.mode2v3 *.perspectivev3 !default.perspectivev3 -xcuserdata +xcuserdata/ ## Other -*.xccheckout *.moved-aside -*.xcuserstate +*.xccheckout +*.xcscmblueprint ### AppCode ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio - -*.iml - -## Directory-based project format: -.idea/ -# if you remove the above rule, at least ignore the following: +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff: -# .idea/workspace.xml -# .idea/tasks.xml -# .idea/dictionaries +.idea/workspace.xml +.idea/tasks.xml +.idea/dictionaries +.idea/vcs.xml +.idea/jsLibraryMappings.xml # Sensitive or high-churn files: -# .idea/dataSources.ids -# .idea/dataSources.xml -# .idea/sqlDataSources.xml -# .idea/dynamic.xml -# .idea/uiDesigner.xml +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml # Gradle: -# .idea/gradle.xml -# .idea/libraries +.idea/gradle.xml +.idea/libraries # Mongo Explorer plugin: -# .idea/mongoSettings.xml +.idea/mongoSettings.xml ## File-based project format: -*.ipr *.iws ## Plugin-specific files: @@ -73,6 +71,81 @@ atlassian-ide-plugin.xml com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties +fabric.properties + +### AppCode Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml + + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output ### OSX ### @@ -81,8 +154,7 @@ crashlytics-build.properties .LSOverride # Icon must end with two \r -Icon - +Icon # Thumbnails ._* @@ -94,6 +166,7 @@ Icon .TemporaryItems .Trashes .VolumeIcon.icns +.com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB @@ -101,3 +174,4 @@ Icon Network Trash Folder Temporary Items .apdisk + diff --git a/Carthage/Checkouts/FileKit/.swiftlint.yml b/Carthage/Checkouts/FileKit/.swiftlint.yml index e26752b..40b3542 100644 --- a/Carthage/Checkouts/FileKit/.swiftlint.yml +++ b/Carthage/Checkouts/FileKit/.swiftlint.yml @@ -1,13 +1,17 @@ +included: + - Sources + # rule identifiers to exclude from running disabled_rules: -- trailing_newline -- trailing_whitespace -- valid_docs + - valid_docs + - function_body_length + - cyclomatic_complexity + - variable_name # some rules are only opt-in opt_in_rules: -- empty_count -- missing_docs + - empty_count + - missing_docs # configurable rules can be customized from this configuration file -line_length: 200 \ No newline at end of file +line_length: 200 diff --git a/Carthage/Checkouts/FileKit/Carthage/Build b/Carthage/Checkouts/FileKit/Carthage/Build deleted file mode 120000 index 76f9ba2..0000000 --- a/Carthage/Checkouts/FileKit/Carthage/Build +++ /dev/null @@ -1 +0,0 @@ -../../../../Carthage/Build \ No newline at end of file diff --git a/Carthage/Checkouts/FileKit/FileKit.playground/Contents.swift b/Carthage/Checkouts/FileKit/FileKit.playground/Contents.swift new file mode 100644 index 0000000..21bd8d4 --- /dev/null +++ b/Carthage/Checkouts/FileKit/FileKit.playground/Contents.swift @@ -0,0 +1,16 @@ +/*: +# FileKit +Use this playground to try out FileKit +*/ +import Cocoa +import FileKit +import XCPlayground + +extension Path { + static let SharedPlaygroundData = Path(url: XCPlaygroundSharedDataDirectoryURL)! +} + +let shared = Path.SharedPlaygroundData +let sample = TextFile(path: shared/"filekit_sample.txt") +try? sample.write("Hello there!") +try? sample.read() diff --git a/Carthage/Checkouts/FileKit/FileKit.playground/contents.xcplayground b/Carthage/Checkouts/FileKit/FileKit.playground/contents.xcplayground new file mode 100644 index 0000000..3de2b51 --- /dev/null +++ b/Carthage/Checkouts/FileKit/FileKit.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Carthage/Checkouts/FileKit/FileKit.podspec b/Carthage/Checkouts/FileKit/FileKit.podspec index d65857e..6c3e94a 100644 --- a/Carthage/Checkouts/FileKit/FileKit.podspec +++ b/Carthage/Checkouts/FileKit/FileKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "FileKit" - s.version = "2.0.0" + s.version = "3.0.0" s.summary = "Simple and expressive file management in Swift." s.homepage = "https://github.com/nvzqz/FileKit" s.license = { :type => "MIT", :file => "LICENSE.md" } diff --git a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/project.pbxproj b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/project.pbxproj index f1fe2c3..c0293c9 100644 --- a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/project.pbxproj +++ b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/project.pbxproj @@ -7,6 +7,18 @@ objects = { /* Begin PBXBuildFile section */ + 17217D561CDCD13700723D11 /* RelativePathType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D551CDCD13700723D11 /* RelativePathType.swift */; }; + 17217D571CDCD1BD00723D11 /* RelativePathType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D551CDCD13700723D11 /* RelativePathType.swift */; }; + 17217D581CDCD1C300723D11 /* RelativePathType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D551CDCD13700723D11 /* RelativePathType.swift */; }; + 17217D591CDCD1C900723D11 /* RelativePathType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D551CDCD13700723D11 /* RelativePathType.swift */; }; + 17217D5E1CDCD74000723D11 /* DispatchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5C1CDCD74000723D11 /* DispatchEvent.swift */; }; + 17217D5F1CDCD74000723D11 /* DispatchWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5D1CDCD74000723D11 /* DispatchWatcher.swift */; }; + 17217D601CDCD79C00723D11 /* DispatchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5C1CDCD74000723D11 /* DispatchEvent.swift */; }; + 17217D611CDCD79C00723D11 /* DispatchWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5D1CDCD74000723D11 /* DispatchWatcher.swift */; }; + 17217D621CDCD90B00723D11 /* DispatchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5C1CDCD74000723D11 /* DispatchEvent.swift */; }; + 17217D631CDCD90B00723D11 /* DispatchWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5D1CDCD74000723D11 /* DispatchWatcher.swift */; }; + 17217D641CDCD91200723D11 /* DispatchEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5C1CDCD74000723D11 /* DispatchEvent.swift */; }; + 17217D651CDCD91200723D11 /* DispatchWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17217D5D1CDCD74000723D11 /* DispatchWatcher.swift */; }; 520E0E301C110CA900BAEA99 /* Process+FileKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520E0E2F1C110CA900BAEA99 /* Process+FileKit.swift */; }; 520E0E311C110CA900BAEA99 /* Process+FileKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520E0E2F1C110CA900BAEA99 /* Process+FileKit.swift */; }; 520E0E321C110CA900BAEA99 /* Process+FileKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 520E0E2F1C110CA900BAEA99 /* Process+FileKit.swift */; }; @@ -117,12 +129,17 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 17217D551CDCD13700723D11 /* RelativePathType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RelativePathType.swift; sourceTree = ""; }; + 17217D5C1CDCD74000723D11 /* DispatchEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatchEvent.swift; sourceTree = ""; }; + 17217D5D1CDCD74000723D11 /* DispatchWatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatchWatcher.swift; sourceTree = ""; }; 5204B7C31B968E8000AA473F /* Path.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Path.swift; sourceTree = ""; }; 5204B7E51B96ADA100AA473F /* String+FileKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+FileKit.swift"; sourceTree = ""; }; 5204B84B1B96B83800AA473F /* FileKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FileKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5204B84F1B96B83800AA473F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5204B8581B96B85E00AA473F /* FileKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FileKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 520E0E2F1C110CA900BAEA99 /* Process+FileKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Process+FileKit.swift"; sourceTree = ""; }; + 521FC3FB1CDEEC12006C9C3C /* FileKit.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = FileKit.playground; sourceTree = ""; }; + 521FC3FD1CDEFED6006C9C3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 521FC3FE1CDF0144006C9C3C /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 52255DCA1C042D6E00AC1DA5 /* FilePermissions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilePermissions.swift; sourceTree = ""; }; 523C33771B9A7EFC00AB70E4 /* TextFile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextFile.swift; sourceTree = ""; }; 523C337A1B9B68D600AB70E4 /* DictionaryFile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictionaryFile.swift; sourceTree = ""; }; @@ -198,10 +215,13 @@ 5204B7AC1B968B8600AA473F = { isa = PBXGroup; children = ( - 82F4F2BB1CA94DEC002C8393 /* .swiftlint.yml */, - 5204B7B81B968B8600AA473F /* FileKit */, - 5263A9051B96BA3D00635A93 /* FileKitTests */, + 5204B7B81B968B8600AA473F /* Sources */, + 521FC3FC1CDEFED6006C9C3C /* Support */, + 5263A9051B96BA3D00635A93 /* Tests */, 5204B7B71B968B8600AA473F /* Products */, + 521FC3FB1CDEEC12006C9C3C /* FileKit.playground */, + 521FC3FE1CDF0144006C9C3C /* Package.swift */, + 82F4F2BB1CA94DEC002C8393 /* .swiftlint.yml */, ); sourceTree = ""; }; @@ -217,27 +237,12 @@ name = Products; sourceTree = ""; }; - 5204B7B81B968B8600AA473F /* FileKit */ = { - isa = PBXGroup; - children = ( - 5204B7E31B96AD2300AA473F /* Core */, - 5204B7E41B96AD3400AA473F /* Extensions */, - 5204B84F1B96B83800AA473F /* Info.plist */, - ); - path = FileKit; - sourceTree = ""; - }; - 5204B7E31B96AD2300AA473F /* Core */ = { + 5204B7B81B968B8600AA473F /* Sources */ = { isa = PBXGroup; children = ( 52A016E81C01565C0045A9C8 /* FileKit.swift */, - 523C33A01B9B772A00AB70E4 /* File.swift */, - 523C33771B9A7EFC00AB70E4 /* TextFile.swift */, - 523C337A1B9B68D600AB70E4 /* DictionaryFile.swift */, - 524D31561BC79067008B93D0 /* ArrayFile.swift */, - 524D315A1BC79331008B93D0 /* DataFile.swift */, - 52B938C81BF402ED001B7AEB /* ImageFile.swift */, 5204B7C31B968E8000AA473F /* Path.swift */, + 17217D551CDCD13700723D11 /* RelativePathType.swift */, 52A016F11C0184CA0045A9C8 /* FileProtection.swift */, 52A017091C01D5400045A9C8 /* FileType.swift */, 52255DCA1C042D6E00AC1DA5 /* FilePermissions.swift */, @@ -245,12 +250,32 @@ 523C33981B9B764600AB70E4 /* DataType.swift */, 52BF6BB01B99322000F07E13 /* FileKitError.swift */, 523C33A61B9B894A00AB70E4 /* Operators.swift */, - 82F4F2BE1CA956D3002C8393 /* File System Event */, + 52F3AFA71CDFB48600C2BBBD /* File Types */, + 52F3AFA61CDFB46300C2BBBD /* Watching */, + 52F3AFA51CDFB45100C2BBBD /* Extensions */, + ); + path = Sources; + sourceTree = ""; + }; + 521FC3FC1CDEFED6006C9C3C /* Support */ = { + isa = PBXGroup; + children = ( + 521FC3FD1CDEFED6006C9C3C /* Info.plist */, + ); + path = Support; + sourceTree = ""; + }; + 5263A9051B96BA3D00635A93 /* Tests */ = { + isa = PBXGroup; + children = ( + 5263A9061B96BA3D00635A93 /* FileKitTests.swift */, + C404F01D1BC7CA7200EF9ED9 /* Date+FileKit.swift */, + 5263A9081B96BA3D00635A93 /* Info.plist */, ); - path = Core; + path = Tests; sourceTree = ""; }; - 5204B7E41B96AD3400AA473F /* Extensions */ = { + 52F3AFA51CDFB45100C2BBBD /* Extensions */ = { isa = PBXGroup; children = ( 520E0E2F1C110CA900BAEA99 /* Process+FileKit.swift */, @@ -262,35 +287,32 @@ 52A017041C01AD6F0045A9C8 /* NSBundle+FileKit.swift */, 524D315E1BC7A02A008B93D0 /* Image+FileKit.swift */, ); - path = Extensions; - sourceTree = ""; - }; - 5263A9051B96BA3D00635A93 /* FileKitTests */ = { - isa = PBXGroup; - children = ( - 5263A9061B96BA3D00635A93 /* FileKitTests.swift */, - C404F01F1BC7CD0500EF9ED9 /* Extensions */, - 5263A9081B96BA3D00635A93 /* Info.plist */, - ); - path = FileKitTests; + name = Extensions; sourceTree = ""; }; - 82F4F2BE1CA956D3002C8393 /* File System Event */ = { + 52F3AFA61CDFB46300C2BBBD /* Watching */ = { isa = PBXGroup; children = ( C4F7D01E1C08C0DA00EF359B /* FileSystemEvent.swift */, 82F4F2BF1CA956F2002C8393 /* FileSystemEventStream.swift */, 82F4F2BC1CA95480002C8393 /* FileSystemWatcher.swift */, + 17217D5C1CDCD74000723D11 /* DispatchEvent.swift */, + 17217D5D1CDCD74000723D11 /* DispatchWatcher.swift */, ); - name = "File System Event"; + name = Watching; sourceTree = ""; }; - C404F01F1BC7CD0500EF9ED9 /* Extensions */ = { + 52F3AFA71CDFB48600C2BBBD /* File Types */ = { isa = PBXGroup; children = ( - C404F01D1BC7CA7200EF9ED9 /* Date+FileKit.swift */, + 523C33A01B9B772A00AB70E4 /* File.swift */, + 523C33771B9A7EFC00AB70E4 /* TextFile.swift */, + 523C337A1B9B68D600AB70E4 /* DictionaryFile.swift */, + 524D31561BC79067008B93D0 /* ArrayFile.swift */, + 524D315A1BC79331008B93D0 /* DataFile.swift */, + 52B938C81BF402ED001B7AEB /* ImageFile.swift */, ); - name = Extensions; + name = "File Types"; sourceTree = ""; }; /* End PBXGroup section */ @@ -573,6 +595,7 @@ files = ( 5263A8FE1B96B95000635A93 /* String+FileKit.swift in Sources */, 52A016E91C01565C0045A9C8 /* FileKit.swift in Sources */, + 17217D561CDCD13700723D11 /* RelativePathType.swift in Sources */, 52A017101C024D840045A9C8 /* NSString+FileKit.swift in Sources */, 52A017051C01AD6F0045A9C8 /* NSBundle+FileKit.swift in Sources */, 523C33991B9B764600AB70E4 /* DataType.swift in Sources */, @@ -590,11 +613,13 @@ 52A017001C01AD4A0045A9C8 /* NSData+FileKit.swift in Sources */, 52A016F61C01ACE50045A9C8 /* NSDictionary+FileKit.swift in Sources */, 52B938C91BF402ED001B7AEB /* ImageFile.swift in Sources */, + 17217D5E1CDCD74000723D11 /* DispatchEvent.swift in Sources */, 52255DCB1C042D6E00AC1DA5 /* FilePermissions.swift in Sources */, C4F7D01F1C08C0DA00EF359B /* FileSystemEvent.swift in Sources */, 524D31571BC79067008B93D0 /* ArrayFile.swift in Sources */, 523C33A11B9B772A00AB70E4 /* File.swift in Sources */, 52A0170A1C01D5400045A9C8 /* FileType.swift in Sources */, + 17217D5F1CDCD74000723D11 /* DispatchWatcher.swift in Sources */, 523C337B1B9B68D600AB70E4 /* DictionaryFile.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -603,6 +628,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 17217D601CDCD79C00723D11 /* DispatchEvent.swift in Sources */, + 17217D611CDCD79C00723D11 /* DispatchWatcher.swift in Sources */, + 17217D571CDCD1BD00723D11 /* RelativePathType.swift in Sources */, 52A016EA1C01565C0045A9C8 /* FileKit.swift in Sources */, 52A016FC1C01AD1E0045A9C8 /* NSArray+FileKit.swift in Sources */, 5263A8FF1B96B95100635A93 /* String+FileKit.swift in Sources */, @@ -642,6 +670,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 17217D621CDCD90B00723D11 /* DispatchEvent.swift in Sources */, + 17217D631CDCD90B00723D11 /* DispatchWatcher.swift in Sources */, + 17217D581CDCD1C300723D11 /* RelativePathType.swift in Sources */, 52A016EB1C01565C0045A9C8 /* FileKit.swift in Sources */, 52A016FD1C01AD1E0045A9C8 /* NSArray+FileKit.swift in Sources */, 527612521BAEA45D00503D0A /* String+FileKit.swift in Sources */, @@ -672,6 +703,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 17217D641CDCD91200723D11 /* DispatchEvent.swift in Sources */, + 17217D651CDCD91200723D11 /* DispatchWatcher.swift in Sources */, + 17217D591CDCD1C900723D11 /* RelativePathType.swift in Sources */, 52B938C51BF3C430001B7AEB /* String+FileKit.swift in Sources */, 52A016EC1C01565C0045A9C8 /* FileKit.swift in Sources */, 52A017131C024D840045A9C8 /* NSString+FileKit.swift in Sources */, @@ -728,8 +762,8 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; - CURRENT_RELEASE_NUMBER = 9; - CURRENT_RELEASE_VERSION = 2.0.0; + CURRENT_RELEASE_NUMBER = 10; + CURRENT_RELEASE_VERSION = 3.0.0; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -777,8 +811,8 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; - CURRENT_RELEASE_NUMBER = 9; - CURRENT_RELEASE_VERSION = 2.0.0; + CURRENT_RELEASE_NUMBER = 10; + CURRENT_RELEASE_VERSION = 3.0.0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -808,7 +842,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = FileKit/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -826,7 +860,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_VERSION = A; - INFOPLIST_FILE = FileKit/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -843,7 +877,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = FileKit/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -862,7 +896,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = FileKit/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -878,7 +912,7 @@ isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = FileKitTests/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.nikolaivazquez.FileKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -889,7 +923,7 @@ isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = FileKitTests/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.nikolaivazquez.FileKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -903,7 +937,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = FileKit/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -922,7 +956,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = FileKit/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -942,7 +976,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/FileKit/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; @@ -961,7 +995,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/FileKit/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/Support/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.nikolaivazquez.$(PROJECT_NAME)"; diff --git a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-OSX.xcscheme b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-OSX.xcscheme deleted file mode 100644 index 1857c30..0000000 --- a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-OSX.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-iOS.xcscheme b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-iOS.xcscheme deleted file mode 100644 index df8d727..0000000 --- a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-iOS.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-tvOS.xcscheme b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-tvOS.xcscheme deleted file mode 100644 index 52eb812..0000000 --- a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-tvOS.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-watchOS.xcscheme b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-watchOS.xcscheme deleted file mode 100644 index 328aa52..0000000 --- a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKit-watchOS.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKitTests.xcscheme b/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKitTests.xcscheme deleted file mode 100644 index 9b0c511..0000000 --- a/Carthage/Checkouts/FileKit/FileKit.xcodeproj/xcshareddata/xcschemes/FileKitTests.xcscheme +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/FileKit/Package.swift b/Carthage/Checkouts/FileKit/Package.swift new file mode 100644 index 0000000..d04231d --- /dev/null +++ b/Carthage/Checkouts/FileKit/Package.swift @@ -0,0 +1,32 @@ +// +// Package.swift +// FileKit +// +// The MIT License (MIT) +// +// Copyright (c) 2016 Nikolai Vazquez +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package( + name: "FileKit" +) diff --git a/Carthage/Checkouts/FileKit/README.md b/Carthage/Checkouts/FileKit/README.md index 2ed229f..b622edf 100644 --- a/Carthage/Checkouts/FileKit/README.md +++ b/Carthage/Checkouts/FileKit/README.md @@ -59,7 +59,7 @@ to learn more. ```ruby use_frameworks! - pod 'FileKit', '~> 2.0.0' + pod 'FileKit', '~> 3.0.0' ``` 2. Run `pod install` and open the `.xcworkspace` file to launch Xcode. diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/ArrayFile.swift b/Carthage/Checkouts/FileKit/Sources/ArrayFile.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Core/ArrayFile.swift rename to Carthage/Checkouts/FileKit/Sources/ArrayFile.swift diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/DataFile.swift b/Carthage/Checkouts/FileKit/Sources/DataFile.swift similarity index 96% rename from Carthage/Checkouts/FileKit/FileKit/Core/DataFile.swift rename to Carthage/Checkouts/FileKit/Sources/DataFile.swift index afc4906..93d1edd 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/DataFile.swift +++ b/Carthage/Checkouts/FileKit/Sources/DataFile.swift @@ -54,7 +54,7 @@ extension File where Data: NSData { /// public func write(data: Data, options: NSDataWritingOptions) throws { do { - try data.writeToFile(self.path.rawValue, options: options) + try data.writeToFile(self.path._safeRawValue, options: options) } catch { throw FileKitError.WriteToFileFail(path: path) } diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/DataType.swift b/Carthage/Checkouts/FileKit/Sources/DataType.swift similarity index 98% rename from Carthage/Checkouts/FileKit/FileKit/Core/DataType.swift rename to Carthage/Checkouts/FileKit/Sources/DataType.swift index 4274d12..a6461ce 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/DataType.swift +++ b/Carthage/Checkouts/FileKit/Sources/DataType.swift @@ -120,7 +120,7 @@ extension WritableToFile { /// - Throws: `FileKitError.WriteToFileFail` /// public func writeToPath(path: Path, atomically useAuxiliaryFile: Bool) throws { - guard writeToFile(path.rawValue, atomically: useAuxiliaryFile) else { + guard writeToFile(path._safeRawValue, atomically: useAuxiliaryFile) else { throw FileKitError.WriteToFileFail(path: path) } } diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/DictionaryFile.swift b/Carthage/Checkouts/FileKit/Sources/DictionaryFile.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Core/DictionaryFile.swift rename to Carthage/Checkouts/FileKit/Sources/DictionaryFile.swift diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/DirectoryEnumerator.swift b/Carthage/Checkouts/FileKit/Sources/DirectoryEnumerator.swift similarity index 96% rename from Carthage/Checkouts/FileKit/FileKit/Core/DirectoryEnumerator.swift rename to Carthage/Checkouts/FileKit/Sources/DirectoryEnumerator.swift index 5ededa2..c245459 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/DirectoryEnumerator.swift +++ b/Carthage/Checkouts/FileKit/Sources/DirectoryEnumerator.swift @@ -38,7 +38,7 @@ public struct DirectoryEnumerator: GeneratorType { /// - Parameter path: The path a directory enumerator to be created for. public init(path: Path) { _path = path - _enumerator = NSFileManager().enumeratorAtPath(path.rawValue) + _enumerator = NSFileManager().enumeratorAtPath(path._safeRawValue) } /// Returns the next path in the enumeration. diff --git a/Carthage/Checkouts/FileKit/Sources/DispatchEvent.swift b/Carthage/Checkouts/FileKit/Sources/DispatchEvent.swift new file mode 100644 index 0000000..f12c65c --- /dev/null +++ b/Carthage/Checkouts/FileKit/Sources/DispatchEvent.swift @@ -0,0 +1,110 @@ +// +// GCDFSEvent.swift +// FileKit +// +// Created by ijump on 5/2/16. +// Copyright © 2016 Nikolai Vazquez. All rights reserved. +// + +import Foundation + +/// Dispatch source type. +public struct DispatchSourceType { + + // MARK: - Static Properties + + /// A dispatch source that monitors a file descriptor for events defined by `dispatch_source_vnode_flags_t`. + public static let Vnode = DISPATCH_SOURCE_TYPE_VNODE + + /// A dispatch source that monitors a file descriptor for pending bytes available to be read. + public static let Read = DISPATCH_SOURCE_TYPE_READ + + /// A dispatch source that monitors a file descriptor for available buffer space to write bytes. + public static let Write = DISPATCH_SOURCE_TYPE_WRITE + +} + + +/// Vnode Events. +public struct DispatchVnodeEvents: OptionSetType, CustomStringConvertible, CustomDebugStringConvertible { + + // MARK: - Events + + /// The file-system object was deleted from the namespace. + public static let Delete = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_DELETE) + + /// The file-system object data changed. + public static let Write = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_WRITE) + + /// The file-system object changed in size. + public static let Extend = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_EXTEND) + + /// The file-system object metadata changed. + public static let Attribute = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_ATTRIB) + + /// The file-system object link count changed. + public static let Link = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_LINK) + + /// The file-system object was renamed in the namespace. + public static let Rename = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_RENAME) + + /// The file-system object was revoked. + public static let Revoke = DispatchVnodeEvents(rawValue: DISPATCH_VNODE_REVOKE) + + /// The file-system object was created. + public static let Create = DispatchVnodeEvents(rawValue: 0x1000) + + /// All of the event IDs. + public static let All: DispatchVnodeEvents = [.Delete, .Write, .Extend, .Attribute, .Link, .Rename, .Revoke, .Create] + + // MARK: - All Events + + /// An array of all of the events. + public static let allEvents: [DispatchVnodeEvents] = [ + .Delete, .Write, .Extend, .Attribute, .Link, .Rename, .Revoke, .Create + ] + + /// The names of all of the events. + public static let allEventNames: [String] = [ + "Delete", "Write", "Extend", "Attribute", "Link", "Rename", "Revoke", "Create" + ] + + // MARK: - Properties + + /// The raw event value. + public let rawValue: UInt + + /// A textual representation of `self`. + public var description: String { + var result = "" + for (index, element) in DispatchVnodeEvents.allEvents.enumerate() { + if self.contains(element) { + let name = DispatchVnodeEvents.allEventNames[index] + result += result.isEmpty ? "\(name)": ", \(name)" + } + } + return String(self.dynamicType) + "[\(result)]" + } + + /// A textual representation of `self`, suitable for debugging. + public var debugDescription: String { + var result = "" + for (index, element) in DispatchVnodeEvents.allEvents.enumerate() { + if self.contains(element) { + let name = DispatchVnodeEvents.allEventNames[index] + "(\(element.rawValue))" + result += result.isEmpty ? "\(name)": ", \(name)" + } + } + return String(self.dynamicType) + "[\(result)]" + } + + // MARK: - Initialization + + /// Creates a set of events from a raw value. + /// + /// - Parameter rawValue: The raw value to initialize from. + public init(rawValue: UInt) { + self.rawValue = rawValue + } + +} diff --git a/Carthage/Checkouts/FileKit/Sources/DispatchWatcher.swift b/Carthage/Checkouts/FileKit/Sources/DispatchWatcher.swift new file mode 100644 index 0000000..aec033c --- /dev/null +++ b/Carthage/Checkouts/FileKit/Sources/DispatchWatcher.swift @@ -0,0 +1,353 @@ +// +// GCDFSWatcher.swift +// FileKit +// +// Created by ijump on 5/2/16. +// Copyright © 2016 Nikolai Vazquez. All rights reserved. +// + +import Foundation + + + +/// Delegate for `DispatchVnodeWatcher` +public protocol DispatchVnodeWatcherDelegate: class { + + // MARK: - Protocol + + /// Call when the file-system object was deleted from the namespace. + func fsWatcherDidObserveDelete(watch: DispatchVnodeWatcher) + + /// Call when the file-system object data changed. + func fsWatcherDidObserveWrite(watch: DispatchVnodeWatcher) + + /// Call when the file-system object changed in size. + func fsWatcherDidObserveExtend(watch: DispatchVnodeWatcher) + + /// Call when the file-system object metadata changed. + func fsWatcherDidObserveAttrib(watch: DispatchVnodeWatcher) + + /// Call when the file-system object link count changed. + func fsWatcherDidObserveLink(watch: DispatchVnodeWatcher) + + /// Call when the file-system object was renamed in the namespace. + func fsWatcherDidObserveRename(watch: DispatchVnodeWatcher) + + /// Call when the file-system object was revoked. + func fsWatcherDidObserveRevoke(watch: DispatchVnodeWatcher) + + /// Call when the file-system object was created. + func fsWatcherDidObserveCreate(watch: DispatchVnodeWatcher) + + /// Call when the directory changed (additions, deletions, and renamings). + /// + /// Calls `fsWatcherDidObserveWrite` by default. + func fsWatcherDidObserveDirectoryChange(watch: DispatchVnodeWatcher) +} + +// Optional func and default func for `GCDFSWatcherDelegate` +// Empty func treated as Optional func +public extension DispatchVnodeWatcherDelegate { + + // MARK: - Extension + + /// Call when the file-system object was deleted from the namespace. + public func fsWatcherDidObserveDelete(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object data changed. + public func fsWatcherDidObserveWrite(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object changed in size. + public func fsWatcherDidObserveExtend(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object metadata changed. + public func fsWatcherDidObserveAttrib(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object link count changed. + public func fsWatcherDidObserveLink(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object was renamed in the namespace. + public func fsWatcherDidObserveRename(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object was revoked. + public func fsWatcherDidObserveRevoke(watch: DispatchVnodeWatcher) { + + } + + /// Call when the file-system object was created. + public func fsWatcherDidObserveCreate(watch: DispatchVnodeWatcher) { + + } + + /// Call when the directory changed (additions, deletions, and renamings). + /// + /// Calls `fsWatcherDidObserveWrite` by default. + public func fsWatcherDidObserveDirectoryChange(watch: DispatchVnodeWatcher) { + fsWatcherDidObserveWrite(watch) + } +} + +/// Watcher for Vnode events +public class DispatchVnodeWatcher { + + // MARK: - Properties + + /// The paths being watched. + public let path: Path + + /// The events used to create the watcher. + public let events: DispatchVnodeEvents + + /// The delegate to call when events happen + weak var delegate: DispatchVnodeWatcherDelegate? + + /// The watcher for watching creation event + weak var createWatcher: DispatchVnodeWatcher? + + /// The callback for vnode events. + private let callback: ((DispatchVnodeWatcher) -> Void)? + + /// The queue for the watcher. + private let queue: dispatch_queue_t? + + /// A file descriptor for the path. + private var fileDescriptor: CInt = -1 + + /// A dispatch source to monitor a file descriptor created from the path. + private var source: dispatch_source_t? + + /// Current events + public var currentEvent: DispatchVnodeEvents? { + if let source = source { + return DispatchVnodeEvents(rawValue: dispatch_source_get_data(source)) + } + if createWatcher != nil { + return .Create + } + return nil + } + + // MARK: - Initialization + + /// Creates a watcher for the given paths. + /// + /// - Parameter paths: The paths. + /// - Parameter events: The create events. + /// - Parameter queue: The queue to be run within. + /// - Parameter callback: The callback to be called on changes. + /// + /// This method does follow links. + init(path: Path, + events: DispatchVnodeEvents, + queue: dispatch_queue_t, + callback: ((DispatchVnodeWatcher) -> Void)? + ) { + self.path = path.absolute + self.events = events + self.queue = queue + self.callback = callback + } + + // MARK: - Deinitialization + + deinit { + //print("\(path): Deinit") + close() + } + + // MARK: - Private Methods + + /// Dispatch the event. + /// + /// If `callback` is set, call the `callback`. Else if `delegate` is set, call the `delegate` + /// + /// - Parameter eventType: The current event to be watched. + private func dispatchDelegate(eventType: DispatchVnodeEvents) { + if let callback = self.callback { + callback(self) + } else if let delegate = self.delegate { + if eventType.contains(.Delete) { + delegate.fsWatcherDidObserveDelete(self) + } + if eventType.contains(.Write) { + if path.isDirectoryFile { + delegate.fsWatcherDidObserveDirectoryChange(self) + } else { + delegate.fsWatcherDidObserveWrite(self) + } + } + if eventType.contains(.Extend) { + delegate.fsWatcherDidObserveExtend(self) + } + if eventType.contains(.Attribute) { + delegate.fsWatcherDidObserveAttrib(self) + } + if eventType.contains(.Link) { + delegate.fsWatcherDidObserveLink(self) + } + if eventType.contains(.Rename) { + delegate.fsWatcherDidObserveRename(self) + } + if eventType.contains(.Revoke) { + delegate.fsWatcherDidObserveRevoke(self) + } + if eventType.contains(.Create) { + delegate.fsWatcherDidObserveCreate(self) + } + } + + } + + // MARK: - Methods + + /// Start watching. + /// + /// This method does follow links. + public func startWatching() -> Bool { + + // create a watcher for CREATE event if path not exists and events contains CREATE + if !path.exists { + if events.contains(.Create) { + let parent = path.parent.absolute + var _events = events + _events.remove(.Create) + // only watch a CREATE event if parent exists and is a directory + if parent.isDirectoryFile { + #if os(OSX) + let watch = { parent.watch2($0, callback: $1) } + #else + let watch = { parent.watch($0, callback: $1) } + #endif + createWatcher = watch(.Write) { [weak self] watch in + // stop watching when path created + if self?.path.isRegular == true || self?.path.isDirectoryFile == true { + self?.dispatchDelegate(.Create) + //self.delegate?.fsWatcherDidObserveCreate(self) + self?.createWatcher = nil + self?.startWatching() + watch.stopWatching() + } + } + return true + } + } + return false + } + + // Only watching for regular file and directory + else if path.isRegular || path.isDirectoryFile { + + if source == nil && fileDescriptor == -1 { + fileDescriptor = open(path._safeRawValue, O_EVTONLY) + if fileDescriptor == -1 { return false } + var _events = events + _events.remove(.Create) + source = dispatch_source_create(DispatchSourceType.Vnode, UInt(fileDescriptor), _events.rawValue, queue) + + // Recheck if open success and source create success + if source != nil && fileDescriptor != -1 { + guard callback != nil || delegate != nil else { + return false + } + + // Define the block to call when a file change is detected. + dispatch_source_set_event_handler(source!) { //[unowned self] () in + let eventType = DispatchVnodeEvents(rawValue: dispatch_source_get_data(self.source!)) + self.dispatchDelegate(eventType) + } + + // Define a cancel handler to ensure the path is closed when the source is cancelled. + dispatch_source_set_cancel_handler(source!) { //[unowned self] () in + Darwin.close(self.fileDescriptor) + self.fileDescriptor = -1 + self.source = nil + } + + // Start monitoring the path via the source. + dispatch_resume(source!) + return true + } + } + return false + } else { + return false + } + + } + + /// Stop watching. + /// + /// **Note:** make sure call this func, or `self` will not release + public func stopWatching() { + if source != nil { + dispatch_source_cancel(source!) + } + } + + /// Closes the watcher. + public func close() { + createWatcher?.stopWatching() + Darwin.close(self.fileDescriptor) + self.fileDescriptor = -1 + self.source = nil + } + + +} + +extension Path { + + #if os(OSX) + // MARK: - Watching + + /// Watches a path for filesystem events and handles them in the callback or delegate. + /// + /// - Parameter events: The create events. + /// - Parameter queue: The queue to be run within. + /// - Parameter delegate: The delegate to call when events happen. + /// - Parameter callback: The callback to be called on changes. + public func watch2(events: DispatchVnodeEvents = .All, + queue: dispatch_queue_t = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), + delegate: DispatchVnodeWatcherDelegate? = nil, + callback: ((DispatchVnodeWatcher) -> Void)? = nil + ) -> DispatchVnodeWatcher { + let watcher = DispatchVnodeWatcher(path: self, events: events, queue: queue, callback: callback) + watcher.delegate = delegate + watcher.startWatching() + return watcher + } + + #else + + // MARK: - Watching + + /// Watches a path for filesystem events and handles them in the callback or delegate. + /// + /// - Parameter events: The create events. + /// - Parameter queue: The queue to be run within. + /// - Parameter delegate: The delegate to call when events happen. + /// - Parameter callback: The callback to be called on changes. + public func watch(events: DispatchVnodeEvents = .All, + queue: dispatch_queue_t = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), + delegate: DispatchVnodeWatcherDelegate? = nil, + callback: ((DispatchVnodeWatcher) -> Void)? = nil + ) -> DispatchVnodeWatcher { + let watcher = DispatchVnodeWatcher(path: self, events: events, queue: queue, callback: callback) + watcher.delegate = delegate + watcher.startWatching() + return watcher + } + #endif +} diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/File.swift b/Carthage/Checkouts/FileKit/Sources/File.swift similarity index 89% rename from Carthage/Checkouts/FileKit/FileKit/Core/File.swift rename to Carthage/Checkouts/FileKit/Sources/File.swift index e32efc1..99e5738 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/File.swift +++ b/Carthage/Checkouts/FileKit/Sources/File.swift @@ -31,6 +31,7 @@ import Foundation /// /// - Precondition: The data type must conform to DataType. /// +/// All method do not follow links. public class File: Comparable { // MARK: - Properties @@ -53,9 +54,11 @@ public class File: Comparable { } } - /// True if the file exists. + /// True if the item exists and is a regular file. + /// + /// this method does not follow links. public var exists: Bool { - return path.exists + return path.isRegular } /// The size of `self` in bytes. @@ -138,7 +141,7 @@ public class File: Comparable { /// - Throws: `FileKitError.MoveFileFail` /// public func moveToPath(path: Path) throws { - try path.moveFileToPath(path) + try self.path.moveFileToPath(path) self.path = path } @@ -152,7 +155,7 @@ public class File: Comparable { /// - Throws: `FileKitError.FileDoesNotExist`, `FileKitError.CopyFileFail` /// public func copyToPath(path: Path) throws { - try path.copyFileToPath(path) + try self.path.copyFileToPath(path) } /// Symlinks the file to a path. @@ -173,6 +176,24 @@ public class File: Comparable { try self.path.symlinkFileToPath(path) } + /// Hardlinks the file to a path. + /// + /// If the path already exists and _is not_ a directory, an error will be + /// thrown and a link will not be created. + /// + /// If the path already exists and _is_ a directory, the link will be made + /// to `self` in that directory. + /// + /// + /// - Parameter path: The path to hardlink the file to. + /// - Throws: + /// `FileKitError.FileDoesNotExist`, + /// `FileKitError.CreateHardlinkFail` + /// + public func hardlinkToPath(path: Path) throws { + try self.path.hardlinkFileToPath(path) + } + // MARK: - FileType /// The FileType attribute for `self`. diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileKit.swift b/Carthage/Checkouts/FileKit/Sources/FileKit.swift similarity index 93% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/FileKit.swift index 4c54876..21f74c5 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/FileKit.swift @@ -33,7 +33,7 @@ /// /// - Copyright: [MIT License](https://opensource.org/licenses/MIT) /// -/// - Version: [v2.0.0](https://github.com/nvzqz/FileKit/releases/tag/v2.0.0) +/// - Version: [v3.0.0](https://github.com/nvzqz/FileKit/releases/tag/v3.0.0) /// /// - Requires: Xcode 7+, Swift 2.0+ /// @@ -42,10 +42,10 @@ public enum FileKit { /// The current version. /// /// FileKit follows [Semantic Versioning v2.0.0](http://semver.org/). - public static let version = "v2.0.0" + public static let version = "v3.0.0" /// The current release. - public static let release = 9 + public static let release = 10 /// FileKit is licensed under the [MIT License](https://opensource.org/licenses/MIT). public static let license = "MIT" diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileKitError.swift b/Carthage/Checkouts/FileKit/Sources/FileKitError.swift similarity index 94% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileKitError.swift rename to Carthage/Checkouts/FileKit/Sources/FileKitError.swift index 1df91df..5d300ea 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/FileKitError.swift +++ b/Carthage/Checkouts/FileKit/Sources/FileKitError.swift @@ -41,6 +41,8 @@ public enum FileKitError: ErrorType { return "Could not change the directory from \"\(fromPath)\" to \"\(toPath)\"" case let CreateSymlinkFail(fromPath, toPath): return "Could not create symlink from \"\(fromPath)\" to \"\(toPath)\"" + case let CreateHardlinkFail(fromPath, toPath): + return "Could not create a hard link from \"\(fromPath)\" to \"\(toPath)\"" case let CreateFileFail(path): return "Could not create file at \"\(path)\"" case let CreateDirectoryFail(path): @@ -69,6 +71,9 @@ public enum FileKitError: ErrorType { /// A symbolic link could not be created. case CreateSymlinkFail(from: Path, to: Path) + /// A hard link could not be created. + case CreateHardlinkFail(from: Path, to: Path) + /// A file could not be created. case CreateFileFail(path: Path) diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FilePermissions.swift b/Carthage/Checkouts/FileKit/Sources/FilePermissions.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Core/FilePermissions.swift rename to Carthage/Checkouts/FileKit/Sources/FilePermissions.swift diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileProtection.swift b/Carthage/Checkouts/FileKit/Sources/FileProtection.swift similarity index 97% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileProtection.swift rename to Carthage/Checkouts/FileKit/Sources/FileProtection.swift index ce6357a..f488b3e 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/FileProtection.swift +++ b/Carthage/Checkouts/FileKit/Sources/FileProtection.swift @@ -27,6 +27,8 @@ import Foundation +#if os(iOS) || os(watchOS) || os(tvOS) + /// The values that can be obtained from `NSFileProtectionKey` on a /// file's attributes. Only available on iOS, watchOS, and tvOS. public enum FileProtection: String { @@ -120,7 +122,7 @@ extension Path { public func createFile(fileProtection: FileProtection) throws { let manager = NSFileManager() let attributes = [NSFileProtectionKey : fileProtection.rawValue] - if !manager.createFileAtPath(rawValue, contents: nil, attributes: attributes) { + if !manager.createFileAtPath(_safeRawValue, contents: nil, attributes: attributes) { throw FileKitError.CreateFileFail(path: self) } } @@ -172,3 +174,5 @@ extension File where Data: NSData { } } + +#endif diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileSystemEvent.swift b/Carthage/Checkouts/FileKit/Sources/FileSystemEvent.swift similarity index 99% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileSystemEvent.swift rename to Carthage/Checkouts/FileKit/Sources/FileSystemEvent.swift index f913ea5..d37e997 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/FileSystemEvent.swift +++ b/Carthage/Checkouts/FileKit/Sources/FileSystemEvent.swift @@ -29,7 +29,6 @@ import Foundation #if os(OSX) - /// A filesystem event. public struct FileSystemEvent { diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileSystemEventStream.swift b/Carthage/Checkouts/FileKit/Sources/FileSystemEventStream.swift similarity index 98% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileSystemEventStream.swift rename to Carthage/Checkouts/FileKit/Sources/FileSystemEventStream.swift index c55a36c..89e1d91 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/FileSystemEventStream.swift +++ b/Carthage/Checkouts/FileKit/Sources/FileSystemEventStream.swift @@ -28,14 +28,13 @@ import Foundation #if os(OSX) - - + /// A filesystem event stream. internal struct FileSystemEventStream: RawRepresentable { - + /// The raw FSEventStreamRef value of `self`. var rawValue: FSEventStreamRef - + /// Schedules the stream on the specified run loop. /// /// - Parameter runLoop: The run loop. @@ -43,22 +42,22 @@ internal struct FileSystemEventStream: RawRepresentable { func scheduleWithRunLoop(runLoop: CFRunLoopRef, runLoopMode: CFStringRef) { FSEventStreamScheduleWithRunLoop(rawValue, runLoop, runLoopMode) } - + /// Invalidates the stream. func invalidate() { FSEventStreamInvalidate(rawValue) } - + /// Registers the stream. func start() { FSEventStreamStart(rawValue) } - + /// Unregisters the stream. func stop() { FSEventStreamStop(rawValue) } - + /// Removes the stream from the specified run loop. /// /// - Parameter runLoop: The run loop. @@ -66,19 +65,19 @@ internal struct FileSystemEventStream: RawRepresentable { func unscheduleFromRunLoop(runLoop: CFRunLoopRef, runLoopMode: CFStringRef) { FSEventStreamUnscheduleFromRunLoop(rawValue, runLoop, runLoopMode) } - + /// Schedules the stream on the specified dispatch queue /// /// - Parameter queue: The queue to be run within. func setDispatchQueue(queue: dispatch_queue_t) { FSEventStreamSetDispatchQueue(rawValue, queue) } - + /// Decrements the FSEventStreamRef's refcount. func release() { FSEventStreamRelease(rawValue) } - + /// Asks the FS Events service to flush out any events that have occurred /// but have not yet been delivered, due to the latency parameter that was /// supplied when the stream was created. This flushing occurs @@ -86,7 +85,7 @@ internal struct FileSystemEventStream: RawRepresentable { func flushAsync() { FSEventStreamFlushAsync(rawValue) } - + /// Asks the FS Events service to flush out any events that have occurred /// but have not yet been delivered, due to the latency parameter that was /// supplied when the stream was created. This flushing occurs @@ -94,24 +93,23 @@ internal struct FileSystemEventStream: RawRepresentable { func flushSync() { FSEventStreamFlushSync(rawValue) } - + /// Prints a description of the stream to stderr. func show() { FSEventStreamShow(rawValue) } - + /// The dev_t for a device-relative stream, otherwise 0. /// /// - Returns: The dev_t for a device-relative stream or 0. func deviceBeingWatched() -> dev_t { return FSEventStreamGetDeviceBeingWatched(rawValue) } - + /// The sinceWhen attribute of the stream. var lastEventId: FSEventStreamEventId { return FSEventStreamGetLatestEventId(rawValue) } } - #endif diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileSystemWatcher.swift b/Carthage/Checkouts/FileKit/Sources/FileSystemWatcher.swift similarity index 82% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileSystemWatcher.swift rename to Carthage/Checkouts/FileKit/Sources/FileSystemWatcher.swift index 2d900e4..b38686f 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/FileSystemWatcher.swift +++ b/Carthage/Checkouts/FileKit/Sources/FileSystemWatcher.swift @@ -1,11 +1,3 @@ -// -// FileSystemWatcher.swift -// FileKit -// -// Created by Cihat Gündüz on 28.03.16. -// Copyright © 2016 Nikolai Vazquez. All rights reserved. -// - // // FileSystemEvent.swift // FileKit @@ -36,80 +28,79 @@ import Foundation #if os(OSX) - - + /// Watches a given set of paths and runs a callback per event. public class FileSystemWatcher { - + // MARK: - Private Static Properties - + /// The event stream callback for when events occur. - private static let eventCallback: FSEventStreamCallback = { + private static let _eventCallback: FSEventStreamCallback = { (stream: ConstFSEventStreamRef, contextInfo: UnsafeMutablePointer, numEvents: Int, eventPaths: UnsafeMutablePointer, eventFlags: UnsafePointer, eventIds: UnsafePointer) in - + defer { watcher.lastEventId = eventIds[numEvents - 1] } - + FileSystemWatcher.log("Callback Fired") - + let watcher: FileSystemWatcher = unsafeBitCast(contextInfo, FileSystemWatcher.self) guard let paths = unsafeBitCast(eventPaths, NSArray.self) as? [String] else { return } - + for index in 0.. Void - + private let _callback: (FileSystemEvent) -> Void + /// The last event ID for the watcher. public private(set) var lastEventId: FSEventStreamEventId - + /// Whether or not the watcher has started yet. - private var started = false - + private var _started = false + /// The event stream for the watcher. - private var stream: FileSystemEventStream? - + private var _stream: FileSystemEventStream? + // MARK: - Initialization - + /// Creates a watcher for the given paths. /// /// - Parameter paths: The paths. @@ -130,25 +121,25 @@ public class FileSystemWatcher { self.flags = flags self.latency = latency self.queue = queue - self.callback = callback + self._callback = callback } - + // MARK: - Deinitialization - + deinit { self.close() } - + // MARK: - Private Methods - + /// Processes the event by logging it and then running the callback. /// /// - Parameter event: The file system event to be logged. - private func processEvent(event: FileSystemEvent) { + private func _processEvent(event: FileSystemEvent) { FileSystemWatcher.log("\t\(event.id) - \(event.flags) - \(event.path)") - self.callback(event) + self._callback(event) } - + /// Prints the message when in debug mode. /// /// - Parameter message: The message to be logged. @@ -157,14 +148,14 @@ public class FileSystemWatcher { print(message) #endif } - + // MARK: - Methods - + // Start watching by creating the stream /// Starts watching. public func watch() { - guard started == false else { return } - + guard _started == false else { return } + var context = FSEventStreamContext( version: 0, info: nil, @@ -174,10 +165,10 @@ public class FileSystemWatcher { ) // add self into context context.info = UnsafeMutablePointer(unsafeAddressOf(self)) - + let streamRef = FSEventStreamCreate( kCFAllocatorDefault, - FileSystemWatcher.eventCallback, + FileSystemWatcher._eventCallback, &context, paths.map {$0.rawValue}, // since when @@ -186,39 +177,39 @@ public class FileSystemWatcher { latency, UInt32(flags.rawValue) ) - stream = FileSystemEventStream(rawValue: streamRef) - - stream?.scheduleWithRunLoop(runLoop, runLoopMode: runLoopMode) + _stream = FileSystemEventStream(rawValue: streamRef) + + _stream?.scheduleWithRunLoop(runLoop, runLoopMode: runLoopMode) if let q = queue { - stream?.setDispatchQueue(q) + _stream?.setDispatchQueue(q) } - stream?.start() - - started = true + _stream?.start() + + _started = true } - + // Stops, invalidates and releases the stream /// Closes the watcher. public func close() { - guard started == true else { return } - - stream?.stop() - stream?.invalidate() - stream?.release() - stream = nil - - started = false + guard _started == true else { return } + + _stream?.stop() + _stream?.invalidate() + _stream?.release() + _stream = nil + + _started = false } - + /// Requests that the fseventsd daemon send any events it has already /// buffered (via the latency parameter). /// /// This occurs asynchronously; clients will not have received all the /// callbacks by the time this call returns to them. public func flushAsync() { - stream?.flushAsync() + _stream?.flushAsync() } - + /// Requests that the fseventsd daemon send any events it has already /// buffered (via the latency). Then runs the runloop in its private mode /// till all events that have occurred have been reported (via the client's @@ -227,9 +218,9 @@ public class FileSystemWatcher { /// This occurs synchronously; clients will have received all the callbacks /// by the time this call returns to them. public func flushSync() { - stream?.flushSync() + _stream?.flushSync() } - + } - + #endif diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/FileType.swift b/Carthage/Checkouts/FileKit/Sources/FileType.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Core/FileType.swift rename to Carthage/Checkouts/FileKit/Sources/FileType.swift diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/Image+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/Image+FileKit.swift similarity index 77% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/Image+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/Image+FileKit.swift index fa1c0fe..d9e1174 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Extensions/Image+FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/Image+FileKit.swift @@ -49,7 +49,7 @@ extension Image: DataType, WritableConvertible { /// - Throws: FileKitError.ReadFromFileFail /// public class func readFromPath(path: Path) throws -> Self { - guard let contents = self.init(contentsOfFile: path.rawValue) else { + guard let contents = self.init(contentsOfFile: path._safeRawValue) else { throw FileKitError.ReadFromFileFail(path: path) } return contents @@ -65,4 +65,24 @@ extension Image: DataType, WritableConvertible { #endif } + /// Retrieves an image from a URL. + public convenience init?(url: NSURL) { + #if os(OSX) + self.init(contentsOfURL: url) + #else + guard let data = NSData(contentsOfURL: url) else { + return nil + } + self.init(data: data) + #endif + } + + /// Retrieves an image from a URL string. + public convenience init?(urlString string: String) { + guard let url = NSURL(string: string) else { + return nil + } + self.init(url: url) + } + } diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/ImageFile.swift b/Carthage/Checkouts/FileKit/Sources/ImageFile.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Core/ImageFile.swift rename to Carthage/Checkouts/FileKit/Sources/ImageFile.swift diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSArray+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/NSArray+FileKit.swift similarity index 95% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/NSArray+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/NSArray+FileKit.swift index de50552..44327e0 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSArray+FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/NSArray+FileKit.swift @@ -33,7 +33,7 @@ extension NSArray: DataType, WritableToFile { /// /// - Parameter path: The path an array to be read from. public class func readFromPath(path: Path) throws -> Self { - guard let contents = self.init(contentsOfFile: path.rawValue) else { + guard let contents = self.init(contentsOfFile: path._safeRawValue) else { throw FileKitError.ReadFromFileFail(path: path) } return contents diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSBundle+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/NSBundle+FileKit.swift similarity index 96% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/NSBundle+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/NSBundle+FileKit.swift index 15e4441..c958236 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSBundle+FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/NSBundle+FileKit.swift @@ -31,7 +31,7 @@ extension NSBundle { /// Returns an NSBundle for the given directory path. public convenience init?(path: Path) { - self.init(path: path.rawValue) + self.init(path: path.absolute.rawValue) } } diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSData+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/NSData+FileKit.swift similarity index 91% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/NSData+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/NSData+FileKit.swift index a1901fe..2abea1d 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSData+FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/NSData+FileKit.swift @@ -31,7 +31,7 @@ extension NSData: DataType, WritableToFile { /// Returns data read from the given path. public class func readFromPath(path: Path) throws -> Self { - guard let contents = self.init(contentsOfFile: path.rawValue) else { + guard let contents = self.init(contentsOfFile: path._safeRawValue) else { throw FileKitError.ReadFromFileFail(path: path) } return contents @@ -40,7 +40,7 @@ extension NSData: DataType, WritableToFile { /// Returns data read from the given path using NSDataReadingOptions. public class func readFromPath(path: Path, options: NSDataReadingOptions) throws -> Self { do { - return try self.init(contentsOfFile: path.rawValue, options: options) + return try self.init(contentsOfFile: path._safeRawValue, options: options) } catch { throw FileKitError.ReadFromFileFail(path: path) } diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSDictionary+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/NSDictionary+FileKit.swift similarity index 94% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/NSDictionary+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/NSDictionary+FileKit.swift index 4466f99..db9130d 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSDictionary+FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/NSDictionary+FileKit.swift @@ -28,7 +28,7 @@ extension NSDictionary: DataType, WritableToFile { /// Returns a dictionary read from the given path. public class func readFromPath(path: Path) throws -> Self { - guard let contents = self.init(contentsOfFile: path.rawValue) else { + guard let contents = self.init(contentsOfFile: path._safeRawValue) else { throw FileKitError.ReadFromFileFail(path: path) } return contents diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/NSString+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/NSString+FileKit.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/NSString+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/NSString+FileKit.swift diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/Operators.swift b/Carthage/Checkouts/FileKit/Sources/Operators.swift similarity index 93% rename from Carthage/Checkouts/FileKit/FileKit/Core/Operators.swift rename to Carthage/Checkouts/FileKit/Sources/Operators.swift index 72aee9f..21d204e 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/Operators.swift +++ b/Carthage/Checkouts/FileKit/Sources/Operators.swift @@ -106,7 +106,17 @@ public func |~ (file: TextFile, motif: String) -> [String] { /// path. @warn_unused_result public func == (lhs: Path, rhs: Path) -> Bool { - return lhs.standardized.rawValue == rhs.standardized.rawValue + if lhs.isAbsolute || rhs.isAbsolute { + return lhs.absolute.rawValue == rhs.absolute.rawValue + } + return lhs.standardRawValueWithTilde == rhs.standardRawValueWithTilde +} + +/// Returns `true` if the standardized form of one path not equals that of another +/// path. +@warn_unused_result +public func != (lhs: Path, rhs: Path) -> Bool { + return !(lhs == rhs) } /// Concatenates two `Path` instances and returns the result. @@ -118,8 +128,8 @@ public func == (lhs: Path, rhs: Path) -> Bool { /// @warn_unused_result public func + (lhs: Path, rhs: Path) -> Path { - if lhs.rawValue.isEmpty { return rhs } - if rhs.rawValue.isEmpty { return lhs } + if lhs.rawValue.isEmpty || lhs.rawValue == "." { return rhs } + if rhs.rawValue.isEmpty || rhs.rawValue == "." { return lhs } switch (lhs.rawValue.hasSuffix(Path.separator), rhs.rawValue.hasPrefix(Path.separator)) { case (true, true): let rhsRawValue = rhs.rawValue.substringFromIndex(rhs.rawValue.startIndex.successor()) @@ -140,7 +150,7 @@ public func + (lhs: String, rhs: Path) -> Path { /// Converts a `String` to a `Path` and returns the concatenated result. @warn_unused_result public func + (lhs: Path, rhs: String) -> Path { - return lhs + Path(rhs) + return lhs + Path(rhs) } /// Appends the right path to the left path. @@ -183,7 +193,7 @@ public func /= (inout lhs: Path, rhs: String) { } infix operator <^> { - associativity left +associativity left } /// Returns the common ancestor between the two paths. @@ -235,7 +245,7 @@ infix operator ->! {} /// `FileKitError.CreateSymlinkFail` /// public func ->! (lhs: Path, rhs: Path) throws { - if rhs.exists { + if rhs.isAny { try rhs.deleteFile() } try lhs ->> rhs @@ -251,7 +261,7 @@ public func ->! (lhs: Path, rhs: Path) throws { /// `FileKitError.CreateSymlinkFail` /// public func ->! (lhs: File, rhs: Path) throws { - if rhs.exists { + if rhs.isAny { try rhs.deleteFile() } try lhs ->> rhs @@ -294,7 +304,7 @@ infix operator +>! {} /// `FileKitError.CreateSymlinkFail` /// public func +>! (lhs: Path, rhs: Path) throws { - if rhs.exists { + if rhs.isAny { try rhs.deleteFile() } try lhs +>> rhs @@ -310,7 +320,7 @@ public func +>! (lhs: Path, rhs: Path) throws { /// `FileKitError.CreateSymlinkFail` /// public func +>! (lhs: File, rhs: Path) throws { - if rhs.exists { + if rhs.isAny { try rhs.deleteFile() } try lhs +>> rhs @@ -361,12 +371,12 @@ infix operator =>! {} /// `FileKitError.CreateSymlinkFail` /// public func =>! (lhs: Path, rhs: Path) throws { - guard lhs.exists else { - throw FileKitError.FileDoesNotExist(path: lhs) - } + // guard lhs.exists else { + // throw FileKitError.FileDoesNotExist(path: lhs) + // } let linkPath = rhs.isDirectory ? rhs + lhs.fileName : rhs - if linkPath.exists { try linkPath.deleteFile() } + if linkPath.isAny { try linkPath.deleteFile() } try lhs =>> rhs } @@ -408,4 +418,4 @@ postfix operator ^ {} @warn_unused_result public postfix func ^ (path: Path) -> Path { return path.parent -} \ No newline at end of file +} diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/Path.swift b/Carthage/Checkouts/FileKit/Sources/Path.swift similarity index 65% rename from Carthage/Checkouts/FileKit/FileKit/Core/Path.swift rename to Carthage/Checkouts/FileKit/Sources/Path.swift index 9bbd825..c2a341c 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/Path.swift +++ b/Carthage/Checkouts/FileKit/Sources/Path.swift @@ -46,16 +46,16 @@ public struct Path: StringLiteralConvertible, RawRepresentable, Hashable, Indexa /// The path of the program's current working directory. public static var Current: Path { get { - return Path(NSFileManager().currentDirectoryPath) + return Path(NSFileManager.defaultManager().currentDirectoryPath) } set { - NSFileManager().changeCurrentDirectoryPath(newValue.rawValue) + NSFileManager.defaultManager().changeCurrentDirectoryPath(newValue._safeRawValue) } } /// The paths of the mounted volumes available. public static func volumes(options: NSVolumeEnumerationOptions = []) -> [Path] { - let volumes = NSFileManager().mountedVolumeURLsIncludingResourceValuesForKeys(nil, + let volumes = NSFileManager.defaultManager().mountedVolumeURLsIncludingResourceValuesForKeys(nil, options: options) return (volumes ?? []).flatMap { Path(url: $0) } } @@ -65,35 +65,104 @@ public struct Path: StringLiteralConvertible, RawRepresentable, Hashable, Indexa private var _fmWraper = _FMWrapper() private class _FMWrapper { - let fileManager = NSFileManager() + let unsafeFileManager = NSFileManager() + weak var delegate: NSFileManagerDelegate? + /// Safe way to use fileManager + var fileManager: NSFileManager { + get { +// if delegate == nil { +// print("\n\nDelegate is nil\n\n") +// } + unsafeFileManager.delegate = delegate + return unsafeFileManager + } + } } /// The delegate for the file manager used by the path. + /// + /// **Note:** no strong reference stored in path, so make sure keep the delegate or it will be `nil` public var fileManagerDelegate: NSFileManagerDelegate? { get { - return _fmWraper.fileManager.delegate + return _fmWraper.delegate } set { if !isUniquelyReferencedNonObjC(&_fmWraper) { _fmWraper = _FMWrapper() } - _fmWraper.fileManager.delegate = newValue + _fmWraper.delegate = newValue } } /// The stored path string value. public private(set) var rawValue: String + /// The non-empty path string value. For internal use only. + /// + /// Some NSAPI may throw `NSInvalidArgumentException` when path is `""`, which can't catch in swift + /// and cause crash + internal var _safeRawValue: String { + return rawValue.isEmpty ? "." : rawValue + } + + /// The standardized path string value + public var standardRawValue: String { + get { + return (self.rawValue as NSString).stringByStandardizingPath + } + } + + /// The standardized path string value without expanding tilde + public var standardRawValueWithTilde: String { + get { + let comps = components + if comps.isEmpty { + return "" + } else { + return self[comps.count - 1].rawValue + } + } + } + /// The components of the path. + /// + /// Return [] if path is `.` or `""` public var components: [Path] { - return (rawValue as NSString).pathComponents.enumerate().flatMap { - ($0 == 0 || $1 != "/") ? Path($1) : nil + if rawValue == "" || rawValue == "." { + return [] + } + if isAbsolute { + return (absolute.rawValue as NSString).pathComponents.enumerate().flatMap { + (($0 == 0 || $1 != "/") && $1 != ".") ? Path($1) : nil + } + } else { + let comps = (self.rawValue as NSString).pathComponents.enumerate() + // remove extraneous `/` and `.` + let cleanComps = comps.flatMap { + (($0 == 0 || $1 != "/") && $1 != ".") ? Path($1) : nil + } + return _cleanComponents(cleanComps) } } + /// resolving `..` if possible + private func _cleanComponents(comps: [Path]) -> [Path] { + var isContinue = false + let count = comps.count + let cleanComps: [Path] = comps.enumerate().flatMap { + if ($1.rawValue != ".." && $0 < count - 1 && comps[$0 + 1].rawValue == "..") || ($1.rawValue == ".." && $0 > 0 && comps[$0 - 1].rawValue != "..") { + isContinue = true + return nil + } else { + return $1 + } + } + return isContinue ? _cleanComponents(cleanComps) : cleanComps + } + /// The name of the file at `self`. public var fileName: String { - return self.components.last?.rawValue ?? "" + return self.absolute.components.last?.rawValue ?? "" } /// A new path created by removing extraneous components from the path. @@ -101,6 +170,18 @@ public struct Path: StringLiteralConvertible, RawRepresentable, Hashable, Indexa return Path((self.rawValue as NSString).stringByStandardizingPath) } + /// The standardized path string value without expanding tilde + public var standardWithTilde: Path { + get { + let comps = components + if comps.isEmpty { + return Path("") + } else { + return self[comps.count - 1] + } + } + } + /// A new path created by resolving all symlinks and standardizing the path. public var resolved: Path { return Path((self.rawValue as NSString).stringByResolvingSymlinksInPath) @@ -134,47 +215,89 @@ public struct Path: StringLiteralConvertible, RawRepresentable, Hashable, Indexa return !isAbsolute } - /// Returns `true` if a file exists at the path. + /// Returns `true` if a file or directory exists at the path. + /// + /// this method does follow links. public var exists: Bool { - return _fmWraper.fileManager.fileExistsAtPath(rawValue) + return _fmWraper.fileManager.fileExistsAtPath(_safeRawValue) } + /// Returns `true` if a file or directory or symbolic link exists at the path + /// + /// this method does **not** follow links. +// public var existsOrLink: Bool { +// return self.isSymbolicLink || _fmWraper.fileManager.fileExistsAtPath(_safeRawValue) +// } + /// Returns `true` if the current process has write privileges for the file /// at the path. + /// + /// this method does follow links. public var isWritable: Bool { - return _fmWraper.fileManager.isWritableFileAtPath(rawValue) + return _fmWraper.fileManager.isWritableFileAtPath(_safeRawValue) } /// Returns `true` if the current process has read privileges for the file /// at the path. + /// + /// this method does follow links. public var isReadable: Bool { - return _fmWraper.fileManager.isReadableFileAtPath(rawValue) + return _fmWraper.fileManager.isReadableFileAtPath(_safeRawValue) } /// Returns `true` if the current process has execute privileges for the /// file at the path. + /// + /// this method does follow links. public var isExecutable: Bool { - return _fmWraper.fileManager.isExecutableFileAtPath(rawValue) + return _fmWraper.fileManager.isExecutableFileAtPath(_safeRawValue) } /// Returns `true` if the current process has delete privileges for the file /// at the path. + /// + /// this method does **not** follow links. public var isDeletable: Bool { - return _fmWraper.fileManager.isDeletableFileAtPath(rawValue) + return _fmWraper.fileManager.isDeletableFileAtPath(_safeRawValue) } /// Returns `true` if the path points to a directory. + /// + /// this method does follow links. public var isDirectory: Bool { var isDirectory: ObjCBool = false - return _fmWraper.fileManager.fileExistsAtPath(rawValue, isDirectory: &isDirectory) + return _fmWraper.fileManager.fileExistsAtPath(_safeRawValue, isDirectory: &isDirectory) && isDirectory } + /// Returns `true` if the path is a directory file. + /// + /// this method does not follow links. + public var isDirectoryFile: Bool { + return fileType == .Directory + } + /// Returns `true` if the path is a symbolic link. + /// + /// this method does not follow links. public var isSymbolicLink: Bool { return fileType == .SymbolicLink } + /// Returns `true` if the path is a regular file. + /// + /// this method does not follow links. + public var isRegular: Bool { + return fileType == .Regular + } + + /// Returns `true` if the path exists any fileType item. + /// + /// this method does not follow links. + public var isAny: Bool { + return fileType != nil + } + /// The path's extension. public var pathExtension: String { get { @@ -188,7 +311,20 @@ public struct Path: StringLiteralConvertible, RawRepresentable, Hashable, Indexa /// The path's parent path. public var parent: Path { - return Path((rawValue as NSString).stringByDeletingLastPathComponent) + if isAbsolute { + return Path((absolute.rawValue as NSString).stringByDeletingLastPathComponent) + } else { + let comps = components + if comps.isEmpty { + return Path("..") + } else if comps.last!.rawValue == ".." { + return ".." + self[comps.count - 1] + } else if comps.count == 1 { + return Path("") + } else { + return self[comps.count - 2] + } + } } // MARK: - Initialization @@ -199,8 +335,13 @@ public struct Path: StringLiteralConvertible, RawRepresentable, Hashable, Indexa } /// Initializes a path to the string's value. - public init(_ path: String) { - self.rawValue = path + public init(_ path: String, expandingTilde: Bool = false) { + // empty path may cause crash + if expandingTilde { + self.rawValue = (path as NSString).stringByExpandingTildeInPath + } else { + self.rawValue = path + } } } @@ -214,10 +355,11 @@ extension Path { /// - Parameter closure: The block to run while `Path.Current` is changed. /// public func changeDirectory(@noescape closure: () throws -> ()) rethrows { - let previous = Path.Current - Path.Current = self + let previous = Path.Current defer { Path.Current = previous } - try closure() + if _fmWraper.fileManager.changeCurrentDirectoryPath(_safeRawValue) { + try closure() + } } /// Returns the path's children paths. @@ -225,11 +367,12 @@ extension Path { /// - Parameter recursive: Whether to obtain the paths recursively. /// Default value is `false`. /// + /// this method follow links if recursive is `false`, otherwise not follow links public func children(recursive recursive: Bool = false) -> [Path] { let obtainFunc = recursive ? _fmWraper.fileManager.subpathsOfDirectoryAtPath : _fmWraper.fileManager.contentsOfDirectoryAtPath - return (try? obtainFunc(rawValue))?.map { self + Path($0) } ?? [] + return (try? obtainFunc(_safeRawValue))?.map { self + Path($0) } ?? [] } /// Returns true if `path` is a child of `self`. @@ -238,6 +381,12 @@ extension Path { /// Default value is `true`. /// public func isChildOfPath(path: Path, recursive: Bool = true) -> Bool { + if !(isRelative && path.isRelative) && !(isAbsolute && path.isAbsolute) { + return self.absolute.isChildOfPath(path.absolute) + } + if isRoot { + return true + } if recursive { return path.isAncestorOfPath(self) } else { @@ -246,31 +395,99 @@ extension Path { } /// Returns true if `path` is a parent of `self`. + /// + /// Relative paths can't be compared return `false`. like `../../path1/path2` and `../path2` + /// public func isAncestorOfPath(path: Path) -> Bool { - if self.parent == path { + if !(isRelative && path.isRelative) && !(isAbsolute && path.isAbsolute) { + return self.absolute.isAncestorOfPath(path.absolute) + } + if path.isRoot { return true } - if self.isRoot || self.rawValue.isEmpty { - return false + if self != path && self.commonAncestor(path) == path { + return true } - return self.parent.isAncestorOfPath(path) + return false } /// Returns the common ancestor between `self` and `path`. + /// + /// Relative path return the most precise path if possible + /// public func commonAncestor(path: Path) -> Path { + if !(isRelative && path.isRelative) && !(isAbsolute && path.isAbsolute) { + return self.absolute.commonAncestor(path.absolute) + } let selfComponents = self.components let pathComponents = path.components - let total = Swift.min(selfComponents.count, pathComponents.count) + let minCount = Swift.min(selfComponents.count, pathComponents.count) + var total = minCount - for index in 0.. 1: + return .Ancestor + case ".."?: + return .Parent + default: + return .Normal + } + } } // swiftlint:disable line_length @@ -340,33 +557,63 @@ extension Path { /// `FileKitError.CreateSymlinkFail` /// public func symlinkFileToPath(path: Path) throws { - guard self.exists else { - throw FileKitError.FileDoesNotExist(path: self) - } + // it's possible to create symbolic links to locations that do not yet exist. +// guard self.exists else { +// throw FileKitError.FileDoesNotExist(path: self) +// } + + let linkPath = path.isDirectory ? path + self.fileName : path // Throws if linking to an existing non-directory file. - guard !path.exists || path.isDirectory else { + guard !linkPath.isAny else { throw FileKitError.CreateSymlinkFail(from: self, to: path) } - let linkPath = path.isDirectory ? path + self.fileName : path - do { try _fmWraper.fileManager.createSymbolicLinkAtPath( - linkPath.rawValue, withDestinationPath: self.rawValue) + linkPath._safeRawValue, withDestinationPath: self._safeRawValue) } catch { throw FileKitError.CreateSymlinkFail(from: self, to: linkPath) } } + /// Creates a hard link at a path that points to `self`. + /// + /// - Parameter path: The Path to which the link of the file at + /// `self` will be created. + /// If `path` exists and is a directory, then the link + /// will be made inside of `path`. Otherwise, an error + /// will be thrown. + /// + /// - Throws: + /// `FileKitError.FileDoesNotExist`, + /// `FileKitError.CreateHardlinkFail` + /// + public func hardlinkFileToPath(path: Path) throws { + let linkPath = path.isDirectory ? path + self.fileName : path + + guard !linkPath.isAny else { + throw FileKitError.CreateHardlinkFail(from: self, to: path) + } + + do { + try _fmWraper.fileManager.linkItemAtPath(self._safeRawValue, toPath: linkPath._safeRawValue) + } catch { + throw FileKitError.CreateHardlinkFail(from: self, to: path) + } + } + /// Creates a file at path. /// /// Throws an error if the file cannot be created. /// /// - Throws: `FileKitError.CreateFileFail` /// + /// this method does not follow links. + /// + /// If a file or symlink exists, this method removes the file or symlink and create regular file public func createFile() throws { - if !_fmWraper.fileManager.createFileAtPath(rawValue, contents: nil, attributes: nil) { + if !_fmWraper.fileManager.createFileAtPath(_safeRawValue, contents: nil, attributes: nil) { throw FileKitError.CreateFileFail(path: self) } } @@ -384,7 +631,7 @@ extension Path { public func touch(updateModificationDate: Bool = true) throws { if self.exists { if updateModificationDate { - try setAttribute(NSFileModificationDate, value: NSDate()) + try _setAttribute(NSFileModificationDate, value: NSDate()) } } else { try createFile() @@ -403,10 +650,12 @@ extension Path { /// /// - Throws: `FileKitError.CreateDirectoryFail` /// + /// this method does not follow links. + /// public func createDirectory(withIntermediateDirectories createIntermediates: Bool = true) throws { do { let manager = _fmWraper.fileManager - try manager.createDirectoryAtPath(rawValue, + try manager.createDirectoryAtPath(_safeRawValue, withIntermediateDirectories: createIntermediates, attributes: nil) } catch { @@ -422,9 +671,10 @@ extension Path { /// /// - Throws: `FileKitError.DeleteFileFail` /// + /// this method does not follow links. public func deleteFile() throws { do { - try _fmWraper.fileManager.removeItemAtPath(rawValue) + try _fmWraper.fileManager.removeItemAtPath(_safeRawValue) } catch { throw FileKitError.DeleteFileFail(path: self) } @@ -436,11 +686,12 @@ extension Path { /// /// - Throws: `FileKitError.FileDoesNotExist`, `FileKitError.MoveFileFail` /// + /// this method does not follow links. public func moveFileToPath(path: Path) throws { - if self.exists { - if !path.exists { + if self.isAny { + if !path.isAny { do { - try _fmWraper.fileManager.moveItemAtPath(self.rawValue, toPath: path.rawValue) + try _fmWraper.fileManager.moveItemAtPath(self._safeRawValue, toPath: path._safeRawValue) } catch { throw FileKitError.MoveFileFail(from: self, to: path) } @@ -459,11 +710,12 @@ extension Path { /// /// - Throws: `FileKitError.FileDoesNotExist`, `FileKitError.CopyFileFail` /// + /// this method does not follow links. public func copyFileToPath(path: Path) throws { - if self.exists { - if !path.exists { + if self.isAny { + if !path.isAny { do { - try _fmWraper.fileManager.copyItemAtPath(self.rawValue, toPath: path.rawValue) + try _fmWraper.fileManager.copyItemAtPath(self._safeRawValue, toPath: path._safeRawValue) } catch { throw FileKitError.CopyFileFail(from: self, to: path) } @@ -545,6 +797,7 @@ extension Path { /// - Returns: All of the path's elements up to and including the index. /// public subscript(index: Int) -> Path { + let components = self.components if index < 0 || index >= components.count { fatalError("Path index out of range") } else { @@ -563,22 +816,26 @@ extension Path { // MARK: - Attributes /// Returns the path's attributes. + /// + /// this method does not follow links. public var attributes: [String : AnyObject] { - return (try? _fmWraper.fileManager.attributesOfItemAtPath(rawValue)) ?? [:] + return (try? _fmWraper.fileManager.attributesOfItemAtPath(_safeRawValue)) ?? [:] } /// Modify attributes - private func setAttributes(attributes: [String : AnyObject]) throws { + /// + /// this method does not follow links. + private func _setAttributes(attributes: [String : AnyObject]) throws { do { - try _fmWraper.fileManager.setAttributes(attributes, ofItemAtPath: self.rawValue) + try _fmWraper.fileManager.setAttributes(attributes, ofItemAtPath: self._safeRawValue) } catch { throw FileKitError.AttributesChangeFail(path: self) } } /// Modify one attribute - private func setAttribute(key: String, value: AnyObject) throws { - try setAttributes([key : value]) + private func _setAttribute(key: String, value: AnyObject) throws { + try _setAttributes([key : value]) } /// The creation date of the file at the path. @@ -699,7 +956,7 @@ extension Path { /// - Returns: The `Path` objects url. public var url: NSURL { - return NSURL(fileURLWithPath: rawValue, isDirectory: self.isDirectory) + return NSURL(fileURLWithPath: _safeRawValue, isDirectory: self.isDirectory) } } @@ -757,19 +1014,19 @@ extension Path { /// Returns a file handle for reading the file at the path, or `nil` if no /// file exists. public var fileHandleForReading: NSFileHandle? { - return NSFileHandle(forReadingAtPath: standardized.rawValue) + return NSFileHandle(forReadingAtPath: absolute._safeRawValue) } /// Returns a file handle for writing to the file at the path, or `nil` if /// no file exists. public var fileHandleForWriting: NSFileHandle? { - return NSFileHandle(forWritingAtPath: standardized.rawValue) + return NSFileHandle(forWritingAtPath: absolute._safeRawValue) } /// Returns a file handle for reading and writing to the file at the path, /// or `nil` if no file exists. public var fileHandleForUpdating: NSFileHandle? { - return NSFileHandle(forUpdatingAtPath: standardized.rawValue) + return NSFileHandle(forUpdatingAtPath: absolute._safeRawValue) } } @@ -781,7 +1038,7 @@ extension Path { /// Returns an input stream that reads data from the file at the path, or /// `nil` if no file exists. public func inputStream() -> NSInputStream? { - return NSInputStream(fileAtPath: rawValue) + return NSInputStream(fileAtPath: absolute._safeRawValue) } /// Returns an output stream for writing to the file at the path, or `nil` @@ -792,7 +1049,7 @@ extension Path { /// `false` otherwise. Default value is `false`. /// public func outputStream(append shouldAppend: Bool = false) -> NSOutputStream? { - return NSOutputStream(toFileAtPath: rawValue, append: shouldAppend) + return NSOutputStream(toFileAtPath: absolute._safeRawValue, append: shouldAppend) } } @@ -859,12 +1116,12 @@ extension Path { /// Returns the path to the user's or application's home directory, /// depending on the platform. public static var UserHome: Path { - return Path(NSHomeDirectory()) + return Path(NSHomeDirectory()).standardized } /// Returns the path to the user's temporary directory. public static var UserTemporary: Path { - return Path(NSTemporaryDirectory()) + return Path(NSTemporaryDirectory()).standardized } /// Returns a temporary path for the process. @@ -879,130 +1136,130 @@ extension Path { /// Returns the path to the user's caches directory. public static var UserCaches: Path { - return pathInUserDomain(.CachesDirectory) + return _pathInUserDomain(.CachesDirectory) } /// Returns the path to the user's applications directory. public static var UserApplications: Path { - return pathInUserDomain(.ApplicationDirectory) + return _pathInUserDomain(.ApplicationDirectory) } /// Returns the path to the user's application support directory. public static var UserApplicationSupport: Path { - return pathInUserDomain(.ApplicationSupportDirectory) + return _pathInUserDomain(.ApplicationSupportDirectory) } /// Returns the path to the user's desktop directory. public static var UserDesktop: Path { - return pathInUserDomain(.DesktopDirectory) + return _pathInUserDomain(.DesktopDirectory) } /// Returns the path to the user's documents directory. public static var UserDocuments: Path { - return pathInUserDomain(.DocumentDirectory) + return _pathInUserDomain(.DocumentDirectory) } /// Returns the path to the user's autosaved documents directory. public static var UserAutosavedInformation: Path { - return pathInUserDomain(.AutosavedInformationDirectory) + return _pathInUserDomain(.AutosavedInformationDirectory) } /// Returns the path to the user's downloads directory. public static var UserDownloads: Path { - return pathInUserDomain(.DownloadsDirectory) + return _pathInUserDomain(.DownloadsDirectory) } /// Returns the path to the user's library directory. public static var UserLibrary: Path { - return pathInUserDomain(.LibraryDirectory) + return _pathInUserDomain(.LibraryDirectory) } /// Returns the path to the user's movies directory. public static var UserMovies: Path { - return pathInUserDomain(.MoviesDirectory) + return _pathInUserDomain(.MoviesDirectory) } /// Returns the path to the user's music directory. public static var UserMusic: Path { - return pathInUserDomain(.MusicDirectory) + return _pathInUserDomain(.MusicDirectory) } /// Returns the path to the user's pictures directory. public static var UserPictures: Path { - return pathInUserDomain(.PicturesDirectory) + return _pathInUserDomain(.PicturesDirectory) } /// Returns the path to the user's Public sharing directory. public static var UserSharedPublic: Path { - return pathInUserDomain(.SharedPublicDirectory) + return _pathInUserDomain(.SharedPublicDirectory) } #if os(OSX) /// Returns the path to the user scripts folder for the calling application public static var UserApplicationScripts: Path { - return pathInUserDomain(.ApplicationScriptsDirectory) + return _pathInUserDomain(.ApplicationScriptsDirectory) } /// Returns the path to the user's trash directory public static var UserTrash: Path { - return pathInUserDomain(.TrashDirectory) + return _pathInUserDomain(.TrashDirectory) } #endif /// Returns the path to the system's applications directory. public static var SystemApplications: Path { - return pathInSystemDomain(.ApplicationDirectory) + return _pathInSystemDomain(.ApplicationDirectory) } /// Returns the path to the system's application support directory. public static var SystemApplicationSupport: Path { - return pathInSystemDomain(.ApplicationSupportDirectory) + return _pathInSystemDomain(.ApplicationSupportDirectory) } /// Returns the path to the system's library directory. public static var SystemLibrary: Path { - return pathInSystemDomain(.LibraryDirectory) + return _pathInSystemDomain(.LibraryDirectory) } /// Returns the path to the system's core services directory. public static var SystemCoreServices: Path { - return pathInSystemDomain(.CoreServiceDirectory) + return _pathInSystemDomain(.CoreServiceDirectory) } /// Returns the path to the system's PPDs directory. public static var SystemPrinterDescription: Path { - return pathInSystemDomain(.PrinterDescriptionDirectory) + return _pathInSystemDomain(.PrinterDescriptionDirectory) } /// Returns the path to the system's PreferencePanes directory. public static var SystemPreferencePanes: Path { - return pathInSystemDomain(.PreferencePanesDirectory) + return _pathInSystemDomain(.PreferencePanesDirectory) } /// Returns the paths where resources can occur. public static var AllLibraries: [Path] { - return pathsInDomains(.AllLibrariesDirectory, .AllDomainsMask) + return _pathsInDomains(.AllLibrariesDirectory, .AllDomainsMask) } /// Returns the paths where applications can occur public static var AllApplications: [Path] { - return pathsInDomains(.AllApplicationsDirectory, .AllDomainsMask) + return _pathsInDomains(.AllApplicationsDirectory, .AllDomainsMask) } - private static func pathInUserDomain(directory: NSSearchPathDirectory) -> Path { - return pathsInDomains(directory, .UserDomainMask)[0] + private static func _pathInUserDomain(directory: NSSearchPathDirectory) -> Path { + return _pathsInDomains(directory, .UserDomainMask)[0] } - private static func pathInSystemDomain(directory: NSSearchPathDirectory) -> Path { - return pathsInDomains(directory, .SystemDomainMask)[0] + private static func _pathInSystemDomain(directory: NSSearchPathDirectory) -> Path { + return _pathsInDomains(directory, .SystemDomainMask)[0] } - private static func pathsInDomains(directory: NSSearchPathDirectory, + private static func _pathsInDomains(directory: NSSearchPathDirectory, _ domainMask: NSSearchPathDomainMask) -> [Path] { return NSSearchPathForDirectoriesInDomains(directory, domainMask, true) - .map({ Path($0) }) + .map({ Path($0).standardized }) } } diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/Process+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/Process+FileKit.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/Process+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/Process+FileKit.swift diff --git a/Carthage/Checkouts/FileKit/Sources/RelativePathType.swift b/Carthage/Checkouts/FileKit/Sources/RelativePathType.swift new file mode 100644 index 0000000..a40c2d8 --- /dev/null +++ b/Carthage/Checkouts/FileKit/Sources/RelativePathType.swift @@ -0,0 +1,29 @@ +// +// RelativePathType.swift +// FileKit +// +// Created by ijump on 4/30/16. +// Copyright © 2016 Nikolai Vazquez. All rights reserved. +// + +import Foundation + +/// The type attribute for a relative path. +public enum RelativePathType: String { + + /// path like "dir/path". + case Normal + + /// path like "." and "". + case Current + + /// path like "../path". + case Ancestor + + /// path like "..". + case Parent + + /// path like "/path". + case Absolute + +} diff --git a/Carthage/Checkouts/FileKit/FileKit/Extensions/String+FileKit.swift b/Carthage/Checkouts/FileKit/Sources/String+FileKit.swift similarity index 96% rename from Carthage/Checkouts/FileKit/FileKit/Extensions/String+FileKit.swift rename to Carthage/Checkouts/FileKit/Sources/String+FileKit.swift index 7d6394a..a6311b7 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Extensions/String+FileKit.swift +++ b/Carthage/Checkouts/FileKit/Sources/String+FileKit.swift @@ -33,7 +33,7 @@ extension String: DataType { /// Creates a string from a path. public static func readFromPath(path: Path) throws -> String { let possibleContents = try? NSString( - contentsOfFile: path.rawValue, + contentsOfFile: path._safeRawValue, encoding: NSUTF8StringEncoding) guard let contents = possibleContents else { throw FileKitError.ReadFromFileFail(path: path) @@ -59,7 +59,7 @@ extension String: DataType { /// public func writeToPath(path: Path, atomically useAuxiliaryFile: Bool) throws { do { - try self.writeToFile(path.rawValue, + try self.writeToFile(path._safeRawValue, atomically: useAuxiliaryFile, encoding: NSUTF8StringEncoding) } catch { diff --git a/Carthage/Checkouts/FileKit/FileKit/Core/TextFile.swift b/Carthage/Checkouts/FileKit/Sources/TextFile.swift similarity index 98% rename from Carthage/Checkouts/FileKit/FileKit/Core/TextFile.swift rename to Carthage/Checkouts/FileKit/Sources/TextFile.swift index 5d13d47..f56e4de 100644 --- a/Carthage/Checkouts/FileKit/FileKit/Core/TextFile.swift +++ b/Carthage/Checkouts/FileKit/Sources/TextFile.swift @@ -64,7 +64,7 @@ public class TextFile: File { /// public override func write(data: String, atomically useAuxiliaryFile: Bool) throws { do { - try data.writeToFile(path.rawValue, atomically: useAuxiliaryFile, encoding: encoding) + try data.writeToFile(path._safeRawValue, atomically: useAuxiliaryFile, encoding: encoding) } catch { throw FileKitError.WriteToFileFail(path: path) } @@ -118,7 +118,7 @@ public class TextFileStreamReader { /// The text encoding. public let encoding: NSStringEncoding - + /// The chunk size when reading. public let chunkSize: Int diff --git a/Carthage/Checkouts/FileKit/FileKit/Info.plist b/Carthage/Checkouts/FileKit/Support/Info.plist similarity index 100% rename from Carthage/Checkouts/FileKit/FileKit/Info.plist rename to Carthage/Checkouts/FileKit/Support/Info.plist diff --git a/Carthage/Checkouts/FileKit/FileKitTests/Date+FileKit.swift b/Carthage/Checkouts/FileKit/Tests/Date+FileKit.swift similarity index 100% rename from Carthage/Checkouts/FileKit/FileKitTests/Date+FileKit.swift rename to Carthage/Checkouts/FileKit/Tests/Date+FileKit.swift diff --git a/Carthage/Checkouts/FileKit/FileKitTests/FileKitTests.swift b/Carthage/Checkouts/FileKit/Tests/FileKitTests.swift similarity index 99% rename from Carthage/Checkouts/FileKit/FileKitTests/FileKitTests.swift rename to Carthage/Checkouts/FileKit/Tests/FileKitTests.swift index 2aac6aa..c761dfc 100644 --- a/Carthage/Checkouts/FileKit/FileKitTests/FileKitTests.swift +++ b/Carthage/Checkouts/FileKit/Tests/FileKitTests.swift @@ -584,7 +584,7 @@ class FileKitTests: XCTestCase { // specific line result = textFile | "eli" XCTAssertEqual(result, [expectedLines[1]]) - + // the other line result = textFile |- "eli" XCTAssertEqual(result, [expectedLines[0], expectedLines[2]]) diff --git a/Carthage/Checkouts/FileKit/FileKitTests/Info.plist b/Carthage/Checkouts/FileKit/Tests/Info.plist similarity index 100% rename from Carthage/Checkouts/FileKit/FileKitTests/Info.plist rename to Carthage/Checkouts/FileKit/Tests/Info.plist diff --git a/Carthage/Checkouts/PrettyColors/.gitignore b/Carthage/Checkouts/PrettyColors/.gitignore deleted file mode 100644 index 2d3bbed..0000000 --- a/Carthage/Checkouts/PrettyColors/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -*.xcscmblueprint -*.playgrounddata - -# CocoaPods -# -Pods/ - -# Carthage -# -Carthage/Build diff --git a/Carthage/Checkouts/PrettyColors/.gitmodules b/Carthage/Checkouts/PrettyColors/.gitmodules deleted file mode 100644 index e26f4f8..0000000 --- a/Carthage/Checkouts/PrettyColors/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "Supporting Files/Configuration"] - path = Supporting Files/Configuration - url = https://github.com/jspahrsummers/xcconfigs.git diff --git a/Carthage/Checkouts/PrettyColors/PrettyColors.podspec b/Carthage/Checkouts/PrettyColors/PrettyColors.podspec deleted file mode 100644 index dd2bebb..0000000 --- a/Carthage/Checkouts/PrettyColors/PrettyColors.podspec +++ /dev/null @@ -1,16 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'PrettyColors' - spec.version = '3.0.2' - spec.summary = 'Styles and colors text in the Terminal with ANSI escape codes. Conforms to ECMA Standard 48.' - spec.homepage = 'https://github.com/jdhealy/PrettyColors' - spec.license = { :type => 'MIT', :file => 'LICENSE.md' } - spec.author = { - 'J.D. Healy' => 'jdhealy@gmail.com' - } - spec.social_media_url = 'http://twitter.com/jdhealy' - spec.source = { :git => 'https://github.com/jdhealy/PrettyColors.git', :tag => "v#{spec.version}" } - spec.source_files = 'Source/**/*.{h,swift}' - spec.requires_arc = true - spec.ios.deployment_target = '8.0' - spec.osx.deployment_target = '10.9' -end diff --git a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.pbxproj b/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.pbxproj deleted file mode 100644 index 9298bdd..0000000 --- a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.pbxproj +++ /dev/null @@ -1,819 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 673900B11A546F2D0066713B /* PrettyColors.h in Headers */ = {isa = PBXBuildFile; fileRef = 673900B01A546F2D0066713B /* PrettyColors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 673900C81A546F530066713B /* StyleParameter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900C71A546F530066713B /* StyleParameter.swift */; }; - 673900CA1A546F880066713B /* ECMA 48.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900C91A546F880066713B /* ECMA 48.swift */; }; - 673900CC1A546FE00066713B /* Wrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900CB1A546FE00066713B /* Wrap.swift */; }; - 673900CE1A54702D0066713B /* EightBitColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900CD1A54702D0066713B /* EightBitColor.swift */; }; - 673900D21A5482890066713B /* PrettyColors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 673900AB1A546F2D0066713B /* PrettyColors.framework */; }; - 678D8CC21A58F50500F1FE02 /* Named.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D8CC11A58F50500F1FE02 /* Named.swift */; }; - 6799D19E1A5D9FC100B8840D /* PrettyColors.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 673900AB1A546F2D0066713B /* PrettyColors.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 6799D1A01A5D9FD400B8840D /* PrettyColors.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 67B8DD621A5C86B400F4CE19 /* PrettyColors.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 67B8DD6D1A5C86B500F4CE19 /* PrettyColors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67B8DD621A5C86B400F4CE19 /* PrettyColors.framework */; }; - 67B8DD7B1A5C86D700F4CE19 /* ECMA 48.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900C91A546F880066713B /* ECMA 48.swift */; }; - 67B8DD7C1A5C86D700F4CE19 /* StyleParameter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900C71A546F530066713B /* StyleParameter.swift */; }; - 67B8DD7D1A5C86DD00F4CE19 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67C9FB1C1A5C7CF100FDFE3A /* Color.swift */; }; - 67B8DD7E1A5C86DD00F4CE19 /* Wrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900CB1A546FE00066713B /* Wrap.swift */; }; - 67B8DD7F1A5C86DD00F4CE19 /* Named.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D8CC11A58F50500F1FE02 /* Named.swift */; }; - 67B8DD801A5C86DD00F4CE19 /* EightBitColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900CD1A54702D0066713B /* EightBitColor.swift */; }; - 67B8DD821A5C86E600F4CE19 /* PrettyColors.h in Headers */ = {isa = PBXBuildFile; fileRef = 673900B01A546F2D0066713B /* PrettyColors.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 67C9FB1D1A5C7CF100FDFE3A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67C9FB1C1A5C7CF100FDFE3A /* Color.swift */; }; - 67E36B6C1A78267D00B3686F /* PrettyColorsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900BD1A546F2D0066713B /* PrettyColorsTests.swift */; }; - 67E36B6D1A78267E00B3686F /* PrettyColorsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673900BD1A546F2D0066713B /* PrettyColorsTests.swift */; }; - 67E36B6E1A78305F00B3686F /* Equality.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67843C211A6102200061C1D3 /* Equality.swift */; }; - 67E36B6F1A78306000B3686F /* Equality.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67843C211A6102200061C1D3 /* Equality.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 673900B81A546F2D0066713B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 673900A21A546F2C0066713B /* Project object */; - proxyType = 1; - remoteGlobalIDString = 673900AA1A546F2C0066713B; - remoteInfo = PrettyColors; - }; - 67B8DD6E1A5C86B500F4CE19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 673900A21A546F2C0066713B /* Project object */; - proxyType = 1; - remoteGlobalIDString = 67B8DD611A5C86B400F4CE19; - remoteInfo = PrettyColors; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 6799D19D1A5D9FB000B8840D /* Copy Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 6799D19E1A5D9FC100B8840D /* PrettyColors.framework in Copy Frameworks */, - ); - name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - 6799D19F1A5D9FCC00B8840D /* Copy Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 6799D1A01A5D9FD400B8840D /* PrettyColors.framework in Copy Frameworks */, - ); - name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 673900AB1A546F2D0066713B /* PrettyColors.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PrettyColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 673900AF1A546F2D0066713B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 673900B01A546F2D0066713B /* PrettyColors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrettyColors.h; sourceTree = ""; }; - 673900B61A546F2D0066713B /* PrettyColorsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PrettyColorsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 673900BC1A546F2D0066713B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 673900BD1A546F2D0066713B /* PrettyColorsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrettyColorsTests.swift; sourceTree = ""; }; - 673900C71A546F530066713B /* StyleParameter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StyleParameter.swift; sourceTree = ""; }; - 673900C91A546F880066713B /* ECMA 48.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ECMA 48.swift"; sourceTree = ""; }; - 673900CB1A546FE00066713B /* Wrap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Wrap.swift; sourceTree = ""; }; - 673900CD1A54702D0066713B /* EightBitColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EightBitColor.swift; sourceTree = ""; }; - 67843C211A6102200061C1D3 /* Equality.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Equality.swift; sourceTree = ""; }; - 678D8CC11A58F50500F1FE02 /* Named.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Named.swift; sourceTree = ""; }; - 67B8DD621A5C86B400F4CE19 /* PrettyColors.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PrettyColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 67B8DD6C1A5C86B500F4CE19 /* PrettyColorsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PrettyColorsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 67B8DD851A5C87AE00F4CE19 /* Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = ""; }; - 67B8DD871A5C87AE00F4CE19 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - 67B8DD881A5C87AE00F4CE19 /* Profile.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Profile.xcconfig; sourceTree = ""; }; - 67B8DD891A5C87AE00F4CE19 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 67B8DD8A1A5C87AE00F4CE19 /* Test.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Test.xcconfig; sourceTree = ""; }; - 67B8DD8C1A5C87AE00F4CE19 /* Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Application.xcconfig; sourceTree = ""; }; - 67B8DD8D1A5C87AE00F4CE19 /* Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Framework.xcconfig; sourceTree = ""; }; - 67B8DD8E1A5C87AE00F4CE19 /* StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = StaticLibrary.xcconfig; sourceTree = ""; }; - 67B8DD901A5C87AE00F4CE19 /* iOS-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Application.xcconfig"; sourceTree = ""; }; - 67B8DD911A5C87AE00F4CE19 /* iOS-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Base.xcconfig"; sourceTree = ""; }; - 67B8DD921A5C87AE00F4CE19 /* iOS-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Framework.xcconfig"; sourceTree = ""; }; - 67B8DD931A5C87AE00F4CE19 /* iOS-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-StaticLibrary.xcconfig"; sourceTree = ""; }; - 67B8DD951A5C87AF00F4CE19 /* Mac-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Application.xcconfig"; sourceTree = ""; }; - 67B8DD961A5C87AF00F4CE19 /* Mac-Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Base.xcconfig"; sourceTree = ""; }; - 67B8DD971A5C87AF00F4CE19 /* Mac-DynamicLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-DynamicLibrary.xcconfig"; sourceTree = ""; }; - 67B8DD981A5C87AF00F4CE19 /* Mac-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-Framework.xcconfig"; sourceTree = ""; }; - 67B8DD991A5C87AF00F4CE19 /* Mac-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-StaticLibrary.xcconfig"; sourceTree = ""; }; - 67B8DD9A1A5C87AF00F4CE19 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - 67C9FB1C1A5C7CF100FDFE3A /* Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 673900A71A546F2C0066713B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 673900B31A546F2D0066713B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 673900D21A5482890066713B /* PrettyColors.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 67B8DD5E1A5C86B400F4CE19 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 67B8DD691A5C86B500F4CE19 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 67B8DD6D1A5C86B500F4CE19 /* PrettyColors.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 673900A11A546F2C0066713B = { - isa = PBXGroup; - children = ( - 673900AD1A546F2D0066713B /* Source */, - 673900AE1A546F2D0066713B /* Supporting Files */, - 673900BA1A546F2D0066713B /* Tests */, - 673900AC1A546F2D0066713B /* Products */, - ); - sourceTree = ""; - }; - 673900AC1A546F2D0066713B /* Products */ = { - isa = PBXGroup; - children = ( - 673900AB1A546F2D0066713B /* PrettyColors.framework */, - 673900B61A546F2D0066713B /* PrettyColorsTests.xctest */, - 67B8DD621A5C86B400F4CE19 /* PrettyColors.framework */, - 67B8DD6C1A5C86B500F4CE19 /* PrettyColorsTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 673900AD1A546F2D0066713B /* Source */ = { - isa = PBXGroup; - children = ( - 673900C91A546F880066713B /* ECMA 48.swift */, - 673900C71A546F530066713B /* StyleParameter.swift */, - 67C9FB1E1A5C7E7B00FDFE3A /* Color */, - 673900B01A546F2D0066713B /* PrettyColors.h */, - ); - path = Source; - sourceTree = ""; - }; - 673900AE1A546F2D0066713B /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 67B8DD831A5C87AE00F4CE19 /* Configuration */, - 673900AF1A546F2D0066713B /* Info.plist */, - ); - path = "Supporting Files"; - sourceTree = ""; - }; - 673900BA1A546F2D0066713B /* Tests */ = { - isa = PBXGroup; - children = ( - 673900BD1A546F2D0066713B /* PrettyColorsTests.swift */, - 67843C211A6102200061C1D3 /* Equality.swift */, - 673900BB1A546F2D0066713B /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - 673900BB1A546F2D0066713B /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 673900BC1A546F2D0066713B /* Info.plist */, - ); - path = "Supporting Files"; - sourceTree = ""; - }; - 67B8DD831A5C87AE00F4CE19 /* Configuration */ = { - isa = PBXGroup; - children = ( - 67B8DD841A5C87AE00F4CE19 /* Base */, - 67B8DD8F1A5C87AE00F4CE19 /* iOS */, - 67B8DD941A5C87AE00F4CE19 /* Mac OS X */, - 67B8DD9A1A5C87AF00F4CE19 /* README.md */, - ); - path = Configuration; - sourceTree = ""; - }; - 67B8DD841A5C87AE00F4CE19 /* Base */ = { - isa = PBXGroup; - children = ( - 67B8DD851A5C87AE00F4CE19 /* Common.xcconfig */, - 67B8DD861A5C87AE00F4CE19 /* Configurations */, - 67B8DD8B1A5C87AE00F4CE19 /* Targets */, - ); - path = Base; - sourceTree = ""; - }; - 67B8DD861A5C87AE00F4CE19 /* Configurations */ = { - isa = PBXGroup; - children = ( - 67B8DD871A5C87AE00F4CE19 /* Debug.xcconfig */, - 67B8DD881A5C87AE00F4CE19 /* Profile.xcconfig */, - 67B8DD891A5C87AE00F4CE19 /* Release.xcconfig */, - 67B8DD8A1A5C87AE00F4CE19 /* Test.xcconfig */, - ); - path = Configurations; - sourceTree = ""; - }; - 67B8DD8B1A5C87AE00F4CE19 /* Targets */ = { - isa = PBXGroup; - children = ( - 67B8DD8C1A5C87AE00F4CE19 /* Application.xcconfig */, - 67B8DD8D1A5C87AE00F4CE19 /* Framework.xcconfig */, - 67B8DD8E1A5C87AE00F4CE19 /* StaticLibrary.xcconfig */, - ); - path = Targets; - sourceTree = ""; - }; - 67B8DD8F1A5C87AE00F4CE19 /* iOS */ = { - isa = PBXGroup; - children = ( - 67B8DD901A5C87AE00F4CE19 /* iOS-Application.xcconfig */, - 67B8DD911A5C87AE00F4CE19 /* iOS-Base.xcconfig */, - 67B8DD921A5C87AE00F4CE19 /* iOS-Framework.xcconfig */, - 67B8DD931A5C87AE00F4CE19 /* iOS-StaticLibrary.xcconfig */, - ); - path = iOS; - sourceTree = ""; - }; - 67B8DD941A5C87AE00F4CE19 /* Mac OS X */ = { - isa = PBXGroup; - children = ( - 67B8DD951A5C87AF00F4CE19 /* Mac-Application.xcconfig */, - 67B8DD961A5C87AF00F4CE19 /* Mac-Base.xcconfig */, - 67B8DD971A5C87AF00F4CE19 /* Mac-DynamicLibrary.xcconfig */, - 67B8DD981A5C87AF00F4CE19 /* Mac-Framework.xcconfig */, - 67B8DD991A5C87AF00F4CE19 /* Mac-StaticLibrary.xcconfig */, - ); - path = "Mac OS X"; - sourceTree = ""; - }; - 67C9FB1E1A5C7E7B00FDFE3A /* Color */ = { - isa = PBXGroup; - children = ( - 67C9FB1C1A5C7CF100FDFE3A /* Color.swift */, - 673900CB1A546FE00066713B /* Wrap.swift */, - 678D8CC11A58F50500F1FE02 /* Named.swift */, - 673900CD1A54702D0066713B /* EightBitColor.swift */, - ); - path = Color; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 673900A81A546F2C0066713B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 673900B11A546F2D0066713B /* PrettyColors.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 67B8DD5F1A5C86B400F4CE19 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 67B8DD821A5C86E600F4CE19 /* PrettyColors.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 673900AA1A546F2C0066713B /* PrettyColors-Mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = 673900C11A546F2D0066713B /* Build configuration list for PBXNativeTarget "PrettyColors-Mac" */; - buildPhases = ( - 673900A61A546F2C0066713B /* Sources */, - 673900A71A546F2C0066713B /* Frameworks */, - 673900A81A546F2C0066713B /* Headers */, - 673900A91A546F2C0066713B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PrettyColors-Mac"; - productName = PrettyColors; - productReference = 673900AB1A546F2D0066713B /* PrettyColors.framework */; - productType = "com.apple.product-type.framework"; - }; - 673900B51A546F2D0066713B /* PrettyColorsTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 673900C41A546F2D0066713B /* Build configuration list for PBXNativeTarget "PrettyColorsTests" */; - buildPhases = ( - 673900B21A546F2D0066713B /* Sources */, - 673900B31A546F2D0066713B /* Frameworks */, - 6799D19D1A5D9FB000B8840D /* Copy Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 673900B91A546F2D0066713B /* PBXTargetDependency */, - ); - name = PrettyColorsTests; - productName = PrettyColorsTests; - productReference = 673900B61A546F2D0066713B /* PrettyColorsTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 67B8DD611A5C86B400F4CE19 /* PrettyColors-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 67B8DD751A5C86B500F4CE19 /* Build configuration list for PBXNativeTarget "PrettyColors-iOS" */; - buildPhases = ( - 67B8DD5D1A5C86B400F4CE19 /* Sources */, - 67B8DD5E1A5C86B400F4CE19 /* Frameworks */, - 67B8DD5F1A5C86B400F4CE19 /* Headers */, - 67B8DD601A5C86B400F4CE19 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PrettyColors-iOS"; - productName = PrettyColors; - productReference = 67B8DD621A5C86B400F4CE19 /* PrettyColors.framework */; - productType = "com.apple.product-type.framework"; - }; - 67B8DD6B1A5C86B500F4CE19 /* PrettyColorsTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 67B8DD781A5C86B500F4CE19 /* Build configuration list for PBXNativeTarget "PrettyColorsTests" */; - buildPhases = ( - 67B8DD681A5C86B500F4CE19 /* Sources */, - 67B8DD691A5C86B500F4CE19 /* Frameworks */, - 6799D19F1A5D9FCC00B8840D /* Copy Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 67B8DD6F1A5C86B500F4CE19 /* PBXTargetDependency */, - ); - name = PrettyColorsTests; - productName = PrettyColorsTests; - productReference = 67B8DD6C1A5C86B500F4CE19 /* PrettyColorsTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 673900A21A546F2C0066713B /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = "J.D. Healy"; - TargetAttributes = { - 673900AA1A546F2C0066713B = { - CreatedOnToolsVersion = 6.2; - }; - 673900B51A546F2D0066713B = { - CreatedOnToolsVersion = 6.2; - }; - 67B8DD611A5C86B400F4CE19 = { - CreatedOnToolsVersion = 6.2; - }; - 67B8DD6B1A5C86B500F4CE19 = { - CreatedOnToolsVersion = 6.2; - }; - }; - }; - buildConfigurationList = 673900A51A546F2C0066713B /* Build configuration list for PBXProject "PrettyColors" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 673900A11A546F2C0066713B; - productRefGroup = 673900AC1A546F2D0066713B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 673900AA1A546F2C0066713B /* PrettyColors-Mac */, - 673900B51A546F2D0066713B /* PrettyColorsTests */, - 67B8DD611A5C86B400F4CE19 /* PrettyColors-iOS */, - 67B8DD6B1A5C86B500F4CE19 /* PrettyColorsTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 673900A91A546F2C0066713B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 67B8DD601A5C86B400F4CE19 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 673900A61A546F2C0066713B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 673900CA1A546F880066713B /* ECMA 48.swift in Sources */, - 678D8CC21A58F50500F1FE02 /* Named.swift in Sources */, - 673900C81A546F530066713B /* StyleParameter.swift in Sources */, - 673900CC1A546FE00066713B /* Wrap.swift in Sources */, - 673900CE1A54702D0066713B /* EightBitColor.swift in Sources */, - 67C9FB1D1A5C7CF100FDFE3A /* Color.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 673900B21A546F2D0066713B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 67E36B6C1A78267D00B3686F /* PrettyColorsTests.swift in Sources */, - 67E36B6F1A78306000B3686F /* Equality.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 67B8DD5D1A5C86B400F4CE19 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 67B8DD7B1A5C86D700F4CE19 /* ECMA 48.swift in Sources */, - 67B8DD7F1A5C86DD00F4CE19 /* Named.swift in Sources */, - 67B8DD7C1A5C86D700F4CE19 /* StyleParameter.swift in Sources */, - 67B8DD801A5C86DD00F4CE19 /* EightBitColor.swift in Sources */, - 67B8DD7D1A5C86DD00F4CE19 /* Color.swift in Sources */, - 67B8DD7E1A5C86DD00F4CE19 /* Wrap.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 67B8DD681A5C86B500F4CE19 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 67E36B6D1A78267E00B3686F /* PrettyColorsTests.swift in Sources */, - 67E36B6E1A78305F00B3686F /* Equality.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 673900B91A546F2D0066713B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 673900AA1A546F2C0066713B /* PrettyColors-Mac */; - targetProxy = 673900B81A546F2D0066713B /* PBXContainerItemProxy */; - }; - 67B8DD6F1A5C86B500F4CE19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 67B8DD611A5C86B400F4CE19 /* PrettyColors-iOS */; - targetProxy = 67B8DD6E1A5C86B500F4CE19 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 673900BF1A546F2D0066713B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD871A5C87AE00F4CE19 /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WARNING_CFLAGS = ( - "-Wno-error=unknown-warning-option", - "-Wno-gcc-compat", - "-Wno-unused-const-variable", - "-Wno-unused", - "-Wno-unused-result", - "-Wno-unused-value", - ); - }; - name = Debug; - }; - 673900C01A546F2D0066713B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD891A5C87AE00F4CE19 /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = macosx; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - WARNING_CFLAGS = ( - "-Wno-error=unknown-warning-option", - "-Wno-gcc-compat", - "-Wno-unused-const-variable", - "-Wno-unused", - "-Wno-unused-result", - "-Wno-unused-value", - ); - }; - name = Release; - }; - 673900C21A546F2D0066713B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD981A5C87AF00F4CE19 /* Mac-Framework.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "Supporting Files/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 673900C31A546F2D0066713B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD981A5C87AF00F4CE19 /* Mac-Framework.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - COMBINE_HIDPI_IMAGES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = "Supporting Files/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.9; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 673900C51A546F2D0066713B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD951A5C87AF00F4CE19 /* Mac-Application.xcconfig */; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 673900C61A546F2D0066713B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD951A5C87AF00F4CE19 /* Mac-Application.xcconfig */; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 67B8DD761A5C86B500F4CE19 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD921A5C87AE00F4CE19 /* iOS-Framework.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Supporting Files/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 67B8DD771A5C86B500F4CE19 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67B8DD921A5C87AE00F4CE19 /* iOS-Framework.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Supporting Files/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(PROJECT_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 67B8DD791A5C86B500F4CE19 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 67B8DD7A1A5C86B500F4CE19 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Supporting Files/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.jdhealy.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 673900A51A546F2C0066713B /* Build configuration list for PBXProject "PrettyColors" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 673900BF1A546F2D0066713B /* Debug */, - 673900C01A546F2D0066713B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 673900C11A546F2D0066713B /* Build configuration list for PBXNativeTarget "PrettyColors-Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 673900C21A546F2D0066713B /* Debug */, - 673900C31A546F2D0066713B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 673900C41A546F2D0066713B /* Build configuration list for PBXNativeTarget "PrettyColorsTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 673900C51A546F2D0066713B /* Debug */, - 673900C61A546F2D0066713B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 67B8DD751A5C86B500F4CE19 /* Build configuration list for PBXNativeTarget "PrettyColors-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 67B8DD761A5C86B500F4CE19 /* Debug */, - 67B8DD771A5C86B500F4CE19 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 67B8DD781A5C86B500F4CE19 /* Build configuration list for PBXNativeTarget "PrettyColorsTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 67B8DD791A5C86B500F4CE19 /* Debug */, - 67B8DD7A1A5C86B500F4CE19 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 673900A21A546F2C0066713B /* Project object */; -} diff --git a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index d59eecb..0000000 --- a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors Mac.xcscheme b/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors Mac.xcscheme deleted file mode 100644 index 537a2ec..0000000 --- a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors Mac.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors iOS.xcscheme b/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors iOS.xcscheme deleted file mode 100644 index ff1c479..0000000 --- a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/xcshareddata/xcschemes/PrettyColors iOS.xcscheme +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Carthage/Checkouts/PrettyColors/README.md b/Carthage/Checkouts/PrettyColors/README.md deleted file mode 100644 index 690c06e..0000000 --- a/Carthage/Checkouts/PrettyColors/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# PrettyColors - -[![Carthage Compatibility](https://img.shields.io/badge/Carthage-✔-f2a77e.svg?style=flat)][carthage] -[![CocoaPods Version](https://img.shields.io/cocoapods/v/PrettyColors.svg?style=flat)][cocoadocs] -[![License](https://img.shields.io/cocoapods/l/PrettyColors.svg?style=flat)][cocoadocs] -[![Platform](https://img.shields.io/cocoapods/p/PrettyColors.svg?style=flat)][cocoadocs] -[carthage]: https://github.com/Carthage/Carthage/ -[cocoadocs]: http://cocoadocs.org/docsets/PrettyColors - -## Description -`PrettyColors` is a Swift library for styling and coloring text in the Terminal. -The library outputs [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) and conforms to [ECMA Standard 48](http://www.ecma-international.org/publications/standards/Ecma-048.htm). - -### Example -```swift -import PrettyColors - -let redText: String = Color.Wrap(foreground: .Red).wrap("A red piece of text.") -println(redText) - -Color.Wrap(foreground: .Yellow, style: .Bold) -Color.Wrap(foreground: .Green, background: .Black, style: .Bold, .Underlined) - -// 8-bit (256) color support -Color.Wrap(foreground: 114) -Color.Wrap(foreground: 114, style: .Bold) -``` - -**More examples can be found in [the tests](https://github.com/jdhealy/PrettyColors/blob/master/Tests/PrettyColorsTests.swift).** - -### Installation -#### [Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) -Add the following to your Cartfile: - -```ogdl -github "jdhealy/PrettyColors" -``` -#### [CocoaPods](http://cocoapods.org) -Add the following to your [Podfile](http://guides.cocoapods.org/using/the-podfile.html): - -```ruby -pod 'PrettyColors', :git => 'https://github.com/jdhealy/PrettyColors' -``` - -You will also need to make sure you're opting into using frameworks: - -```ruby -use_frameworks! -``` - -Then run `pod install` with CocoaPods 0.36 or newer. - -## Inspiration -- [`junegunn/ansi256`](https://github.com/junegunn/ansi256/) -- [`tehmaze/ansi`](https://github.com/tehmaze/ansi/) - -## License -PrettyColors is released under the [MIT license](http://opensource.org/licenses/MIT). See [LICENSE.md](https://github.com/jdhealy/PrettyColors/blob/master/LICENSE.md) for details. diff --git a/Carthage/Checkouts/PrettyColors/Source/Color/Color.swift b/Carthage/Checkouts/PrettyColors/Source/Color/Color.swift deleted file mode 100644 index 5f3d7b1..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/Color/Color.swift +++ /dev/null @@ -1,21 +0,0 @@ - -public struct Color {} - -public protocol ColorType: Parameter { - var level: Level { get } -} - -/// Foreground/Background -public enum Level { - case Foreground - case Background - - public mutating func toggle() { - if self == .Foreground { - self = .Background - } else { - self = .Foreground - } - } - -} diff --git a/Carthage/Checkouts/PrettyColors/Source/Color/EightBitColor.swift b/Carthage/Checkouts/PrettyColors/Source/Color/EightBitColor.swift deleted file mode 100644 index d5fe687..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/Color/EightBitColor.swift +++ /dev/null @@ -1,32 +0,0 @@ -extension Color { - public struct EightBit: Parameter, ColorType { - public var color: UInt8 - public var level: Level - - public var code: (enable: [UInt8], disable: UInt8?) { - return ( - enable: [ - (self.level == .Foreground ? 38 : 48), - 5, - self.color - ], - disable: nil - ) - } - - public init( - foreground color: UInt8 - ) { - self.color = color - self.level = Level.Foreground - } - - public init( - background color: UInt8 - ) { - self.color = color - self.level = Level.Background - } - - } -} diff --git a/Carthage/Checkouts/PrettyColors/Source/Color/Named.swift b/Carthage/Checkouts/PrettyColors/Source/Color/Named.swift deleted file mode 100644 index 25b71ef..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/Color/Named.swift +++ /dev/null @@ -1,63 +0,0 @@ -extension Color { - public struct Named: Parameter, ColorType { - public enum Color: UInt8 { - case Black = 30 - case Red - case Green - case Yellow - case Blue - case Magenta - case Cyan - case White - } - - public enum Brightness { - case Bright - case NonBright - - public var additive: UInt8 { return self == .Bright ? 60 : 0 } - - public mutating func toggle() { - switch self { - case .Bright: self = .NonBright - case .NonBright: self = .Bright - } - } - - } - - public var color: Color - public var brightness = Brightness.NonBright - public var level = Level.Foreground - - public var code: (enable: [UInt8], disable: UInt8?) { - return ( - enable: [ - self.color.rawValue + - self.brightness.additive + - (self.level == .Foreground ? 0 : 10) - ], - disable: nil - ) - } - - public init( - foreground color: Color, - brightness: Brightness = .NonBright - ) { - self.color = color - self.brightness = brightness - self.level = Level.Foreground - } - - public init( - background color: Color, - brightness: Brightness = .NonBright - ) { - self.color = color - self.brightness = brightness - self.level = Level.Background - } - - } -} diff --git a/Carthage/Checkouts/PrettyColors/Source/Color/Wrap.swift b/Carthage/Checkouts/PrettyColors/Source/Color/Wrap.swift deleted file mode 100644 index 36af19f..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/Color/Wrap.swift +++ /dev/null @@ -1,275 +0,0 @@ -/* begin extension of color */ extension Color { - -//------------------------------------------------------------------------------ -// MARK: - Wrap -//------------------------------------------------------------------------------ - -public struct Wrap: SelectGraphicRenditionWrapType { - - public typealias Element = Parameter - public typealias UnderlyingCollection = [Element] - - public var parameters = UnderlyingCollection() - - //------------------------------------------------------------------------------ - // MARK: - Initializers - //------------------------------------------------------------------------------ - - public init(parameters: S) { - self.parameters = UnderlyingCollection(parameters) - } - - public init() { - self.init( - parameters: [] as UnderlyingCollection - ) - } - - public init(arrayLiteral parameters: Element...) { - self.init(parameters: parameters) - } - - public init( - foreground: Color.Named.Color? = nil, - background: Color.Named.Color? = nil, - style: StyleParameter... - ) { - let colors: [Parameter] = [ - foreground.map { Color.Named(foreground: $0) }, - background.map { Color.Named(background: $0) } - ].flatMap { $0 } // concatenate non-nil ColorType parameters - - self.init(parameters: colors + style.map { $0 as Parameter }) - } - - public init( - foreground: UInt8? = nil, - background: UInt8? = nil, - style: StyleParameter... - ) { - let colors: [Parameter] = [ - foreground.map { Color.EightBit(foreground: $0) }, - background.map { Color.EightBit(background: $0) } - ].flatMap { $0 } // concatenate non-nil ColorType parameters - - self.init(parameters: colors + style.map { $0 as Parameter }) - } - - public init(styles: StyleParameter...) { - self.init(parameters: styles.map { $0 as Parameter }) - } - - //------------------------------------------------------------------------------ - // MARK: - SelectGraphicRenditionWrap - //------------------------------------------------------------------------------ - - /// A SelectGraphicRendition code in two parts: enable and disable. - public var code: (enable: SelectGraphicRendition, disable: SelectGraphicRendition) { - - if self.parameters.isEmpty { - return ("", "") - } - - let disableAll = [StyleParameter.Reset.defaultRendition] - - let (enables, disables) = self.parameters.reduce( - (enable: [] as [UInt8], disable: [] as [UInt8]) - ) { (previous: (enable: [UInt8], disable: [UInt8]), value) in - let code = value.code - let appendedEnable = previous.enable + code.enable - - guard - previous.disable != disableAll, - let disable = code.disable - else { - return (enable: appendedEnable, disable: disableAll) - } - - return (enable: appendedEnable, disable: previous.disable + [disable]) - } - - let render = { - ECMA48.controlSequenceIntroducer - + ($0 as [UInt8]) - .map(String.init) - .joinWithSeparator(";") - + "m" - } - - return (enable: render(enables), disable: render(disables)) - } - - /// Wraps the enable and disable SelectGraphicRendition codes around a string. - public func wrap(string: String) -> String { - let (enable, disable) = self.code - return enable + string + disable - } - - //------------------------------------------------------------------------------ - // MARK: - Foreground/Background Helpers - //------------------------------------------------------------------------------ - - private func filter(level level: Level, inverse: Bool = false) -> UnderlyingCollection { - return self.filter { - let condition = (($0 as? ColorType)?.level == level) ?? false - return inverse ? !condition : condition - } - } - - public var foreground: Parameter? { - get { - return self.filter(level: .Foreground).first - } - mutating set(newForeground) { - self.parameters = - [newForeground].flatMap { $0 } + // Empty array or array containing new foreground - self.filter(level: .Foreground, inverse: true) // All non-foreground parameters - } - } - - public var background: Parameter? { - get { - return self.filter(level: .Background).first - } - mutating set(newBackground) { - self.parameters = - [newBackground].flatMap { $0 } + // Empty array or array containing new background - self.filter(level: .Background, inverse: true) // All non-background parameters - } - } - - private func levelTransform(level: Level, @noescape transform: ColorType -> ColorType) -> ( - transformed: Bool, - parameters: UnderlyingCollection - ) { - return self.parameters.reduce( - (transformed: false, parameters: [] as UnderlyingCollection) - ) { previous, value in - if - let color = value as? ColorType where color.level == level, - case let transformation = [ transform(color) ] as UnderlyingCollection - { - return (transformed: true, parameters: previous.parameters + transformation) - } else { - return (previous.transformed, previous.parameters + [value]) - } - } - } - - /// Synchronously transform all ColorTypes with a `Level` of `Foreground`. - public mutating func foreground(@noescape transform: ColorType -> ColorType) -> Bool { - let transformation = levelTransform(.Foreground, transform: transform) - self.parameters = transformation.parameters - return transformation.transformed - } - - /// Synchronously transform all ColorTypes with a `Level` of `Background`. - public mutating func background(@noescape transform: ColorType -> ColorType) -> Bool { - let transformation = levelTransform(.Background, transform: transform) - self.parameters = transformation.parameters - return transformation.transformed - } - -} - -/* end extension of color */ } - -//------------------------------------------------------------------------------ -// MARK: - Wrap: SequenceType -//------------------------------------------------------------------------------ - -extension Color.Wrap: SequenceType { - public typealias Generator = IndexingGenerator> - public func generate() -> Generator { - return parameters.generate() - } -} - -//------------------------------------------------------------------------------ -// MARK: - Wrap: CollectionType -//------------------------------------------------------------------------------ - -extension Color.Wrap: CollectionType, MutableCollectionType { - public typealias Index = UnderlyingCollection.Index - public var startIndex: Index { return parameters.startIndex } - public var endIndex: Index { return parameters.endIndex } - - public subscript(position:Index) -> Generator.Element { - get { return parameters[position] } - set { parameters[position] = newValue } - } -} - -//------------------------------------------------------------------------------ -// MARK: - Wrap: RangeReplaceableCollectionType -//------------------------------------------------------------------------------ - -extension Color.Wrap: RangeReplaceableCollectionType { - public mutating func replaceRange( - subRange: Range, with newElements: C - ) { - parameters.replaceRange(subRange, with: newElements) - } - - - public mutating func reserveCapacity(n: Index.Distance) { - parameters.reserveCapacity(n) - } - - public mutating func append(newElement: Element) { - parameters.append(newElement) - } - - public mutating func append(style style: StyleParameter...) { - for parameter in style { - parameters.append(parameter) - } - } - - public mutating func appendContentsOf(sequence: S) { - parameters.appendContentsOf(sequence) - } -} - -//------------------------------------------------------------------------------ -// MARK: - Wrap: ArrayLiteralConvertible -//------------------------------------------------------------------------------ - -extension Color.Wrap: ArrayLiteralConvertible {} - -//------------------------------------------------------------------------------ -// MARK: - Wrap: Equatable -//------------------------------------------------------------------------------ - -extension Color.Wrap: Equatable { - - public enum EqualityType { - case Array - case Set - } - - private func setEqualilty(a: Color.Wrap, _ b: Color.Wrap) -> Bool { - - let x = Set( a.parameters.map { String($0.code.enable) } ) - let y = Set( b.parameters.map { String($0.code.enable) } ) - - return x == y - - } - - public func isEqual(to other: Color.Wrap, equality: Color.Wrap.EqualityType = .Array) -> Bool { - switch equality { - case .Array: - return - self.parameters.count == other.parameters.count && - self.code.enable == other.code.enable - case .Set: - return setEqualilty(self, other) - } - } - -} - -public func == (a: Color.Wrap, b: Color.Wrap) -> Bool { - return a.isEqual(to: b, equality: .Array) -} diff --git a/Carthage/Checkouts/PrettyColors/Source/ECMA 48.swift b/Carthage/Checkouts/PrettyColors/Source/ECMA 48.swift deleted file mode 100644 index 5ca9f16..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/ECMA 48.swift +++ /dev/null @@ -1,55 +0,0 @@ - -//------------------------------------------------------------------------------ -// MARK: - ECMA 48 -//------------------------------------------------------------------------------ - -public struct ECMA48 { - /// “ESC is used for code extension purposes. It causes the meanings of a limited - /// number of bit combinations following it in the data stream to be changed.” - public static let escape = "\u{001B}" - /// “used as the first character of a control sequence” - public static let controlSequenceIntroducer = escape + "[" -} - -//------------------------------------------------------------------------------ -// MARK: - SelectGraphicRendition -//------------------------------------------------------------------------------ - -public typealias SelectGraphicRendition = String - -public protocol SelectGraphicRenditionWrapType { - - /// A SelectGraphicRendition code in two parts: enable and disable. - var code: (enable: SelectGraphicRendition, disable: SelectGraphicRendition) { get } - - /// Wraps a string in the SelectGraphicRendition code. - func wrap(string: String) -> String - - var parameters: [Parameter] { get set } - -} - -//------------------------------------------------------------------------------ -// MARK: - Parameter -//------------------------------------------------------------------------------ - -public protocol Parameter { - var code: (enable: [UInt8], disable: UInt8?) { get } -} - -//------------------------------------------------------------------------------ -// MARK: - Parameter: Equatable -//------------------------------------------------------------------------------ - -// `Parameter` cannot conform to the `Swift.Equatable` protocol (as of swiftlang-700.0.57.3) -// because of Self requirements, which prevent `Parameter`s from being array elements. - -/// Defines equality for Parameters. -public func == (a: Parameter, b: Parameter) -> Bool { - return a.code.enable == b.code.enable -} - -/// Defines inequality for Parameters. -public func != (a: Parameter, b: Parameter) -> Bool { - return !(a == b) -} diff --git a/Carthage/Checkouts/PrettyColors/Source/PrettyColors.h b/Carthage/Checkouts/PrettyColors/Source/PrettyColors.h deleted file mode 100644 index 0e7f87b..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/PrettyColors.h +++ /dev/null @@ -1,12 +0,0 @@ - -#import - -//! Project version number for PrettyColors. -FOUNDATION_EXPORT double PrettyColorsVersionNumber; - -//! Project version string for PrettyColors. -FOUNDATION_EXPORT const unsigned char PrettyColorsVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Carthage/Checkouts/PrettyColors/Source/StyleParameter.swift b/Carthage/Checkouts/PrettyColors/Source/StyleParameter.swift deleted file mode 100644 index 0b94f87..0000000 --- a/Carthage/Checkouts/PrettyColors/Source/StyleParameter.swift +++ /dev/null @@ -1,48 +0,0 @@ -/// Based on: ECMA-048 — 8.3.117 -public enum StyleParameter: UInt8, Parameter { - // Reference: Terminal Support Table: https://github.com/jdhealy/PrettyColors/wiki/Terminal-Support - case Bold = 01 // bold or increased intensity - case Faint = 02 // faint, decreased intensity or second colour - case Italic = 03 // italicized - case Underlined = 04 // singly underlined - case BlinkSlow = 05 // slowly blinking (less then 150 per minute) - case Blink = 06 // rapidly blinking (150 per minute or more) - case Negative = 07 // negative image — a.k.a. Inverse - case Concealed = 08 // concealed characters - case CrossedOut = 09 // (characters still legible but marked as to be deleted) - case Font1 = 11 - case Font2 = 12 - case Font3 = 13 - case Font4 = 14 - case Font5 = 15 - case Font6 = 16 - case Font7 = 17 - case Font8 = 18 - case Font9 = 19 - case Fraktur = 20 // Gothic - case UnderlinedDouble = 21 // doubly underlined - case Normal = 22 // normal colour or normal intensity (neither bold nor faint) - case Positive = 27 // positive image - case Revealed = 28 // revealed characters - case Framed = 51 - case Encircled = 52 - case Overlined = 53 - - public struct Reset { - /// Some parameters have corresponding resets, - /// but all parameters are reset by `defaultRendition` - public static let dictionary: [UInt8: UInt8] = [ - 03: 23, 04: 24, 05: 25, 06: 25, 11: 10, - 12: 10, 13: 10, 14: 10, 15: 10, 16: 10, - 17: 10, 18: 10, 19: 10, 20: 23, 51: 54, - 52: 54, 53: 55 - ] - - /// “cancels the effect of any preceding occurrence of SGR in the data stream” - public static let defaultRendition: UInt8 = 0 - } - - public var code: (enable: [UInt8], disable: UInt8?) { - return ( [self.rawValue], Reset.dictionary[self.rawValue] ) - } -} diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Common.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Common.xcconfig deleted file mode 100644 index c49032c..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Common.xcconfig +++ /dev/null @@ -1,174 +0,0 @@ -// -// This file defines common settings that should be enabled for every new -// project. Typically, you want to use Debug, Release, or a similar variant -// instead. -// - -// Disable legacy-compatible header searching -ALWAYS_SEARCH_USER_PATHS = NO - -// Architectures to build -ARCHS = $(ARCHS_STANDARD) - -// Whether to warn when a floating-point value is used as a loop counter -CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES - -// Whether to warn about use of rand() and random() being used instead of arc4random() -CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES - -// Whether to warn about strcpy() and strcat() -CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES - -// Whether to enable module imports -CLANG_ENABLE_MODULES = YES - -// Enable ARC -CLANG_ENABLE_OBJC_ARC = YES - -// Warn about implicit conversions to boolean values that are suspicious. -// For example, writing 'if (foo)' with 'foo' being the name a function will trigger a warning. -CLANG_WARN_BOOL_CONVERSION = YES - -// Warn about implicit conversions of constant values that cause the constant value to change, -// either through a loss of precision, or entirely in its meaning. -CLANG_WARN_CONSTANT_CONVERSION = YES - -// Whether to warn when overriding deprecated methods -CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES - -// Warn about direct accesses to the Objective-C 'isa' pointer instead of using a runtime API. -CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR - -// Warn about declaring the same method more than once within the same @interface. -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES - -// Warn about loop bodies that are suspiciously empty. -CLANG_WARN_EMPTY_BODY = YES - -// Warn about implicit conversions between different kinds of enum values. -// For example, this can catch issues when using the wrong enum flag as an argument to a function or method. -CLANG_WARN_ENUM_CONVERSION = YES - -// Whether to warn on implicit conversions between signed/unsigned types -CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO - -// Warn about implicit conversions between pointers and integers. -// For example, this can catch issues when one incorrectly intermixes using NSNumbers and raw integers. -CLANG_WARN_INT_CONVERSION = YES - -// Don't warn about repeatedly using a weak reference without assigning the weak reference to a strong reference. Too many false positives. -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = NO - -// Warn about classes that unintentionally do not subclass a root class (such as NSObject). -CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR - -// Whether to warn on suspicious implicit conversions -CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES - -// Warn about potentially unreachable code -CLANG_WARN_UNREACHABLE_CODE = YES - -// The format of debugging symbols -DEBUG_INFORMATION_FORMAT = dwarf-with-dsym - -// Whether to compile assertions in -ENABLE_NS_ASSERTIONS = YES - -// Whether to require objc_msgSend to be cast before invocation -ENABLE_STRICT_OBJC_MSGSEND = YES - -// Which C variant to use -GCC_C_LANGUAGE_STANDARD = gnu99 - -// Whether to enable exceptions for Objective-C -GCC_ENABLE_OBJC_EXCEPTIONS = YES - -// Whether to generate debugging symbols -GCC_GENERATE_DEBUGGING_SYMBOLS = YES - -// Whether to precompile the prefix header (if one is specified) -GCC_PRECOMPILE_PREFIX_HEADER = YES - -// Whether to enable strict aliasing, meaning that two pointers of different -// types (other than void * or any id type) cannot point to the same memory -// location -GCC_STRICT_ALIASING = YES - -// Whether symbols not explicitly exported are hidden by default (this primarily -// only affects C++ code) -GCC_SYMBOLS_PRIVATE_EXTERN = NO - -// Whether static variables are thread-safe by default -GCC_THREADSAFE_STATICS = NO - -// Which compiler to use -GCC_VERSION = com.apple.compilers.llvm.clang.1_0 - -// Whether warnings are treated as errors -GCC_TREAT_WARNINGS_AS_ERRORS = YES - -// Whether to warn about 64-bit values being implicitly shortened to 32 bits -GCC_WARN_64_TO_32_BIT_CONVERSION = YES - -// Whether to warn about fields missing from structure initializers (only if -// designated initializers aren't used) -GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES - -// Whether to warn about missing function prototypes -GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO - -// Whether to warn about implicit conversions in the signedness of the type -// a pointer is pointing to (e.g., 'int *' getting converted to 'unsigned int *') -GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES - -// Whether to warn when the value returned from a function/method/block does not -// match its return type -GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR - -// Whether to warn on a class not implementing all the required methods of -// a protocol it declares conformance to -GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES - -// Whether to warn when switching on an enum value, and all possibilities are -// not accounted for -GCC_WARN_CHECK_SWITCH_STATEMENTS = YES - -// Whether to warn about the use of four-character constants -GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES - -// Whether to warn about an aggregate data type's initializer not being fully -// bracketed (e.g., array initializer syntax) -GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES - -// Whether to warn about missing braces or parentheses that make the meaning of -// the code ambiguous -GCC_WARN_MISSING_PARENTHESES = YES - -// Whether to warn about unsafe comparisons between values of different -// signedness -GCC_WARN_SIGN_COMPARE = YES - -// Whether to warn about the arguments to printf-style functions not matching -// the format specifiers -GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES - -// Warn if a "@selector(...)" expression referring to an undeclared selector is found -GCC_WARN_UNDECLARED_SELECTOR = YES - -// Warn if a variable might be clobbered by a setjmp call or if an automatic variable is used without prior initialization. -GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE - -// Whether to warn about static functions that are unused -GCC_WARN_UNUSED_FUNCTION = YES - -// Whether to warn about labels that are unused -GCC_WARN_UNUSED_LABEL = YES - -// Whether to warn about variables that are never used -GCC_WARN_UNUSED_VARIABLE = YES - -// Whether to run the static analyzer with every build -RUN_CLANG_STATIC_ANALYZER = YES - -// Don't treat unknown warnings as errors, and disable GCC compatibility warnings and unused static const variable warnings -WARNING_CFLAGS = -Wno-error=unknown-warning-option -Wno-gcc-compat -Wno-unused-const-variable diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Debug.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Debug.xcconfig deleted file mode 100644 index 6ef0040..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Debug.xcconfig +++ /dev/null @@ -1,43 +0,0 @@ -// -// This file defines the base configuration for a Debug build of any project. -// This should be set at the project level for the Debug configuration. -// - -#include "../Common.xcconfig" - -// Whether to strip debugging symbols when copying resources (like included -// binaries) -COPY_PHASE_STRIP = NO - -// The optimization level (0, 1, 2, 3, s) for the produced binary -GCC_OPTIMIZATION_LEVEL = 0 - -// Preproccessor definitions to apply to each file compiled -GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 - -// Whether to enable link-time optimizations (such as inlining across translation -// units) -LLVM_LTO = NO - -// Whether to only build the active architecture -ONLY_ACTIVE_ARCH = YES - -// Other compiler flags -// -// These settings catch some errors in integer arithmetic -OTHER_CFLAGS = -ftrapv - -// Other flags to pass to the Swift compiler -// -// This enables conditional compilation with #if DEBUG -OTHER_SWIFT_FLAGS = -D DEBUG - -// Whether to strip debugging symbols when copying the built product to its -// final installation location -STRIP_INSTALLED_PRODUCT = NO - -// The optimization level (-Onone, -O, -Ofast) for the produced Swift binary -SWIFT_OPTIMIZATION_LEVEL = -Onone - -// Disable Developer ID timestamping -OTHER_CODE_SIGN_FLAGS = --timestamp=none diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Profile.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Profile.xcconfig deleted file mode 100644 index 0d01553..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Profile.xcconfig +++ /dev/null @@ -1,27 +0,0 @@ -// -// This file defines the base configuration for an optional profiling-specific -// build of any project. To use these settings, create a Profile configuration -// in your project, and use this file at the project level for the new -// configuration. -// - -// based on the Release configuration, with some stuff related to debugging -// symbols re-enabled -#include "Release.xcconfig" - -// Whether to strip debugging symbols when copying resources (like included -// binaries) -COPY_PHASE_STRIP = NO - -// Whether to only build the active architecture -ONLY_ACTIVE_ARCH = YES - -// Whether to strip debugging symbols when copying the built product to its -// final installation location -STRIP_INSTALLED_PRODUCT = NO - -// Whether to perform App Store validation checks -VALIDATE_PRODUCT = NO - -// Disable Developer ID timestamping -OTHER_CODE_SIGN_FLAGS = --timestamp=none diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Release.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Release.xcconfig deleted file mode 100644 index 98600fe..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Release.xcconfig +++ /dev/null @@ -1,33 +0,0 @@ -// -// This file defines the base configuration for a Release build of any project. -// This should be set at the project level for the Release configuration. -// - -#include "../Common.xcconfig" - -// Whether to strip debugging symbols when copying resources (like included -// binaries) -COPY_PHASE_STRIP = YES - -// The optimization level (0, 1, 2, 3, s) for the produced binary -GCC_OPTIMIZATION_LEVEL = s - -// Preproccessor definitions to apply to each file compiled -GCC_PREPROCESSOR_DEFINITIONS = NDEBUG=1 - -// Whether to enable link-time optimizations (such as inlining across translation -// units) -LLVM_LTO = NO - -// Whether to only build the active architecture -ONLY_ACTIVE_ARCH = NO - -// Whether to strip debugging symbols when copying the built product to its -// final installation location -STRIP_INSTALLED_PRODUCT = YES - -// The optimization level (-Onone, -O, -Ofast) for the produced Swift binary -SWIFT_OPTIMIZATION_LEVEL = -O - -// Whether to perform App Store validation checks -VALIDATE_PRODUCT = YES diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Test.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Test.xcconfig deleted file mode 100644 index 2da35e8..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Configurations/Test.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -// -// This file defines the base configuration for a Test build of any project. -// This should be set at the project level for the Test configuration. -// - -#include "Debug.xcconfig" - -// Sandboxed apps can't be unit tested since they can't load some random -// external bundle. So we disable sandboxing for testing. -CODE_SIGN_ENTITLEMENTS = diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Application.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Application.xcconfig deleted file mode 100644 index a91feca..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Application.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for an application. Typically, you want to use a platform-specific variant -// instead. -// - -// Whether to strip out code that isn't called from anywhere -DEAD_CODE_STRIPPING = NO - -// Sets the @rpath for the application such that it can include frameworks in -// the application bundle (inside the "Frameworks" folder) -LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks @loader_path/../Frameworks @executable_path/Frameworks diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Framework.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Framework.xcconfig deleted file mode 100644 index 6f045cd..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/Framework.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a framework. Typically, you want to use a platform-specific variant -// instead. -// - -// Whether to strip out code that isn't called from anywhere -DEAD_CODE_STRIPPING = NO - -// Whether this framework should define an LLVM module -DEFINES_MODULE = YES - -// Whether function calls should be position-dependent (should always be -// disabled for library code) -GCC_DYNAMIC_NO_PIC = NO - -// Default frameworks to the name of the project, instead of any -// platform-specific target -PRODUCT_NAME = $(PROJECT_NAME) - -// Enables the framework to be included from any location as long as the -// loader’s runpath search paths includes it. For example from an application -// bundle (inside the "Frameworks" folder) or shared folder -INSTALL_PATH = @rpath -LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME) -SKIP_INSTALL = YES diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/StaticLibrary.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/StaticLibrary.xcconfig deleted file mode 100644 index 2f96d0e..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Base/Targets/StaticLibrary.xcconfig +++ /dev/null @@ -1,26 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a static library. Typically, you want to use a platform-specific variant -// instead. -// - -// Whether to strip out code that isn't called from anywhere -DEAD_CODE_STRIPPING = NO - -// Whether to strip debugging symbols when copying resources (like included -// binaries). -// -// Overrides Release.xcconfig when used at the target level. -COPY_PHASE_STRIP = NO - -// Whether function calls should be position-dependent (should always be -// disabled for library code) -GCC_DYNAMIC_NO_PIC = NO - -// Copy headers to "include/LibraryName" in the build folder by default. This -// lets consumers use #import syntax even for static -// libraries -PUBLIC_HEADERS_FOLDER_PATH = include/$PRODUCT_NAME - -// Don't include in an xcarchive -SKIP_INSTALL = YES diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Application.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Application.xcconfig deleted file mode 100644 index 2e552c7..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Application.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for an application on Mac OS X. This should be set at the target level for -// each project configuration. -// - -// Import base application settings -#include "../Base/Targets/Application.xcconfig" - -// Apply common settings specific to Mac OS X -#include "Mac-Base.xcconfig" - -// Whether function calls should be position-dependent (should always be -// disabled for library code) -GCC_DYNAMIC_NO_PIC = YES diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Base.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Base.xcconfig deleted file mode 100644 index 8fdeccc..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Base.xcconfig +++ /dev/null @@ -1,19 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for Mac OS X. This file is not standalone -- it is meant to be included into -// a configuration file for a specific type of target. -// - -// Whether to combine multiple image resolutions into a multirepresentational -// TIFF -COMBINE_HIDPI_IMAGES = YES - -// Where to find embedded frameworks -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks - -// The base SDK to use (if no version is specified, the latest version is -// assumed) -SDKROOT = macosx - -// Supported build architectures -VALID_ARCHS = x86_64 diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-DynamicLibrary.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-DynamicLibrary.xcconfig deleted file mode 100644 index dfb4eb2..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-DynamicLibrary.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a dynamic library. This should be set at the target level for each -// project configuration. -// - -// Import common settings specific to Mac OS X -#include "Mac-Base.xcconfig" - -// Whether to strip out code that isn't called from anywhere -DEAD_CODE_STRIPPING = NO - -// Whether function calls should be position-dependent (should always be -// disabled for library code) -GCC_DYNAMIC_NO_PIC = NO - -// Don't include in an xcarchive -SKIP_INSTALL = YES diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Framework.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Framework.xcconfig deleted file mode 100644 index dd98764..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-Framework.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a framework on OS X. This should be set at the target level for each -// project configuration. -// - -// Import base framework settings -#include "../Base/Targets/Framework.xcconfig" - -// Import common settings specific to Mac OS X -#include "Mac-Base.xcconfig" diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-StaticLibrary.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-StaticLibrary.xcconfig deleted file mode 100644 index 97d0318..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/Mac OS X/Mac-StaticLibrary.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a static library on Mac OS X. This should be set at the target level for -// each project configuration. -// - -// Import base static library settings -#include "../Base/Targets/StaticLibrary.xcconfig" - -// Apply common settings specific to Mac OS X -#include "Mac-Base.xcconfig" diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/README.md b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/README.md deleted file mode 100644 index 8b69024..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/README.md +++ /dev/null @@ -1,13 +0,0 @@ -This project intends to aggregate common or universal Xcode configuration settings, keeping them in hierarchial Xcode configuration files for easy modification and reuse. - -## License - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. - -In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to [unlicense.org](http://unlicense.org). diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Application.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Application.xcconfig deleted file mode 100644 index a700868..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Application.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for an application on iOS. This should be set at the target level for each -// project configuration. -// - -// Import base application settings -#include "../Base/Targets/Application.xcconfig" - -// Apply common settings specific to iOS -#include "iOS-Base.xcconfig" diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Base.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Base.xcconfig deleted file mode 100644 index fd15e35..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Base.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for iOS. This file is not standalone -- it is meant to be included into -// a configuration file for a specific type of target. -// - -// Xcode needs this to find archived headers if SKIP_INSTALL is set -HEADER_SEARCH_PATHS = $(OBJROOT)/UninstalledProducts/include - -// Where to find embedded frameworks -LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks - -// The base SDK to use (if no version is specified, the latest version is -// assumed) -SDKROOT = iphoneos diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Framework.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Framework.xcconfig deleted file mode 100644 index 68f5770..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-Framework.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a framework. This should be set at the target level for each project -// configuration. -// - -// Import base framework settings -#include "../Base/Targets/Framework.xcconfig" - -// Import common settings specific to iOS -#include "iOS-Base.xcconfig" diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-StaticLibrary.xcconfig b/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-StaticLibrary.xcconfig deleted file mode 100644 index 4384570..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Configuration/iOS/iOS-StaticLibrary.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// -// This file defines additional configuration options that are appropriate only -// for a static library on iOS. This should be set at the target level for each -// project configuration. -// - -// Import base static library settings -#include "../Base/Targets/StaticLibrary.xcconfig" - -// Apply common settings specific to iOS -#include "iOS-Base.xcconfig" - -// Supported device families (1 is iPhone, 2 is iPad) -TARGETED_DEVICE_FAMILY = 1,2 diff --git a/Carthage/Checkouts/PrettyColors/Supporting Files/Info.plist b/Carthage/Checkouts/PrettyColors/Supporting Files/Info.plist deleted file mode 100644 index b517b54..0000000 --- a/Carthage/Checkouts/PrettyColors/Supporting Files/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.0.2 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSHumanReadableCopyright - Copyright © 2014 J.D. Healy. All rights reserved. - NSPrincipalClass - - - diff --git a/Carthage/Checkouts/PrettyColors/Tests/Equality.swift b/Carthage/Checkouts/PrettyColors/Tests/Equality.swift deleted file mode 100644 index b5a43ae..0000000 --- a/Carthage/Checkouts/PrettyColors/Tests/Equality.swift +++ /dev/null @@ -1,97 +0,0 @@ - -import PrettyColors -import Foundation -import XCTest - -class EqualityTests: XCTestCase { - - override func setUp() { - super.setUp() - } - - override func tearDown() { - super.tearDown() - } - - func testA() { - let one = [ - Color.EightBit(foreground: 100), - Color.EightBit(background: 200), - (StyleParameter.Encircled) - ] as Color.Wrap - - let two = [ - Color.EightBit(background: 200), - StyleParameter.Encircled, - Color.EightBit(foreground: 100) - ] as Color.Wrap - - XCTAssert( - one.isEqual(to: two, equality: Color.Wrap.EqualityType.Set) - ) - XCTAssert( - !one.isEqual(to: two, equality: Color.Wrap.EqualityType.Array) - ) - - // Defaults to Array Equality - XCTAssert( !one.isEqual(to: two) ) - - // `==` operator checks Array Equality - XCTAssert( !(one == two) ) - XCTAssert( one != two ) - - } - - func testB() { - let one = [ - Color.Named(foreground: .Green), - Color.EightBit(background: 200), - StyleParameter.Encircled - ] as Color.Wrap - - let two = [ - Color.EightBit(background: 200), - StyleParameter.Encircled, - Color.EightBit(foreground: 100) - ] as Color.Wrap - - XCTAssert(one != two) - } - - func testC() { - let one = [ - Color.Named(foreground: .Green), - Color.EightBit(background: 200), - StyleParameter.Encircled - ] as Color.Wrap - - let two = [ - Color.EightBit(background: 200), - StyleParameter.CrossedOut, - Color.EightBit(foreground: 100) - ] as Color.Wrap - - XCTAssert(one != two) - } - - func testD() { - let one = Color.Wrap(foreground: .Green) - - let two = [ - Color.EightBit(background: 200), - StyleParameter.CrossedOut, - Color.EightBit(foreground: 100) - ] as Color.Wrap - - XCTAssert(one != two) - } - - func testE() { - let one: Parameter = Color.Named(foreground: .Yellow) - let two: Parameter = Color.Named(background: .Yellow) - // TODO: DOCUMENT: Parameters don't conform to Equatable - XCTAssert(!(one == two)) - XCTAssert(one != two) - } - -} diff --git a/Carthage/Checkouts/PrettyColors/Tests/PrettyColorsTests.swift b/Carthage/Checkouts/PrettyColors/Tests/PrettyColorsTests.swift deleted file mode 100644 index 80ce3be..0000000 --- a/Carthage/Checkouts/PrettyColors/Tests/PrettyColorsTests.swift +++ /dev/null @@ -1,398 +0,0 @@ - -import PrettyColors -import Foundation -import XCTest - -class PrettyColorsTests: XCTestCase { - - override func setUp() { - super.setUp() - } - - override func tearDown() { - super.tearDown() - } - - func test_basics() { - let redText: String = Color.Wrap(foreground: .Red).wrap("A red piece of text.") - print(redText) - - _ = (( - Color.Wrap(foreground: .Yellow, style: .Bold), - Color.Wrap(foreground: .Green, background: .Black, style: .Bold, .Underlined), - - // 8-bit (256) color support - Color.Wrap(foreground: 114), - Color.Wrap(foreground: 114, style: .Bold) - )) - } - - func test_problem_SingleStyleParameter() { - /* - As of `swiftlang-700.0.57.3`, the following statement errors: - «Ambiguous use of 'init(foreground:background:style:)'» - */ - // Color.Wrap(style: .Bold) - - _ = (( - // Workarounds: - Color.Wrap(foreground: nil as UInt8?, style: .Bold), - Color.Wrap(foreground: nil as Color.Named.Color?, style: .Bold), - [StyleParameter.Bold] as Color.Wrap, - Color.Wrap(styles: .Bold), - - // Multiple - Color.Wrap(styles: .Bold, .Blink) - )) - } - - func test_problem_TypeInference() { - - // As of `swiftlang-700.0.57.3`, this doesn't get type-inferred properly. - /* - Color.Wrap( - parameters: [ - Color.Named(foreground: .Green), - Color.EightBit(foreground: 114), - StyleParameter.Bold - ] - ) - */ - - _ = (( - // Workarounds: - Color.Wrap( - parameters: [ - Color.Named(foreground: .Green), - Color.EightBit(foreground: 114), - StyleParameter.Bold - ] as [Color.Wrap.Element] - ), - - Color.Wrap( - parameters: [ - Color.Named(foreground: .Green), - Color.EightBit(foreground: 114), - StyleParameter.Bold - ] as [Parameter] - ), - - [ - Color.Named(foreground: .Green), - Color.EightBit(foreground: 114), - StyleParameter.Bold - ] as Color.Wrap - )) - } - - func testImmutableFilterOrMap() { - let redBold = Color.Wrap(foreground: .Red, style: .Bold) - let redItalic = Color.Wrap(foreground: .Red, style: .Italic) - - // Filter - XCTAssert( - redBold == redItalic - .filter { $0 != StyleParameter.Italic } - + [ StyleParameter.Bold ] - ) - - // Map - XCTAssert( - // `ArrayLiteralConvertible` inferred - [] + redItalic - .map { - switch $0 as? StyleParameter { - case .Some: /* replace value */ return StyleParameter.Bold - case .None: /* same value */ return $0 - } - } - == redBold - ) - } - - func testEmptyWrap() { - XCTAssert( - Color.Wrap(parameters: []).code.enable == "", - "Wrap with no parameters wrapping an empty string should return an empty SelectGraphicRendition." - ) - XCTAssert( - Color.Wrap(parameters: []).wrap("") == "", - "Wrap with no parameters wrapping an empty string should return an empty string." - ) - } - - func testMulti() { - let multi = [ - Color.EightBit(foreground: 227), - Color.Named(foreground: .Green, brightness: .NonBright) - ] as Color.Wrap - XCTAssert( - multi.code.enable == - ECMA48.controlSequenceIntroducer + "38;5;227" + ";" + "32" + "m" - ) - XCTAssert( - multi.code.disable == - ECMA48.controlSequenceIntroducer + "0" + "m" - ) - } - - func testLetWorkflow() { - let redOnBlack = Color.Wrap(foreground: .Red, background: .Black) - let boldRedOnBlack: Color.Wrap = redOnBlack + [ StyleParameter.Bold ] as Color.Wrap - - XCTAssert( - boldRedOnBlack == Color.Wrap(foreground: .Red, background: .Black, style: .Bold) - ) - XCTAssert( - [ - boldRedOnBlack, - Color.Wrap(foreground: .Red, background: .Black, style: .Bold) - ].reduce(true) { - (previous, value) in - return previous && value.parameters.reduce(true) { - (previous, value) in - // For some reason, referencing `value` avoids the - // `Expression was too complex to be solved in reasonable time` - // error for the returned expression… 😕 - _ = value - return previous && ( - value == Color.Named(foreground: .Red) as Parameter || - value == Color.Named(background: .Black) as Parameter || - value == StyleParameter.Bold - ) - } - } == true - ) - } - - - func testAppendStyleParameter() { - let red = Color.Wrap(foreground: .Red) - - let _ = { (wrap: Color.Wrap) -> Void in - var formerlyRed = wrap - formerlyRed.append(StyleParameter.Bold) - XCTAssert( - formerlyRed == Color.Wrap(foreground: .Red, style: .Bold) - ) - }(red) - - let _ = { (wrap: Color.Wrap) -> Void in - var formerlyRed = wrap - formerlyRed.append(style: .Bold) - XCTAssert( - formerlyRed == Color.Wrap(foreground: .Red, style: .Bold) - ) - }(red) - - XCTAssert( - red + Color.Wrap(styles: .Bold) == Color.Wrap(foreground: .Red, style: .Bold) - ) - - // Multiple - let _ = { (wrap: Color.Wrap) -> Void in - var formerlyRed = wrap - formerlyRed.append(StyleParameter.Bold) - formerlyRed.append(StyleParameter.Italic) - XCTAssert( - formerlyRed == Color.Wrap(foreground: .Red, style: .Bold, .Italic) - ) - }(red) - - let _ = { (wrap: Color.Wrap) -> Void in - var formerlyRed = wrap - formerlyRed.append(style: .Bold, .Italic) - XCTAssert( - formerlyRed == Color.Wrap(foreground: .Red, style: .Bold, .Italic) - ) - }(red) - - XCTAssert( - red + Color.Wrap(styles: .Bold, .Italic) == Color.Wrap(foreground: .Red, style: .Bold, .Italic) - ) - } - - func testMutableAppend() { - var formerlyRed = Color.Wrap(foreground: .Red) - let redBlackBackground = Color.Wrap(foreground: .Red, background: .Black) - - - formerlyRed.append( Color.Named(background: .Black) ) - - XCTAssert( - formerlyRed == redBlackBackground - ) - } - - //------------------------------------------------------------------------------ - // MARK: - Foreground/Background - //------------------------------------------------------------------------------ - - func testSetForeground() { - var formerlyRed = Color.Wrap(foreground: .Red) - formerlyRed.foreground = Color.EightBit(foreground: 227) // A nice yellow - XCTAssert( - formerlyRed == Color.Wrap(foreground: 227) - ) - } - - func testSetForegroundToNil() { - var formerlyRed = Color.Wrap(foreground: .Red) - formerlyRed.foreground = nil - - XCTAssert( - formerlyRed == Color.Wrap(foreground: nil as Color.Named.Color?) - ) - XCTAssert( - formerlyRed == Color.Wrap(foreground: nil as UInt8?) - ) - } - - func testSetForegroundToParameter() { - var formerlyRed = Color.Wrap(foreground: .Red) - formerlyRed.foreground = StyleParameter.Bold - - XCTAssert( formerlyRed == [StyleParameter.Bold] as Color.Wrap ) - - } - - func testTransformForeground() { - var formerlyRed = Color.Wrap(foreground: .Red) - formerlyRed.foreground { _ in - return Color.EightBit(foreground: 227) // A nice yellow - } - XCTAssert( formerlyRed == Color.Wrap(foreground: 227) ) - } - - func testTransformForeground2() { - var formerlyRed = Color.Wrap(foreground: 124) - formerlyRed.foreground { color in - if let color = color as? Color.EightBit { - var soonYellow = color - soonYellow.color += (227 as UInt8 - 124) - return soonYellow - } else { return color } - } - XCTAssert( formerlyRed == Color.Wrap(foreground: 227) ) - } - - func testTransformForeground2_withGuard() { - var formerlyRed = Color.Wrap(foreground: 124) // will soon be yellow… - formerlyRed.foreground { color in - guard let eight·bit·color = color as? Color.EightBit else { return color } - - return Color.EightBit( - foreground: UInt8.addWithOverflow(eight·bit·color.color, 227 - 124).0 - ) - } - XCTAssert( formerlyRed == Color.Wrap(foreground: 227) ) - } - - func testTransformForegroundWithVar() { - var formerlyRed = Color.Wrap(foreground: .Red) - formerlyRed.foreground { color in - if let namedColor = color as? Color.Named { - var soonYellow = namedColor - soonYellow.color = .Yellow - return soonYellow - } else { return color } - } - XCTAssert( formerlyRed == Color.Wrap(foreground: .Yellow) ) - } - - func testTransformForegroundToBright() { - var formerlyRed = Color.Wrap(foreground: .Red) - - formerlyRed.foreground { - var clone = $0 as! Color.Named - clone.brightness.toggle() - return clone - } - - let brightRed = [ - Color.Named(foreground: .Red, brightness: .Bright) - ] as Color.Wrap - - XCTAssert( formerlyRed == brightRed ) - } - - func testComputedVariableForegroundEquality() { - XCTAssert( - Color.Named(foreground: .Red) == Color.Wrap(foreground: .Red).foreground! as! Color.Named - ) - } - - func testEightBitForegroundBackgroundDifference() { - let foreground = Color.Named(foreground: .Green).code.enable - let background = Color.Named(background: .Green).code.enable - - let difference = zip(foreground, background) - .reduce(0 as UInt8) { sum, values in - let (foreground, background) = values - return sum + background - foreground - } - - XCTAssert( difference == 10 ) - } - - func testNamedForegroundBackgroundDifference() { - let foreground = Color.Named(foreground: .Green).code.enable - let background = Color.Named(background: .Green).code.enable - - let difference = zip(foreground, background) - .reduce(0 as UInt8) { sum, values in - let (foreground, background) = values - return sum + background - foreground - } - - XCTAssert( difference == 10 ) - } - - func testNamedBrightnessDifference() { - let non·bright = Color.Named(foreground: .Green).code.enable - let bright = Color.Named(foreground: .Green, brightness: .Bright).code.enable - - let difference = zip(non·bright, bright) - .reduce(0 as UInt8) { sum, values in - let (non·bright, bright) = values - return sum + bright - non·bright - } - - XCTAssert( difference == 60 ) - } - - //------------------------------------------------------------------------------ - // MARK: - Zap - //------------------------------------------------------------------------------ - - func testZapAllStyleParameters() { - - for wrap in [ - Color.Wrap(foreground: .Red), - Color.Wrap(foreground: 114) - ] { - for (number, style·wrap) in ( - (1 as UInt8 ... 55).flatMap /* more accurately, concatenate optionals */ { - guard let style = StyleParameter(rawValue: $0) else { return nil } - return ($0 as UInt8, [style] as Color.Wrap) - } /* type-inference fails without */ as [(UInt8, Color.Wrap)] - ) { - let formatted·number = NSString(format: "%02d", number) as String - - for (appended·wrap, suffix) in [ - (wrap, "normal"), - // TODO: Investigate why `as (Color.Wrap, String)` before above comma - // doesn't provide enough type info for the remaining lines in the array. - (wrap + [ StyleParameter.Bold ], "bold"), - (wrap + [ StyleParameter.Italic ], "italic"), - (wrap + [ StyleParameter.Underlined ], "underlined") - ] /* type-inference fails without */ as [(Color.Wrap, String)] { - let styled·output = (appended·wrap + style·wrap).wrap("__|øat·•ªº^∆©|__") - print( "• \(styled·output) \(formatted·number) + \(suffix)" ) - } - } - } - - } - -} diff --git a/Carthage/Checkouts/PrettyColors/Tests/Supporting Files/Info.plist b/Carthage/Checkouts/PrettyColors/Tests/Supporting Files/Info.plist deleted file mode 100644 index a905efc..0000000 --- a/Carthage/Checkouts/PrettyColors/Tests/Supporting Files/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 3.0.2 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/.gitignore b/Example/.gitignore deleted file mode 100644 index d83691b..0000000 --- a/Example/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Carthage -/Pods diff --git a/Example/Cartfile b/Example/Cartfile deleted file mode 100644 index 1de5b23..0000000 --- a/Example/Cartfile +++ /dev/null @@ -1,4 +0,0 @@ -github "realm/realm-cocoa" -github "SnapKit/SnapKit" -github "Quick/Quick" -github "Quick/Nimble" diff --git a/Example/Cartfile.resolved b/Example/Cartfile.resolved deleted file mode 100644 index 84d13aa..0000000 --- a/Example/Cartfile.resolved +++ /dev/null @@ -1,4 +0,0 @@ -github "Quick/Nimble" "v3.2.0" -github "Quick/Quick" "v0.9.1" -github "SnapKit/SnapKit" "0.19.1" -github "realm/realm-cocoa" "v0.98.5" diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index fb91587..36390bd 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -7,94 +7,62 @@ objects = { /* Begin PBXBuildFile section */ - 7ADE68A7019D1F518E8A8765 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76981785FAA07037EE599C5E /* Pods_Example.framework */; }; - 8AD82C0EE35224173D0D00BA /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21113255D6D48C74B425F3A0 /* Pods.framework */; }; - BF0AD1CA1C9ECEDF002D049A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0AD1C91C9ECEDF002D049A /* AppDelegate.swift */; }; - BF0AD1CC1C9ECEDF002D049A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF0AD1CB1C9ECEDF002D049A /* ViewController.swift */; }; - BF0AD1CF1C9ECEDF002D049A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF0AD1CD1C9ECEDF002D049A /* Main.storyboard */; }; - BF0AD1D11C9ECEDF002D049A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF0AD1D01C9ECEDF002D049A /* Assets.xcassets */; }; - BF0AD1D41C9ECEDF002D049A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF0AD1D21C9ECEDF002D049A /* LaunchScreen.storyboard */; }; - BFBAC46C1CA01AD900598D51 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BFBAC46B1CA01AD900598D51 /* Settings.bundle */; }; + BFDFD7D71D4A2DC000ADD7EF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDFD7D61D4A2DC000ADD7EF /* AppDelegate.swift */; }; + BFDFD7D91D4A2DC000ADD7EF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDFD7D81D4A2DC000ADD7EF /* ViewController.swift */; }; + BFDFD7DC1D4A2DC000ADD7EF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BFDFD7DA1D4A2DC000ADD7EF /* Main.storyboard */; }; + BFDFD7DE1D4A2DC000ADD7EF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BFDFD7DD1D4A2DC000ADD7EF /* Assets.xcassets */; }; + BFDFD7E11D4A2DC000ADD7EF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BFDFD7DF1D4A2DC000ADD7EF /* LaunchScreen.storyboard */; }; + BFDFD7E91D4A2F5400ADD7EF /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BFDFD7E81D4A2F5400ADD7EF /* Settings.bundle */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 21113255D6D48C74B425F3A0 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4FC866A1A8C1FAF38E494EC7 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; - 67B1EF5E2CE7C15A5A496497 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; - 76981785FAA07037EE599C5E /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BF0AD1C61C9ECEDF002D049A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - BF0AD1C91C9ECEDF002D049A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - BF0AD1CB1C9ECEDF002D049A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - BF0AD1CE1C9ECEDF002D049A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - BF0AD1D01C9ECEDF002D049A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - BF0AD1D31C9ECEDF002D049A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - BF0AD1D51C9ECEDF002D049A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BFBAC46B1CA01AD900598D51 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; - C63DA3FFBADF68B754F64B40 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; - F7274C6E749E8906FDB1B63F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + BFDFD7D31D4A2DC000ADD7EF /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + BFDFD7D61D4A2DC000ADD7EF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + BFDFD7D81D4A2DC000ADD7EF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + BFDFD7DB1D4A2DC000ADD7EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + BFDFD7DD1D4A2DC000ADD7EF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + BFDFD7E01D4A2DC000ADD7EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + BFDFD7E21D4A2DC000ADD7EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BFDFD7E81D4A2F5400ADD7EF /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - BF0AD1C31C9ECEDF002D049A /* Frameworks */ = { + BFDFD7D01D4A2DC000ADD7EF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7ADE68A7019D1F518E8A8765 /* Pods_Example.framework in Frameworks */, - 8AD82C0EE35224173D0D00BA /* Pods.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 3E68FD32615DD8EB36CC5B19 /* Frameworks */ = { + BFDFD7CA1D4A2DBF00ADD7EF = { isa = PBXGroup; children = ( - 76981785FAA07037EE599C5E /* Pods_Example.framework */, - 21113255D6D48C74B425F3A0 /* Pods.framework */, + BFDFD7D51D4A2DC000ADD7EF /* Example */, + BFDFD7D41D4A2DC000ADD7EF /* Products */, ); - name = Frameworks; sourceTree = ""; }; - 71ED4651504F88CC23173EC7 /* Pods */ = { + BFDFD7D41D4A2DC000ADD7EF /* Products */ = { isa = PBXGroup; children = ( - 4FC866A1A8C1FAF38E494EC7 /* Pods-Example.debug.xcconfig */, - 67B1EF5E2CE7C15A5A496497 /* Pods-Example.release.xcconfig */, - C63DA3FFBADF68B754F64B40 /* Pods.debug.xcconfig */, - F7274C6E749E8906FDB1B63F /* Pods.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - BF0AD1BD1C9ECEDF002D049A = { - isa = PBXGroup; - children = ( - BF0AD1C81C9ECEDF002D049A /* Example */, - BF0AD1C71C9ECEDF002D049A /* Products */, - 71ED4651504F88CC23173EC7 /* Pods */, - 3E68FD32615DD8EB36CC5B19 /* Frameworks */, - ); - sourceTree = ""; - }; - BF0AD1C71C9ECEDF002D049A /* Products */ = { - isa = PBXGroup; - children = ( - BF0AD1C61C9ECEDF002D049A /* Example.app */, + BFDFD7D31D4A2DC000ADD7EF /* Example.app */, ); name = Products; sourceTree = ""; }; - BF0AD1C81C9ECEDF002D049A /* Example */ = { + BFDFD7D51D4A2DC000ADD7EF /* Example */ = { isa = PBXGroup; children = ( - BF0AD1C91C9ECEDF002D049A /* AppDelegate.swift */, - BF0AD1CB1C9ECEDF002D049A /* ViewController.swift */, - BF0AD1CD1C9ECEDF002D049A /* Main.storyboard */, - BF0AD1D01C9ECEDF002D049A /* Assets.xcassets */, - BF0AD1D21C9ECEDF002D049A /* LaunchScreen.storyboard */, - BF0AD1D51C9ECEDF002D049A /* Info.plist */, - BFBAC46B1CA01AD900598D51 /* Settings.bundle */, + BFDFD7D61D4A2DC000ADD7EF /* AppDelegate.swift */, + BFDFD7D81D4A2DC000ADD7EF /* ViewController.swift */, + BFDFD7E81D4A2F5400ADD7EF /* Settings.bundle */, + BFDFD7DA1D4A2DC000ADD7EF /* Main.storyboard */, + BFDFD7DD1D4A2DC000ADD7EF /* Assets.xcassets */, + BFDFD7DF1D4A2DC000ADD7EF /* LaunchScreen.storyboard */, + BFDFD7E21D4A2DC000ADD7EF /* Info.plist */, ); path = Example; sourceTree = ""; @@ -102,19 +70,13 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - BF0AD1C51C9ECEDF002D049A /* Example */ = { + BFDFD7D21D4A2DC000ADD7EF /* Example */ = { isa = PBXNativeTarget; - buildConfigurationList = BF0AD1D81C9ECEDF002D049A /* Build configuration list for PBXNativeTarget "Example" */; + buildConfigurationList = BFDFD7E51D4A2DC000ADD7EF /* Build configuration list for PBXNativeTarget "Example" */; buildPhases = ( - 7D7C8524079DF2C2A2FFD3D3 /* Check Pods Manifest.lock */, - 4E3041F11D6BFFDD7A1C0606 /* 📦 Check Pods Manifest.lock */, - BF0AD1C21C9ECEDF002D049A /* Sources */, - BF0AD1C31C9ECEDF002D049A /* Frameworks */, - BF0AD1C41C9ECEDF002D049A /* Resources */, - 0EE11DD6AFB6340A3843BE3B /* 📦 Embed Pods Frameworks */, - 14765C43A87FE6F6EF6E0C53 /* 📦 Copy Pods Resources */, - B944F025FBB735DF9471A501 /* Embed Pods Frameworks */, - F80CDE97C26605329FDDFD36 /* Copy Pods Resources */, + BFDFD7CF1D4A2DC000ADD7EF /* Sources */, + BFDFD7D01D4A2DC000ADD7EF /* Frameworks */, + BFDFD7D11D4A2DC000ADD7EF /* Resources */, ); buildRules = ( ); @@ -122,25 +84,25 @@ ); name = Example; productName = Example; - productReference = BF0AD1C61C9ECEDF002D049A /* Example.app */; + productReference = BFDFD7D31D4A2DC000ADD7EF /* Example.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - BF0AD1BE1C9ECEDF002D049A /* Project object */ = { + BFDFD7CB1D4A2DBF00ADD7EF /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Recruit Lifestyle Co., Ltd."; TargetAttributes = { - BF0AD1C51C9ECEDF002D049A = { - CreatedOnToolsVersion = 7.2.1; + BFDFD7D21D4A2DC000ADD7EF = { + CreatedOnToolsVersion = 7.3.1; }; }; }; - buildConfigurationList = BF0AD1C11C9ECEDF002D049A /* Build configuration list for PBXProject "Example" */; + buildConfigurationList = BFDFD7CE1D4A2DBF00ADD7EF /* Build configuration list for PBXProject "Example" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -148,148 +110,55 @@ en, Base, ); - mainGroup = BF0AD1BD1C9ECEDF002D049A; - productRefGroup = BF0AD1C71C9ECEDF002D049A /* Products */; + mainGroup = BFDFD7CA1D4A2DBF00ADD7EF; + productRefGroup = BFDFD7D41D4A2DC000ADD7EF /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - BF0AD1C51C9ECEDF002D049A /* Example */, + BFDFD7D21D4A2DC000ADD7EF /* Example */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - BF0AD1C41C9ECEDF002D049A /* Resources */ = { + BFDFD7D11D4A2DC000ADD7EF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - BFBAC46C1CA01AD900598D51 /* Settings.bundle in Resources */, - BF0AD1D41C9ECEDF002D049A /* LaunchScreen.storyboard in Resources */, - BF0AD1D11C9ECEDF002D049A /* Assets.xcassets in Resources */, - BF0AD1CF1C9ECEDF002D049A /* Main.storyboard in Resources */, + BFDFD7E91D4A2F5400ADD7EF /* Settings.bundle in Resources */, + BFDFD7E11D4A2DC000ADD7EF /* LaunchScreen.storyboard in Resources */, + BFDFD7DE1D4A2DC000ADD7EF /* Assets.xcassets in Resources */, + BFDFD7DC1D4A2DC000ADD7EF /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 0EE11DD6AFB6340A3843BE3B /* 📦 Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 14765C43A87FE6F6EF6E0C53 /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 4E3041F11D6BFFDD7A1C0606 /* 📦 Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 7D7C8524079DF2C2A2FFD3D3 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - B944F025FBB735DF9471A501 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - F80CDE97C26605329FDDFD36 /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ - BF0AD1C21C9ECEDF002D049A /* Sources */ = { + BFDFD7CF1D4A2DC000ADD7EF /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - BF0AD1CC1C9ECEDF002D049A /* ViewController.swift in Sources */, - BF0AD1CA1C9ECEDF002D049A /* AppDelegate.swift in Sources */, + BFDFD7D91D4A2DC000ADD7EF /* ViewController.swift in Sources */, + BFDFD7D71D4A2DC000ADD7EF /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - BF0AD1CD1C9ECEDF002D049A /* Main.storyboard */ = { + BFDFD7DA1D4A2DC000ADD7EF /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - BF0AD1CE1C9ECEDF002D049A /* Base */, + BFDFD7DB1D4A2DC000ADD7EF /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - BF0AD1D21C9ECEDF002D049A /* LaunchScreen.storyboard */ = { + BFDFD7DF1D4A2DC000ADD7EF /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - BF0AD1D31C9ECEDF002D049A /* Base */, + BFDFD7E01D4A2DC000ADD7EF /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -297,10 +166,11 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - BF0AD1D61C9ECEDF002D049A /* Debug */ = { + BFDFD7E31D4A2DC000ADD7EF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -333,7 +203,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -342,10 +212,11 @@ }; name = Debug; }; - BF0AD1D71C9ECEDF002D049A /* Release */ = { + BFDFD7E41D4A2DC000ADD7EF /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -372,7 +243,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -380,9 +251,8 @@ }; name = Release; }; - BF0AD1D91C9ECEDF002D049A /* Debug */ = { + BFDFD7E61D4A2DC000ADD7EF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C63DA3FFBADF68B754F64B40 /* Pods.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; @@ -392,9 +262,8 @@ }; name = Debug; }; - BF0AD1DA1C9ECEDF002D049A /* Release */ = { + BFDFD7E71D4A2DC000ADD7EF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F7274C6E749E8906FDB1B63F /* Pods.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; @@ -407,25 +276,24 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - BF0AD1C11C9ECEDF002D049A /* Build configuration list for PBXProject "Example" */ = { + BFDFD7CE1D4A2DBF00ADD7EF /* Build configuration list for PBXProject "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - BF0AD1D61C9ECEDF002D049A /* Debug */, - BF0AD1D71C9ECEDF002D049A /* Release */, + BFDFD7E31D4A2DC000ADD7EF /* Debug */, + BFDFD7E41D4A2DC000ADD7EF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - BF0AD1D81C9ECEDF002D049A /* Build configuration list for PBXNativeTarget "Example" */ = { + BFDFD7E51D4A2DC000ADD7EF /* Build configuration list for PBXNativeTarget "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - BF0AD1D91C9ECEDF002D049A /* Debug */, - BF0AD1DA1C9ECEDF002D049A /* Release */, + BFDFD7E61D4A2DC000ADD7EF /* Debug */, + BFDFD7E71D4A2DC000ADD7EF /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = BF0AD1BE1C9ECEDF002D049A /* Project object */; + rootObject = BFDFD7CB1D4A2DBF00ADD7EF /* Project object */; } diff --git a/Example/Example.xcworkspace/contents.xcworkspacedata b/Example/Example.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a37cf19..0000000 --- a/Example/Example.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/Example/AppDelegate.swift b/Example/Example/AppDelegate.swift index a9e95a7..ab5b714 100644 --- a/Example/Example/AppDelegate.swift +++ b/Example/Example/AppDelegate.swift @@ -2,7 +2,7 @@ // AppDelegate.swift // Example // -// Created by Yuki Nagai on 3/20/16. +// Created by Yuki Nagai on 7/28/16. // Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. // diff --git a/Example/Example/Base.lproj/Main.storyboard b/Example/Example/Base.lproj/Main.storyboard index 3a2a49b..8d2ee7a 100644 --- a/Example/Example/Base.lproj/Main.storyboard +++ b/Example/Example/Base.lproj/Main.storyboard @@ -1,13 +1,14 @@ - + - + + - + @@ -15,7 +16,7 @@ - + diff --git a/Example/Example/Settings.bundle/Acknowledgements.plist b/Example/Example/Settings.bundle/Acknowledgements.plist index c75b554..a53e57a 100644 --- a/Example/Example/Settings.bundle/Acknowledgements.plist +++ b/Example/Example/Settings.bundle/Acknowledgements.plist @@ -6,7 +6,7 @@ FooterText - Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) + Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -33,9 +33,22 @@ THE SOFTWARE. FooterText - The MIT License (MIT) + Copyright (c) 2015 - 2016 Yosuke Ishikawa + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -Copyright (c) 2014 Ruoyu Fu +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Title + APIKit + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2015-2016 Damien (http://delba.io) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -44,437 +57,51 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. Title - SwiftyJSON + JASON Type PSGroupSpecifier FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Title - Nimble - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. + The MIT License (MIT) - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +Copyright (c) 2014-2016 Mathijs Kadijk - Copyright 2014, Quick Team +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - http://www.apache.org/licenses/LICENSE-2.0 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +--- +BE AWARE: This software includes Xcode.swift from Tom Lokhorst as a whole, the copyright notice and this permission notice of the MIT license from Xcode.swift should also be included. See: https://github.com/tomlokhorst/Xcode.swift/blob/develop/LICENSE Title - Quick + R.swift Type PSGroupSpecifier @@ -755,6 +382,21 @@ otherwise in violation of any such restrictions or regulations. Type PSGroupSpecifier + + FooterText + The MIT License Copyright © 2015 Krunoslav Zaher All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Title + RxSwift + Type + PSGroupSpecifier + FooterText Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit @@ -782,6 +424,64 @@ THE SOFTWARE. Type PSGroupSpecifier + + FooterText + The MIT License (MIT) + +Copyright (c) 2015 Radosław Pietruszewski + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + Title + SwiftyUserDefaults + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2015 Tom Lokhorst + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + Title + Xcode.swift + Type + PSGroupSpecifier + StringsTable Acknowledgements diff --git a/Example/Example/Settings.bundle/LisenceList.plist b/Example/Example/Settings.bundle/LisenceList.plist deleted file mode 100644 index c75b554..0000000 --- a/Example/Example/Settings.bundle/LisenceList.plist +++ /dev/null @@ -1,791 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - Title - Alamofire - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Ruoyu Fu - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - Title - SwiftyJSON - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Title - Nimble - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Title - Quick - Type - PSGroupSpecifier - - - FooterText - TABLE OF CONTENTS - -1. Apache License version 2.0 -2. Realm Components -3. Export Compliance - -------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -REALM COMPONENTS - -This software contains components with separate copyright and license terms. -Your use of these components is subject to the terms and conditions of the -following licenses. - -For the Realm Core component - - Realm Core Binary License - - Copyright (c) 2011-2014 Realm Inc All rights reserved - - Redistribution and use in binary form, with or without modification, is - permitted provided that the following conditions are met: - - 1. You agree not to attempt to decompile, disassemble, reverse engineer or - otherwise discover the source code from which the binary code was derived. - You may, however, access and obtain a separate license for most of the - source code from which this Software was created, at - http://realm.io/pricing/. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -EXPORT COMPLIANCE - -You understand that the Software may contain cryptographic functions that may be -subject to export restrictions, and you represent and warrant that you are not -located in a country that is subject to United States export restriction or embargo, -including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, and that you -are not on the Department of Commerce list of Denied Persons, Unverified Parties, -or affiliated with a Restricted Entity. - -You agree to comply with all export, re-export and import restrictions and -regulations of the Department of Commerce or other agency or authority of the -United States or other applicable countries. You also agree not to transfer, or -authorize the transfer of, directly or indirectly, the Software to any prohibited -country, including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, -or to any person or organization on or affiliated with the Department of -Commerce lists of Denied Persons, Unverified Parties or Restricted Entities, or -otherwise in violation of any such restrictions or regulations. - - Title - realm-cocoa - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - Title - SnapKit - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Example/Example/Settings.bundle/Root.plist b/Example/Example/Settings.bundle/Root.plist index 6b1ed0f..66ab00b 100644 --- a/Example/Example/Settings.bundle/Root.plist +++ b/Example/Example/Settings.bundle/Root.plist @@ -12,7 +12,7 @@ Title Acknowledgements File - LisenceList + Acknowledgements diff --git a/Example/Example/ViewController.swift b/Example/Example/ViewController.swift index 397d5e1..404ef6e 100644 --- a/Example/Example/ViewController.swift +++ b/Example/Example/ViewController.swift @@ -2,7 +2,7 @@ // ViewController.swift // Example // -// Created by Yuki Nagai on 3/20/16. +// Created by Yuki Nagai on 7/28/16. // Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. // diff --git a/Carthage/Checkouts/PrettyColors/LICENSE.md b/Example/Licenses/APIKit.txt similarity index 93% rename from Carthage/Checkouts/PrettyColors/LICENSE.md rename to Example/Licenses/APIKit.txt index 9d7a52e..d3639de 100644 --- a/Carthage/Checkouts/PrettyColors/LICENSE.md +++ b/Example/Licenses/APIKit.txt @@ -1,6 +1,4 @@ -# The MIT License (MIT) - -**Copyright (c) 2014 - 2015 J.D. Healy** +Copyright (c) 2015 - 2016 Yosuke Ishikawa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Example/Licenses/Acknowledgements.plist similarity index 54% rename from Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to Example/Licenses/Acknowledgements.plist index 08de0be..6f9f195 100644 --- a/Carthage/Checkouts/PrettyColors/PrettyColors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ b/Example/Licenses/Acknowledgements.plist @@ -2,7 +2,11 @@ - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - + PreferenceSpecifiers + + StringsTable + Acknowledgements + Title + Acknowledgements diff --git a/Example/Licenses/Alamofire.txt b/Example/Licenses/Alamofire.txt new file mode 100644 index 0000000..4cfbf72 --- /dev/null +++ b/Example/Licenses/Alamofire.txt @@ -0,0 +1,19 @@ +Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Example/Licenses/JASON.txt b/Example/Licenses/JASON.txt new file mode 100644 index 0000000..c567f8e --- /dev/null +++ b/Example/Licenses/JASON.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015-2016 Damien (http://delba.io) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Example/Licenses/R.swift.txt b/Example/Licenses/R.swift.txt new file mode 100644 index 0000000..c18c50b --- /dev/null +++ b/Example/Licenses/R.swift.txt @@ -0,0 +1,24 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016 Mathijs Kadijk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- +BE AWARE: This software includes Xcode.swift from Tom Lokhorst as a whole, the copyright notice and this permission notice of the MIT license from Xcode.swift should also be included. See: https://github.com/tomlokhorst/Xcode.swift/blob/develop/LICENSE diff --git a/Example/Licenses/RxSwift.txt b/Example/Licenses/RxSwift.txt new file mode 100644 index 0000000..c3797a6 --- /dev/null +++ b/Example/Licenses/RxSwift.txt @@ -0,0 +1,7 @@ +The MIT License Copyright © 2015 Krunoslav Zaher All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Example/Licenses/SnapKit.txt b/Example/Licenses/SnapKit.txt new file mode 100644 index 0000000..a18ccfb --- /dev/null +++ b/Example/Licenses/SnapKit.txt @@ -0,0 +1,19 @@ +Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Example/Licenses/SwiftyUserDefaults.txt b/Example/Licenses/SwiftyUserDefaults.txt new file mode 100644 index 0000000..9e0e45b --- /dev/null +++ b/Example/Licenses/SwiftyUserDefaults.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Radosław Pietruszewski + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Example/Licenses/Xcode.swift.txt b/Example/Licenses/Xcode.swift.txt new file mode 100644 index 0000000..4fffba8 --- /dev/null +++ b/Example/Licenses/Xcode.swift.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Tom Lokhorst + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Example/Licenses/realm-cocoa.txt b/Example/Licenses/realm-cocoa.txt new file mode 100644 index 0000000..a194346 --- /dev/null +++ b/Example/Licenses/realm-cocoa.txt @@ -0,0 +1,269 @@ +TABLE OF CONTENTS + +1. Apache License version 2.0 +2. Realm Components +3. Export Compliance + +------------------------------------------------------------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +REALM COMPONENTS + +This software contains components with separate copyright and license terms. +Your use of these components is subject to the terms and conditions of the +following licenses. + +For the Realm Core component + + Realm Core Binary License + + Copyright (c) 2011-2014 Realm Inc All rights reserved + + Redistribution and use in binary form, with or without modification, is + permitted provided that the following conditions are met: + + 1. You agree not to attempt to decompile, disassemble, reverse engineer or + otherwise discover the source code from which the binary code was derived. + You may, however, access and obtain a separate license for most of the + source code from which this Software was created, at + http://realm.io/pricing/. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +EXPORT COMPLIANCE + +You understand that the Software may contain cryptographic functions that may be +subject to export restrictions, and you represent and warrant that you are not +located in a country that is subject to United States export restriction or embargo, +including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, and that you +are not on the Department of Commerce list of Denied Persons, Unverified Parties, +or affiliated with a Restricted Entity. + +You agree to comply with all export, re-export and import restrictions and +regulations of the Department of Commerce or other agency or authority of the +United States or other applicable countries. You also agree not to transfer, or +authorize the transfer of, directly or indirectly, the Software to any prohibited +country, including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, +or to any person or organization on or affiliated with the Department of +Commerce lists of Denied Persons, Unverified Parties or Restricted Entities, or +otherwise in violation of any such restrictions or regulations. diff --git a/Example/Podfile b/Example/Podfile deleted file mode 100644 index 81315a9..0000000 --- a/Example/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -platform :ios, '9.0' -use_frameworks! - -pod 'Alamofire' -pod 'SwiftyJSON' diff --git a/Example/Podfile.lock b/Example/Podfile.lock deleted file mode 100644 index 2a6a28e..0000000 --- a/Example/Podfile.lock +++ /dev/null @@ -1,13 +0,0 @@ -PODS: - - Alamofire (3.2.1) - - SwiftyJSON (2.3.2) - -DEPENDENCIES: - - Alamofire - - SwiftyJSON - -SPEC CHECKSUMS: - Alamofire: f11d8624a05f5d39e0c99309b3e600a3ba64298a - SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a - -COCOAPODS: 0.39.0 diff --git a/README.md b/README.md index 40b4e2e..0744327 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Thankios -Acknowlegements Settings.bundle generator for CocoaPods and Carthage. +Acknowlegements Settings.bundle generator. ## Requirements * Xcode 7.3+ @@ -12,17 +12,8 @@ $ brew install thankios ``` ## Usage -```bash -# Before running thankios, you should get license texts: -$ pod install -$ carthage checkout --no-use-binaries - -# On your project root: -$ thankios - -# Example: -$ thankios ~/SampleProject/SampleProject/Settings.bundle/ -``` +1. Add License text files into a directory. [Like this.](https://github.com/recruit-lifestyle/Thankios/tree/master/Example/Licenses) +2. `thankios ` ## Credits Thankios is owned an maintained by [RECRUIT LIFESTYLE CO., LTD.](http://www.recruit-lifestyle.co.jp/). diff --git a/Thankios.xcodeproj/project.pbxproj b/Thankios.xcodeproj/project.pbxproj index 25bacd3..4f442cc 100644 --- a/Thankios.xcodeproj/project.pbxproj +++ b/Thankios.xcodeproj/project.pbxproj @@ -10,19 +10,10 @@ AA5B5AB01C9FE9D50099B3B5 /* FileKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA5B5AAF1C9FE9D50099B3B5 /* FileKit.framework */; }; AADA79191C9FE16E00318613 /* ThankiosKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF973B721C9E90480065ED90 /* ThankiosKit.framework */; }; AADA791A1C9FE16E00318613 /* ThankiosKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BF973B721C9E90480065ED90 /* ThankiosKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - BF29CE6A1CB24CA3003DE779 /* Project.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF29CE691CB24CA3003DE779 /* Project.swift */; }; - BF29CE6C1CB24DD9003DE779 /* Library.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF29CE6B1CB24DD9003DE779 /* Library.swift */; }; BF4B54351CB3C0AA00E0E410 /* FileKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = AA5B5AAF1C9FE9D50099B3B5 /* FileKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - BF4B54371CB3C10400E0E410 /* PrettyColors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF4B54361CB3C10400E0E410 /* PrettyColors.framework */; }; - BF4B54381CB3C10E00E0E410 /* PrettyColors.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = BF4B54361CB3C10400E0E410 /* PrettyColors.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BF973B6C1C9E8FE50065ED90 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF973B6B1C9E8FE50065ED90 /* main.swift */; }; BF973B751C9E90480065ED90 /* ThankiosKit.h in Headers */ = {isa = PBXBuildFile; fileRef = BF973B741C9E90480065ED90 /* ThankiosKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BF973B7C1C9E90480065ED90 /* ThankiosKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF973B721C9E90480065ED90 /* ThankiosKit.framework */; }; - BF973B831C9E90480065ED90 /* ThankiosKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF973B821C9E90480065ED90 /* ThankiosKitTests.swift */; }; - BFBAC4611C9FFF9E00598D51 /* InputForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBAC4601C9FFF9E00598D51 /* InputForm.swift */; }; - BFBAC4641CA0036900598D51 /* CocoaPodsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBAC4631CA0036900598D51 /* CocoaPodsManager.swift */; }; - BFBAC4661CA0037500598D51 /* CarthageManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBAC4651CA0037500598D51 /* CarthageManager.swift */; }; - BFBAC4681CA0037D00598D51 /* ManagerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFBAC4671CA0037D00598D51 /* ManagerProtocol.swift */; }; + BFDFD7C91D4A291000ADD7EF /* ThankiosKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDFD7C81D4A291000ADD7EF /* ThankiosKit.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -33,20 +24,6 @@ remoteGlobalIDString = BF973B711C9E90480065ED90; remoteInfo = ThankiosKit; }; - BF973B7D1C9E90480065ED90 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BF973B531C9E8F6E0065ED90 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BF973B711C9E90480065ED90; - remoteInfo = ThankiosKit; - }; - BF973B7F1C9E90480065ED90 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BF973B531C9E8F6E0065ED90 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BF973B5A1C9E8F6E0065ED90; - remoteInfo = Thankios; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -57,7 +34,6 @@ dstSubfolderSpec = 10; files = ( BF4B54351CB3C0AA00E0E410 /* FileKit.framework in Copy Frameworks */, - BF4B54381CB3C10E00E0E410 /* PrettyColors.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -77,22 +53,13 @@ /* Begin PBXFileReference section */ AA5B5AAF1C9FE9D50099B3B5 /* FileKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FileKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BF29CE691CB24CA3003DE779 /* Project.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Project.swift; sourceTree = ""; }; - BF29CE6B1CB24DD9003DE779 /* Library.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Library.swift; sourceTree = ""; }; - BF4B54361CB3C10400E0E410 /* PrettyColors.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PrettyColors.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BF973B5B1C9E8F6E0065ED90 /* thankios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = thankios.app; sourceTree = BUILT_PRODUCTS_DIR; }; BF973B651C9E8F6E0065ED90 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BF973B6B1C9E8FE50065ED90 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; BF973B721C9E90480065ED90 /* ThankiosKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ThankiosKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BF973B741C9E90480065ED90 /* ThankiosKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ThankiosKit.h; sourceTree = ""; }; BF973B761C9E90480065ED90 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BF973B7B1C9E90480065ED90 /* ThankiosKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ThankiosKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - BF973B821C9E90480065ED90 /* ThankiosKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThankiosKitTests.swift; sourceTree = ""; }; - BF973B841C9E90480065ED90 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BFBAC4601C9FFF9E00598D51 /* InputForm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InputForm.swift; sourceTree = ""; }; - BFBAC4631CA0036900598D51 /* CocoaPodsManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CocoaPodsManager.swift; sourceTree = ""; }; - BFBAC4651CA0037500598D51 /* CarthageManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CarthageManager.swift; sourceTree = ""; }; - BFBAC4671CA0037D00598D51 /* ManagerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagerProtocol.swift; sourceTree = ""; }; + BFDFD7C81D4A291000ADD7EF /* ThankiosKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThankiosKit.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -109,15 +76,6 @@ buildActionMask = 2147483647; files = ( AA5B5AB01C9FE9D50099B3B5 /* FileKit.framework in Frameworks */, - BF4B54371CB3C10400E0E410 /* PrettyColors.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BF973B781C9E90480065ED90 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BF973B7C1C9E90480065ED90 /* ThankiosKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -127,7 +85,6 @@ AA5B5AB11C9FE9FF0099B3B5 /* Frameworks */ = { isa = PBXGroup; children = ( - BF4B54361CB3C10400E0E410 /* PrettyColors.framework */, AA5B5AAF1C9FE9D50099B3B5 /* FileKit.framework */, ); name = Frameworks; @@ -140,7 +97,6 @@ AA5B5AB11C9FE9FF0099B3B5 /* Frameworks */, BF973B5D1C9E8F6E0065ED90 /* Thankios */, BF973B731C9E90480065ED90 /* ThankiosKit */, - BF973B811C9E90480065ED90 /* ThankiosKitTests */, BF973B5C1C9E8F6E0065ED90 /* Products */, ); sourceTree = ""; @@ -150,7 +106,6 @@ children = ( BF973B5B1C9E8F6E0065ED90 /* thankios.app */, BF973B721C9E90480065ED90 /* ThankiosKit.framework */, - BF973B7B1C9E90480065ED90 /* ThankiosKitTests.xctest */, ); name = Products; sourceTree = ""; @@ -167,59 +122,13 @@ BF973B731C9E90480065ED90 /* ThankiosKit */ = { isa = PBXGroup; children = ( - BFBAC4621CA0035B00598D51 /* Managers */, - BFBAC45D1C9FFE5D00598D51 /* Protocols */, - BFBAC45C1C9FFE4D00598D51 /* Enumerations */, - BFBAC45B1C9FFE3F00598D51 /* Models */, BF973B761C9E90480065ED90 /* Info.plist */, BF973B741C9E90480065ED90 /* ThankiosKit.h */, + BFDFD7C81D4A291000ADD7EF /* ThankiosKit.swift */, ); path = ThankiosKit; sourceTree = ""; }; - BF973B811C9E90480065ED90 /* ThankiosKitTests */ = { - isa = PBXGroup; - children = ( - BF973B821C9E90480065ED90 /* ThankiosKitTests.swift */, - BF973B841C9E90480065ED90 /* Info.plist */, - ); - path = ThankiosKitTests; - sourceTree = ""; - }; - BFBAC45B1C9FFE3F00598D51 /* Models */ = { - isa = PBXGroup; - children = ( - BFBAC4601C9FFF9E00598D51 /* InputForm.swift */, - BF29CE691CB24CA3003DE779 /* Project.swift */, - BF29CE6B1CB24DD9003DE779 /* Library.swift */, - ); - path = Models; - sourceTree = ""; - }; - BFBAC45C1C9FFE4D00598D51 /* Enumerations */ = { - isa = PBXGroup; - children = ( - ); - path = Enumerations; - sourceTree = ""; - }; - BFBAC45D1C9FFE5D00598D51 /* Protocols */ = { - isa = PBXGroup; - children = ( - BFBAC4671CA0037D00598D51 /* ManagerProtocol.swift */, - ); - path = Protocols; - sourceTree = ""; - }; - BFBAC4621CA0035B00598D51 /* Managers */ = { - isa = PBXGroup; - children = ( - BFBAC4631CA0036900598D51 /* CocoaPodsManager.swift */, - BFBAC4651CA0037500598D51 /* CarthageManager.swift */, - ); - path = Managers; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -272,32 +181,13 @@ productReference = BF973B721C9E90480065ED90 /* ThankiosKit.framework */; productType = "com.apple.product-type.framework"; }; - BF973B7A1C9E90480065ED90 /* ThankiosKitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = BF973B8D1C9E90480065ED90 /* Build configuration list for PBXNativeTarget "ThankiosKitTests" */; - buildPhases = ( - BF973B771C9E90480065ED90 /* Sources */, - BF973B781C9E90480065ED90 /* Frameworks */, - BF973B791C9E90480065ED90 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BF973B7E1C9E90480065ED90 /* PBXTargetDependency */, - BF973B801C9E90480065ED90 /* PBXTargetDependency */, - ); - name = ThankiosKitTests; - productName = ThankiosKitTests; - productReference = BF973B7B1C9E90480065ED90 /* ThankiosKitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ BF973B531C9E8F6E0065ED90 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0720; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Recruit Lifestyle Co., Ltd."; TargetAttributes = { @@ -307,10 +197,6 @@ BF973B711C9E90480065ED90 = { CreatedOnToolsVersion = 7.2.1; }; - BF973B7A1C9E90480065ED90 = { - CreatedOnToolsVersion = 7.2.1; - TestTargetID = BF973B5A1C9E8F6E0065ED90; - }; }; }; buildConfigurationList = BF973B561C9E8F6E0065ED90 /* Build configuration list for PBXProject "Thankios" */; @@ -328,7 +214,6 @@ targets = ( BF973B5A1C9E8F6E0065ED90 /* Thankios */, BF973B711C9E90480065ED90 /* ThankiosKit */, - BF973B7A1C9E90480065ED90 /* ThankiosKitTests */, ); }; /* End PBXProject section */ @@ -348,13 +233,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - BF973B791C9E90480065ED90 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -370,20 +248,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - BFBAC4681CA0037D00598D51 /* ManagerProtocol.swift in Sources */, - BFBAC4611C9FFF9E00598D51 /* InputForm.swift in Sources */, - BFBAC4661CA0037500598D51 /* CarthageManager.swift in Sources */, - BF29CE6C1CB24DD9003DE779 /* Library.swift in Sources */, - BF29CE6A1CB24CA3003DE779 /* Project.swift in Sources */, - BFBAC4641CA0036900598D51 /* CocoaPodsManager.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BF973B771C9E90480065ED90 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BF973B831C9E90480065ED90 /* ThankiosKitTests.swift in Sources */, + BFDFD7C91D4A291000ADD7EF /* ThankiosKit.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -395,16 +260,6 @@ target = BF973B711C9E90480065ED90 /* ThankiosKit */; targetProxy = AADA791B1C9FE16E00318613 /* PBXContainerItemProxy */; }; - BF973B7E1C9E90480065ED90 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BF973B711C9E90480065ED90 /* ThankiosKit */; - targetProxy = BF973B7D1C9E90480065ED90 /* PBXContainerItemProxy */; - }; - BF973B801C9E90480065ED90 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BF973B5A1C9E8F6E0065ED90 /* Thankios */; - targetProxy = BF973B7F1C9E90480065ED90 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -570,30 +425,6 @@ }; name = Release; }; - BF973B8E1C9E90480065ED90 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = ThankiosKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.ThankiosKitTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Thankios.app/Contents/MacOS/Thankios"; - }; - name = Debug; - }; - BF973B8F1C9E90480065ED90 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = ThankiosKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-lifestyle.ThankiosKitTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Thankios.app/Contents/MacOS/Thankios"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -624,15 +455,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - BF973B8D1C9E90480065ED90 /* Build configuration list for PBXNativeTarget "ThankiosKitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BF973B8E1C9E90480065ED90 /* Debug */, - BF973B8F1C9E90480065ED90 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = BF973B531C9E8F6E0065ED90 /* Project object */; diff --git a/Thankios.xcodeproj/xcshareddata/xcschemes/Thankios.xcscheme b/Thankios.xcodeproj/xcshareddata/xcschemes/Thankios.xcscheme index 1df681f..8e30a88 100644 --- a/Thankios.xcodeproj/xcshareddata/xcschemes/Thankios.xcscheme +++ b/Thankios.xcodeproj/xcshareddata/xcschemes/Thankios.xcscheme @@ -26,7 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO"> @@ -48,6 +48,18 @@ ReferencedContainer = "container:Thankios.xcodeproj"> + + + + + + @@ -73,6 +85,10 @@ + + diff --git a/Thankios.xcodeproj/xcshareddata/xcschemes/ThankiosKit.xcscheme b/Thankios.xcodeproj/xcshareddata/xcschemes/ThankiosKit.xcscheme deleted file mode 100644 index 90f97f6..0000000 --- a/Thankios.xcodeproj/xcshareddata/xcschemes/ThankiosKit.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Thankios.xcworkspace/contents.xcworkspacedata b/Thankios.xcworkspace/contents.xcworkspacedata index 3ea944b..fd51355 100644 --- a/Thankios.xcworkspace/contents.xcworkspacedata +++ b/Thankios.xcworkspace/contents.xcworkspacedata @@ -4,9 +4,6 @@ - - diff --git a/Thankios/Components.plist b/Thankios/Components.plist index 9c1d112..0224926 100644 --- a/Thankios/Components.plist +++ b/Thankios/Components.plist @@ -15,12 +15,6 @@ RootRelativeBundlePath Library/Frameworks/ThankiosKit.framework/Versions/A/Frameworks/FileKit.framework - - BundleOverwriteAction - - RootRelativeBundlePath - Library/Frameworks/ThankiosKit.framework/Versions/A/Frameworks/PrettyColors.framework - RootRelativeBundlePath Library/Frameworks/ThankiosKit.framework diff --git a/Thankios/main.swift b/Thankios/main.swift index 91bb6ce..440346e 100644 --- a/Thankios/main.swift +++ b/Thankios/main.swift @@ -9,7 +9,6 @@ import ThankiosKit func main(arguments: [String]) { - let input = InputForm(arguments) - Project().collect().write(input.path) + ThankiosKit(arguments).generate() } main(Process.arguments) diff --git a/ThankiosKit/Managers/CarthageManager.swift b/ThankiosKit/Managers/CarthageManager.swift deleted file mode 100644 index 2924189..0000000 --- a/ThankiosKit/Managers/CarthageManager.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// CarthageManager.swift -// Thankios -// -// Created by Yuki Nagai on 3/21/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -import FileKit -import PrettyColors - -public struct CarthageManager: ManagerProtocol { - private let rootPath: String - - public var managing: Bool { - let checkouts = Path(self.rootPath) + "Carthage/Checkouts" - return checkouts.isDirectory - } - - public init(rootPath: String) { - self.rootPath = rootPath - } - - public func collect() -> [Library] { - let checkouts = Path(self.rootPath) + "Carthage/Checkouts" - let candidates = checkouts.find(searchDepth: 0) { $0.isDirectory } - return candidates.flatMap { self.extract($0) } - } - - private func extract(path: Path) -> Library? { - let name = path.fileName - let candidates = path.find(searchDepth: 0) { $0.fileName.uppercaseString.containsString("LICENSE") } - let contents = candidates.flatMap { try? String(contentsOfPath: $0) }.first - guard let license = contents else { - let message = "LICENSE file not found in Carthage/Checkouts: " + Color.Wrap(foreground: .Blue).wrap(name) - print(message) - return nil - } - let library = Library(name: name, license: license) - return library - } -} diff --git a/ThankiosKit/Managers/CocoaPodsManager.swift b/ThankiosKit/Managers/CocoaPodsManager.swift deleted file mode 100644 index cbb4d04..0000000 --- a/ThankiosKit/Managers/CocoaPodsManager.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CocoaPodsManager.swift -// Thankios -// -// Created by Yuki Nagai on 3/21/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -import FileKit - -public struct CocoaPodsManager: ManagerProtocol { - private let rootPath: String - private typealias Specifier = [String: String] - - public var managing: Bool { - let pods = Path(self.rootPath) + "Pods" - return pods.isDirectory - } - - public init(rootPath: String) { - self.rootPath = rootPath - } - - public func collect() -> [Library] { - let filePath = Path(self.rootPath) + "Pods/Target Support Files/Pods/Pods-acknowledgements.plist" - let contents = try! NSDictionary(contentsOfPath: filePath) - let specifiers = contents["PreferenceSpecifiers"] as! [Specifier] - return specifiers.flatMap { self.extract($0) } - } - - private func extract(specifier: Specifier) -> Library? { - let title = specifier["Title"]! - let footerText = specifier["FooterText"]! - guard !["Acknowledgements", ""].contains(title) else { return nil } - return Library(name: title, license: footerText) - } -} diff --git a/ThankiosKit/Models/InputForm.swift b/ThankiosKit/Models/InputForm.swift deleted file mode 100644 index bbd26e4..0000000 --- a/ThankiosKit/Models/InputForm.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// InputForm.swift -// Thankios -// -// Created by Yuki Nagai on 3/21/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -import PrettyColors - -public struct InputForm { - public let path: String - - public init(_ arguments: [String]) { - let usage = Color.Wrap(foreground: .Green).wrap("USAGE (on your project root): thankios \n\n") - print(usage) - let count = arguments.count - self.path = count > 1 ? arguments[1] : "./" - } -} diff --git a/ThankiosKit/Models/Library.swift b/ThankiosKit/Models/Library.swift deleted file mode 100644 index c08e784..0000000 --- a/ThankiosKit/Models/Library.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Library.swift -// Thankios -// -// Created by Yuki Nagai on 4/4/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -import FileKit -import PrettyColors - -public struct Library { - public let name: String - public let license: String - - public var itemFileName: String { - return "ListItem\(name).plist" - } - - public init(name: String, license: String) { - self.name = name - self.license = license - } -} diff --git a/ThankiosKit/Models/Project.swift b/ThankiosKit/Models/Project.swift deleted file mode 100644 index df1692f..0000000 --- a/ThankiosKit/Models/Project.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Project.swift -// Thankios -// -// Created by Yuki Nagai on 4/4/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -import FileKit -import PrettyColors - -public struct Project { - public let libraries: [Library] - - private let candidates: [ManagerProtocol.Type] = [ - CocoaPodsManager.self, - CarthageManager.self - ] - - public init() { - self.libraries = [] - } - - private init(libraries: [Library]) { - self.libraries = libraries - } - - public func collect() -> Project { - let cwd = "./" - let libraries = self.candidates - .map { $0.init(rootPath: cwd) } - .filter { $0.managing } - .flatMap { $0.collect() } - var information = "LICENSE found libraries:\n" - defer { print(information) } - libraries.forEach { library in - information += Color.Wrap(foreground: .Blue).wrap(library.name) + "\t" - } - return Project(libraries: libraries) - } - - public func write(destination: String) { - let specifies = self.libraries.map { library in - return [ - "FooterText": library.license, - "Title": library.name, - "Type": "PSGroupSpecifier", - ] - } - let contents = [ - "PreferenceSpecifiers": specifies, - "StringsTable": "Acknowledgements", - "Title": "Acknowledgements", - ] - let file = Path(destination) + "Acknowledgements.plist" - try! contents.writeToPath(file) - } -} diff --git a/ThankiosKit/Protocols/ManagerProtocol.swift b/ThankiosKit/Protocols/ManagerProtocol.swift deleted file mode 100644 index c39ec5b..0000000 --- a/ThankiosKit/Protocols/ManagerProtocol.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ManagerProtocol.swift -// Thankios -// -// Created by Yuki Nagai on 3/21/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -public protocol ManagerProtocol { - var managing: Bool { get } - init(rootPath: String) - func collect() -> [Library] -} diff --git a/ThankiosKit/ThankiosKit.swift b/ThankiosKit/ThankiosKit.swift new file mode 100644 index 0000000..86f93f0 --- /dev/null +++ b/ThankiosKit/ThankiosKit.swift @@ -0,0 +1,43 @@ +// +// ThankiosKit.swift +// Thankios +// +// Created by Yuki Nagai on 7/28/16. +// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. +// + +import Foundation +import FileKit + +public struct ThankiosKit { + let arguments: [String] + + public init(_ arguments: [String]) { + guard arguments.count == 3 else { + let message = "[Usage] thankios " + fatalError(message) + } + self.arguments = arguments + } + + public func generate() { + print("**Generate License**") + let files = Path(self.arguments[1]).find { $0.pathExtension == "txt" } + files.forEach { print("-> " + $0.fileName) } + let specifiers = files.map { path in + [ + "FooterText": try! String(contentsOfPath: path), + "Title": (path.fileName as NSString).stringByDeletingPathExtension, + "Type": "PSGroupSpecifier" + ] + } + let title = "Acknowledgements" + let contents = [ + "PreferenceSpecifiers": specifiers, + "StringsTable": title, + "Title": title + ] + let destination = Path(self.arguments[2]) + "\(title).plist" + try! contents.writeToPath(destination) + } +} diff --git a/ThankiosKitTests/Info.plist b/ThankiosKitTests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/ThankiosKitTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ThankiosKitTests/ThankiosKitTests.swift b/ThankiosKitTests/ThankiosKitTests.swift deleted file mode 100644 index e7180e3..0000000 --- a/ThankiosKitTests/ThankiosKitTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ThankiosKitTests.swift -// ThankiosKitTests -// -// Created by Yuki Nagai on 3/20/16. -// Copyright © 2016 Recruit Lifestyle Co., Ltd. All rights reserved. -// - -import XCTest -@testable import ThankiosKit - -class ThankiosKitTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock { - // Put the code you want to measure the time of here. - } - } - -}