Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Support Swift Package Manager with PackageDescriptionV4
Browse files Browse the repository at this point in the history
  • Loading branch information
inamiy committed Feb 13, 2019
1 parent f3e831d commit 4158215
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.2.1
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "Quick/Quick" ~> 1.0
github "Quick/Nimble" ~> 7.0
github "Quick/Quick"
github "Quick/Nimble"
github "mrackwitz/xcconfigs"
github "shu223/Pulsator" ~> 0.4
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github "Quick/Nimble" "v7.0.2"
github "Quick/Quick" "v1.2.0"
github "ReactiveX/RxSwift" "4.0.0"
github "Quick/Nimble" "v7.3.4"
github "Quick/Quick" "v1.3.4"
github "ReactiveX/RxSwift" "4.4.1"
github "mrackwitz/xcconfigs" "3.0"
github "shu223/Pulsator" "0.4.0"
github "shu223/Pulsator" "0.4.2"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Nimble
Submodule Nimble updated 108 files
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Quick
Submodule Quick updated 56 files
+2 −2 .gitignore
+9 −5 .travis.yml
+1 −0 Documentation/README.md
+2 −2 Documentation/en-us/ConfiguringQuick.md
+14 −14 Documentation/en-us/NimbleAssertions.md
+1 −1 Documentation/en-us/QuickExamplesAndGroups.md
+75 −0 Documentation/en-us/TestingApps.md
+14 −14 Documentation/ja/NimbleAssertions.md
+1 −1 Documentation/ja/QuickExamplesAndGroups.md
+203 −0 Documentation/ko-kr/ArrangeActAssert.md
+80 −0 Documentation/ko-kr/BehavioralTesting.md
+99 −0 Documentation/ko-kr/ConfiguringQuick.md
+25 −0 Documentation/ko-kr/InstallingFileTemplates.md
+141 −0 Documentation/ko-kr/InstallingQuick.md
+25 −0 Documentation/ko-kr/MoreResources.md
+97 −0 Documentation/ko-kr/NimbleAssertions.md
+462 −0 Documentation/ko-kr/QuickExamplesAndGroups.md
+49 −0 Documentation/ko-kr/QuickInObjectiveC.md
+35 −0 Documentation/ko-kr/README.md
+80 −0 Documentation/ko-kr/SettingUpYourXcodeProject.md
+116 −0 Documentation/ko-kr/SharedExamples.md
+129 −0 Documentation/ko-kr/TestUsingTestDoubles.md
+173 −0 Documentation/ko-kr/TestingApps.md
+10 −0 Documentation/ko-kr/Troubleshooting.md
+12 −12 Documentation/zh-cn/NimbleAssertions.md
+1 −1 Documentation/zh-cn/QuickExamplesAndGroups.md
+1 −1 Externals/Nimble
+1 −1 Gemfile
+40 −36 Gemfile.lock
+16 −0 Package.resolved
+1 −1 Package@swift-4.swift
+6 −2 Quick.podspec
+59 −36 Quick.xcodeproj/project.pbxproj
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-iOS.xcscheme
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-macOS.xcscheme
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-tvOS.xcscheme
+8 −0 Quick.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+5 −0 Rakefile
+1 −1 Sources/Quick/Behavior.swift
+3 −3 Sources/Quick/Configuration/QuickConfiguration.swift
+9 −4 Sources/Quick/DSL/World+DSL.swift
+3 −0 Sources/Quick/Example.swift
+19 −3 Sources/Quick/NSString+C99ExtendedIdentifier.swift
+14 −2 Sources/Quick/QuickSpec.swift
+1 −1 Sources/Quick/World.swift
+6 −1 Sources/QuickObjectiveC/Configuration/QuickConfiguration.m
+6 −2 Sources/QuickObjectiveC/DSL/QCKDSL.m
+0 −20 Sources/QuickObjectiveC/DSL/World+DSL.h
+6 −0 Sources/QuickObjectiveC/QuickSpec.h
+11 −3 Sources/QuickObjectiveC/QuickSpec.m
+0 −18 Sources/QuickObjectiveC/World.h
+5 −0 Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m
+25 −0 Tests/QuickTests/QuickTests/FunctionalTests/CurrentSpecTests.swift
+0 −1 Tests/QuickTests/QuickTests/Helpers/QCKSpecRunner.m
+7 −1 Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.h
+5 −13 Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.m
2 changes: 1 addition & 1 deletion Carthage/Checkouts/RxSwift
Submodule RxSwift updated 538 files
34 changes: 34 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"object": {
"pins": [
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble",
"state": {
"branch": null,
"revision": "e9d769113660769a4d9dd3afb855562c0b7ae7b0",
"version": "7.3.4"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick",
"state": {
"branch": null,
"revision": "f2b5a06440ea87eba1a167cab37bf6496646c52e",
"version": "1.3.4"
}
},
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "a2348cef2a28fca5a1a5fa26b3ce62e6831c0a49",
"version": "4.4.1"
}
}
]
},
"version": 1
}
35 changes: 21 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
// swift-tools-version:4.2

import Foundation
import PackageDescription

let isSwiftPackageManagerTest = ProcessInfo.processInfo.environment["SWIFTPM_TEST"] == "YES"

let package = Package(
name: "RxAutomaton",
dependencies: {
var deps: [Package.Dependency] = [
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 4)
]
if isSwiftPackageManagerTest {
deps += [
.Package(url: "https://github.com/Quick/Quick", majorVersion: 1),
.Package(url: "https://github.com/Quick/Nimble", majorVersion: 7)
]
}
return deps
}()
products: [
.library(
name: "RxAutomaton",
targets: ["RxAutomaton"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "4.0.0"),
.package(url: "https://github.com/Quick/Quick", from: "1.0.0"),
.package(url: "https://github.com/Quick/Nimble", from: "7.0.0")
],
targets: [
.target(
name: "RxAutomaton",
dependencies: ["RxSwift", "RxCocoa"],
path: "Sources"),
.testTarget(
name: "RxAutomatonTests",
dependencies: ["RxAutomaton", "Quick", "Nimble"]),
]
)
8 changes: 8 additions & 0 deletions RxAutomaton.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
8 changes: 5 additions & 3 deletions Tests/RxAutomatonTests/StateFuncMappingSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ class StateFuncMappingSpec: QuickSpec
var automaton: Automaton?

beforeEach {
let mappings: [Automaton.EffectMapping] = [
.increment | { $0 + 1 } | .empty(),
.decrement | { $0 - 1 } | .empty(),
var mappings: [Automaton.EffectMapping] = [
.increment | { $0 + 1 } | .empty()
// Comment-Out: Type inference is super slow in Swift 4.2... (use `+=` instead)
// .decrement | { $0 - 1 } | .empty()
]
mappings += [ .decrement | { $0 - 1 } | .empty() ]

// strategy = `.merge`
automaton = Automaton(state: 0, input: signal, mapping: reduce(mappings), strategy: .merge)
Expand Down

0 comments on commit 4158215

Please sign in to comment.