diff --git a/.gitignore b/.gitignore index 40998bc..438e2d7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,8 @@ docs # can change it using the `--build-path` option. .build Packages + +# SwiftPM manages xcode config via the `generate-xcodeproj` command +*.xcodeproj +xcuserdata +DerivedData/ diff --git a/HypertextApplicationLanguage.xcodeproj/project.pbxproj b/HypertextApplicationLanguage.xcodeproj/project.pbxproj deleted file mode 100644 index d1dbdec..0000000 --- a/HypertextApplicationLanguage.xcodeproj/project.pbxproj +++ /dev/null @@ -1,491 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 7812331F1B985C4D000D929E /* Link.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7812331E1B985C4D000D929E /* Link.swift */; }; - 781233211B985D13000D929E /* LinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 781233201B985D13000D929E /* LinkTests.swift */; }; - 781298851E54D4D00010806D /* Representation+JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 781298841E54D4D00010806D /* Representation+JSON.swift */; }; - 781A7F1F1E55D08B005ADE67 /* example.json in Resources */ = {isa = PBXBuildFile; fileRef = 781A7F1E1E55D08B005ADE67 /* example.json */; }; - 782155C11B9F11A20085CEBC /* Representation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 782155C01B9F11A20085CEBC /* Representation.swift */; }; - 782155C51B9F34290085CEBC /* Representation+Renderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 782155C41B9F34290085CEBC /* Representation+Renderer.swift */; }; - 782155C91B9F35FF0085CEBC /* Representation+Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 782155C81B9F35FF0085CEBC /* Representation+Parser.swift */; }; - 78493B601BA08E8D00EF7893 /* NamespaceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78493B5F1BA08E8D00EF7893 /* NamespaceManager.swift */; }; - 78493B621BA08F8C00EF7893 /* NamespaceManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78493B611BA08F8C00EF7893 /* NamespaceManagerTests.swift */; }; - 787A8D1B1BB2B8CD00AB2DFD /* Link+CustomDebugStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 787A8D1A1BB2B8CD00AB2DFD /* Link+CustomDebugStringConvertible.swift */; }; - 78A330FA1BAD18A20080B5C1 /* RepresentationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78A330F91BAD18A20080B5C1 /* RepresentationTests.swift */; }; - 78C736EF1D1D11460061A9EA /* Link+Equatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78C736EE1D1D11460061A9EA /* Link+Equatable.swift */; }; - 78E0DA7B1B977B43007DC50C /* HypertextApplicationLanguage.h in Headers */ = {isa = PBXBuildFile; fileRef = 78E0DA7A1B977B43007DC50C /* HypertextApplicationLanguage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 78E0DA821B977B43007DC50C /* HypertextApplicationLanguage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78E0DA771B977B43007DC50C /* HypertextApplicationLanguage.framework */; }; - 78E0DA871B977B43007DC50C /* HypertextApplicationLanguageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E0DA861B977B43007DC50C /* HypertextApplicationLanguageTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 78E0DA831B977B43007DC50C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78E0DA6E1B977B43007DC50C /* Project object */; - proxyType = 1; - remoteGlobalIDString = 78E0DA761B977B43007DC50C; - remoteInfo = HypertextApplicationLanguage; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 7812331E1B985C4D000D929E /* Link.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Link.swift; sourceTree = ""; }; - 781233201B985D13000D929E /* LinkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinkTests.swift; sourceTree = ""; }; - 781298841E54D4D00010806D /* Representation+JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Representation+JSON.swift"; sourceTree = ""; }; - 781A7F1E1E55D08B005ADE67 /* example.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = example.json; sourceTree = ""; }; - 782155C01B9F11A20085CEBC /* Representation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Representation.swift; sourceTree = ""; }; - 782155C41B9F34290085CEBC /* Representation+Renderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Representation+Renderer.swift"; sourceTree = ""; }; - 782155C81B9F35FF0085CEBC /* Representation+Parser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Representation+Parser.swift"; sourceTree = ""; }; - 78493B5F1BA08E8D00EF7893 /* NamespaceManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NamespaceManager.swift; sourceTree = ""; }; - 78493B611BA08F8C00EF7893 /* NamespaceManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NamespaceManagerTests.swift; sourceTree = ""; }; - 787A8D1A1BB2B8CD00AB2DFD /* Link+CustomDebugStringConvertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Link+CustomDebugStringConvertible.swift"; sourceTree = ""; }; - 78A330F91BAD18A20080B5C1 /* RepresentationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RepresentationTests.swift; sourceTree = ""; }; - 78C736EE1D1D11460061A9EA /* Link+Equatable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Link+Equatable.swift"; sourceTree = ""; }; - 78E0DA771B977B43007DC50C /* HypertextApplicationLanguage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HypertextApplicationLanguage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 78E0DA7A1B977B43007DC50C /* HypertextApplicationLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HypertextApplicationLanguage.h; sourceTree = ""; }; - 78E0DA7C1B977B43007DC50C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 78E0DA811B977B43007DC50C /* HypertextApplicationLanguageTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HypertextApplicationLanguageTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 78E0DA861B977B43007DC50C /* HypertextApplicationLanguageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HypertextApplicationLanguageTests.swift; sourceTree = ""; }; - 78E0DA881B977B43007DC50C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 78E0DA731B977B43007DC50C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 78E0DA7E1B977B43007DC50C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 78E0DA821B977B43007DC50C /* HypertextApplicationLanguage.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 785C5E111E57809500C7497B /* Fixtures */ = { - isa = PBXGroup; - children = ( - 781A7F1E1E55D08B005ADE67 /* example.json */, - ); - path = Fixtures; - sourceTree = ""; - }; - 789AF5771E53603800FE57DD /* HypertextApplicationLanguageTests */ = { - isa = PBXGroup; - children = ( - 78E0DA861B977B43007DC50C /* HypertextApplicationLanguageTests.swift */, - 78493B611BA08F8C00EF7893 /* NamespaceManagerTests.swift */, - 781233201B985D13000D929E /* LinkTests.swift */, - 78A330F91BAD18A20080B5C1 /* RepresentationTests.swift */, - 785C5E111E57809500C7497B /* Fixtures */, - ); - path = HypertextApplicationLanguageTests; - sourceTree = ""; - }; - 78E0DA6D1B977B43007DC50C = { - isa = PBXGroup; - children = ( - 78E0DA791B977B43007DC50C /* Sources */, - 78E0DA851B977B43007DC50C /* Tests */, - 78E0DA781B977B43007DC50C /* Products */, - ); - sourceTree = ""; - }; - 78E0DA781B977B43007DC50C /* Products */ = { - isa = PBXGroup; - children = ( - 78E0DA771B977B43007DC50C /* HypertextApplicationLanguage.framework */, - 78E0DA811B977B43007DC50C /* HypertextApplicationLanguageTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 78E0DA791B977B43007DC50C /* Sources */ = { - isa = PBXGroup; - children = ( - 78E0DA7A1B977B43007DC50C /* HypertextApplicationLanguage.h */, - 78493B5F1BA08E8D00EF7893 /* NamespaceManager.swift */, - 7812331E1B985C4D000D929E /* Link.swift */, - 78C736EE1D1D11460061A9EA /* Link+Equatable.swift */, - 787A8D1A1BB2B8CD00AB2DFD /* Link+CustomDebugStringConvertible.swift */, - 782155C01B9F11A20085CEBC /* Representation.swift */, - 782155C81B9F35FF0085CEBC /* Representation+Parser.swift */, - 782155C41B9F34290085CEBC /* Representation+Renderer.swift */, - 781298841E54D4D00010806D /* Representation+JSON.swift */, - 78E0DA7C1B977B43007DC50C /* Info.plist */, - ); - path = Sources; - sourceTree = ""; - }; - 78E0DA851B977B43007DC50C /* Tests */ = { - isa = PBXGroup; - children = ( - 789AF5771E53603800FE57DD /* HypertextApplicationLanguageTests */, - 78E0DA881B977B43007DC50C /* Info.plist */, - ); - path = Tests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 78E0DA741B977B43007DC50C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 78E0DA7B1B977B43007DC50C /* HypertextApplicationLanguage.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 78E0DA761B977B43007DC50C /* HypertextApplicationLanguage */ = { - isa = PBXNativeTarget; - buildConfigurationList = 78E0DA8B1B977B43007DC50C /* Build configuration list for PBXNativeTarget "HypertextApplicationLanguage" */; - buildPhases = ( - 78E0DA721B977B43007DC50C /* Sources */, - 78E0DA731B977B43007DC50C /* Frameworks */, - 78E0DA741B977B43007DC50C /* Headers */, - 78E0DA751B977B43007DC50C /* Resources */, - 781B879D1CDB6C7D00A42AAA /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = HypertextApplicationLanguage; - productName = HypertextApplicationLanguage; - productReference = 78E0DA771B977B43007DC50C /* HypertextApplicationLanguage.framework */; - productType = "com.apple.product-type.framework"; - }; - 78E0DA801B977B43007DC50C /* HypertextApplicationLanguageTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 78E0DA8E1B977B43007DC50C /* Build configuration list for PBXNativeTarget "HypertextApplicationLanguageTests" */; - buildPhases = ( - 78E0DA7D1B977B43007DC50C /* Sources */, - 78E0DA7E1B977B43007DC50C /* Frameworks */, - 78E0DA7F1B977B43007DC50C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 78E0DA841B977B43007DC50C /* PBXTargetDependency */, - ); - name = HypertextApplicationLanguageTests; - productName = HypertextApplicationLanguageTests; - productReference = 78E0DA811B977B43007DC50C /* HypertextApplicationLanguageTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 78E0DA6E1B977B43007DC50C /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0820; - ORGANIZATIONNAME = "Pioneering Software, United Kingdom"; - TargetAttributes = { - 78E0DA761B977B43007DC50C = { - CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0800; - }; - 78E0DA801B977B43007DC50C = { - CreatedOnToolsVersion = 7.0; - LastSwiftMigration = 0800; - }; - }; - }; - buildConfigurationList = 78E0DA711B977B43007DC50C /* Build configuration list for PBXProject "HypertextApplicationLanguage" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 78E0DA6D1B977B43007DC50C; - productRefGroup = 78E0DA781B977B43007DC50C /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 78E0DA761B977B43007DC50C /* HypertextApplicationLanguage */, - 78E0DA801B977B43007DC50C /* HypertextApplicationLanguageTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 78E0DA751B977B43007DC50C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 78E0DA7F1B977B43007DC50C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 781A7F1F1E55D08B005ADE67 /* example.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 781B879D1CDB6C7D00A42AAA /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# https://github.com/ypresto/SwiftLintXcode\nif which swiftlint > /dev/null\nthen swiftlint\nelse echo \"cannot find swiftlint\" > /dev/stderr\nfi"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 78E0DA721B977B43007DC50C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 78493B601BA08E8D00EF7893 /* NamespaceManager.swift in Sources */, - 787A8D1B1BB2B8CD00AB2DFD /* Link+CustomDebugStringConvertible.swift in Sources */, - 7812331F1B985C4D000D929E /* Link.swift in Sources */, - 782155C11B9F11A20085CEBC /* Representation.swift in Sources */, - 781298851E54D4D00010806D /* Representation+JSON.swift in Sources */, - 782155C91B9F35FF0085CEBC /* Representation+Parser.swift in Sources */, - 78C736EF1D1D11460061A9EA /* Link+Equatable.swift in Sources */, - 782155C51B9F34290085CEBC /* Representation+Renderer.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 78E0DA7D1B977B43007DC50C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 78E0DA871B977B43007DC50C /* HypertextApplicationLanguageTests.swift in Sources */, - 78493B621BA08F8C00EF7893 /* NamespaceManagerTests.swift in Sources */, - 781233211B985D13000D929E /* LinkTests.swift in Sources */, - 78A330FA1BAD18A20080B5C1 /* RepresentationTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 78E0DA841B977B43007DC50C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 78E0DA761B977B43007DC50C /* HypertextApplicationLanguage */; - targetProxy = 78E0DA831B977B43007DC50C /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 78E0DA891B977B43007DC50C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1.0; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 78E0DA8A1B977B43007DC50C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1.0; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 78E0DA8C1B977B43007DC50C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1.0; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = uk.co.pioneeringsoftware.HypertextApplicationLanguage; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 78E0DA8D1B977B43007DC50C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1.0; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = uk.co.pioneeringsoftware.HypertextApplicationLanguage; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - 78E0DA8F1B977B43007DC50C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = uk.co.pioneeringsoftware.HypertextApplicationLanguageTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 78E0DA901B977B43007DC50C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = uk.co.pioneeringsoftware.HypertextApplicationLanguageTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 78E0DA711B977B43007DC50C /* Build configuration list for PBXProject "HypertextApplicationLanguage" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E0DA891B977B43007DC50C /* Debug */, - 78E0DA8A1B977B43007DC50C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 78E0DA8B1B977B43007DC50C /* Build configuration list for PBXNativeTarget "HypertextApplicationLanguage" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E0DA8C1B977B43007DC50C /* Debug */, - 78E0DA8D1B977B43007DC50C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 78E0DA8E1B977B43007DC50C /* Build configuration list for PBXNativeTarget "HypertextApplicationLanguageTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E0DA8F1B977B43007DC50C /* Debug */, - 78E0DA901B977B43007DC50C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 78E0DA6E1B977B43007DC50C /* Project object */; -} diff --git a/HypertextApplicationLanguage.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/HypertextApplicationLanguage.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 115ab80..0000000 --- a/HypertextApplicationLanguage.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/HypertextApplicationLanguage.xcodeproj/xcshareddata/xcschemes/HypertextApplicationLanguage.xcscheme b/HypertextApplicationLanguage.xcodeproj/xcshareddata/xcschemes/HypertextApplicationLanguage.xcscheme deleted file mode 100644 index 1fd5f26..0000000 --- a/HypertextApplicationLanguage.xcodeproj/xcshareddata/xcschemes/HypertextApplicationLanguage.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Package.swift b/Package.swift index a36d56f..73fcf1e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,3 +1,4 @@ +// swift-tools-version:5.0 // HypertextApplicationLanguage Package.swift // // Copyright © 2017, Roy Ratcliffe, Pioneering Software, United Kingdom @@ -26,7 +27,17 @@ import PackageDescription let package = Package( name: "HypertextApplicationLanguage", - exclude: [ - "Tests/HypertextApplicationLanguageTests/Fixtures", + products: [ + .library(name: "HypertextApplicationLanguage", targets: ["HypertextApplicationLanguage"]) + ], + targets: [ + .target(name: "HypertextApplicationLanguage", + exclude: [ + "Tests/HypertextApplicationLanguageTests/Fixtures", + ] + ), + .testTarget(name: "HypertextApplicationLanguageTests", + dependencies: ["HypertextApplicationLanguage"] + ) ] ) diff --git a/Package@swift-4.0.swift b/Package@swift-4.0.swift new file mode 100644 index 0000000..63a6952 --- /dev/null +++ b/Package@swift-4.0.swift @@ -0,0 +1,43 @@ +// swift-tools-version:4.0 +// HypertextApplicationLanguage Package.swift +// +// Copyright © 2017, Roy Ratcliffe, Pioneering Software, United Kingdom +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the “Software”), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EITHER +// EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO +// EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +//------------------------------------------------------------------------------ + +import PackageDescription + +let package = Package( + name: "HypertextApplicationLanguage", + products: [ + .library(name: "HypertextApplicationLanguage", targets: ["HypertextApplicationLanguage"]) + ], + targets: [ + .target(name: "HypertextApplicationLanguage", + exclude: [ + "Tests/HypertextApplicationLanguageTests/Fixtures", + ] + ), + .testTarget(name: "HypertextApplicationLanguageTests", + dependencies: ["HypertextApplicationLanguage"] + ) + ] +) diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift new file mode 100644 index 0000000..d079c8c --- /dev/null +++ b/Package@swift-4.2.swift @@ -0,0 +1,43 @@ +// swift-tools-version:4.2 +// HypertextApplicationLanguage Package.swift +// +// Copyright © 2017, Roy Ratcliffe, Pioneering Software, United Kingdom +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the “Software”), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EITHER +// EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO +// EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +//------------------------------------------------------------------------------ + +import PackageDescription + +let package = Package( + name: "HypertextApplicationLanguage", + products: [ + .library(name: "HypertextApplicationLanguage", targets: ["HypertextApplicationLanguage"]) + ], + targets: [ + .target(name: "HypertextApplicationLanguage", + exclude: [ + "Tests/HypertextApplicationLanguageTests/Fixtures", + ] + ), + .testTarget(name: "HypertextApplicationLanguageTests", + dependencies: ["HypertextApplicationLanguage"] + ) + ] +) diff --git a/Sources/HypertextApplicationLanguage.h b/Sources/HypertextApplicationLanguage/HypertextApplicationLanguage.h similarity index 100% rename from Sources/HypertextApplicationLanguage.h rename to Sources/HypertextApplicationLanguage/HypertextApplicationLanguage.h diff --git a/Sources/Info.plist b/Sources/HypertextApplicationLanguage/Info.plist similarity index 100% rename from Sources/Info.plist rename to Sources/HypertextApplicationLanguage/Info.plist diff --git a/Sources/Link+CustomDebugStringConvertible.swift b/Sources/HypertextApplicationLanguage/Link+CustomDebugStringConvertible.swift similarity index 100% rename from Sources/Link+CustomDebugStringConvertible.swift rename to Sources/HypertextApplicationLanguage/Link+CustomDebugStringConvertible.swift diff --git a/Sources/Link+Equatable.swift b/Sources/HypertextApplicationLanguage/Link+Equatable.swift similarity index 100% rename from Sources/Link+Equatable.swift rename to Sources/HypertextApplicationLanguage/Link+Equatable.swift diff --git a/Sources/Link.swift b/Sources/HypertextApplicationLanguage/Link.swift similarity index 98% rename from Sources/Link.swift rename to Sources/HypertextApplicationLanguage/Link.swift index b03d9f9..a40af16 100644 --- a/Sources/Link.swift +++ b/Sources/HypertextApplicationLanguage/Link.swift @@ -64,7 +64,7 @@ public struct Link { // swiftlint:disable:next force_try static let expression = try! NSRegularExpression(pattern: "\\{.+\\}", options: []) } - let range = NSRange(location: 0, length: href.characters.count) + let range = NSRange(location: 0, length: href.count) return Templated.expression.numberOfMatches(in: href, options: [], range: range) > 0 } diff --git a/Sources/NamespaceManager.swift b/Sources/HypertextApplicationLanguage/NamespaceManager.swift similarity index 91% rename from Sources/NamespaceManager.swift rename to Sources/HypertextApplicationLanguage/NamespaceManager.swift index e6fcc16..62db6b8 100644 --- a/Sources/NamespaceManager.swift +++ b/Sources/HypertextApplicationLanguage/NamespaceManager.swift @@ -61,15 +61,15 @@ public class NamespaceManager { public func curie(href: String) -> String? { for (name, ref) in refForName { guard let range = ref.range(of: NamespaceManager.Rel) else { continue } - let left = ref.substring(to: range.lowerBound) - let right = ref.substring(from: range.upperBound) + let left = String(ref[.. String? { guard let range = curie.range(of: ":") else { return nil } - let name = curie.substring(to: range.lowerBound) + let name = String(curie[..