This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from marty-suzuki/feature-0.2.0
Feature 0.2.0
- Loading branch information
Showing
21 changed files
with
1,016 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
language: objective-c | ||
matrix: | ||
include: | ||
- osx_image: xcode9.2 | ||
env: | ||
global: | ||
- LC_CTYPE=en_US.UTF-8 | ||
git: | ||
submodules: false | ||
branches: | ||
only: | ||
- master | ||
script: | ||
- xcodebuild test -workspace Continuum.xcworkspace -scheme ContinuumTests -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 7" | xcpretty -c | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
Continuum.xcodeproj/xcshareddata/xcschemes/ContinuumTests.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0920" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
language = "" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "379BCD172029FF9600450632" | ||
BuildableName = "ContinuumTests.xctest" | ||
BlueprintName = "ContinuumTests" | ||
ReferencedContainer = "container:Continuum.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
language = "" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// Constant.swift | ||
// Continuum | ||
// | ||
// Created by 鈴木大貴 on 2018/02/08. | ||
// Copyright © 2018年 marty-suzuki. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Constant is wrapper for value that has getter. | ||
public final class Constant<Element>: ValueRepresentable, NotificationCenterSettable { | ||
/// Gets current value of constant. | ||
public var value: Element { | ||
return _variable.value | ||
} | ||
|
||
/// Represents unique Notification.Name for each constants. | ||
public var uniqueName: Notification.Name { | ||
return _variable.uniqueName | ||
} | ||
|
||
private let _variable: Variable<E> | ||
|
||
/// Initializes Constant with a Variable. | ||
/// | ||
/// - parameter value: Variable. | ||
public init(variable: Variable<E>) { | ||
self._variable = variable | ||
} | ||
|
||
func setCenter(_ center: NotificationCenter) { | ||
_variable.setCenter(center) | ||
} | ||
} |
Oops, something went wrong.