Skip to content

Commit

Permalink
Merge pull request #22 from CodaFi/scheme-a-little-scheme
Browse files Browse the repository at this point in the history
Add watchOS and tvOS Schemes
  • Loading branch information
CodaFi committed Jan 4, 2016
2 parents e39ac8c + 3830381 commit eca4aa0
Show file tree
Hide file tree
Showing 8 changed files with 600 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ language: objective-c
osx_image: xcode7.2
before_install: true
install: true
script: script/cibuild Focus Focus-iOS
script:
- script/cibuild Focus Focus-iOS
- xcodebuild test -scheme Focus-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 1080p'
- xcodebuild build -scheme Focus-watchOS -destination 'platform=watchOS Simulator,name=Apple Watch - 42mm'

notifications:
webhooks:
urls:
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "typelift/Operadics" "0.1.4"
github "typelift/SwiftCheck" "v0.3.1"
github "typelift/SwiftCheck" "v0.4.4"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/SwiftCheck
409 changes: 408 additions & 1 deletion Focus.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions Focus.xcodeproj/xcshareddata/xcschemes/Focus-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE381C3A47AC00EF4D29"
BuildableName = "Focus-tvOS.framework"
BlueprintName = "Focus-tvOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE411C3A47AC00EF4D29"
BuildableName = "Focus-tvOSTests.xctest"
BlueprintName = "Focus-tvOSTests"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE381C3A47AC00EF4D29"
BuildableName = "Focus-tvOS.framework"
BlueprintName = "Focus-tvOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE381C3A47AC00EF4D29"
BuildableName = "Focus-tvOS.framework"
BlueprintName = "Focus-tvOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE381C3A47AC00EF4D29"
BuildableName = "Focus-tvOS.framework"
BlueprintName = "Focus-tvOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
80 changes: 80 additions & 0 deletions Focus.xcodeproj/xcshareddata/xcschemes/Focus-watchOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE231C3A47A500EF4D29"
BuildableName = "Focus-watchOS.framework"
BlueprintName = "Focus-watchOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE231C3A47A500EF4D29"
BuildableName = "Focus-watchOS.framework"
BlueprintName = "Focus-watchOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8240CE231C3A47A500EF4D29"
BuildableName = "Focus-watchOS.framework"
BlueprintName = "Focus-watchOS"
ReferencedContainer = "container:Focus.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
8 changes: 4 additions & 4 deletions FocusTests/PrismSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class PrismSpec : XCTestCase {
func testPrismLaws() {
property("modify-identity") <- forAll { (fs : IsoOf<Int, UInt>) in
/// Cannot generate this in the forAll because we need this to be memoizing and consistent with the Iso.
let tryGet = ArrowOf<UInt, OptionalOf<UInt>>({ arc4random() % 4 == 0 ? OptionalOf(.None) : OptionalOf(.Some($0)) })
let prism = Prism(tryGet: { $0.getOptional } tryGet.getArrow fs.getTo, inject: fs.getFrom)
let tryGet : UInt -> OptionalOf<UInt> = { arc4random() % 4 == 0 ? OptionalOf(.None) : OptionalOf(.Some($0)) }
let prism = Prism(tryGet: { $0.getOptional } tryGet fs.getTo, inject: fs.getFrom)
return forAll { (l : Int) in
let m = prism.tryModify(l, { $0 })
return m != nil ==> (m == l)
Expand All @@ -28,8 +28,8 @@ class SimplePrismSpec : XCTestCase {
func testPrismLaws() {
property("modify-identity") <- forAll { (fs : IsoOf<Int, UInt>) in
/// Cannot generate this in the forAll because we need this to be memoizing and consistent with the Iso.
let tryGet = ArrowOf<UInt, OptionalOf<UInt>>({ arc4random() % 4 == 0 ? OptionalOf(.None) : OptionalOf(.Some($0)) })
let prism = SimplePrism(tryGet: { $0.getOptional } tryGet.getArrow fs.getTo, inject: fs.getFrom)
let tryGet : UInt -> OptionalOf<UInt> = { arc4random() % 4 == 0 ? OptionalOf(.None) : OptionalOf(.Some($0)) }
let prism = SimplePrism(tryGet: { $0.getOptional } tryGet fs.getTo, inject: fs.getFrom)
return forAll { (l : Int) in
let m = prism.tryModify(l, { $0 })
return m != nil ==> (m == l)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Build Status](https://travis-ci.org/typelift/Focus.svg?branch=master)](https://travis-ci.org/typelift/Focus)
[![Gitter chat](https://badges.gitter.im/DPVN/chat.png)](https://gitter.im/typelift/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link)

# Focus
Focus is an Optics library for Swift (where Optics includes `Lens`, `Prism`s, and `Iso`s) that is
Expand Down

0 comments on commit eca4aa0

Please sign in to comment.