diff --git a/.circleci/config.yml b/.circleci/config.yml index fd72f48..9220e3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,166 +6,108 @@ executors: environment: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 + BUNDLE_JOBS: 4 + BUNDLE_RETRY: 3 + BUNDLE_PATH: vendor/bundle HOMEBREW_LOGS: ~/homebrew-logs HOMEBREW_TEMP: ~/homebrew-temp HOMEBREW_NO_AUTO_UPDATE: 1 - job-environment-ios: - shell: /bin/bash --login -eo pipefail - environment: - LC_ALL: en_US.UTF-8 - LANG: en_US.UTF-8 - HOMEBREW_LOGS: ~/homebrew-logs - HOMEBREW_TEMP: ~/homebrew-temp - HOMEBREW_NO_AUTO_UPDATE: 1 - SCHEME: JWTDecode-iOS - DEVICE: iPhone 11 - FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + FL_OUTPUT_DIR: output commands: - use-swift: - parameters: - version: - type: string - steps: - - run: sed -i "" 's/SWIFT_VERSION = 5.0/SWIFT_VERSION = << parameters.version >>/g' "JWTDecode.xcodeproj/project.pbxproj" prepare: parameters: ruby: type: string - default: "2.6.3" - steps: + default: "2.7.1p83" + xcode: + type: string + default: "11.7.0" + steps: + - restore_cache: + keys: + - jwtdecode-swift-gems-{{ checksum "Gemfile.lock" }} + - jwtdecode-swift-gems- - run: | echo "ruby-<< parameters.ruby >>" > ~/.ruby-version + bundle check || bundle install --without=development + - save_cache: + key: jwtdecode-swift-gems-{{ checksum "Gemfile.lock" }} + paths: + - vendor/bundle + - run: | brew install swiftlint - bundle install --without=development grep -lR "shouldUseLaunchSchemeArgsEnv" *.* --null | xargs -0 sed -i '' -e 's/shouldUseLaunchSchemeArgsEnv = "YES"/shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES"/g' - send-coverage-report: - steps: - - run: bash <(curl -s https://codecov.io/bash) -J 'JWTDecode' - save-carthage-cache: - steps: + - restore_cache: + keys: + - jwtdecode-swift-carthage-{ checksum "Cartfile.resolved" }}-<< parameters.xcode >> + - jwtdecode-swift-carthage-{ checksum "Cartfile.resolved" }} + - jwtdecode-swift-carthage- + - run: carthage bootstrap --no-use-binaries --cache-builds - save_cache: - key: dependency-cache + key: jwtdecode-swift-carthage-{ checksum "Cartfile.resolved" }}-<< parameters.xcode >> paths: - Carthage/Build - build-package-ios: - steps: - - run: | - bundle exec fastlane ios pod_lint - carthage update --no-use-binaries && carthage build --no-skip-current test-ios: steps: - - run: | - bundle exec fastlane ios bootstrap - bundle exec fastlane ios ci - - save-carthage-cache + - run: bundle exec fastlane ios ci + pod-lint: + steps: + - run: bundle exec fastlane ios pod_lint + send-coverage-report: + steps: + - run: bash <(curl -s https://codecov.io/bash) -J 'JWTDecode' test-macos: steps: - run: | - carthage bootstrap --platform mac security create-keychain -p circle cikeychain security list-keychains -d user -s "/Users/distiller/Library/Keychains/xcode.keychain-db" /Users/distiller/Library/Keychains/cikeychain-db security default-keychain -s /Users/distiller/Library/Keychains/cikeychain-db security unlock-keychain -p circle "/Users/distiller/Library/Keychains/cikeychain-db" xcodebuild test -scheme JWTDecode-OSX -destination 'platform=macOS,arch=x86_64' | xcpretty swift test - - save-carthage-cache test-tvos: steps: - - run: | - carthage bootstrap --platform tvOS - xcodebuild test -scheme JWTDecode-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty - - save-carthage-cache + - run: xcodebuild test -scheme JWTDecode-tvOS -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty jobs: - build-iOS-Swift-5_1: - executor: job-environment-ios + build-and-test-iOS-swift-5_2: + executor: job-environment + environment: + FASTLANE_EXPLICIT_OPEN_SIMULATOR: 2 macos: - xcode: 11.2.0 + xcode: 11.7.0 steps: - checkout - - prepare: - ruby: "2.6.5" + - prepare - test-ios - - build-package-ios - send-coverage-report + - pod-lint - store_test_results: - path: fastlane/test_output - build-iOS-Swift-5_0: - executor: job-environment-ios - macos: - xcode: 10.3.0 - steps: - - checkout - - prepare - - test-ios - build-iOS-Swift-4_2: - executor: job-environment-ios - macos: - xcode: 10.3.0 - steps: - - checkout - - use-swift: - version: "4.2" - - prepare - - test-ios - build-iOS-Swift-4_0: - executor: job-environment-ios - macos: - xcode: 10.3.0 - steps: - - checkout - - use-swift: - version: "4.0" - - prepare - - test-ios - build-macOS-Swift-5_1: - executor: job-environment - macos: - xcode: 11.2.0 - steps: - - checkout - - prepare: - ruby: "2.6.5" - - test-macos - build-macOS-Swift-4_2: + path: output/scan + - store_artifacts: + path: output + build-and-test-macOS-swift-5_2: executor: job-environment macos: - xcode: 10.3.0 + xcode: 11.7.0 steps: - checkout - - use-swift: - version: "4.2" - prepare - test-macos - build-tvOS-Swift-5_1: - executor: job-environment - macos: - xcode: 11.2.0 - steps: - - checkout - - prepare: - ruby: "2.6.5" - - test-tvos - build-tvOS-Swift-4_2: + build-and-test-tvOS-swift-5_2: executor: job-environment macos: - xcode: 10.3.0 + xcode: 11.7.0 steps: - checkout - - use-swift: - version: "4.2" - prepare - test-tvos workflows: build: jobs: - - build-iOS-Swift-5_1 - - build-iOS-Swift-5_0 - - build-iOS-Swift-4_2 - - build-iOS-Swift-4_0 - - build-macOS-Swift-5_1 - - build-macOS-Swift-4_2 - - build-tvOS-Swift-5_1 - - build-tvOS-Swift-4_2 + - build-and-test-iOS-swift-5_2 + - build-and-test-macOS-swift-5_2 + - build-and-test-tvOS-swift-5_2 diff --git a/Cartfile.private b/Cartfile.private index 6b5cfe7..55332a2 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,2 +1,2 @@ -github "Quick/Quick" ~> 2.1 -github "Quick/Nimble" ~> 8.0 \ No newline at end of file +github "Quick/Quick" ~> 3.0 +github "Quick/Nimble" ~> 9.0 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 9eb6d52..db1bc9e 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "Quick/Nimble" "v8.0.4" -github "Quick/Quick" "v2.2.0" +github "Quick/Nimble" "v9.0.0" +github "Quick/Quick" "v3.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index 8369e29..2b053a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,28 +2,43 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.2) - activesupport (4.2.11.1) - i18n (~> 0.7) + activesupport (5.2.4.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - algoliasearch (1.27.1) + algoliasearch (1.27.4) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) - babosa (1.0.3) + aws-eventstream (1.1.0) + aws-partitions (1.381.0) + aws-sdk-core (3.109.1) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.39.0) + aws-sdk-core (~> 3, >= 3.109.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.83.0) + aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.2.2) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) claide (1.0.3) - cocoapods (1.9.0.beta.3) - activesupport (>= 4.0.2, < 5) + cocoapods (1.10.0.rc.1) + addressable (~> 2.6) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.9.0.beta.3) + cocoapods-core (= 1.10.0.rc.1) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.2.2, < 2.0) + cocoapods-downloader (>= 1.4.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-stats (>= 1.0.0, < 2.0) cocoapods-trunk (>= 1.4.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) @@ -33,75 +48,76 @@ GEM molinillo (~> 0.6.6) nap (~> 1.0) ruby-macho (~> 1.4) - xcodeproj (>= 1.14.0, < 2.0) - cocoapods-core (1.9.0.beta.3) - activesupport (>= 4.0.2, < 6) + xcodeproj (>= 1.17.0, < 2.0) + cocoapods-core (1.10.0.rc.1) + activesupport (> 5.0, < 6) + addressable (~> 2.6) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) fuzzy_match (~> 2.0.4) nap (~> 1.0) netrc (~> 0.11) + public_suffix typhoeus (~> 1.0) cocoapods-deintegrate (1.0.4) - cocoapods-downloader (1.3.0) + cocoapods-downloader (1.4.0) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.0) - cocoapods-stats (1.1.0) - cocoapods-trunk (1.4.1) + cocoapods-trunk (1.5.0) nap (>= 0.8, < 2.0) netrc (~> 0.11) - cocoapods-try (1.1.0) + cocoapods-try (1.2.0) colored (1.2) colored2 (3.1.2) commander-fastlane (4.4.6) highline (~> 1.7.2) - concurrent-ruby (1.1.5) - declarative (0.0.10) + concurrent-ruby (1.1.7) + declarative (0.0.20) declarative-option (0.1.0) - digest-crc (0.4.1) + digest-crc (0.6.1) + rake (~> 13.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.5) - emoji_regex (1.0.1) + dotenv (2.7.6) + emoji_regex (3.0.0) escape (0.0.4) ethon (0.12.0) ffi (>= 1.3.0) - excon (0.72.0) - faraday (0.17.3) + excon (0.76.0) + faraday (1.0.1) multipart-post (>= 1.2, < 3) - faraday-cookie_jar (0.0.6) - faraday (>= 0.7.4) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) http-cookie (~> 1.0.0) - faraday_middleware (0.13.1) - faraday (>= 0.7.4, < 1.0) - fastimage (2.1.7) - fastlane (2.141.0) + faraday_middleware (1.0.0) + faraday (~> 1.0) + fastimage (2.2.0) + fastlane (2.162.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) - babosa (>= 1.0.2, < 2.0.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored commander-fastlane (>= 4.4.6, < 5.0.0) dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (>= 0.1, < 2.0) + emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) - faraday (~> 0.17) + faraday (~> 1.0) faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 0.13.1) + faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.29.2, < 0.37.0) + google-api-client (>= 0.37.0, < 0.39.0) google-cloud-storage (>= 1.15.0, < 2.0.0) highline (>= 1.7.2, < 2.0.0) json (< 3.0.0) - jwt (~> 2.1.0) + jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) - multi_xml (~> 0.5) multipart-post (~> 2.0.0) plist (>= 3.1.0, < 4.0.0) - public_suffix (~> 2.0.0) - rubyzip (>= 1.3.0, < 2.0.0) + rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) simctl (~> 1.6.3) slack-notifier (>= 2.0.0, < 3.0.0) @@ -115,11 +131,11 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-auth0_shipper (0.4.1) semantic (~> 1.5) - ffi (1.12.2) + ffi (1.13.1) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-api-client (0.36.4) + google-api-client (0.38.0) addressable (~> 2.5, >= 2.5.1) googleauth (~> 0.9) httpclient (>= 2.8.1, < 3.0) @@ -130,46 +146,47 @@ GEM google-cloud-core (1.5.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.3.0) - faraday (~> 0.11) - google-cloud-errors (1.0.0) - google-cloud-storage (1.25.1) + google-cloud-env (1.3.3) + faraday (>= 0.17.3, < 2.0) + google-cloud-errors (1.0.1) + google-cloud-storage (1.29.1) addressable (~> 2.5) digest-crc (~> 0.4) google-api-client (~> 0.33) google-cloud-core (~> 1.2) googleauth (~> 0.9) mini_mime (~> 1.0) - googleauth (0.10.0) - faraday (~> 0.12) + googleauth (0.14.0) + faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.12) + signet (~> 0.14) highline (1.7.10) http-cookie (1.0.3) domain_name (~> 0.5) httpclient (2.8.3) - i18n (0.9.5) + i18n (1.8.5) concurrent-ruby (~> 1.0) - json (2.3.0) - jwt (2.1.0) + jmespath (1.4.0) + json (2.3.1) + jwt (2.2.2) memoist (0.16.2) mini_magick (4.10.1) mini_mime (1.0.2) - minitest (5.14.0) + minitest (5.14.2) molinillo (0.6.6) - multi_json (1.14.1) - multi_xml (0.6.0) + multi_json (1.15.0) multipart-post (2.0.0) - nanaimo (0.2.6) + nanaimo (0.3.0) nap (1.1.0) naturally (2.2.0) netrc (0.11.0) - os (1.0.1) + os (1.1.1) plist (3.5.0) - public_suffix (2.0.5) + public_suffix (4.0.6) + rake (13.0.1) representable (3.0.4) declarative (< 0.1.0) declarative-option (< 0.2.0) @@ -177,15 +194,15 @@ GEM retriable (3.1.2) rouge (2.0.7) ruby-macho (1.4.0) - rubyzip (1.3.0) + rubyzip (2.3.0) security (0.1.3) semantic (1.6.1) - signet (0.12.0) + signet (0.14.0) addressable (~> 2.3) - faraday (~> 0.9) + faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - simctl (1.6.7) + simctl (1.6.8) CFPropertyList naturally slack-notifier (2.3.2) @@ -194,25 +211,25 @@ GEM unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) tty-cursor (0.7.1) - tty-screen (0.7.1) + tty-screen (0.8.1) tty-spinner (0.9.3) tty-cursor (~> 0.7) - typhoeus (1.3.1) + typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.6) - unicode-display_width (1.6.1) + unf_ext (0.0.7.7) + unicode-display_width (1.7.0) word_wrap (1.0.0) - xcodeproj (1.15.0) + xcodeproj (1.19.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) - nanaimo (~> 0.2.6) + nanaimo (~> 0.3.0) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.0) @@ -228,4 +245,4 @@ DEPENDENCIES semantic (~> 1.5) BUNDLED WITH - 1.17.2 + 2.1.4 diff --git a/JWTDecode.podspec b/JWTDecode.podspec index 677f337..b113bd6 100644 --- a/JWTDecode.podspec +++ b/JWTDecode.podspec @@ -21,5 +21,5 @@ Pod::Spec.new do |s| s.source_files = 'JWTDecode/*.swift' - s.swift_versions = ['4.0', '4.1', '4.2', '5.0', '5.1'] + s.swift_versions = ['4.0', '4.1', '4.2', '5.0', '5.1', '5.2', '5.3'] end diff --git a/Package.swift b/Package.swift index debac46..402e9de 100644 --- a/Package.swift +++ b/Package.swift @@ -1,30 +1,25 @@ // swift-tools-version:5.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "JWTDecode", products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "JWTDecode", - targets: ["JWTDecode"]), + targets: ["JWTDecode"]) ], dependencies: [ - // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Quick/Quick", from: "2.1.0"), - .package(url: "https://github.com/Quick/Nimble", from: "8.0.0") + .package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "3.0.0")), + .package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "9.0.0")) ], targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. .target( name: "JWTDecode", dependencies: [], path: "JWTDecode"), .testTarget( name: "JWTDecode.swiftTests", - dependencies: ["JWTDecode", "Quick", "Nimble"]), + dependencies: ["JWTDecode", "Quick", "Nimble"]) ] ) diff --git a/README.md b/README.md index 60c4bb3..b76186c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![License](https://img.shields.io/cocoapods/l/JWTDecode.svg?style=flat-square)](https://cocoadocs.org/docsets/JWTDecode) [![Platform](https://img.shields.io/cocoapods/p/JWTDecode.svg?style=flat-square)](https://cocoadocs.org/docsets/JWTDecode) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat-square)](https://github.com/Carthage/Carthage) -![Swift 5.1](https://img.shields.io/badge/Swift-5.1-orange.svg?style=flat-square) +![Swift 5.3](https://img.shields.io/badge/Swift-5.3-orange.svg?style=flat-square) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2FJWTDecode.swift.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2FJWTDecode.swift?ref=badge_shield) This library will help you check [JWT](https://jwt.io/) payload @@ -27,7 +27,7 @@ This library will help you check [JWT](https://jwt.io/) payload ## Requirements - iOS 9+ / macOS 10.11+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 10.x / 11.x +- Xcode 11.4+ - Swift 4.x/5.x ## Installation @@ -207,4 +207,4 @@ If you have found a bug or to request a feature, please [raise an issue](https:/ This project is licensed under the MIT license. See the [LICENSE](LICENSE.txt) file for more info. -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2FJWTDecode.swift.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2FJWTDecode.swift?ref=badge_large) \ No newline at end of file +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2FJWTDecode.swift.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2FJWTDecode.swift?ref=badge_large) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 240f9db..3a9e21f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -6,6 +6,10 @@ default_platform :ios platform :ios do + before_all do + setup_circle_ci + end + desc "Installs dependencies using Carthage" lane :dependencies do |options| action = options[:action] diff --git a/fastlane/Scanfile b/fastlane/Scanfile index 1f9fe00..41562f5 100644 --- a/fastlane/Scanfile +++ b/fastlane/Scanfile @@ -1,6 +1,4 @@ scheme "JWTDecode-iOS" -devices ["iPhone 8"] +devices ["iPhone 11"] clean true - -output_types "html"