diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..ea95d18 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,43 @@ +name: "OMGHTTPURLRQ CI" + +on: + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + Pods: + name: Cocoapods Lint (Latest Stable Xcode) + runs-on: macOS-11 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1.4.0 + with: + xcode-version: latest-stable + + - name: Run pod lib lint + run: pod lib lint --fail-fast + + SwiftPM: + name: SwiftPM (Latest Stable Xcode) + runs-on: macOS-11 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1.4.0 + with: + xcode-version: latest-stable + + - name: Build + run: swift build + + - name: Run tests + run: swift test diff --git a/.gitignore b/.gitignore index 3975f71..a408dc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ /Carthage /Cartfile.resolved xcuserdata -.DS_Store \ No newline at end of file +.DS_Store + +# Swift Package Manager +.build/ +.swiftpm/ +Package.resolved diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4cdca80..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: objective-c -osx_image: xcode9.3 -script: xcodebuild test -scheme OMGHTTPURLRQ diff --git a/OMGHTTPURLRQ.podspec b/OMGHTTPURLRQ.podspec index 3c86acf..c63deba 100644 --- a/OMGHTTPURLRQ.podspec +++ b/OMGHTTPURLRQ.podspec @@ -23,17 +23,17 @@ Pod::Spec.new do |s| s.default_subspecs = 'RQ' s.subspec 'RQ' do |ss| - ss.source_files = 'Sources/OMGHTTPURLRQ.{h,m}' + ss.source_files = 'Sources/RQ/OMGHTTPURLRQ.{h,m}' ss.dependency 'OMGHTTPURLRQ/UserAgent' ss.dependency 'OMGHTTPURLRQ/FormURLEncode' end s.subspec 'UserAgent' do |ss| - ss.source_files = 'Sources/OMGUserAgent.{h,m}' + ss.source_files = 'Sources/UserAgent/OMGUserAgent.{h,m}' end s.subspec 'FormURLEncode' do |ss| - ss.source_files = 'Sources/OMGFormURLEncode.{h,m}' + ss.source_files = 'Sources/FormURLEncode/OMGFormURLEncode.{h,m}' end end diff --git a/OMGHTTPURLRQ.xcodeproj/project.pbxproj b/OMGHTTPURLRQ.xcodeproj/project.pbxproj index dd9ae44..7b78716 100644 --- a/OMGHTTPURLRQ.xcodeproj/project.pbxproj +++ b/OMGHTTPURLRQ.xcodeproj/project.pbxproj @@ -18,15 +18,15 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 51D4A3D61BAC562700BC6AE2 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/OMGFormURLEncode.h; sourceTree = ""; }; - 51D4A3D81BAC562700BC6AE2 /* OMGUserAgent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = ""; }; + 51D4A3D61BAC562700BC6AE2 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/FormURLEncode/OMGFormURLEncode.h; sourceTree = ""; }; + 51D4A3D81BAC562700BC6AE2 /* OMGUserAgent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/UserAgent/OMGUserAgent.h; sourceTree = ""; }; 635FC0261AB8AE4600E3CFFE /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6364E0251A7FFDED00F83CA1 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/OMGFormURLEncode.h; sourceTree = ""; }; - 6364E0261A7FFDED00F83CA1 /* OMGFormURLEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/OMGFormURLEncode.m; sourceTree = ""; }; - 6364E0271A7FFDED00F83CA1 /* OMGHTTPURLRQ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGHTTPURLRQ.h; path = Sources/OMGHTTPURLRQ.h; sourceTree = ""; }; - 6364E0281A7FFDED00F83CA1 /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/OMGHTTPURLRQ.m; sourceTree = ""; }; - 6364E0291A7FFDED00F83CA1 /* OMGUserAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = ""; }; - 6364E02A1A7FFDED00F83CA1 /* OMGUserAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/OMGUserAgent.m; sourceTree = ""; }; + 6364E0251A7FFDED00F83CA1 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/FormURLEncode/OMGFormURLEncode.h; sourceTree = ""; }; + 6364E0261A7FFDED00F83CA1 /* OMGFormURLEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/FormURLEncode/OMGFormURLEncode.m; sourceTree = ""; }; + 6364E0271A7FFDED00F83CA1 /* OMGHTTPURLRQ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGHTTPURLRQ.h; path = Sources/RQ/OMGHTTPURLRQ.h; sourceTree = ""; }; + 6364E0281A7FFDED00F83CA1 /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/RQ/OMGHTTPURLRQ.m; sourceTree = ""; }; + 6364E0291A7FFDED00F83CA1 /* OMGUserAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/UserAgent/OMGUserAgent.h; sourceTree = ""; }; + 6364E02A1A7FFDED00F83CA1 /* OMGUserAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/UserAgent/OMGUserAgent.m; sourceTree = ""; }; 636A05041A7FFFE600EA66E1 /* OMGFormURLEncodeTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncodeTestCase.m; path = Tests/OMGFormURLEncodeTestCase.m; sourceTree = ""; }; 63EDFE721A7FFD0E0030F974 /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 63EDFE7D1A7FFD0E0030F974 /* OMGTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OMGTest.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -237,7 +237,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 3.2.4; + CURRENT_PROJECT_VERSION = 3.3.0; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; @@ -295,7 +295,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.2.4; + CURRENT_PROJECT_VERSION = 3.3.0; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)"; diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..60f5be5 --- /dev/null +++ b/Package.swift @@ -0,0 +1,48 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let package = Package( + name: "OMGHTTPURLRQ", + platforms: [ + .iOS(.v9), + .tvOS(.v9), + .watchOS(.v2), + .macOS(.v10_10) + ], + products: [ + .library( + name: "OMGHTTPURLRQ", + targets: ["OMGHTTPURLRQ"]), + .library( + name: "OMGHTTPURLRQUserAgent", + targets: ["OMGHTTPURLRQUserAgent"]), + .library( + name: "OMGHTTPURLRQFormURLEncode", + targets: ["OMGHTTPURLRQFormURLEncode"]), + ], + dependencies: [], + targets: [ + .target( + name: "OMGHTTPURLRQ", + dependencies: [ + "OMGHTTPURLRQUserAgent", + "OMGHTTPURLRQFormURLEncode" + ], + path: "Sources/RQ", + publicHeadersPath: "."), + .target( + name: "OMGHTTPURLRQUserAgent", + path: "Sources/UserAgent", + publicHeadersPath: "."), + .target( + name: "OMGHTTPURLRQFormURLEncode", + path: "Sources/FormURLEncode", + publicHeadersPath: "."), + .testTarget( + name: "OMGHTTPURLRQTests", + dependencies: ["OMGHTTPURLRQ"], + path: "Tests", + exclude: ["Tests-Info.plist"]), + ] +) diff --git a/README.md b/README.md index c9dd3b6..1df4960 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OMGHTTPURLRQ [![Build Status](https://travis-ci.org/mxcl/OMGHTTPURLRQ.svg?branch=master)](https://travis-ci.org/mxcl/OMGHTTPURLRQ) +# OMGHTTPURLRQ ![Build Status](https://github.com/mxcl/OMGHTTPURLRQ/actions/workflows/CI.yml/badge.svg) [![Join the chat at https://gitter.im/mxcl/OMGHTTPURLRQ](https://badges.gitter.im/mxcl/OMGHTTPURLRQ.svg)](https://gitter.im/mxcl/OMGHTTPURLRQ?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) diff --git a/Sources/OMGFormURLEncode.h b/Sources/FormURLEncode/OMGFormURLEncode.h similarity index 100% rename from Sources/OMGFormURLEncode.h rename to Sources/FormURLEncode/OMGFormURLEncode.h diff --git a/Sources/OMGFormURLEncode.m b/Sources/FormURLEncode/OMGFormURLEncode.m similarity index 100% rename from Sources/OMGFormURLEncode.m rename to Sources/FormURLEncode/OMGFormURLEncode.m diff --git a/Sources/OMGHTTPURLRQ.h b/Sources/RQ/OMGHTTPURLRQ.h similarity index 100% rename from Sources/OMGHTTPURLRQ.h rename to Sources/RQ/OMGHTTPURLRQ.h diff --git a/Sources/OMGHTTPURLRQ.m b/Sources/RQ/OMGHTTPURLRQ.m similarity index 100% rename from Sources/OMGHTTPURLRQ.m rename to Sources/RQ/OMGHTTPURLRQ.m diff --git a/Sources/OMGUserAgent.h b/Sources/UserAgent/OMGUserAgent.h similarity index 100% rename from Sources/OMGUserAgent.h rename to Sources/UserAgent/OMGUserAgent.h diff --git a/Sources/OMGUserAgent.m b/Sources/UserAgent/OMGUserAgent.m similarity index 100% rename from Sources/OMGUserAgent.m rename to Sources/UserAgent/OMGUserAgent.m