From c690765eed803877c3967dbf83754af142abef58 Mon Sep 17 00:00:00 2001 From: luoxiu Date: Mon, 20 Jul 2020 10:36:39 +0800 Subject: [PATCH] support cocoapods --- .travis.yml | 19 ------------------- Chalk.podspec | 21 +++++++++++++++++++++ LICENSE | 2 +- README.md | 8 ++++++-- Tests/ChalkTests/ChalkTests.swift | 4 ---- Tests/ChalkTests/XCTestManifests.swift | 15 ++++++++++++--- Tests/LinuxMain.swift | 3 ++- 7 files changed, 42 insertions(+), 30 deletions(-) delete mode 100644 .travis.yml create mode 100644 Chalk.podspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 38602ca..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -os: - - linux - - osx -language: generic -sudo: required -dist: trusty -osx_image: xcode11.3 -env: SWIFT_VERSION=5.1 -install: - - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"; - fi -script: - - swift test --enable-code-coverage - -after_success: - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then - bash <(curl -s https://codecov.io/bash); - fi diff --git a/Chalk.podspec b/Chalk.podspec new file mode 100644 index 0000000..76f0ff2 --- /dev/null +++ b/Chalk.podspec @@ -0,0 +1,21 @@ +Pod::Spec.new do |s| + s.name = 'Chalk' + s.version = '0.1.1' + s.summary = 'Expressive styling on terminal string. (chalk for swift)' + s.homepage = 'https://github.com/luoxiu/Chalk' + + s.license = { type: 'MIT', file: 'LICENSE' } + + s.author = { 'luoxiu' => 'luoxiustm@gmail.com' } + + s.ios.deployment_target = '10.0' + s.osx.deployment_target = '10.12' + s.tvos.deployment_target = '10.0' + s.watchos.deployment_target = '3.0' + + s.swift_version = '5.0' + + s.source = { git: s.homepage + '.git', tag: s.version } + s.source_files = 'Sources/Chalk/**/*.swift' +end + \ No newline at end of file diff --git a/LICENSE b/LICENSE index 883bd23..1e16ec9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Quentin Jin +Copyright (c) 2020 Quentin Jin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c0212be..dbe3429 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Chalk
- - + + @@ -129,6 +129,10 @@ dependencies: [ ] ``` +```ruby +pod 'Chalk', '~> 0.1.0' +``` + ## Acknowledge diff --git a/Tests/ChalkTests/ChalkTests.swift b/Tests/ChalkTests/ChalkTests.swift index 7ed9cb5..10c28e9 100644 --- a/Tests/ChalkTests/ChalkTests.swift +++ b/Tests/ChalkTests/ChalkTests.swift @@ -15,8 +15,4 @@ final class ChalkTests: XCTestCase { let nest = ck.red.on("a" + ck.yellow.on("b" + ck.green.on("c") + "b") + "c") XCTAssertEqual(nest.description, "\u{001B}[31ma\u{001B}[39m\u{001B}[33mb\u{001B}[39m\u{001B}[32mc\u{001B}[39m\u{001B}[33mb\u{001B}[39m\u{001B}[31mc\u{001B}[39m") } - - static var allTests = [ - ("testChalk", testChalk), - ] } diff --git a/Tests/ChalkTests/XCTestManifests.swift b/Tests/ChalkTests/XCTestManifests.swift index 0bd8391..70eb235 100644 --- a/Tests/ChalkTests/XCTestManifests.swift +++ b/Tests/ChalkTests/XCTestManifests.swift @@ -1,9 +1,18 @@ +#if !canImport(ObjectiveC) import XCTest -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { +extension ChalkTests { + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ChalkTests = [ + ("testChalk", testChalk), + ] +} + +public func __allTests() -> [XCTestCaseEntry] { return [ - testCase(ChalkTests.allTests), + testCase(ChalkTests.__allTests__ChalkTests), ] } #endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index c736592..495be2c 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -3,5 +3,6 @@ import XCTest import ChalkTests var tests = [XCTestCaseEntry]() -tests += ChalkTests.allTests() +tests += ChalkTests.__allTests() + XCTMain(tests)