├── .gitignore ├── LICENSE ├── Package.swift ├── Package.xcconfig ├── README.md ├── Sources ├── Arguments │ ├── Arguments.swift │ └── Option.swift ├── Deliver │ ├── Deliver.swift │ └── altool │ │ ├── Altool-Options.swift │ │ └── Altool.swift ├── Errors │ └── String+Error.swift ├── FSKit │ ├── FileSystem.swift │ ├── Helper │ │ └── String+Error.swift │ ├── Implementations │ │ ├── AnchoredFileSystem.swift │ │ ├── InMemoryFileSystem.swift │ │ └── LocalFileSystem.swift │ └── Model │ │ ├── AbsoluteUrl.swift │ │ ├── Directory.swift │ │ ├── FSError.swift │ │ ├── File.swift │ │ └── RelativePath.swift ├── Git │ ├── Git.swift │ ├── GitAutotag.swift │ └── GitTool.swift ├── HWKit │ ├── Bundles │ │ └── Home │ │ │ ├── Bootstraper.swift │ │ │ └── HomeBundle.swift │ ├── Command Helper │ │ ├── BuildResult.swift │ │ ├── HighwayBundle+Creating.swift │ │ ├── HighwayProjectTool.swift │ │ ├── HomeBundleUpdater.swift │ │ ├── SelfUpdater.swift │ │ ├── SwiftBuildSystem-Bundle.swift │ │ ├── XCProjectGenerator.swift │ │ └── init │ │ │ └── InitOptions.swift │ └── Templates │ │ ├── gitignore_template.swift │ │ ├── main_swift_subtype_xcode_template.swift │ │ ├── package_swift_template.swift │ │ └── xcconfig_template.swift ├── HighwayCore │ ├── Bundle │ │ ├── Configuration.swift │ │ └── HighwayBundle.swift │ ├── Context │ │ └── Context.swift │ ├── Features │ │ ├── Fastlane.swift │ │ └── Swift │ │ │ ├── SwiftBuildSystem.swift │ │ │ ├── SwiftOptions.swift │ │ │ ├── SwiftPackageTool.swift │ │ │ └── SwiftRunTool.swift │ ├── Global Stuff │ │ ├── Env.swift │ │ ├── OrderedDictionary.swift │ │ └── String+Convenience.swift │ └── Highways │ │ ├── HighwayDescription.swift │ │ ├── HighwayTypeProtocol.swift │ │ ├── Invocation │ │ ├── Invocation.swift │ │ └── InvocationProvider.swift │ │ └── _Highway.swift ├── HighwayProject │ └── Highway.swift ├── Keychain │ └── Keychain.swift ├── POSIX │ └── abscwd.swift ├── Result │ └── Result.swift ├── Task │ ├── ExcecutableProtocol.swift │ ├── Finding and Executing │ │ ├── PathEnvironmentParser.swift │ │ ├── SystemExecutableProvider.swift │ │ ├── SystemExecutor.swift │ │ └── TaskExecutorProtocol.swift │ ├── LocalSystem.swift │ ├── Model │ │ ├── Channel+Reader.swift │ │ ├── Channel+Writer.swift │ │ ├── Channel.swift │ │ ├── IO.swift │ │ ├── State.swift │ │ ├── Task.swift │ │ └── Termination.swift │ ├── SystemProtocol.swift │ ├── TerminalTasks 2.swift │ └── TerminalTasks.swift ├── Terminal │ ├── FileStream.swift │ ├── Printable │ │ ├── Printable.swift │ │ └── Printables │ │ │ ├── Line.swift │ │ │ └── List.swift │ ├── Prompt.swift │ ├── String+Convenience.swift │ ├── Terminal.swift │ ├── Text │ │ ├── Color.swift │ │ ├── SubText.swift │ │ ├── Text.swift │ │ ├── Texts+Operators.swift │ │ └── Texts+Printable.swift │ └── UI.swift ├── Url │ ├── Absolute.swift │ └── Relative.swift ├── XCBuild │ ├── Archive │ │ ├── Archive.swift │ │ ├── ArchiveOptions.swift │ │ └── ArchivePlist.swift │ ├── Destination.swift │ ├── DestinationFactory.swift │ ├── Export │ │ ├── Export.swift │ │ ├── ExportArchiveOptions.swift │ │ └── ExportOptions.swift │ ├── Test │ │ ├── TestOptions.swift │ │ └── TestReport.swift │ ├── XCBuild.swift │ └── docs │ │ └── KNOW_HOW.md ├── ZFile │ ├── File.swift │ ├── FileSystem.swift │ ├── FileSystemInterator.swift │ ├── FileSystemSequence.swift │ ├── FilesGeneral.swift │ └── Folder.swift ├── highway │ ├── App │ │ ├── App.swift │ │ ├── AppHighway.swift │ │ └── AppInfo.swift │ ├── CurrentVersion.swift │ └── main.swift └── 🧙‍♂️ │ ├── AutoProtocols │ ├── AutoGenerateProtocol.generated.swift │ ├── AutoGenerateProtocol.stencil │ └── SourceryAutoProtocols.swift │ └── Mocks │ ├── AutoMockable.generated.swift │ ├── AutoMockable.stencil │ └── DecoderMock.swift ├── Tests ├── ArgumentsTests │ └── test.swift ├── DeliverTests │ └── test.swift ├── FSKitTests │ ├── AbsoluteURLTests.swift │ ├── AnchoredFileSystemTests.swift │ ├── FileSystemTest.swift │ ├── InMemoryFileSystemTests.swift │ ├── LocalFileSystemTests.swift │ └── RelativePathTests.swift ├── FileSystemTests │ ├── AnchoredFileSystemTests.swift │ ├── FileSystemTest.swift │ ├── InMemoryFileSystemTests.swift │ └── LocalFileSystemTests.swift ├── GitTests │ ├── GitAutotagTests.swift │ ├── GitToolTests.swift │ └── git.swift ├── HWKitTests │ ├── BootstraperTests.swift │ ├── HighwayBundleCreatorTests.swift │ ├── HomeBundleTests.swift │ ├── InitOptionsTests.swift │ └── SwiftBuildSystem_HighwayBundleTests.swift ├── HighwayCoreTests │ ├── Fixtures │ │ └── BigTextFile.text │ ├── HighwayBundleTests.swift │ ├── HighwaysTests.swift │ ├── Support │ │ └── FileHandle+Convenience.swift │ └── SwiftBuildSystemTests.swift ├── POSIXTests │ └── test.swift ├── ResultTests │ └── test.swift ├── TaskTests │ ├── Fixtures │ │ └── BigTextFile.text │ ├── PathEnvironmentParserTests.swift │ ├── SystemExecutableProviderTests.swift │ ├── SystemTests.swift │ ├── TaskExecutorSystemTests.swift │ └── TaskTests.swift ├── TerminalTests │ └── TerminalTests.swift ├── UrlTests │ ├── AbsoluteURLTests.swift │ └── RelativePathTests.swift └── XCBuildTests │ ├── DestinationFactoryTests.swift │ ├── Fixtures │ ├── highwayiostest │ │ ├── .gitignore │ │ ├── highwayiostest.xcodeproj │ │ │ └── project.pbxproj │ │ ├── highwayiostest │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-57x57@1x.png │ │ │ │ │ ├── Icon-App-57x57@2x.png │ │ │ │ │ ├── Icon-App-60x60@1x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-72x72@1x.png │ │ │ │ │ ├── Icon-App-72x72@2x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-76x76@3x.png │ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ │ ├── Icon-Small-50x50@1x.png │ │ │ │ │ ├── Icon-Small-50x50@2x.png │ │ │ │ │ └── ItunesArtwork@2x.png │ │ │ │ └── Contents.json │ │ │ ├── Base.lproj │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── ViewController.swift │ │ └── highwayiostestTests │ │ │ ├── Info.plist │ │ │ └── highwayiostestTests.swift │ ├── highwayiostest_export.plist │ └── highwayiostest_objc │ │ ├── .gitignore │ │ ├── highwayiostest.xcodeproj │ │ └── project.pbxproj │ │ ├── highwayiostest │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-57x57@1x.png │ │ │ │ ├── Icon-App-57x57@2x.png │ │ │ │ ├── Icon-App-60x60@1x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-72x72@1x.png │ │ │ │ ├── Icon-App-72x72@2x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-76x76@3x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ ├── Icon-Small-50x50@1x.png │ │ │ │ ├── Icon-Small-50x50@2x.png │ │ │ │ └── ItunesArtwork@2x.png │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ └── main.m │ │ └── highwayiostestTests │ │ ├── Info.plist │ │ └── highwayiostestTests.m │ └── XCBuild_System_Tests.swift ├── ZFileiOS ├── Info.plist └── ZFileiOS.h ├── ZFileiOSTests ├── Info.plist └── ZFileiOSTests.swift ├── _highway ├── .gitignore ├── Package.swift ├── config.xcconfig ├── main.swift └── utils │ └── versioning.swift ├── config └── config.xcconfig ├── end2end_tests ├── highwayiostest │ ├── .gitignore │ ├── derivedData_archive │ │ ├── ModuleCache │ │ │ └── Session.modulevalidation │ │ └── info.plist │ ├── fastlane │ │ ├── Appfile │ │ ├── Deliverfile │ │ ├── Fastfile │ │ ├── README.md │ │ ├── metadata │ │ │ ├── copyright.txt │ │ │ ├── de-DE │ │ │ │ ├── description.txt │ │ │ │ ├── keywords.txt │ │ │ │ ├── marketing_url.txt │ │ │ │ ├── name.txt │ │ │ │ ├── privacy_url.txt │ │ │ │ ├── promotional_text.txt │ │ │ │ ├── release_notes.txt │ │ │ │ ├── subtitle.txt │ │ │ │ └── support_url.txt │ │ │ ├── primary_category.txt │ │ │ ├── primary_first_sub_category.txt │ │ │ ├── primary_second_sub_category.txt │ │ │ ├── review_information │ │ │ │ ├── demo_password.txt │ │ │ │ ├── demo_user.txt │ │ │ │ ├── email_address.txt │ │ │ │ ├── first_name.txt │ │ │ │ ├── last_name.txt │ │ │ │ ├── notes.txt │ │ │ │ └── phone_number.txt │ │ │ ├── secondary_category.txt │ │ │ ├── secondary_first_sub_category.txt │ │ │ ├── secondary_second_sub_category.txt │ │ │ └── trade_representative_contact_information │ │ │ │ ├── address_line1.txt │ │ │ │ ├── city_name.txt │ │ │ │ ├── country.txt │ │ │ │ ├── is_displayed_on_app_store.txt │ │ │ │ ├── postal_code.txt │ │ │ │ └── trade_name.txt │ │ ├── report.xml │ │ └── screenshots │ │ │ └── README.txt │ ├── highwayiostest.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── highwayiostest │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift │ ├── highwayiostestTests │ │ ├── Info.plist │ │ └── highwayiostestTests.swift │ └── resultBundle_archive │ │ ├── 1_Archive │ │ └── build.xcactivitylog │ │ └── Info.plist └── swift_project │ ├── .gitignore │ ├── Package.swift │ ├── README.md │ ├── Sources │ └── swift_project │ │ └── main.swift │ └── _highway │ ├── Package.resolved │ ├── Package.swift │ ├── config.xcconfig │ └── main.swift ├── scripts ├── bootstrap.sh ├── edit.sh ├── generate-project.sh ├── loc.sh ├── loc_over_time.text ├── setEnv.sh └── tag.sh └── 🛣.xcodeproj ├── ArgumentsTests_Info.plist ├── Arguments_Info.plist ├── DeliverTests_Info.plist ├── Deliver_Info.plist ├── Errors_Info.plist ├── GitTests_Info.plist ├── Git_Info.plist ├── HWKitTests_Info.plist ├── HWKit_Info.plist ├── HighwayCoreTests_Info.plist ├── HighwayCore_Info.plist ├── HighwayProject_Info.plist ├── Keychain_Info.plist ├── POSIXTests_Info.plist ├── POSIX_Info.plist ├── ResultTests_Info.plist ├── Result_Info.plist ├── SourceryAutoProtocols_Info.plist ├── SourceryMocks_Info.plist ├── TaskTests_Info.plist ├── Task_Info.plist ├── TerminalTests_Info.plist ├── Terminal_Info.plist ├── TestKit_Info.plist ├── UrlTests_Info.plist ├── Url_Info.plist ├── XCBuildTests_Info.plist ├── XCBuild_Info.plist ├── ZFile_Info.plist ├── project.pbxproj ├── project.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcshareddata └── xcschemes ├── All.xcscheme ├── ArgumentsTests.xcscheme ├── DeliverTests.xcscheme ├── GitTests.xcscheme ├── HWKit.xcscheme ├── HWKitTests.xcscheme ├── HighwayCoreTests.xcscheme ├── POSIXTests.xcscheme ├── PackageTests.xcscheme ├── ResultTests.xcscheme ├── SourceryMocks.xcscheme ├── Task.xcscheme ├── TaskTests.xcscheme ├── TerminalTests.xcscheme ├── UrlTests.xcscheme ├── XCBuild.xcscheme ├── ZFile.xcscheme ├── ZFileiOS.xcscheme ├── highway.xcscheme ├── highwayPackageDescription.xcscheme ├── highwayPackageTests.xcscheme ├── xcschememanagement.plist ├── 🛣-Package.xcscheme ├── 🛣.xcscheme ├── 🛣PackageDescription.xcscheme └── 🛣Tests.xcscheme /.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X files 2 | .DS_Store 3 | .DS_Store? 4 | .Trashes 5 | .Spotlight-V100 6 | *.swp 7 | 8 | # xcode project files 9 | highway.xcodeproj/ 10 | _highway.xcodeproj/ 11 | 12 | ## Xcode build files 13 | DerivedData/ 14 | build/ 15 | 16 | ## Xcode private settings 17 | *.pbxuser 18 | !default.pbxuser 19 | *.mode1v3 20 | !default.mode1v3 21 | *.mode2v3 22 | !default.mode2v3 23 | *.perspectivev3 24 | !default.perspectivev3 25 | 26 | xcuserdata/ 27 | 28 | ## Other 29 | *.xccheckout 30 | *.moved-aside 31 | *.xcuserstate 32 | *.xcscmblueprint 33 | 34 | ## Obj-C/Swift specific 35 | *.hmap 36 | *.ipa 37 | *.dSYM.zip 38 | *.dSYM 39 | 40 | ## Swift Package Manager 41 | .build/ 42 | 43 | ## Carthage 44 | Carthage/Build 45 | 46 | # fastlane 47 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 48 | 49 | fastlane/report.xml 50 | fastlane/Preview.html 51 | fastlane/screenshots 52 | fastlane/test_output 53 | 54 | ## Playgrounds 55 | timeline.xctimeline 56 | playground.xcworkspace 57 | Package.resolved 58 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Christian Kienle 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.xcconfig: -------------------------------------------------------------------------------- 1 | /// Package.xcconfig 2 | 3 | /// macOS Deployment Target 4 | /// 5 | /// Code will load on this and later versions of macOS. 6 | /// Framework APIs that are unavailable in earlier versions will be weak-linked; 7 | /// your code should check for `null` function pointers 8 | /// or specific system versions before calling newer APIs. 9 | 10 | MACOSX_DEPLOYMENT_TARGET=10.13 11 | -------------------------------------------------------------------------------- /Sources/Errors/String+Error.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String: Swift.Error { } 4 | extension String: LocalizedError { 5 | public var errorDescription: String? { return self } 6 | } 7 | public typealias ErrorMessage = String 8 | -------------------------------------------------------------------------------- /Sources/FSKit/Helper/String+Error.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String: Swift.Error { } 4 | -------------------------------------------------------------------------------- /Sources/FSKit/Model/Directory.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class Directory { 4 | // MARK: - Properties 5 | let url: Absolute 6 | let fileSystem: FileSystem 7 | public var isExistingDirectory: Bool { 8 | guard let type = try? fileSystem.itemMetadata(at: url).type else { 9 | return false 10 | } 11 | return type == .directory 12 | } 13 | 14 | // MARK: - Init 15 | init(url: Absolute, in fileSystem: FileSystem) { 16 | self.url = url 17 | self.fileSystem = fileSystem 18 | } 19 | 20 | // MARK: - Working with the directory 21 | public func directory(at url: Relative) -> Directory { 22 | return fileSystem.directory(at: _absoluteUrl(for: url)) 23 | } 24 | 25 | public func file(at url: Relative) -> File { 26 | return fileSystem.file(at: _absoluteUrl(for: url)) 27 | } 28 | 29 | public func file(named name: String) -> File { 30 | return file(at: Relative(name)) 31 | } 32 | 33 | public func directory(named name: String) -> Directory { 34 | return directory(at: Relative(name)) 35 | } 36 | 37 | private func _absoluteUrl(`for` path: Relative) -> Absolute { 38 | return Absolute(path: path.asString, relativeTo: url) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sources/FSKit/Model/FSError.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public enum FSError: Error { 4 | case doesNotExist 5 | case typeMismatch // expected item to be a file or directory but is the opposite in reality 6 | case other(Swift.Error) 7 | public var isDoesNotExistError: Bool { 8 | guard case .doesNotExist = self else { return false } 9 | return true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sources/FSKit/Model/File.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // All throwing methods HAVE to throw FileSystemError if they throw anything at all. 4 | public class File { 5 | // MARK: - Init 6 | init(url: Absolute, fileSystem: FileSystem) { 7 | self.url = url 8 | self.fileSystem = fileSystem 9 | } 10 | 11 | // MARK: - Properties 12 | let url: Absolute 13 | let fileSystem: FileSystem 14 | public var isExistingFile: Bool { 15 | guard let type = try? fileSystem.itemMetadata(at: url).type else { 16 | return false 17 | } 18 | return type == .file 19 | } 20 | // MARK: - Working with the File 21 | public func data() throws -> Data { 22 | return try fileSystem.data(at: url) 23 | } 24 | 25 | public func setData(_ data: Data) throws { 26 | try fileSystem.writeData(data, to: url) 27 | } 28 | 29 | public func string() throws -> String { 30 | let data = try self.data() 31 | guard let result = String(data: data, encoding: .utf8) else { 32 | throw FSError.other("Cannot convert contents of file \(url.description) to string.") 33 | } 34 | return result 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sources/Git/Git.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import Url 4 | import SourceryAutoProtocols 5 | 6 | /// Git namespace 7 | 8 | public protocol GitToolProtocol: AutoMockable { 9 | 10 | /// sourcery:inline:GitTool.AutoGenerateProtocol 11 | 12 | func addAll(at url: FolderProtocol) throws 13 | func commit(at url: FolderProtocol, message: String) throws 14 | func pushToMaster(at url: FolderProtocol) throws 15 | func pushTagsToMaster(at url: FolderProtocol) throws 16 | func pull(at url: FolderProtocol) throws 17 | func currentTag(at url: FolderProtocol) throws -> String 18 | func clone(with options: CloneOptions) throws 19 | /// sourcery:end 20 | } 21 | 22 | public struct CloneOptions: AutoMockable { 23 | // MARK: - Properties 24 | public let remoteUrl: String 25 | public let localPath: FolderProtocol 26 | public let performMirror: Bool 27 | 28 | // MARK: - Init 29 | public init(remoteUrl: String, localPath: FolderProtocol, performMirror: Bool = false) { 30 | self.remoteUrl = remoteUrl 31 | self.localPath = localPath 32 | self.performMirror = performMirror 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Sources/Git/GitAutotag.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Url 3 | import Task 4 | import Arguments 5 | import ZFile 6 | 7 | public final class GitAutotag { 8 | // MARK: - Properties 9 | public let system: SystemProtocol 10 | 11 | // MARK: - Init 12 | public init(system: SystemProtocol) throws { 13 | self.system = system 14 | } 15 | 16 | // MARK: - Tagging 17 | @discardableResult 18 | public func autotag(at url: FolderProtocol, dryRun: Bool = true) throws -> String { 19 | let arguments = Arguments(dryRun ? ["-n"] : []) 20 | let task = try system.task(named: "git-autotag") 21 | task.arguments = arguments 22 | task.currentDirectoryUrl = url 23 | task.enableReadableOutputDataCapturing() 24 | try system.execute(task) 25 | guard let rawTag = task.trimmedOutput else { 26 | throw "Failed to get current tag." 27 | } 28 | let numberOfDots = rawTag.reduce(0) { (result, char) -> Int in 29 | return char == "." ? result + 1 : result 30 | } 31 | guard numberOfDots == 2 else { 32 | throw "'\(rawTag)' is not a valid version number: Must contain two '.'." 33 | } 34 | return rawTag 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sources/HWKit/Bundles/Home/Bootstraper.swift: -------------------------------------------------------------------------------- 1 | import HighwayCore 2 | import ZFile 3 | import Url 4 | import Git 5 | 6 | /// This class is doing a lot of things - probably too many things: 7 | /// - Creates the highway home directory ($HOME/.highway) 8 | /// - Checks if the highway working copy exists 9 | /// If it does not exist it uses git to clone 10 | /// the repo. 11 | public final class Bootstraper { 12 | // MARK: - Init 13 | public init(homeDirectory: FolderProtocol = FileSystem().homeFolder, configuration: HomeBundle.Configuration, git: GitTool, context: Context) { 14 | self.homeDirectory = homeDirectory 15 | self.configuration = configuration 16 | self.git = git 17 | self.context = context 18 | } 19 | 20 | // MARK: - Properties 21 | public let homeDirectory: FolderProtocol 22 | public let configuration: HomeBundle.Configuration 23 | public let git: GitTool 24 | public let context: Context 25 | 26 | public func requestHomeBundle() throws -> HomeBundle { 27 | let fs = context.fileSystem 28 | 29 | let bundle = try HomeBundle(url: homeDirectory, fileSystem: fs) 30 | if bundle.missingComponents().contains(.clone) { 31 | let localCloneUrl = bundle.localCloneUrl 32 | let remoteCloneUrl = configuration.remoteRepositoryUrl 33 | let options = Git.CloneOptions(remoteUrl: remoteCloneUrl, localPath: localCloneUrl, performMirror: false) 34 | try git.clone(with: options) 35 | } 36 | 37 | return bundle 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Sources/HWKit/Command Helper/BuildResult.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BuildResult.swift 3 | // highway 4 | // 5 | // Created by Stijn on 26/07/2018. 6 | // 7 | 8 | import Foundation 9 | import SourceryAutoProtocols 10 | import ZFile 11 | import HighwayCore 12 | 13 | public protocol BuildResultProtocol: AutoMockable { 14 | 15 | /// sourcery:inline:BuildResult.AutoGenerateProtocol 16 | var executableUrl: FileProtocol { get } 17 | var artifact: SwiftBuildSystem.Artifact { get } 18 | /// sourcery:end 19 | } 20 | 21 | public struct BuildResult: AutoGenerateProtocol { 22 | // MARK: - Init 23 | public init(executableUrl: FileProtocol, artifact: SwiftBuildSystem.Artifact) { 24 | self.executableUrl = executableUrl 25 | self.artifact = artifact 26 | } 27 | // MARK: - Properties 28 | public let executableUrl: FileProtocol 29 | public let artifact: SwiftBuildSystem.Artifact 30 | } 31 | -------------------------------------------------------------------------------- /Sources/HWKit/Command Helper/HighwayBundle+Creating.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import HighwayCore 3 | import ZFile 4 | import Url 5 | 6 | public extension HighwayBundle { 7 | public convenience init(creatingInParent parentUrl: FolderProtocol, 8 | fileSystem: FileSystemProtocol, 9 | configuration config: Configuration = .standard, 10 | homeConfig: HomeBundle.Configuration 11 | ) throws { 12 | let url = try parentUrl.subfolder(named: config.directoryName) 13 | 14 | try self.init(url: url, fileSystem: fileSystem, configuration: config) 15 | 16 | let dependencyUrl = homeConfig.remoteRepositoryUrl 17 | let branch = config.branch 18 | let packageName = config.packageName 19 | let targetName = config.targetName 20 | let contents = packageDescriptionTemplate(packageName: packageName, 21 | targetName: targetName, 22 | branch: branch, 23 | dependencyUrl: dependencyUrl 24 | ) 25 | 26 | try package().write(data: contents.utf8Data()) 27 | 28 | try xcconfigFile().write(data: xcconfigTemplate.utf8Data()) 29 | 30 | try gitignore().write(data: gitignoreTemplate.utf8Data()) 31 | 32 | try mainSwiftFile().write(data: mainSwiftSubtypeXcodeTemplate.utf8Data()) 33 | } 34 | } 35 | 36 | extension String { 37 | 38 | func utf8Data() throws -> Data { 39 | 40 | guard let data = self.data(using: .utf8) else { throw "Could not create data from \(self)" } 41 | 42 | return data 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Sources/HWKit/Command Helper/SwiftBuildSystem-Bundle.swift: -------------------------------------------------------------------------------- 1 | import HighwayCore 2 | import ZFile 3 | 4 | public extension SwiftBuildSystem { 5 | public typealias BundleCompiler = (plan: SwiftBuildSystem.ExecutionPlan, bundle: HighwayBundle) 6 | func bundleCompiler(`for` bundle: HighwayBundle) throws -> BundleCompiler { 7 | let options = SwiftOptions(subject: .auto, 8 | projectDirectory: bundle.url, 9 | configuration: .debug, 10 | verbose: true, 11 | buildPath: try bundle.buildDirectory(), 12 | additionalArguments: [] 13 | ) 14 | let plan = try executionPlan(with: options) 15 | return BundleCompiler(plan: plan, bundle: bundle) 16 | } 17 | 18 | public func compile(bundle: HighwayBundle) throws -> Artifact { 19 | let compiler = try bundleCompiler(for: bundle) 20 | do { 21 | return try execute(plan: compiler.plan) 22 | } catch { 23 | print(error.localizedDescription) 24 | throw error 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/HWKit/Command Helper/XCProjectGenerator.swift: -------------------------------------------------------------------------------- 1 | import HighwayCore 2 | import ZFile 3 | import Url 4 | 5 | // MARK: - Types 6 | public typealias GeneratedXCProject = SwiftPackageTool.XCProjectOptions 7 | 8 | public class XCProjectGenerator { 9 | // MARK: - Init 10 | public init(context: Context, bundle: HighwayBundle) { 11 | self.context = context 12 | self.bundle = bundle 13 | } 14 | 15 | // MARK: - Properties 16 | public let context: Context 17 | public let bundle: HighwayBundle 18 | 19 | // MARK: - Command 20 | public func generate() throws -> FolderProtocol { 21 | let swift_package = SwiftPackageTool(context: context) 22 | let xcconfigName = bundle.configuration.xcconfigName 23 | let projectUrl = try bundle.xcodeprojectUrl() 24 | let options = SwiftPackageTool.XCProjectOptions(swiftProjectDirectory: bundle.url, 25 | xcprojectDestinationDirectory: projectUrl, 26 | xcconfigFileName: xcconfigName) 27 | try swift_package.generateXcodeproj(with: options) 28 | return projectUrl 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sources/HWKit/Command Helper/init/InitOptions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Arguments 3 | import Errors 4 | 5 | // highway init 6 | // highway init --type swift 7 | // highway init --type swift --create-project 8 | // highway init --type xcode 9 | 10 | public struct InitOptions { 11 | public enum ProjectType: String, RawRepresentable { 12 | case swift, xcode 13 | } 14 | 15 | public init(_ arguments: Arguments) throws { 16 | let all = arguments.all 17 | guard all.isEmpty == false else { 18 | self.init(projectType: .swift, shouldCreateProject: false) 19 | return 20 | } 21 | // We need at least two more options 22 | guard all.count >= 2 else { 23 | throw "Unknown configuration." 24 | } 25 | // First argument must be --type 26 | guard all.first == "--type" else { 27 | throw "Unknown configuration." 28 | } 29 | guard let projectType = ProjectType(rawValue: all[1]) else { 30 | throw "Unknown project type." 31 | } 32 | 33 | let shouldCreateProject = all.contains("--create-project") 34 | // creating xcode projects is not supported 35 | if projectType == .xcode && shouldCreateProject { 36 | throw "Creation of Xcode projects is not supported yet." 37 | } 38 | 39 | self.init(projectType: projectType, shouldCreateProject: shouldCreateProject) 40 | } 41 | 42 | public init(projectType: ProjectType, shouldCreateProject: Bool) { 43 | self.projectType = projectType 44 | self.shouldCreateProject = shouldCreateProject 45 | } 46 | 47 | // MARK: - Properties 48 | public var projectType: ProjectType = .xcode 49 | public var shouldCreateProject: Bool = false 50 | } 51 | 52 | extension InitOptions: Equatable { 53 | public static func ==(lhs: InitOptions, rhs: InitOptions) -> Bool { 54 | return 55 | lhs.projectType == rhs.projectType && 56 | lhs.shouldCreateProject == rhs.shouldCreateProject 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Sources/HWKit/Templates/gitignore_template.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | let gitignoreTemplate = 4 | """ 5 | .DS_Store 6 | /.build 7 | /Packages 8 | /*.xcodeproj 9 | """ 10 | -------------------------------------------------------------------------------- /Sources/HWKit/Templates/main_swift_subtype_xcode_template.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public let mainSwiftSubtypeXcodeTemplate = 4 | """ 5 | import HighwayCore 6 | import XCBuild 7 | import HighwayProject 8 | import Deliver 9 | import Foundation 10 | 11 | enum Way: String, HighwayType { 12 | case test, build, run 13 | var usage: String { 14 | switch self { 15 | case .build: return "Builds the project" 16 | case .test: return "Executes tests" 17 | case .run: return "Runs the project" 18 | } 19 | } 20 | } 21 | 22 | class App: Highway { 23 | override func setupHighways() { 24 | self[.build] ==> build 25 | self[.test] ==> test 26 | self[.run] ==> run 27 | } 28 | 29 | // MARK: - Highways 30 | func build() { 31 | 32 | } 33 | 34 | func test() throws { 35 | var options = TestOptions() 36 | options.project = "" 37 | options.scheme = "" 38 | options.destination = Destination.simulator(.iOS, name: "iPhone 7", os: .latest, id: nil) 39 | try xcbuild.buildAndTest(using: options) 40 | } 41 | 42 | func run() { 43 | 44 | } 45 | } 46 | 47 | App(Way.self).go() 48 | 49 | 50 | """ 51 | -------------------------------------------------------------------------------- /Sources/HWKit/Templates/package_swift_template.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | func packageDescriptionTemplate(packageName: String, targetName: String, branch: String, dependencyUrl: String) -> String { 4 | return """ 5 | // swift-tools-version:4.0 6 | import PackageDescription 7 | import Foundation 8 | 9 | let package = Package( 10 | name: "\(packageName)", 11 | dependencies: [ 12 | .package( 13 | url: ProcessInfo.processInfo.environment["HIGHWAY_REPOSITORY"] ?? 14 | URL(fileURLWithPath: NSHomeDirectory() + "/.highway/highway").absoluteString, 15 | .branch(ProcessInfo.processInfo.environment["HIGHWAY_BRANCH"] ?? "master")) 16 | ], 17 | targets: [ 18 | .target(name: "\(targetName)", dependencies: ["Deliver", "HighwayProject", "XCBuild", "HighwayCore", "FileSystem"], path: ".") 19 | ] 20 | ) 21 | """ 22 | } 23 | -------------------------------------------------------------------------------- /Sources/HWKit/Templates/xcconfig_template.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | let xcconfigTemplate = 4 | """ 5 | SUPPORTED_PLATFORMS = macosx 6 | MACOSX_DEPLOYMENT_TARGET = 10.13 7 | SWIFT_VERSION = 4.0 8 | OTHER_SWIFT_FLAGS = -DXcode 9 | """ 10 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Bundle/Configuration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Configuration.swift 3 | // XCBuild 4 | // 5 | // Created by Stijn on 26/07/2018. 6 | // 7 | 8 | import Foundation 9 | 10 | public struct Configuration { 11 | // MARK: - Getting the default Configuration 12 | public static let standard: Configuration = { 13 | var config = Configuration() 14 | config.branch = env("HIGHWAY_BUNDLE_BRANCH", defaultValue: "master") 15 | return config 16 | }() 17 | // MARK: - Properties 18 | public var mainSwiftFileName = "main.swift" 19 | public var packageSwiftFileName = "Package.swift" 20 | public var xcodeprojectName = "_highway.xcodeproj" 21 | public var packageName = "_highway" 22 | public var targetName = "_highway" 23 | public var directoryName = "_highway" 24 | public var buildDirectoryName = ".build" // there is a bug in PM: generating the xcode project causes .build to be used every time... 25 | public var pinsFileName = "Package.resolved" 26 | // MARK: - Properties / Convenience 27 | public var xcconfigName = "config.xcconfig" 28 | public var gitignoreName = ".gitignore" 29 | 30 | // MARK: - Private Stuff 31 | public var branch = "master" 32 | } 33 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Context/Context.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import Task 4 | import Terminal 5 | import SourceryAutoProtocols 6 | 7 | 8 | public protocol ContextProtocol: AutoMockable { 9 | 10 | /// sourcery:inline:Context.AutoGenerateProtocol 11 | var fileSystem: FileSystemProtocol { get } 12 | var executableProvider: ExecutableProviderProtocol { get } 13 | var executor: TaskExecutorProtocol { get } 14 | 15 | /// sourcery:end 16 | } 17 | 18 | 19 | open class Context: ContextProtocol, AutoGenerateProtocol { 20 | // MARK: - Convenience 21 | public init() throws { 22 | self.fileSystem = FileSystem() 23 | self.executableProvider = try SystemExecutableProvider() 24 | self.executor = SystemExecutor(ui: Terminal.shared) 25 | } 26 | 27 | // MARK: - Init 28 | public init(executableProvider: ExecutableProviderProtocol, executor: TaskExecutorProtocol, fileSystem: FileSystemProtocol) { 29 | self.executableProvider = executableProvider 30 | self.executor = executor 31 | self.fileSystem = fileSystem 32 | } 33 | 34 | // MARK: - Properties 35 | public let fileSystem: FileSystemProtocol 36 | public let executableProvider: ExecutableProviderProtocol 37 | 38 | public private(set) var executor: TaskExecutorProtocol 39 | } 40 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Features/Fastlane.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import Url 4 | import Task 5 | import Arguments 6 | import POSIX 7 | 8 | public final class Fastlane { 9 | // MARK: - Properties 10 | public let context: Context 11 | 12 | // MARK: - Init 13 | public init(context: Context) { 14 | self.context = context 15 | } 16 | 17 | // MARK: - Executing Actions 18 | public func action(named action: String, 19 | additionalArguments: Arguments = .empty, 20 | currentDirectoryUrl cwd: FolderProtocol = FileSystem().currentFolder 21 | ) throws { 22 | let arguments = Arguments(action) + additionalArguments 23 | let task = try Task(commandName: "fastlane", arguments: arguments, currentDirectoryUrl: cwd, provider: context.executableProvider) 24 | try context.executor.execute(task: task) 25 | 26 | guard task.state.successfullyFinished else { 27 | throw "fastlane failed." 28 | } 29 | } 30 | 31 | // MARK: Executing Actions - Convenience 32 | public func gym(_ args: String...) throws { 33 | try action(named: "gym", additionalArguments: Arguments(args)) 34 | } 35 | 36 | public func scan(_ args: String...) throws { 37 | try action(named: "scan", additionalArguments: Arguments(args)) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Features/Swift/SwiftRunTool.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import Url 4 | import Task 5 | import Arguments 6 | import POSIX 7 | 8 | public enum SwiftRun { } 9 | 10 | public extension SwiftRun { 11 | public final class Tool { 12 | public let context: Context 13 | public init(context: Context) { 14 | self.context = context 15 | } 16 | public func run(with options: Options) throws -> Result { 17 | let arguments = options.taskArguments 18 | 19 | let task = try Task(commandName: "swift", arguments: arguments, provider: context.executableProvider) 20 | task.currentDirectoryUrl = options.currentWorkingDirectory 21 | task.enableReadableOutputDataCapturing() 22 | 23 | try context.executor.execute(task: task) 24 | 25 | try task.throwIfNotSuccess("🛣🔥 \(SwiftRun.Tool.self) failed running task\n\(task).") 26 | let output = task.capturedOutputString 27 | return Result(output: output ?? "") 28 | } 29 | } 30 | } 31 | 32 | public extension SwiftRun { 33 | public struct Result { 34 | public let output: String 35 | } 36 | public struct Options { 37 | public var executable: String? = nil // swift run $executable 38 | public var arguments: Arguments = .empty 39 | public var packageUrl: FolderProtocol? = nil // --package-path 40 | public var currentWorkingDirectory: FolderProtocol = FileSystem().currentFolder 41 | public init() {} 42 | var taskArguments: Arguments { 43 | var result = Arguments() 44 | result.append("run") 45 | if let packageUrl = packageUrl { 46 | result.append("--package-path") 47 | result.append(packageUrl.path) 48 | } 49 | if let executable = executable { 50 | result.append(executable) 51 | } 52 | result += arguments 53 | return result 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Global Stuff/Env.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public func env(_ name: String, defaultValue: String) -> String { 4 | return ProcessInfo.processInfo.environment[name] ?? defaultValue 5 | } 6 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Global Stuff/OrderedDictionary.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class OrderedDictionary where Key : Hashable { 4 | // MARK: - Properties 5 | private var keys = [Key]() 6 | private(set) var values = [Value]() 7 | 8 | // MARK: - Appending Keys and Values 9 | func append(_ value: Value, forKey key: Key) { // FIXME: Replace 10 | keys.append(key) 11 | values.append(value) 12 | } 13 | 14 | // MARK: - Removing Pairs 15 | func removeValue(forKey key: Key) { 16 | guard let index = keys.index(of: key) else { return } 17 | 18 | keys.remove(at: index) 19 | values.remove(at: index) 20 | } 21 | 22 | // MARK: - Getting Values 23 | func value(forKey key: Key) -> Value? { 24 | guard let index = keys.index(of: key) else { return nil } 25 | return values[index] 26 | } 27 | 28 | subscript(key: Key) -> Value? { 29 | get { 30 | return value(forKey: key) 31 | } 32 | } 33 | 34 | // Adds defaultValue to the dictionary if it does not contain the key. 35 | subscript(key: Key, default defaultValue: @autoclosure () -> Value) -> Value { 36 | get { 37 | if let value = self[key] { 38 | return value 39 | } 40 | let fallbackValue = defaultValue() 41 | append(fallbackValue, forKey: key) 42 | return fallbackValue 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Global Stuff/String+Convenience.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public extension String { 4 | public static let elli = "…" 5 | } 6 | 7 | public extension String { 8 | public func padded(to maxLength: Int) -> String { 9 | let delta = maxLength - lengthOfBytes(using: .utf8) 10 | guard delta > 0 else { 11 | return self 12 | } 13 | let padding = String(repeating: " ", count: delta) 14 | return self + padding 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Highways/HighwayDescription.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Terminal 3 | 4 | /// Describes a Highway. 5 | public struct HighwayDescription: Codable { 6 | // MARK: - Properties 7 | public let name: String 8 | public let usage: String 9 | public var examples = [Example]() 10 | 11 | // MARK: - Init 12 | init(name: String, usage: String) { 13 | self.name = name 14 | self.usage = usage 15 | } 16 | } 17 | 18 | extension Example { 19 | func text(highway: String, indent: Text) -> Text { 20 | let line1 = indent + .text("- ") + .text(help + ":", color: .green) + .newline 21 | let line2 = indent + .whitespace(2) + .text("highway", color: .cyan) + .whitespace() + .text(highway, color: .none) + .whitespace() + .text(arguments ?? "", color: .none) + .newline 22 | return Text([line1, line2]) 23 | } 24 | } 25 | 26 | extension Array where Iterator.Element == HighwayDescription { 27 | public func jsonString() throws -> String { 28 | let coder = JSONEncoder() 29 | let data = try coder.encode(self) 30 | guard let string = String(data: data, encoding: .utf8) else { 31 | throw "Failed to convert data to String." 32 | } 33 | return string 34 | } 35 | 36 | public init(rawHighwaysData data: Data) throws { 37 | let coder = JSONDecoder() 38 | let rawHighways = try coder.decode(type(of: self), from: data) 39 | self.init(rawHighways) 40 | } 41 | 42 | func text() -> Text { 43 | return Text(map { $0.text() }) 44 | } 45 | 46 | public func printableString(with options: Print.Options) -> String { 47 | return text().printableString(with: options) 48 | } 49 | } 50 | 51 | public extension HighwayDescription { 52 | func text() -> Text { 53 | guard examples.isEmpty == false else { 54 | return Text() 55 | } 56 | let texts:[Text] = examples.map { $0.text(highway: self.name, indent: .whitespace(5)) + .newline } 57 | return Text(texts) 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Highways/HighwayTypeProtocol.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct Example: Codable { 4 | // MARK: - Properties 5 | public var arguments: String? 6 | public var help: String 7 | 8 | // MARK: - Init 9 | public init(arguments: String?, help: String) { 10 | self.arguments = arguments 11 | self.help = help 12 | } 13 | } 14 | 15 | public protocol HighwayTypeProtocol: Hashable { 16 | // MARK: - Init 17 | init?(name: String) 18 | 19 | // MARK: - Properties 20 | var name: String { get } 21 | var usage: String { get } 22 | var examples: [Example] { get } 23 | } 24 | 25 | extension HighwayTypeProtocol { 26 | var examples: [Example] { 27 | return [] 28 | } 29 | } 30 | 31 | /// Default Implementation 32 | extension HighwayTypeProtocol { 33 | public var hashValue: Int { return name.hashValue } 34 | var usage: String { return "No usage provided." } 35 | } 36 | 37 | /// Default Implementation for RawRepresentable (enums in most cases) 38 | public extension HighwayTypeProtocol where Self: RawRepresentable, Self.RawValue == String { 39 | // MARK: - Init 40 | init?(name: String) { 41 | self.init(rawValue: name) 42 | } 43 | 44 | // MARK: - Properties 45 | var name: String { return rawValue } 46 | var usage: String { return "No usage provided for '\(name)'." } 47 | 48 | /// By default we use `name` and `usage` to create an example instance. 49 | /// Renders like this: 50 | /// - $example0.usage 51 | /// highway $name $example0.$arguments 52 | /// 53 | /// $example1.usage 54 | /// highway $name $example1.arguments 55 | var examples: [Example] { 56 | return [Example(arguments: nil, help: usage)] 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Highways/Invocation/Invocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Arguments 3 | 4 | public final class Invocation { 5 | // MARK: - Init 6 | public init(highway: String = "", arguments: Arguments = .empty, verbose: Bool = false) { 7 | self.highway = highway 8 | self.arguments = arguments 9 | self.verbose = verbose 10 | } 11 | 12 | // MARK: - Properties 13 | public let highway: String 14 | public let arguments: Arguments 15 | public let verbose: Bool 16 | public var representsEmptyInvocation: Bool { return highway == "" } 17 | } 18 | 19 | extension Invocation: Equatable { 20 | public static func ==(l: Invocation, r: Invocation) -> Bool { 21 | return l.highway == r.highway && l.arguments == r.arguments && l.verbose == r.verbose 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sources/HighwayCore/Highways/Invocation/InvocationProvider.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Arguments 3 | 4 | public protocol InvocationProvider { 5 | func invocation() -> Invocation 6 | } 7 | 8 | public struct CommandLineInvocationProvider: InvocationProvider { 9 | public init(args: [String] = CommandLine.arguments) { 10 | self.args = args 11 | } 12 | private let args: [String] 13 | public func invocation() -> Invocation { 14 | let rawArgs = Array(args.dropFirst()) 15 | 16 | guard let firstArg = rawArgs.first else { 17 | return Invocation() 18 | } 19 | let verbose: Bool 20 | let remainingArgs: [String] 21 | if firstArg == "--verbose" { 22 | verbose = true 23 | remainingArgs = Array(rawArgs.dropFirst()) 24 | } else { 25 | verbose = false 26 | remainingArgs = rawArgs 27 | } 28 | 29 | guard let highwayName = remainingArgs.first else { 30 | return Invocation(verbose: verbose) 31 | } 32 | return Invocation(highway: highwayName, arguments: Arguments(Array(remainingArgs.dropFirst())), verbose: verbose) 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Sources/HighwayProject/Highway.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import XCBuild 4 | import Task 5 | import HighwayCore 6 | import Terminal 7 | import Deliver 8 | import POSIX 9 | import Git 10 | 11 | open class Highway: _Highway { 12 | public let fileSystem: FileSystemProtocol = FileSystem() 13 | public let context: ContextProtocol 14 | public let cwd: FolderProtocol 15 | public let system: SystemProtocol 16 | public let ui: UIProtocol = Terminal.shared 17 | 18 | public override init(_ highwayType: T.Type) throws { 19 | context = try Context() 20 | cwd = FileSystem().currentFolder 21 | system = try LocalSystem() 22 | 23 | try super.init(highwayType) 24 | } 25 | 26 | public lazy var git: GitTool = { 27 | return GitTool(system: system) 28 | }() 29 | 30 | public lazy var deliver: Deliver.Local = { 31 | return Deliver.Local(altool: Altool(system: system, fileSystem: fileSystem)) 32 | }() 33 | public lazy var xcbuild: XCBuild = { 34 | return XCBuild(system: system, fileSystem: fileSystem) 35 | }() 36 | public lazy var swift: SwiftBuildSystem = { 37 | return SwiftBuildSystem(context: context) 38 | }() 39 | } 40 | -------------------------------------------------------------------------------- /Sources/Keychain/Keychain.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Security 3 | import Task 4 | import Arguments 5 | import SourceryAutoProtocols 6 | 7 | public protocol KeychainProtocol: AutoMockable { 8 | 9 | /// sourcery:inline:Keychain.AutoGenerateProtocol 10 | var system: SystemProtocol { get } 11 | 12 | func password(matching query: Keychain.PasswordQuery) throws -> String 13 | /// sourcery:end 14 | } 15 | 16 | public class Keychain: KeychainProtocol, AutoGenerateProtocol { 17 | // MARK: - Init 18 | public init(system: SystemProtocol) { 19 | self.system = system 20 | } 21 | 22 | // MARK: - Properties 23 | public let system: SystemProtocol 24 | 25 | // MARK: - Working with the Keychain 26 | public func password(matching query: PasswordQuery) throws -> String { 27 | let task = try system.task(named: "security") 28 | task.arguments = query.processArguments 29 | task.enableReadableOutputDataCapturing() 30 | try system.execute(task) 31 | 32 | guard let password = task.trimmedOutput, password.isEmpty == false else { 33 | throw "Failed to get password from keychain: No Output found." 34 | } 35 | 36 | return password 37 | } 38 | } 39 | 40 | public extension Keychain { 41 | public class PasswordQuery { 42 | public init(account: String, service: String) { 43 | self.account = account 44 | self.service = service 45 | } 46 | public let account: String 47 | public let service: String 48 | public var processArguments: Arguments { 49 | return Arguments("find-generic-password") 50 | + "-a" + account 51 | + "-s" + service 52 | + "-w" // Display only the password on stdout 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Sources/POSIX/abscwd.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Darwin 3 | import Url 4 | 5 | public func abscwd() -> Absolute { 6 | #if Xcode 7 | if let result = _getabsxcodecwd(file: #file) { 8 | return Absolute(result) 9 | } 10 | #endif 11 | func error() -> Never { 12 | fputs("error: no current directory\n", stderr) 13 | exit(EXIT_FAILURE) 14 | } 15 | 16 | let cwd = Darwin.getcwd(nil, Int(PATH_MAX)) 17 | if cwd == nil { error() } 18 | defer { free(cwd) } 19 | guard let path = String(validatingUTF8: cwd!) else { error() } 20 | 21 | return Absolute(path) 22 | } 23 | 24 | private func _getabsxcodecwd(file: String) -> URL? { 25 | // Special case: 26 | // Xcode modifies the current working directory. If the user 27 | // opens his highway project in Xcode and launches it 28 | // he expects the cwd to be the directory that contains 29 | // _highway/. 30 | // In order to determine the cwd we get #file and move up the 31 | // directory tree until we find '_highway/.build' 32 | // or more generally, until we find: 33 | // HWBundle.directoryName/HWBundle.buildDirectoryName 34 | // The cwd then becomes the parent of HWBundle.directoryName. 35 | let xcodeCWD = URL(fileURLWithPath: file) 36 | let components = xcodeCWD.pathComponents 37 | guard let buildDirIndex = components.index(of: ".build") else { 38 | return nil 39 | } 40 | // Check if index before buildDirIndex exists and value is correct 41 | let previousIndex = buildDirIndex - 1 42 | guard components.indices.contains(previousIndex) else { 43 | return nil 44 | } 45 | let prevValue = components[previousIndex] 46 | let foundDirSequence = prevValue == "_highway" 47 | guard foundDirSequence else { 48 | return nil 49 | } 50 | let subComps = components[0.. FileProtocol 16 | 17 | } 18 | 19 | public protocol ArgumentExecutableProtocol: ExecutableProtocol { 20 | 21 | func arguments() throws -> Arguments 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Sources/Task/Finding and Executing/PathEnvironmentParser.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import POSIX 4 | import Url 5 | 6 | /// Parser that extracts urls from a String-Array of paths. 7 | /// Usually used to parse the contents of the PATH-environment 8 | /// variable. Any component (PATH=comp1:comp2:...) equal to "." 9 | /// is subsituted by $cwd. Furthermore: Any component which only 10 | /// contains a "." is used as an input to Absolute.init:. (which 11 | /// standardizes the path). 12 | public struct PathEnvironmentParser { 13 | // MARK: - Convenience 14 | public static func local() throws -> PathEnvironmentParser { 15 | let env = ProcessInfo.processInfo.environment 16 | let path = env["PATH"] ?? "" 17 | return try self.init(value: path, currentDirectoryUrl: FileSystem().currentFolder) 18 | } 19 | 20 | // MARK: - Init 21 | public init(value: String, currentDirectoryUrl: FolderProtocol) throws { 22 | let paths = value.components(separatedBy: ":") 23 | self.urls = try paths.compactMap { path in 24 | guard path != "" else { return nil } 25 | guard path != "." else { return currentDirectoryUrl } 26 | 27 | let isRelative = path.hasPrefix("/") == false 28 | guard isRelative else { return try Folder(path: path) } 29 | return try currentDirectoryUrl.subfolder(atPath: path) 30 | } 31 | self.currentDirectoryUrl = currentDirectoryUrl 32 | } 33 | 34 | // MARK: - Properties 35 | public let currentDirectoryUrl: FolderProtocol 36 | public var urls: [FolderProtocol] 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Sources/Task/Finding and Executing/SystemExecutableProvider.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import Url 4 | import SourceryAutoProtocols 5 | 6 | /// Maps names command line tools/executables to file urls. 7 | public protocol ExecutableProviderProtocol: AutoMockable { 8 | 9 | /// sourcery:inline:SystemExecutableProvider.AutoGenerateProtocol 10 | var searchedUrls: [FolderProtocol] { get set } 11 | var fileSystem: FileSystemProtocol { get } 12 | 13 | func executable(with executableName: String) throws -> FileProtocol 14 | /// sourcery:end 15 | } 16 | 17 | public final class SystemExecutableProvider: ExecutableProviderProtocol, AutoGenerateProtocol { 18 | // MARK: - Init 19 | public init(searchedUrls: [FolderProtocol], fileSystem: FileSystemProtocol) { 20 | self.searchedUrls = searchedUrls 21 | self.fileSystem = fileSystem 22 | } 23 | // MARK: - Convenience 24 | public init() throws { 25 | self.searchedUrls = try PathEnvironmentParser.local().urls 26 | self.fileSystem = FileSystem() 27 | } 28 | 29 | // MARK: - Properties 30 | public var searchedUrls = [FolderProtocol]() 31 | public let fileSystem: FileSystemProtocol 32 | 33 | // MARKL: - Error 34 | 35 | public enum Error: Swift.Error { 36 | case executableNotFoundFor(executableName: String) 37 | } 38 | } 39 | 40 | // MARK: - ExecutableProviderProtocol 41 | 42 | extension SystemExecutableProvider { 43 | 44 | public func executable(with executableName: String) throws -> FileProtocol { 45 | for url in searchedUrls { 46 | let potentialUrl = Absolute(url.path).appending(executableName) 47 | do { 48 | let file = try File(path: potentialUrl.path) 49 | return file 50 | } catch {} 51 | 52 | } 53 | throw Error.executableNotFoundFor(executableName: executableName) 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Sources/Task/Finding and Executing/SystemExecutor.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Arguments 3 | import Terminal 4 | 5 | public final class SystemExecutor: TaskExecutorProtocol { 6 | public var ui: UIProtocol 7 | 8 | // MARK: - Init 9 | public init(ui: UIProtocol) { 10 | self.ui = ui 11 | } 12 | 13 | // MARK: - Working with the Executor 14 | public func launch(task: Task, wait: Bool) { 15 | let process = task.toProcess 16 | ui.verbose(task.description) 17 | task.state = .executing 18 | process.launch() 19 | if wait { 20 | process.waitUntilExit() 21 | } 22 | if task.successfullyFinished == false { 23 | ui.error(task.state.description) 24 | } else { 25 | ui.verbose(task.state.description) 26 | } 27 | } 28 | } 29 | 30 | private extension Process { 31 | func takeIOFrom(_ task: Task) { 32 | standardInput = task.input.asProcessChannel 33 | standardOutput = task.output.asProcessChannel 34 | } 35 | } 36 | 37 | // internal because it is tested 38 | extension Task { 39 | 40 | // sourcery:skipProtocol 41 | var toProcess: Process { 42 | let result = Process() 43 | result.arguments = arguments.all 44 | result.launchPath = executable.path 45 | if let currentDirectoryPath = currentDirectoryUrl?.path { 46 | result.currentDirectoryPath = currentDirectoryPath 47 | } 48 | var _environment: [String:String] = ProcessInfo.processInfo.environment 49 | self.environment.forEach { 50 | _environment[$0.key] = $0.value 51 | } 52 | result.environment = _environment 53 | result.terminationHandler = { terminatedProcess in 54 | self.state = .terminated(Termination(describing: terminatedProcess)) 55 | } 56 | result.takeIOFrom(self) 57 | return result 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Sources/Task/Finding and Executing/TaskExecutorProtocol.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Terminal 3 | import SourceryAutoProtocols 4 | 5 | public protocol TaskExecutorProtocol: AutoMockable { 6 | var ui: UIProtocol { get } 7 | func execute(task: Task) throws 8 | func launch(task: Task, wait: Bool) throws 9 | } 10 | 11 | public extension TaskExecutorProtocol { 12 | func execute(task: Task) throws { 13 | try launch(task: task, wait: true) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sources/Task/LocalSystem.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ZFile 3 | import Result 4 | import Terminal 5 | import SourceryAutoProtocols 6 | 7 | public final class LocalSystem: SystemProtocol, AutoGenerateProtocol { 8 | 9 | 10 | // MARK: - Properties 11 | private let executor: TaskExecutorProtocol 12 | private let executableProvider: ExecutableProviderProtocol 13 | private let fileSystem: FileSystemProtocol 14 | 15 | // MARK: - Init 16 | public init(executor: TaskExecutorProtocol, executableProvider: ExecutableProviderProtocol, fileSystem: FileSystemProtocol) { 17 | self.executor = executor 18 | self.executableProvider = executableProvider 19 | self.fileSystem = fileSystem 20 | } 21 | 22 | /// Local System 23 | public init(executableProvider: SystemExecutableProvider? = nil) throws { 24 | self.executor = SystemExecutor(ui: Terminal.shared) 25 | self.executableProvider = (executableProvider == nil) ? try SystemExecutableProvider() : executableProvider! 26 | self.fileSystem = FileSystem() 27 | } 28 | } 29 | 30 | extension LocalSystem { 31 | // MARK: - Working with the System 32 | public func task(named name: String) throws -> Task { 33 | 34 | return Task(executable: try executableProvider.executable(with: name)) 35 | } 36 | 37 | public func execute(_ task: Task) throws -> Bool{ 38 | return try launch(task, wait: true) 39 | } 40 | 41 | public func launch(_ task: Task, wait: Bool) throws -> Bool { 42 | 43 | try executor.launch(task: task, wait: wait) 44 | 45 | guard wait else { return true } 46 | 47 | let state = task.state 48 | switch state { 49 | case .waiting, .executing: 50 | throw ExecutionError.invalidStateAfterExecuting 51 | case .terminated(let termination): 52 | guard termination.isSuccess else { 53 | throw ExecutionError.taskDidExitWithFailure(termination) 54 | } 55 | return true 56 | } 57 | 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /Sources/Task/Model/Channel+Reader.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public extension Channel { 4 | public class Reader { 5 | // MARK: - Properties 6 | private let fileHandle: FileHandle 7 | public var didRead: ((Data) -> Void)? 8 | public var didClose: (() -> Void)? 9 | 10 | // MARK: - Init 11 | init(_ fileHandle: FileHandle) { 12 | self.fileHandle = fileHandle 13 | } 14 | 15 | // MARK: - Working with the Channel 16 | public func withAvailableData(_ consumeData: (Data)->(Void)) { 17 | let data = fileHandle.availableData 18 | consumeData(data) 19 | didRead?(data) 20 | } 21 | 22 | public func close() { 23 | fileHandle.closeFile() 24 | didClose?() 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Task/Model/Channel+Writer.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public extension Channel { 4 | public class Writer { 5 | // MARK: - Properties 6 | public var didWrite: ((Data) -> Void)? 7 | public var didClose: (() -> Void)? 8 | private let fileHandle: FileHandle 9 | 10 | // MARK: - Init 11 | init(_ fileHandle: FileHandle) { 12 | self.fileHandle = fileHandle 13 | } 14 | 15 | // MARK: - Working with the Channel 16 | public func write(_ data: Data) { 17 | fileHandle.write(data) 18 | didWrite?(data) 19 | } 20 | 21 | public func write(_ string: String) { 22 | guard let data = string.data(using: .utf8) else { 23 | fatalError() 24 | } 25 | write(data) 26 | } 27 | 28 | public func close() { 29 | fileHandle.closeFile() 30 | didClose?() 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Task/Model/IO.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public final class IO { 4 | // MARK: - Properties 5 | public var input: Channel = .standardInput() 6 | public var output: Channel = .standardOutput() 7 | public private(set) var readOutputData: Data? 8 | 9 | // MARK: - Convenience 10 | public func enableReadableOutputDataCapturing() { 11 | readOutputData = Data() 12 | output = .pipe() 13 | output.readabilityHandler = { handle in 14 | handle.withAvailableData { available in 15 | self.readOutputData?.append(available) 16 | } 17 | } 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Sources/Task/Model/State.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public enum State { 4 | case waiting 5 | case executing 6 | case terminated(Termination) 7 | 8 | // MARK: - Properties 9 | public var termination: Termination? { 10 | if case let .terminated(_termination) = self { return _termination } 11 | return nil 12 | } 13 | public var successfullyFinished: Bool { return termination?.isSuccess ?? false } 14 | } 15 | 16 | extension State: CustomDebugStringConvertible { 17 | public var debugDescription: String { 18 | switch self { 19 | case .waiting: 20 | return "WAITING" 21 | case .executing: 22 | return "EXECUTING" 23 | case .terminated(let termination): 24 | return termination.debugDescription 25 | } 26 | } 27 | } 28 | 29 | extension State: CustomStringConvertible { 30 | public var description: String { 31 | switch self { 32 | case .waiting: return "[WAITING]" 33 | case .executing: return "[EXECUTING]" 34 | case .terminated(let termination): return "[TERMINATED] \(termination)" 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Sources/Task/Model/Termination.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct Termination { 4 | // MARK: - Types 5 | public typealias Reason = Process.TerminationReason 6 | 7 | // MARK: - Convenience 8 | public static let success = Termination(reason: .exit, status: EXIT_SUCCESS) 9 | public static let failure = Termination(reason: .exit, status: EXIT_FAILURE) 10 | 11 | // MARK: - Init 12 | public init(describing process: Process) { 13 | self.init(reason: process.terminationReason, status: process.terminationStatus) 14 | } 15 | 16 | init(reason: Reason, status: Int32) { 17 | self.reason = reason 18 | self.status = status 19 | } 20 | // MARK: - Properties 21 | public let reason: Reason 22 | public let status: Int32 23 | public var isSuccess: Bool { return status == EXIT_SUCCESS } 24 | } 25 | 26 | extension Termination: CustomStringConvertible, CustomDebugStringConvertible { 27 | public var description: String { 28 | return "[\(isSuccess ? "SUCCESS" : "ERROR")] Status: \(status), Reason: \(reason)" 29 | } 30 | public var debugDescription: String { return description } 31 | } 32 | 33 | extension Termination: Equatable { 34 | public static func ==(lhs: Termination, rhs: Termination) -> Bool { 35 | return lhs.status == rhs.status && lhs.reason == rhs.reason 36 | } 37 | } 38 | 39 | extension Process.TerminationReason: CustomStringConvertible { 40 | public var description: String { 41 | switch self { 42 | case .exit: return "Exited normally." 43 | case .uncaughtSignal: return "Exited due to an uncaught signal." 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Sources/Task/SystemProtocol.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Result 3 | import SourceryAutoProtocols 4 | 5 | /// A `System` is able to do two things: 6 | /// 1. Create new *executable* Tasks. A System can do that because it 7 | /// is initialized with an executable provider. 8 | /// 2. Execute Tasks. It can do that because it has an executor. 9 | /// Everytime you would write a class that needs to create and execute Tasks 10 | /// you no longer have to initialize it with both but rather use the System 11 | /// class for that. It is just a little bit of convenience. 12 | public protocol SystemProtocol: AutoMockable { 13 | 14 | /// sourcery:inline:LocalSystem.AutoGenerateProtocol 15 | @discardableResult func task(named name: String) throws -> Task 16 | @discardableResult func execute(_ task: Task) throws -> Bool 17 | @discardableResult func launch(_ task: Task, wait: Bool) throws -> Bool 18 | /// sourcery:end 19 | } 20 | 21 | public extension SystemProtocol { 22 | func execute(_ task: Task) throws -> Bool { 23 | return try launch(task, wait: true) 24 | } 25 | } 26 | 27 | // MARK: - Errors 28 | public enum TaskCreationError: Swift.Error { 29 | case executableNotFound(commandName: String) 30 | } 31 | 32 | public enum ExecutionError: Swift.Error { 33 | case currentDirectoryDoesNotExist 34 | case invalidStateAfterExecuting 35 | case taskDidExitWithFailure(Termination) 36 | } 37 | 38 | // MARK: - Equatable for ExecutionError 39 | extension ExecutionError: Equatable { 40 | public static func ==(lhs: ExecutionError, rhs: ExecutionError) -> Bool { 41 | let errors = (lhs, rhs) 42 | switch errors { 43 | case (.currentDirectoryDoesNotExist, .currentDirectoryDoesNotExist), 44 | (.invalidStateAfterExecuting, .invalidStateAfterExecuting): 45 | return true 46 | case (.taskDidExitWithFailure(let lf), .taskDidExitWithFailure(let rf)): 47 | return lf == rf 48 | default: return false 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Sources/Terminal/FileStream.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class FileStream { 4 | // MARK: - Init 5 | init(fd: UnsafeMutablePointer) { 6 | self.fd = fd 7 | } 8 | 9 | // MARK: - Properties 10 | private let queue = DispatchQueue(label: "de.christian-kienle.highway.FileStream") 11 | private let fd: UnsafeMutablePointer 12 | 13 | // MARK: - Working with the Stream 14 | func write(_ text: String) { 15 | queue.sync { 16 | fputs(text, fd) 17 | fflush(fd) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sources/Terminal/Printable/Printable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public protocol Printable { 4 | func printableString(with options: Print.Options) -> String 5 | } 6 | 7 | public protocol Printer { 8 | func string(with options: Print.Options) -> String 9 | } 10 | 11 | public enum Print { 12 | public struct Options { 13 | public let width: Int 14 | static func defaultOptions() -> Options { 15 | return self.init(width: terminal_width()) 16 | } 17 | } 18 | } 19 | 20 | private func terminal_width() -> Int { 21 | let env = ProcessInfo.processInfo.environment 22 | if let columns = env["COLUMNS"], let width = Int(columns) { 23 | return width 24 | } 25 | var ws = winsize() 26 | if ioctl(1, UInt(TIOCGWINSZ), &ws) == 0 { 27 | return Int(ws.ws_col) 28 | } 29 | return 80 30 | } 31 | -------------------------------------------------------------------------------- /Sources/Terminal/Printable/Printables/Line.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct Line { 4 | public init(prompt: Prompt, text: Text) { 5 | self.prompt = prompt 6 | self.text = text 7 | } 8 | public let prompt: Prompt 9 | public let text: Text 10 | } 11 | 12 | extension Line: Printable { 13 | public func printableString(with options: Print.Options) -> String { 14 | return prompt.terminalString + text.terminalString 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sources/Terminal/Printable/Printables/List.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct List { 4 | // MARK: - Init 5 | private init(lines: [Line] = []) { 6 | self.lines = lines 7 | } 8 | public init(lines rawLines: [String] = []) { 9 | lines = [] 10 | rawLines.forEach { self.append($0) } 11 | } 12 | // MARK: - Properties 13 | private var lines: [Line] 14 | 15 | // MARK: - Working with the List 16 | public mutating func append(_ rawText: String) { 17 | lines.append(Line(prompt: .normal, text: Text(rawText))) 18 | } 19 | } 20 | 21 | extension List: Printable { 22 | public func printableString(with options: Print.Options) -> String { 23 | return lines.map { $0.printableString(with: options) }.joined(separator: .newline) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/Terminal/Prompt.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct Prompt { 4 | // MARK: - Convenience 5 | public static let success = Prompt(color: .green) 6 | public static let error = Prompt(color: .red) 7 | public static let normal = Prompt(color: .none) 8 | public static let warning = Prompt(color: .yellow) 9 | 10 | // MARK: - Init 11 | public init(color: Color) { 12 | self.color = color 13 | strings = Text(repeating: .promptCharacter(with: color), count: 3) 14 | } 15 | 16 | // MARK: - Properties 17 | public var length: Int { return strings.length } 18 | public var strings: Text 19 | public var terminalString: String { return strings.terminalString + " " } 20 | public let color: Color 21 | 22 | // MARK: - Working with the Prompt 23 | public mutating func set(color: Color, forCharacterAt index: Int) { 24 | strings.setColor(self.color) 25 | strings[index] = .promptCharacter(with: color) 26 | } 27 | } 28 | 29 | private extension SubText { 30 | static func promptCharacter(with color: Color = .none) -> SubText { 31 | return SubText("❯", color: color) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Terminal/String+Convenience.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String { 4 | public static let newline = "\n" 5 | } 6 | 7 | extension String { 8 | enum Ansi { 9 | static let CSI = "\u{001B}[" 10 | static let BOLD = CSI + "1m" 11 | static let RESET = CSI + "0m" 12 | } 13 | } 14 | 15 | extension String { 16 | func indented(width: Int, using indentationString: String = " ") -> String { 17 | let indent = String(repeating: indentationString, count: width) 18 | return indent + self 19 | } 20 | public static func whitespace(_ width: Int = 0) -> String { 21 | return String(repeating: " " , count: width) 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Sources/Terminal/Text/Color.swift: -------------------------------------------------------------------------------- 1 | public enum Color: String { 2 | case none = "" 3 | case red = "31m" 4 | case green = "32m" 5 | case yellow = "33m" 6 | case cyan = "36m" 7 | case white = "37m" 8 | case black = "30m" 9 | case grey = "30;1m" 10 | 11 | // MARK: - Properties 12 | var terminalString: String { 13 | if case .none = self { 14 | return "" 15 | } 16 | return String.Ansi.CSI + rawValue 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sources/Terminal/Text/SubText.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct SubText { 4 | // MARK: - Convenience 5 | public static let empty = SubText() 6 | public static let newline = SubText(.newline) 7 | 8 | // MARK: - Init 9 | public init(_ text: String = "", color: Color = .none, bold: Bool = false) { 10 | self.text = text 11 | self.color = color 12 | self.bold = bold 13 | } 14 | 15 | // MARK: - Properties 16 | public var text: String 17 | public var color: Color 18 | public var bold: Bool 19 | public var length: Int { return text.lengthOfBytes(using: .utf8) } 20 | public var terminalString: String { 21 | // Strings without any styling have to be printed as raw strings for some reason 22 | if bold == false && color == .none { 23 | return text 24 | } 25 | let _bold = bold ? String.Ansi.BOLD : "" 26 | return String.Ansi.RESET + color.terminalString + _bold + text + String.Ansi.RESET 27 | } 28 | } 29 | 30 | public extension SubText { 31 | public init(whitespaceWidth width: Int = 0) { 32 | self.init(String.whitespace(width)) 33 | } 34 | public static func whitespace(_ width: Int = 1) -> SubText { 35 | return SubText(whitespaceWidth: width) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Sources/Terminal/Text/Texts+Operators.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public func +(l: Text, r: Text) -> Text { 4 | return l.appending(r) 5 | } 6 | -------------------------------------------------------------------------------- /Sources/Terminal/Text/Texts+Printable.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String: Printable { 4 | public func printableString(with options: Print.Options) -> String { 5 | return self 6 | } 7 | } 8 | 9 | extension SubText: Printable { 10 | public func printableString(with options: Print.Options) -> String { 11 | return terminalString 12 | } 13 | } 14 | 15 | extension Text: Printable { 16 | public func printableString(with options: Print.Options) -> String { 17 | return terminalString 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sources/Terminal/UI.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SourceryAutoProtocols 3 | 4 | public protocol UIProtocol: AutoMockable { 5 | func message(_ text: String) 6 | func success(_ text: String) 7 | 8 | /// Prints text only if --verbose is set. 9 | func verbose(_ text: String) 10 | func error(_ text: String) 11 | 12 | /// Prints printable 13 | func print(_ printable: Printable) 14 | 15 | /// Prints printable only if --verbose is set. 16 | func verbosePrint(_ printable: Printable) 17 | } 18 | -------------------------------------------------------------------------------- /Sources/XCBuild/Archive/Archive.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Url 3 | import ZFile 4 | import SourceryAutoProtocols 5 | 6 | 7 | public protocol ArchiveProtocol: AutoMockable { 8 | 9 | /// sourcery:inline:Archive.AutoGenerateProtocol 10 | var archiveFolder: FolderProtocol { get } 11 | var appFolder: FolderProtocol { get } 12 | var plist: ArchivePlistProtocol { get } 13 | /// sourcery:end 14 | 15 | } 16 | 17 | public struct Archive: ArchiveProtocol, AutoGenerateProtocol { 18 | 19 | public let archiveFolder: FolderProtocol 20 | public let appFolder: FolderProtocol 21 | public let plist: ArchivePlistProtocol 22 | 23 | 24 | // MARK: - Init 25 | 26 | init(archiveFolder: FolderProtocol, fileSystem: FileSystemProtocol) throws { 27 | self.archiveFolder = archiveFolder 28 | 29 | let infoPlistData = try archiveFolder.file(named: "Info.plist").read() 30 | 31 | plist = try PropertyListDecoder().decode(ArchivePlist.self, from: infoPlistData) 32 | 33 | appFolder = try archiveFolder.subfolder(named: "Products") 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sources/XCBuild/Archive/ArchiveOptions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SourceryAutoProtocols 3 | 4 | public protocol ArchiveOptionsProtocol: AutoMockable { 5 | 6 | /// sourcery:inline:ArchiveOptions.AutoGenerateProtocol 7 | var scheme: String { get } 8 | var project: String { get } 9 | var destination: DestinationProtocol { get } 10 | var archivePath: String { get } 11 | /// sourcery:end 12 | } 13 | 14 | /// Options for xcodebuild's archive action: 15 | public struct ArchiveOptions: ArchiveOptionsProtocol, AutoGenerateProtocol { 16 | 17 | // MARK: - Properties 18 | public let scheme: String // -scheme 19 | public let project: String // -project [sub-type: path] 20 | public let destination: DestinationProtocol // -destination 21 | 22 | // Option: -archivePath 23 | // Type: path 24 | // Notes: Directory at archivePath must not exist already. 25 | public let archivePath: String 26 | 27 | // MARK: - Init 28 | public init(scheme: String, project: String, destination: DestinationProtocol, archivePath: String) { 29 | self.scheme = scheme 30 | self.project = project 31 | self.destination = destination 32 | self.archivePath = archivePath 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Sources/XCBuild/Archive/ArchivePlist.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlistProtocol.swift 3 | // XCBuild 4 | // 5 | // Created by Stijn on 26/07/2018. 6 | // 7 | 8 | import Foundation 9 | import SourceryAutoProtocols 10 | 11 | public protocol ArchivePlistProtocol: Codable, AutoMockable { 12 | 13 | /// sourcery:inline:ArchivePlist.AutoGenerateProtocol 14 | var applicationProperties: String { get } 15 | var applicationPath: String { get } 16 | /// sourcery:end 17 | 18 | } 19 | 20 | public struct ArchivePlist: ArchivePlistProtocol, Codable, AutoGenerateProtocol { 21 | public let applicationProperties: String 22 | public let applicationPath: String 23 | 24 | enum CodingKeys: String, CodingKey { 25 | case applicationProperties = "ApplicationProperties" 26 | case applicationPath = "ApplicationPath" 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Sources/XCBuild/Export/Export.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Url 3 | import ZFile 4 | import SourceryAutoProtocols 5 | 6 | public protocol ExportProtocol: AutoMockable { 7 | 8 | /// sourcery:inline:Export.AutoGenerateProtocol 9 | var folder: FolderProtocol { get } 10 | var ipa: FileProtocol { get } 11 | /// sourcery:end 12 | } 13 | 14 | public struct Export: ExportProtocol, AutoGenerateProtocol { 15 | // MARK: - Properties 16 | public let folder: FolderProtocol 17 | public let ipa: FileProtocol 18 | 19 | // MARK: - Init 20 | init(folder: FolderProtocol, fileSystem: FileSystemProtocol) throws { 21 | self.folder = folder 22 | let ipa = folder.makeFileSequence(recursive: false, includeHidden: false).first { $0.extension == "ipa" } 23 | 24 | guard let result = ipa else { 25 | throw Error.noIpaFound(inFolder: folder) 26 | } 27 | 28 | self.ipa = result 29 | } 30 | 31 | enum Error: Swift.Error { 32 | case noIpaFound(inFolder: FolderProtocol) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sources/XCBuild/Test/TestReport.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct TestReport { 4 | public init() {} 5 | } 6 | -------------------------------------------------------------------------------- /Sources/ZFile/FilesGeneral.swift: -------------------------------------------------------------------------------- 1 | /** 2 | * Files 3 | * 4 | * Copyright (c) 2017 John Sundell. Licensed under the MIT license, as follows: 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | import Foundation 26 | 27 | 28 | extension String { 29 | var pathComponents: [String] { 30 | return components(separatedBy: "/") 31 | } 32 | } 33 | 34 | extension ProcessInfo { 35 | var homeFolderPath: String { 36 | return environment["HOME"]! 37 | } 38 | } 39 | 40 | #if os(Linux) && !(swift(>=4.1)) 41 | private extension ObjCBool { 42 | var boolValue: Bool { return Bool(self) } 43 | } 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /Sources/highway/App/AppHighway.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import HighwayCore 3 | 4 | enum AppHighway: String, HighwayTypeProtocol { 5 | case initialize 6 | case help 7 | case generate 8 | case bootstrap 9 | case clean 10 | case version 11 | case self_update 12 | 13 | var name: String { 14 | if self == .initialize { return "init" } 15 | if self == .version { return "--version" } 16 | return rawValue 17 | } 18 | 19 | var usage: String { 20 | switch self { 21 | case .initialize: return "Initializes a new highway project" 22 | case .help: return "Displays available commands and options" 23 | case .generate: return "Generates an Xcode project" 24 | case .bootstrap: return "Bootstraps the highway home directory" 25 | case .clean: return "Delete build artifacts of your highway project" 26 | case .self_update: return "Updates highway & the supporting frameworks" 27 | case .version: return "Print version information and exit" 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Sources/highway/App/AppInfo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import HighwayCore 3 | import Terminal 4 | 5 | struct AppInfo: Printable { 6 | // MARK: - Init 7 | init(_ infos:[HighwayDescription]) { 8 | self.infos = infos 9 | } 10 | 11 | // MARK: - Properties 12 | private let infos: [HighwayDescription] 13 | 14 | // MARK: - Printing 15 | func printableString(with options: Print.Options) -> String { 16 | return infos.printableString(with: options) 17 | } 18 | } 19 | 20 | extension _Highway { 21 | func appInfo(developerProvidedDescriptions: [HighwayDescription]) -> AppInfo { 22 | let all = descriptions + developerProvidedDescriptions 23 | return AppInfo(all) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/highway/CurrentVersion.swift: -------------------------------------------------------------------------------- 1 | let CurrentVersion = "0.0.12" 2 | -------------------------------------------------------------------------------- /Sources/highway/main.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import HighwayCore 3 | import ZFile 4 | import Terminal 5 | 6 | let invocation = CommandLineInvocationProvider().invocation() 7 | Terminal.shared.verbose = invocation.verbose 8 | 9 | let app = App(AppHighway.self) 10 | app.go() 11 | 12 | -------------------------------------------------------------------------------- /Sources/🧙‍♂️/AutoProtocols/AutoGenerateProtocol.generated.swift: -------------------------------------------------------------------------------- 1 | // Generated using Sourcery 0.13.1 — https://github.com/krzysztofzablocki/Sourcery 2 | // DO NOT EDIT 3 | 4 | 5 | //: Do not change this code as it is autogenerated every time you build. 6 | //: You can change the code in `../StencilTemplatesForSourcery/Application/AutoGenerateProtocol 7 | import Foundation 8 | // MARK: - AutoGenerateProtocol 9 | //: From all Types implementing this protocol Sourcery adds: 10 | //: - public/internal variables // private variables are ignored 11 | //: - public/internal methods (skips initializers) 12 | //: - initializers marked with annotation // sourcery:includeInitInProtocol 13 | //: - of the above it does not add it if // sourcery:skipProtocol 14 | //: --- 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Sources/🧙‍♂️/AutoProtocols/SourceryAutoProtocols.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AutoMockable.swift 3 | // VRTNieuws 4 | // 5 | // Created by Stijn on 15/03/2018. 6 | // Copyright © 2018 VRT. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | //: # Implementing these protocols will generate code in files named `.generated.swift` 12 | 13 | /*: Generate code with 🧙‍♂️ 14 | 15 | // ## Mocks 16 | 17 | /Applications/Sourcery.app/Contents/MacOS/Sourcery\ 18 | --templates ./🤖sources/builder/Sources/🧙‍♂️/Mocks\ 19 | --output ./🤖sources/builder/Sources/🧙‍♂️/Mocks\ 20 | --sources ./🤖sources/builder\ 21 | 22 | // to edit template 23 | 24 | atom .🤖sources/builder/🧙‍♂️/Mocks/AutoMockable.stencil 25 | 26 | 27 | // ## Protocols 28 | 29 | /Applications/Sourcery.app/Contents/MacOS/Sourcery\ 30 | --templates ./🤖sources/builder/Sources/🧙‍♂️/AutoProtocols\ 31 | --output ./🤖sources/builder/Sources/🧙‍♂️/AutoProtocols\ 32 | --sources ./🤖sources/builder\ 33 | 34 | // to edit template 35 | 36 | atom .🤖sources/builder/🧙‍♂️/AutoProtocols/AutoGenerateProtocol.stencil 37 | 38 | :*/ 39 | 40 | //: To be able to create a mock via sourcery 41 | //: usage: Extend any protocol with this and a mock will be created 42 | public protocol AutoMockable { 43 | } 44 | 45 | @objc public protocol AutoObjcMockable { 46 | 47 | } 48 | public protocol AutoGenerateProtocol { 49 | } 50 | 51 | public protocol AutoGenerateSelectiveProtocol { 52 | } 53 | 54 | public protocol AutoEquatable { 55 | } 56 | 57 | // MARK: Enums 58 | 59 | public protocol AutoCases { 60 | } 61 | 62 | // MARK: - Sourcery Errors 63 | 64 | public enum SourceryMockError: Swift.Error, CustomDebugStringConvertible { 65 | case implementErrorCaseFor(String) 66 | 67 | public var debugDescription: String { 68 | switch self { 69 | case let .implementErrorCaseFor(message): 70 | return """ 71 | \n 72 | 🧙‍♂️ \(SourceryMockError.self) Implement a case for: 73 | \n 74 | \(message) 75 | \n 76 | """ 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Tests/ArgumentsTests/test.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Arguments 3 | 4 | private class Person { 5 | var firstName: String? 6 | var lastName: String? 7 | var age: Int? 8 | } 9 | final class ArgumentsTests: XCTestCase { 10 | func testExample() { 11 | let p = Person() 12 | let parser = Parser(p) 13 | parser.add(Key("--firstname", "-fn", description: "Sets the first name.")) { (pers, keyable) in 14 | pers.firstName = keyable 15 | } 16 | XCTAssertNoThrow(try parser.consume(["--firstname", "Chris"])) 17 | print(p) 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Tests/DeliverTests/test.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/DeliverTests/test.swift -------------------------------------------------------------------------------- /Tests/FSKitTests/AbsoluteURLTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import FileSystem 3 | 4 | final class AbsoluteURLTests: XCTestCase { 5 | func testInitRelativeTo() { 6 | assertAbsoluteEqualsPath(Absolute(path: "test", relativeTo: Absolute("/")), "/test") 7 | assertAbsoluteEqualsPath(Absolute(path: "", relativeTo: Absolute("/")), "/") 8 | assertAbsoluteEqualsPath(Absolute(path: "hello/world", relativeTo: Absolute("/")), "/hello/world") 9 | } 10 | 11 | func testAppendRelative() { 12 | let base = Absolute("/") 13 | let bin = base.appending(Relative("bin")) 14 | assertAbsoluteEqualsPath(bin, "/bin") 15 | } 16 | } 17 | 18 | private func assertAbsoluteEqualsPath(_ absoluteURL: Absolute, _ absolutePath: String, file: StaticString = #file, line: UInt = #line) { 19 | XCTAssertEqual(absoluteURL, Absolute(absolutePath), "\nURLs not equal:\n\(absoluteURL) \n\nExpected: \(absolutePath)", file: file, line: line) 20 | } 21 | -------------------------------------------------------------------------------- /Tests/FSKitTests/FileSystemTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import FileSystem 3 | 4 | func _assert(_ expression: @autoclosure () throws -> T, throwsErrorOfType: ErrorType.Type, file: StaticString = #file, line: UInt = #line, _ errorHandler: (ErrorType) -> Void) { 5 | XCTAssertThrowsError(expression, "", file: file, line: line) { anyError in 6 | guard let error = anyError as? ErrorType else { 7 | XCTFail("Caught error has incorrect type. Got '\(type(of: anyError))', expected: \(ErrorType.self)", file: file, line: line) 8 | return 9 | } 10 | errorHandler(error) 11 | } 12 | } 13 | 14 | func _assertThrowsFileSystemError(_ expression: @autoclosure () throws -> T, file: StaticString = #file, line: UInt = #line, _ errorHandler: (FSError) -> Void) { 15 | _assert(expression, throwsErrorOfType: FSError.self, errorHandler) 16 | } 17 | -------------------------------------------------------------------------------- /Tests/FSKitTests/RelativePathTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import FileSystem 3 | 4 | final class RelativePathTests: XCTestCase { 5 | func testThatValidPathsAreNotModified() { 6 | XCTAssertEqual(Relative("hello").asString, "hello") 7 | XCTAssertEqual(Relative("hello/world").asString, "hello/world") 8 | XCTAssertEqual(Relative(".hello").asString, ".hello") 9 | XCTAssertEqual(Relative(".").asString, ".") 10 | } 11 | func testTrailingSlashesAreRemoved() { 12 | XCTAssertEqual(Relative("hello/").asString, "hello") 13 | XCTAssertEqual(Relative("hello/world/").asString, "hello/world") 14 | } 15 | func testEmptyPathIsTransformedIntoCurrentPathIndicator() { 16 | XCTAssertEqual(Relative("").asString, ".") 17 | } 18 | 19 | func testThatRedundantDotsAreRemoved() { 20 | XCTAssertEqual(Relative("hello/./.").asString, "hello") 21 | XCTAssertEqual(Relative("./.").asString, ".") 22 | XCTAssertEqual(Relative("hello/././world/./test/./bla/test/././.build/test").asString, "hello/world/test/bla/test/.build/test") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Tests/FileSystemTests/FileSystemTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import FileSystem 3 | import Url 4 | 5 | func _assert(_ expression: @autoclosure () throws -> T, throwsErrorOfType: ErrorType.Type, file: StaticString = #file, line: UInt = #line, _ errorHandler: (ErrorType) -> Void) { 6 | XCTAssertThrowsError(expression, "", file: file, line: line) { anyError in 7 | guard let error = anyError as? ErrorType else { 8 | XCTFail("Caught error has incorrect type. Got '\(type(of: anyError))', expected: \(ErrorType.self)", file: file, line: line) 9 | return 10 | } 11 | errorHandler(error) 12 | } 13 | } 14 | 15 | func _assertThrowsFileSystemError(_ expression: @autoclosure () throws -> T, file: StaticString = #file, line: UInt = #line, _ errorHandler: (FSError) -> Void) { 16 | _assert(expression, throwsErrorOfType: FSError.self, errorHandler) 17 | } 18 | -------------------------------------------------------------------------------- /Tests/GitTests/git.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/GitTests/git.swift -------------------------------------------------------------------------------- /Tests/HWKitTests/BootstraperTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import HWKit 3 | import TestKit 4 | import ZFile 5 | import Url 6 | 7 | class BootstraperTests: XCTestCase { 8 | private var context = ContextMock() 9 | private var git = GitMock() 10 | 11 | override func setUp() { 12 | super.setUp() 13 | context = ContextMock() 14 | git = GitMock() 15 | } 16 | 17 | func testSuccess() { 18 | git.throwsEnabeld = false 19 | let homeDir = Absolute("/home") 20 | let bootstrapper = Bootstraper(homeDirectory: homeDir, configuration: .standard, git: git, context: context) 21 | let bundle: HomeBundle 22 | do { 23 | bundle = try bootstrapper.requestHomeBundle() 24 | } catch { 25 | XCTFail(error.localizedDescription) 26 | return 27 | } 28 | XCTAssertEqual(git.requestedClones.count, 1) 29 | XCTAssertNoThrow(try context.fileSystem.assertItem(at: bundle.url, is: .directory)) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Tests/HWKitTests/HighwayBundleCreatorTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import HWKit 3 | import HighwayCore 4 | import TestKit 5 | import ZFile 6 | import Url 7 | 8 | final class HighwayBundleCreatorTests: XCTestCase { 9 | func testSuccess() { 10 | let fs = InMemoryFileSystem() 11 | let url = Absolute("/highway-go") 12 | let homeUrl = Absolute("/.highway") 13 | XCTAssertNoThrow(try fs.createDirectory(at: url)) 14 | XCTAssertNoThrow(try fs.createDirectory(at: homeUrl)) 15 | let bundle: HighwayBundle 16 | let config = HighwayBundle.Configuration.standard 17 | do { 18 | bundle = try HighwayBundle(creatingInParent: .root, 19 | fileSystem: fs, 20 | configuration: config, 21 | homeBundleConfiguration: .standard) 22 | } catch { 23 | XCTFail(error.localizedDescription) 24 | return 25 | } 26 | 27 | XCTAssertTrue(fs.file(at: bundle.mainSwiftFileUrl).isExistingFile) 28 | XCTAssertTrue(fs.file(at: bundle.packageFileUrl).isExistingFile) 29 | XCTAssertTrue(fs.file(at: bundle.xcconfigFileUrl).isExistingFile) 30 | XCTAssertTrue(fs.file(at: bundle.gitignoreFileUrl).isExistingFile) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Tests/HWKitTests/InitOptionsTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import HWKit 3 | 4 | final class InitOptionsTests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testDefaultOptions() { 17 | XCTAssertEqual(try InitOptions([]), 18 | .init(projectType: .swift, shouldCreateProject: false)) 19 | } 20 | 21 | func testSwift_NoProjectCreation() { 22 | XCTAssertEqual(try InitOptions(["--type", "swift"]), 23 | .init(projectType: .swift, shouldCreateProject: false)) 24 | } 25 | 26 | func testSwift_ProjectCreation() { 27 | XCTAssertEqual(try InitOptions(["--type", "swift", "--create-project"]), 28 | .init(projectType: .swift, shouldCreateProject: true)) 29 | 30 | } 31 | 32 | func testXcode_with_create_project() { 33 | XCTAssertThrowsError(try InitOptions(["--type", "xcode", "--create-project"])) 34 | } 35 | 36 | func testXcode_with_unknown_option() { 37 | XCTAssertThrowsError(try InitOptions(["--unknown", "xcode"])) 38 | } 39 | 40 | func testXcode_with_unknown_projectType() { 41 | XCTAssertThrowsError(try InitOptions(["--type", "none"])) 42 | } 43 | 44 | func testXcode_without_projectType() { 45 | XCTAssertThrowsError(try InitOptions(["--type"])) 46 | } 47 | func testXcode_without_projectType_and_option() { 48 | XCTAssertThrowsError(try InitOptions(["--type", "--create-project"])) 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Tests/HWKitTests/SwiftBuildSystem_HighwayBundleTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import HWKit 3 | import HighwayCore 4 | import TestKit 5 | import ZFile 6 | import Url 7 | 8 | final class SwiftBuildSystem_HighwayBundleTests: XCTestCase { 9 | 10 | func testSuccess() { 11 | let fs = InMemoryFileSystem() 12 | let config = HighwayBundle.Configuration.standard 13 | let bundleUrl = Absolute.root.appending(config.directoryName) 14 | XCTAssertNoThrow(try fs.createDirectory(at: bundleUrl)) 15 | let binDir = Absolute("/bin") 16 | let swiftUrl = Absolute("/bin/xcrun") 17 | XCTAssertNoThrow(try fs.createDirectory(at: binDir)) 18 | XCTAssertNoThrow(try fs.writeData(Data(), to: swiftUrl)) 19 | let bundle: HighwayBundle 20 | do { 21 | bundle = try HighwayBundle(url: bundleUrl, fileSystem: fs, configuration: config) 22 | } 23 | catch { 24 | XCTFail(error.localizedDescription) 25 | return 26 | } 27 | 28 | let finder = ExecutableProviderMock() 29 | finder[binDir] = ["xcrun"] 30 | 31 | let executor = ExecutorMock { _ in 32 | return; 33 | } 34 | let context = Context(executableProvider: finder, executor: executor, fileSystem: fs) 35 | let buildSystem = SwiftBuildSystem(context: context) 36 | 37 | guard let compiler = try? buildSystem.bundleCompiler(for: bundle) else { 38 | XCTFail() 39 | return 40 | } 41 | let buildTask = compiler.plan.buildTask 42 | 43 | XCTAssertEqual(buildTask.executableUrl, swiftUrl) 44 | XCTAssertEqual(buildTask.arguments, ["swift", "build", "--configuration", "debug", "--build-path", bundle.buildDirectory.path, "-v"]) 45 | 46 | let binPathTask = compiler.plan.showBinPathTask 47 | XCTAssertEqual(binPathTask.executableUrl, swiftUrl) 48 | XCTAssertEqual(binPathTask.arguments, ["swift", "build", "--configuration", "debug", "--build-path", bundle.buildDirectory.path, "--show-bin-path"]) 49 | 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /Tests/HighwayCoreTests/Support/FileHandle+Convenience.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension FileHandle { 4 | func write(_ string: String) { 5 | guard let data = string.data(using: .utf8) else { 6 | return 7 | } 8 | write(data) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/POSIXTests/test.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/POSIXTests/test.swift -------------------------------------------------------------------------------- /Tests/ResultTests/test.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/ResultTests/test.swift -------------------------------------------------------------------------------- /Tests/TaskTests/PathEnvironmentParserTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Task 3 | import Url 4 | 5 | final class PathEnvironmentParserTests: XCTestCase { 6 | // MARK: Tests 7 | func testParser() { 8 | let cwd: Absolute = "/Users/chris" 9 | _assert("") // yields nothing 10 | _assert("/usr/bin", yields: "/usr/bin") 11 | _assert("/usr/bin:/usr/local/bin", yields: "/usr/bin", "/usr/local/bin") 12 | _assert("/usr/bin::/usr/local/bin", yields: "/usr/bin", "/usr/local/bin") 13 | _assert(".", yields: cwd) 14 | _assert("hello/world", yields: cwd.appending("/hello/world")) 15 | } 16 | 17 | func testContainsDot() { 18 | _assert("/a/./b", yields: "/a/b") 19 | } 20 | 21 | // MARK: Helper 22 | private func _urlsFrom(path: String, _ cwd: Absolute = "/Users/chris") -> [Absolute] { 23 | return PathEnvironmentParser(value: path, currentDirectoryUrl: cwd).urls 24 | } 25 | 26 | func _assert(_ path: String, `in` cwd: Absolute = "/Users/chris", yields expectedUrls: Absolute..., file: StaticString = #file, line: UInt = #line) { 27 | let actual = _urlsFrom(path: path, cwd) 28 | XCTAssertEqual(actual, expectedUrls, "failure", file: file, line: line) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Tests/TaskTests/SystemExecutableProviderTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Task 3 | import ZFile 4 | import Url 5 | 6 | /// Tests the SystemExecutableProvider with a custom FileSystem 7 | final class SystemExecutableProviderTests: XCTestCase { 8 | // MARK: - Properties 9 | private var finder = SystemExecutableProvider(searchedUrls: [], fileSystem: InMemoryFileSystem()) 10 | private var fs: FileSystem { return finder.fileSystem } 11 | 12 | // MARK: - XCTest 13 | override func setUp() { 14 | super.setUp() 15 | finder = SystemExecutableProvider(searchedUrls: [], fileSystem: InMemoryFileSystem()) 16 | } 17 | 18 | // MARK: - Tests 19 | func testWithEmptyFileSystem() { 20 | XCTAssertNil(finder.urlForExecuable("hello")) 21 | XCTAssertNil(finder.urlForExecuable("/hello")) 22 | XCTAssertNil(finder.urlForExecuable("/local")) 23 | XCTAssertNil(finder.urlForExecuable("local")) 24 | XCTAssertNil(finder.urlForExecuable("")) 25 | finder.searchedUrls = ["/usr/bin", "/hello", "/usr/local"] 26 | XCTAssertNil(finder.urlForExecuable("hello")) 27 | XCTAssertNil(finder.urlForExecuable("/hello")) 28 | XCTAssertNil(finder.urlForExecuable("/local")) 29 | XCTAssertNil(finder.urlForExecuable("local")) 30 | XCTAssertNil(finder.urlForExecuable("")) 31 | } 32 | 33 | func testSimple() { 34 | XCTAssertNoThrow(try fs.createDirectory(at: "/usr/bin")) 35 | XCTAssertNoThrow(try fs.writeData(Data(), to: "/usr/bin/bash")) 36 | finder.searchedUrls = ["/usr/bin"] 37 | XCTAssertEqual(finder.urlForExecuable("bash"), "/usr/bin/bash") 38 | } 39 | 40 | func testThatOrderIsOK() { 41 | XCTAssertNoThrow(try fs.createDirectory(at: "/usr/bin")) 42 | XCTAssertNoThrow(try fs.createDirectory(at: "/local/bin")) 43 | XCTAssertNoThrow(try fs.writeData(Data(), to: "/usr/bin/bash")) 44 | XCTAssertNoThrow(try fs.writeData(Data(), to: "/local/bin/bash")) 45 | finder.searchedUrls = ["/local/bin", "/usr/bin"] 46 | XCTAssertEqual(finder.urlForExecuable("bash"), "/local/bin/bash") 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Tests/TaskTests/TaskTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import HighwayCore 3 | import ZFile 4 | import Url 5 | @testable import Task 6 | import Arguments 7 | 8 | final class TaskTests: XCTestCase { 9 | func testTaskTaskCanBeTransformedToProcessBySystemExecutor() { 10 | let exeUrl = Absolute("/usr/bin/ls") 11 | let currentDirectoryUrl = Absolute("/Users/chris/test") 12 | let arguments: Arguments = ["hello"] 13 | let env = ["test":"value"] 14 | let task = Task(executableUrl: exeUrl, arguments: arguments, currentDirectoryUrl: currentDirectoryUrl) 15 | task.environment = env 16 | let outputIO = Channel.pipe() 17 | let inputIO = Channel.pipe() 18 | 19 | task.output = outputIO 20 | task.input = inputIO 21 | 22 | let process = task.toProcess 23 | 24 | XCTAssertNotNil(process.launchPath) 25 | XCTAssertEqual(process.launchPath, exeUrl.path) 26 | 27 | XCTAssertEqual(process.currentDirectoryPath, currentDirectoryUrl.path) 28 | 29 | XCTAssertNotNil(process.arguments) 30 | XCTAssertEqual(process.arguments ?? [], arguments.all) 31 | XCTAssertTrue((process.environment?.contains { (key, value) in 32 | return key == "test" && value == "value" 33 | }) ?? false) 34 | 35 | XCTAssertNotNil(process.standardOutput) 36 | XCTAssertTrue(process.standardOutput is Pipe) 37 | 38 | XCTAssertNotNil(process.standardInput) 39 | XCTAssertTrue(process.standardInput is Pipe) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Tests/TerminalTests/TerminalTests.swift: -------------------------------------------------------------------------------- 1 | /* intentionally left blank */ 2 | 3 | -------------------------------------------------------------------------------- /Tests/UrlTests/AbsoluteURLTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import ZFile 3 | import Url 4 | 5 | final class AbsoluteURLTests: XCTestCase { 6 | func testInitRelativeTo() { 7 | assertAbsoluteEqualsPath(Absolute(path: "test", relativeTo: Absolute("/")), "/test") 8 | assertAbsoluteEqualsPath(Absolute(path: "", relativeTo: Absolute("/")), "/") 9 | assertAbsoluteEqualsPath(Absolute(path: "hello/world", relativeTo: Absolute("/")), "/hello/world") 10 | } 11 | 12 | func testAppendRelative() { 13 | let base = Absolute("/") 14 | let bin = base.appending(Relative("bin")) 15 | assertAbsoluteEqualsPath(bin, "/bin") 16 | } 17 | } 18 | 19 | private func assertAbsoluteEqualsPath(_ absoluteURL: Absolute, _ absolutePath: String, file: StaticString = #file, line: UInt = #line) { 20 | XCTAssertEqual(absoluteURL, Absolute(absolutePath), "\nURLs not equal:\n\(absoluteURL) \n\nExpected: \(absolutePath)", file: file, line: line) 21 | } 22 | -------------------------------------------------------------------------------- /Tests/UrlTests/RelativePathTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import ZFile 3 | import Url 4 | 5 | final class RelativePathTests: XCTestCase { 6 | func testThatValidPathsAreNotModified() { 7 | XCTAssertEqual(Relative("hello").asString, "hello") 8 | XCTAssertEqual(Relative("hello/world").asString, "hello/world") 9 | XCTAssertEqual(Relative(".hello").asString, ".hello") 10 | XCTAssertEqual(Relative(".").asString, ".") 11 | } 12 | func testTrailingSlashesAreRemoved() { 13 | XCTAssertEqual(Relative("hello/").asString, "hello") 14 | XCTAssertEqual(Relative("hello/world/").asString, "hello/world") 15 | } 16 | func testEmptyPathIsTransformedIntoCurrentPathIndicator() { 17 | XCTAssertEqual(Relative("").asString, ".") 18 | } 19 | 20 | func testThatRedundantDotsAreRemoved() { 21 | XCTAssertEqual(Relative("hello/./.").asString, "hello") 22 | XCTAssertEqual(Relative("./.").asString, ".") 23 | XCTAssertEqual(Relative("hello/././world/./test/./bla/test/././.build/test").asString, "hello/world/test/bla/test/.build/test") 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/DestinationFactoryTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import XCBuild 3 | 4 | final class DestinationFactoryTests: XCTestCase { 5 | 6 | func testExample() { 7 | 8 | let destinationFactory = DestinationFactory() 9 | _assert(destinationFactory.macOS(architecture: .i386), equals: ["arch" : "i386", "platform" : "macOS"]) 10 | _assert(destinationFactory.macOS(architecture: .x86_64), equals: ["arch" : "x86_64", "platform" : "macOS"]) 11 | 12 | _assert(destinationFactory.device(.iOS, name: "Chris", id: nil), equals: ["name" : "Chris", "generic/platform" : "iOS"]) 13 | _assert(destinationFactory.device(.iOS, name: "Chris", id: "123"), equals: ["id" : "123", "name" : "Chris", "generic/platform" : "iOS"]) 14 | 15 | _assert(destinationFactory.simulator(.iOS, name: "Hello", os: .iOS(version: "10.1"), id: nil), 16 | equals: ["name" : "Hello", "OS" : "10.1", "platform" : "iOS Simulator"]) 17 | } 18 | 19 | // MARK: Helper 20 | private func _assert(_ destination: Destination, equals properties: [String: String], file: StaticString = #file, line: UInt = #line) { 21 | XCTAssertTrue(destination.raw == properties, "failure", file: file, line: line) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xcode 3 | 4 | ### Xcode ### 5 | # Xcode 6 | # 7 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 8 | 9 | ## Build generated 10 | build/ 11 | DerivedData/ 12 | 13 | ## Various settings 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.moved-aside 26 | *.xccheckout 27 | *.xcscmblueprint 28 | 29 | ### Xcode Patch ### 30 | *.xcodeproj/* 31 | !*.xcodeproj/project.pbxproj 32 | !*.xcodeproj/xcshareddata/ 33 | !*.xcworkspace/contents.xcworkspacedata 34 | /*.gcno 35 | 36 | # End of https://www.gitignore.io/api/xcode 37 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | de.christian-kienle.highway.e2e.ios 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 55 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostest/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // highwayiostest 4 | // 5 | // Created by Kienle, Christian on 07.10.17. 6 | // Copyright © 2017 Christian Kienle. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest/highwayiostestTests/highwayiostestTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // highwayiostestTests.swift 3 | // highwayiostestTests 4 | // 5 | // Created by Kienle, Christian on 07.10.17. 6 | // Copyright © 2017 Christian Kienle. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import highwayiostest 11 | 12 | class highwayiostestTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_export.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | app-store 7 | provisioningProfiles 8 | 9 | de.christian-kienle.highway.e2e.ios 10 | highwayiostest Prod Profile 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xcode 3 | 4 | ### Xcode ### 5 | # Xcode 6 | # 7 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 8 | 9 | ## Build generated 10 | build/ 11 | DerivedData/ 12 | 13 | ## Various settings 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.moved-aside 26 | *.xccheckout 27 | *.xcscmblueprint 28 | 29 | ### Xcode Patch ### 30 | *.xcodeproj/* 31 | !*.xcodeproj/project.pbxproj 32 | !*.xcodeproj/xcshareddata/ 33 | !*.xcworkspace/contents.xcworkspacedata 34 | /*.gcno 35 | 36 | # End of https://www.gitignore.io/api/xcode 37 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // highwayiostest 4 | // 5 | // Created by Kienle, Christian on 21.10.17. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property (strong, nonatomic) UIWindow *window; 13 | 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // highwayiostest 4 | // 5 | // Created by Kienle, Christian on 21.10.17. 6 | // 7 | 8 | #import 9 | 10 | @interface ViewController : UIViewController 11 | 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // highwayiostest 4 | // 5 | // Created by Kienle, Christian on 21.10.17. 6 | // 7 | 8 | #import "ViewController.h" 9 | 10 | @interface ViewController () 11 | 12 | @end 13 | 14 | @implementation ViewController 15 | 16 | - (void)viewDidLoad { 17 | [super viewDidLoad]; 18 | // Do any additional setup after loading the view, typically from a nib. 19 | } 20 | 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // highwayiostest 4 | // 5 | // Created by Kienle, Christian on 21.10.17. 6 | // 7 | 8 | #import 9 | #import "AppDelegate.h" 10 | 11 | int main(int argc, char * argv[]) { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Tests/XCBuildTests/Fixtures/highwayiostest_objc/highwayiostestTests/highwayiostestTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // highwayiostestTests.m 3 | // highwayiostestTests 4 | // 5 | // Created by Kienle, Christian on 21.10.17. 6 | // 7 | 8 | #import 9 | 10 | @interface highwayiostestTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation highwayiostestTests 15 | 16 | - (void)testExample { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 17 | - (void)testExample1 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 18 | - (void)testExample2 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 19 | - (void)testExample3 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 20 | - (void)testExample4 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 21 | - (void)testExample5 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 22 | - (void)testExample6 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 23 | - (void)testExample7 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 24 | - (void)testExample8 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 25 | - (void)testExample9 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 26 | - (void)testExample10 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 27 | - (void)testExample11 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 28 | - (void)testExample12 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 29 | - (void)testExample13 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 30 | - (void)testExample14 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 31 | - (void)testExample15 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 32 | - (void)testExample16 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 33 | - (void)testExample17 { [NSThread sleepForTimeInterval:0.25]; XCTAssertTrue(true); } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ZFileiOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ZFileiOS/ZFileiOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZFileiOS.h 3 | // ZFileiOS 4 | // 5 | // Created by Stijn on 03/08/2018. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ZFileiOS. 11 | FOUNDATION_EXPORT double ZFileiOSVersionNumber; 12 | 13 | //! Project version string for ZFileiOS. 14 | FOUNDATION_EXPORT const unsigned char ZFileiOSVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /ZFileiOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ZFileiOSTests/ZFileiOSTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZFileiOSTests.swift 3 | // ZFileiOSTests 4 | // 5 | // Created by Stijn on 03/08/2018. 6 | // 7 | 8 | import XCTest 9 | @testable import ZFileiOS 10 | 11 | class ZFileiOSTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | // Use XCTAssert and related functions to verify your tests produce the correct results. 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measure { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /_highway/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | -------------------------------------------------------------------------------- /_highway/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | import PackageDescription 3 | import Foundation 4 | 5 | let package = Package( 6 | name: "_highway", 7 | dependencies: [ 8 | .package( 9 | url: ProcessInfo.processInfo.environment["HIGHWAY_REPOSITORY"] ?? 10 | URL(fileURLWithPath: NSHomeDirectory() + "/.highway/highway").absoluteString, 11 | .branch(ProcessInfo.processInfo.environment["HIGHWAY_BRANCH"] ?? "master")) 12 | ], 13 | targets: [ 14 | .target(name: "_highway", dependencies: ["Url", "Deliver", "HighwayProject", "XCBuild", "HighwayCore", "FileSystem"], path: ".") 15 | ] 16 | ) 17 | -------------------------------------------------------------------------------- /_highway/config.xcconfig: -------------------------------------------------------------------------------- 1 | SUPPORTED_PLATFORMS = macosx 2 | MACOSX_DEPLOYMENT_TARGET = 10.13 3 | SWIFT_VERSION = 4.0 4 | -------------------------------------------------------------------------------- /_highway/utils/versioning.swift: -------------------------------------------------------------------------------- 1 | import ZFile 2 | import Url 3 | 4 | func update(nextVersion: String, currentDirectoryURL: Absolute, fileSystem: FileSystemProtocol) throws { 5 | let versionFile = Absolute(path: "Sources/highway/CurrentVersion.swift", relativeTo: currentDirectoryURL) 6 | try fileSystem.assertItem(at: versionFile, is: .file) 7 | 8 | let code = "let CurrentVersion = \"\(nextVersion)\"" 9 | try fileSystem.writeString(code, to: versionFile) 10 | } 11 | -------------------------------------------------------------------------------- /config/config.xcconfig: -------------------------------------------------------------------------------- 1 | SUPPORTED_PLATFORMS = macosx 2 | MACOSX_DEPLOYMENT_TARGET = 10.13 3 | SWIFT_VERSION = 4.0 4 | OTHER_SWIFT_FLAGS = -D Xcode 5 | 6 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/xcode 3 | 4 | ### Xcode ### 5 | # Xcode 6 | # 7 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 8 | 9 | ## Build generated 10 | build/ 11 | DerivedData/ 12 | 13 | ## Various settings 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.moved-aside 26 | *.xccheckout 27 | *.xcscmblueprint 28 | 29 | ### Xcode Patch ### 30 | *.xcodeproj/* 31 | !*.xcodeproj/project.pbxproj 32 | !*.xcodeproj/xcshareddata/ 33 | !*.xcworkspace/contents.xcworkspacedata 34 | /*.gcno 35 | 36 | # End of https://www.gitignore.io/api/xcode 37 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/derivedData_archive/ModuleCache/Session.modulevalidation: -------------------------------------------------------------------------------- 1 | Module build session file for module cache at /Users/d069408/privat/Developer/highway_github/end2end_tests/highwayiostest/derivedData_archive/ModuleCache 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/derivedData_archive/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LastAccessedDate 6 | 2017-10-07T12:55:48Z 7 | WorkspacePath 8 | /Users/d069408/privat/Developer/highway_github/end2end_tests/highwayiostest/highwayiostest.xcodeproj 9 | 10 | 11 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | app_identifier "de.christian-kienle.highway.e2e.ios" # The bundle identifier of your app 2 | apple_id "uin.cmk@googlemail.com" # Your Apple email address 3 | 4 | team_id "6YJV6LM6Q4" # Developer Portal Team ID 5 | 6 | # you can even provide different app identifiers, Apple IDs and team names per lane: 7 | # More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md 8 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/Deliverfile: -------------------------------------------------------------------------------- 1 | ###################### More Options ###################### 2 | # If you want to have even more control, check out the documentation 3 | # https://github.com/fastlane/fastlane/blob/master/deliver/Deliverfile.md 4 | 5 | 6 | ###################### Automatically generated ###################### 7 | # Feel free to remove the following line if you use fastlane (which you should) 8 | 9 | app_identifier "de.christian-kienle.highway.e2e.ios" # The bundle identifier of your app 10 | username "uin.cmk@googlemail.com" # your Apple ID user 11 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ================ 3 | # Installation 4 | 5 | Make sure you have the latest version of the Xcode command line tools installed: 6 | 7 | ``` 8 | xcode-select --install 9 | ``` 10 | 11 | ## Choose your installation method: 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
Homebrew 16 | Installer Script 17 | Rubygems 18 |
macOSmacOSmacOS or Linux with Ruby 2.0.0 or above
brew cask install fastlaneDownload the zip file. Then double click on the install script (or run it in a terminal window).sudo gem install fastlane -NV
30 | 31 | # Available Actions 32 | ## iOS 33 | ### ios test 34 | ``` 35 | fastlane ios test 36 | ``` 37 | Runs all the tests 38 | ### ios beta 39 | ``` 40 | fastlane ios beta 41 | ``` 42 | Submit a new Beta Build to Apple TestFlight 43 | 44 | This will also make sure the profile is up to date 45 | ### ios release 46 | ``` 47 | fastlane ios release 48 | ``` 49 | Deploy a new version to the App Store 50 | 51 | ---- 52 | 53 | This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. 54 | More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). 55 | The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 56 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/copyright.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/description.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/keywords.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/marketing_url.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/name.txt: -------------------------------------------------------------------------------- 1 | highwayiostest 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/privacy_url.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/promotional_text.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/release_notes.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/subtitle.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/de-DE/support_url.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/primary_category.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/primary_first_sub_category.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/primary_second_sub_category.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/demo_password.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/demo_user.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/email_address.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/first_name.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/last_name.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/notes.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/review_information/phone_number.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/secondary_category.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/secondary_first_sub_category.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/secondary_second_sub_category.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/trade_representative_contact_information/address_line1.txt: -------------------------------------------------------------------------------- 1 | Philippsburgr Strasse 124 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/trade_representative_contact_information/city_name.txt: -------------------------------------------------------------------------------- 1 | Philippsburg 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/trade_representative_contact_information/country.txt: -------------------------------------------------------------------------------- 1 | Germany 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/trade_representative_contact_information/is_displayed_on_app_store.txt: -------------------------------------------------------------------------------- 1 | false 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/trade_representative_contact_information/postal_code.txt: -------------------------------------------------------------------------------- 1 | 76661 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/metadata/trade_representative_contact_information/trade_name.txt: -------------------------------------------------------------------------------- 1 | Christian Kienle 2 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/fastlane/screenshots/README.txt: -------------------------------------------------------------------------------- 1 | Put all screenshots you want to use inside the folder of its language (e.g. en-US). 2 | The device type will automatically be recognized using the image resolution. Apple TV screenshots 3 | should be stored in a subdirectory named appleTV with language folders inside of it. iMessage 4 | screenshots, like Apple TV screenshots, should also be stored in a subdirectory named iMessage 5 | with language folders inside of it. 6 | 7 | The screenshots can be named whatever you want, but keep in mind they are sorted alphabetically. 8 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | de.christian-kienle.highway.e2e.ios 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 2 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostest/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // highwayiostest 4 | // 5 | // Created by Kienle, Christian on 07.10.17. 6 | // Copyright © 2017 Christian Kienle. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/highwayiostestTests/highwayiostestTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // highwayiostestTests.swift 3 | // highwayiostestTests 4 | // 5 | // Created by Kienle, Christian on 07.10.17. 6 | // Copyright © 2017 Christian Kienle. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import highwayiostest 11 | 12 | class highwayiostestTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /end2end_tests/highwayiostest/resultBundle_archive/1_Archive/build.xcactivitylog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChristianKienle/highway/3b79663efa3f110168bf64d070a482f06e482e91/end2end_tests/highwayiostest/resultBundle_archive/1_Archive/build.xcactivitylog -------------------------------------------------------------------------------- /end2end_tests/swift_project/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | -------------------------------------------------------------------------------- /end2end_tests/swift_project/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "swift_project", 8 | dependencies: [ 9 | // Dependencies declare other packages that this package depends on. 10 | // .package(url: /* package url */, from: "1.0.0"), 11 | ], 12 | targets: [ 13 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 14 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 15 | .target( 16 | name: "swift_project", 17 | dependencies: []), 18 | ] 19 | ) 20 | -------------------------------------------------------------------------------- /end2end_tests/swift_project/README.md: -------------------------------------------------------------------------------- 1 | # swift_project 2 | 3 | A description of this package. 4 | -------------------------------------------------------------------------------- /end2end_tests/swift_project/Sources/swift_project/main.swift: -------------------------------------------------------------------------------- 1 | print("Hello, world!") 2 | -------------------------------------------------------------------------------- /end2end_tests/swift_project/_highway/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "highway", 6 | "repositoryURL": "git@bitbucket.org:ChristianKienle/highway.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "bbf46d86e6aee141658b2a5c725d486405fb4e80", 10 | "version": "0.0.196" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /end2end_tests/swift_project/_highway/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "_highway", 6 | dependencies: [ 7 | .package(url: "git@bitbucket.org:ChristianKienle/highway.git", .upToNextMajor(from: "0.0.0")) 8 | ], 9 | targets: [ 10 | .target(name: "_highway", dependencies: ["HighwayCore"], path: ".") 11 | ] 12 | ) -------------------------------------------------------------------------------- /end2end_tests/swift_project/_highway/config.xcconfig: -------------------------------------------------------------------------------- 1 | SUPPORTED_PLATFORMS = macosx 2 | MACOSX_DEPLOYMENT_TARGET = 10.12 3 | SWIFT_VERSION = 4.0 4 | OTHER_SWIFT_FLAGS = -DXcode -------------------------------------------------------------------------------- /end2end_tests/swift_project/_highway/main.swift: -------------------------------------------------------------------------------- 1 | import HighwayCore 2 | import FSKit 3 | 4 | enum App: String, Highway { 5 | case build 6 | case test 7 | case run 8 | 9 | /// !!! Add more Highways by adding additional cases. !!! 10 | 11 | var usage: String { 12 | switch self { 13 | case .build: return "Builds the project" 14 | case .test: return "Executes tests" 15 | case .run: return "Runs the project" 16 | } 17 | } 18 | } 19 | 20 | // MARK: - Helper to get you started 21 | 22 | let context = Context.local() 23 | let pwd = context.currentWorkingUrl // also works when build + run within Xcode 24 | let highways = Highways(App.self) 25 | 26 | // MARK: - Setup your custom highways 27 | func _test_then_build() throws { 28 | Fastlane().gym("arguments", "passed", "to", "fastlane gym") 29 | Fastlane().scan("arguments", "passed", "to", "fastlane scan") 30 | 31 | let swift = SwiftBuildSystem() 32 | 33 | try swift.test() // Test 34 | 35 | // Build and get an object describing the result. 36 | let artifact = try swift.build() 37 | 38 | print("😜 \(artifact.binPath)") 39 | print("😜 \(artifact.buildOutput)") 40 | 41 | } 42 | 43 | highways 44 | .highway(.build, _test_then_build) 45 | .highway(.test) { 46 | 47 | } 48 | .highway(.run) { 49 | 50 | } 51 | 52 | .go() 53 | -------------------------------------------------------------------------------- /scripts/edit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Debug Support 4 | if [ -z ${HIGHWAY_DEBUG_ENABLED+x} ] 5 | then 6 | echo "Debugging disabled" 7 | echo "To enable debugging: 'export HIGHWAY_DEBUG_ENABLED=1'" 8 | else 9 | echo "Debugging enabled" 10 | set -x # => enable tracing 11 | fi 12 | 13 | # more boilerplate 14 | set -e # => exit on failure 15 | set -u # => exit on undeclared variable access 16 | set -o pipefail # => sane exit codes when using | 17 | 18 | # Do it 19 | swift package --package-path ./_highway edit highway --path . 20 | -------------------------------------------------------------------------------- /scripts/generate-project.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Debug Support 4 | if [ -z ${HIGHWAY_DEBUG_ENABLED+x} ] 5 | then 6 | echo "Debugging disabled" 7 | echo "To enable debugging: 'export HIGHWAY_DEBUG_ENABLED=1'" 8 | else 9 | echo "Debugging enabled" 10 | set -x # => enable tracing 11 | fi 12 | 13 | # more boilerplate 14 | set -e # => exit on failure 15 | set -u # => exit on undeclared variable access 16 | set -o pipefail # => sane exit codes when using | 17 | 18 | # Do it 19 | # rm -f -rf highway.xcodeproj || true 20 | swift package generate-xcodeproj --enable-code-coverage --xcconfig-overrides ./config/config.xcconfig --output . 21 | open highway.xcodeproj -a Xcode 22 | -------------------------------------------------------------------------------- /scripts/loc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd Sources 3 | locs=$(( find ./ -name '*.swift' -print0 | xargs -0 cat ) | wc -l) 4 | DATE=`date '+%Y-%m-%d %H:%M:%S'` 5 | echo "${DATE} ${locs}" >> ./../scripts/loc_over_time.text 6 | 7 | cat ./../scripts/loc_over_time.text 8 | -------------------------------------------------------------------------------- /scripts/loc_over_time.text: -------------------------------------------------------------------------------- 1 | 2017-10-03 15:54:21 3644 2 | 2017-10-03 16:00:47 3611 3 | 2017-10-03 16:22:22 3613 4 | 2017-10-03 20:43:21 3808 5 | 2017-10-07 00:12:29 3876 6 | 2017-10-10 12:52:16 4659 7 | 2017-10-10 13:41:04 4681 8 | 2017-10-10 13:42:55 4681 9 | 2017-10-10 13:43:44 4681 10 | 2017-10-20 20:24:11 5844 11 | 2017-10-20 20:25:12 5844 12 | 2017-10-21 00:14:35 5950 13 | 2017-10-21 01:53:48 5957 14 | 2017-10-22 21:53:57 6195 15 | 2017-10-24 19:40:49 6186 16 | 2017-10-24 20:48:43 6149 17 | 2017-10-24 20:50:45 6064 18 | 2017-10-24 20:52:42 6038 19 | 2017-10-24 20:58:02 5992 20 | -------------------------------------------------------------------------------- /scripts/setEnv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Debug Support 4 | if [ -z ${HIGHWAY_DEBUG_ENABLED+x} ] 5 | then 6 | echo "Debugging disabled" 7 | echo "To enable debugging: 'export HIGHWAY_DEBUG_ENABLED=1'" 8 | else 9 | echo "Debugging enabled" 10 | set -x # => enable tracing 11 | fi 12 | 13 | # more boilerplate 14 | set -e # => exit on failure 15 | set -u # => exit on undeclared variable access 16 | set -o pipefail # => sane exit codes when using | 17 | 18 | # Adjust paths as needed 19 | # call the script like this: 20 | # $ . /path/to/script 21 | export HIGHWAY_REPOSITORY=/Users/d069408/privat/Developer/highway_github 22 | export HIGHWAY_BRANCH=feature/misc 23 | -------------------------------------------------------------------------------- /scripts/tag.sh: -------------------------------------------------------------------------------- 1 | git add . 2 | git commit -m "update" 3 | git-autotag 4 | git push origin master 5 | git push --tags 6 | -------------------------------------------------------------------------------- /🛣.xcodeproj/ArgumentsTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Arguments_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/DeliverTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Deliver_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Errors_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/GitTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Git_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/HWKitTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/HWKit_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/HighwayCoreTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/HighwayCore_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/HighwayProject_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Keychain_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/POSIXTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/POSIX_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/ResultTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Result_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/SourceryAutoProtocols_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/SourceryMocks_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/TaskTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Task_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/TerminalTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Terminal_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/TestKit_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/UrlTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/Url_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/XCBuildTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/XCBuild_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/ZFile_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /🛣.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /🛣.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/GitTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 42 | 48 | 49 | 51 | 52 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/HWKitTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 42 | 48 | 49 | 51 | 52 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/POSIXTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 42 | 48 | 49 | 51 | 52 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/ResultTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 42 | 48 | 49 | 51 | 52 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/TaskTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 42 | 48 | 49 | 51 | 52 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/UrlTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 42 | 48 | 49 | 51 | 52 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /🛣.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SchemeUserState 5 | 6 | highway-Package.xcscheme 7 | 8 | 9 | SuppressBuildableAutocreation 10 | 11 | 12 | 13 | --------------------------------------------------------------------------------