Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrwendt committed Mar 30, 2020
2 parents 77c680d + 466daa0 commit d7e4e5e
Show file tree
Hide file tree
Showing 52 changed files with 364 additions and 152 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Version 1.1.0
### Features
* SwiftUI support
* Expose SheetyColors view]

## Version 1.0.2
### Enhancements
*[Support Swift Package Manager](https://github.com/chrs1885/SheetyColors/issues/10)
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ target 'SheetyColors_Example' do
target 'SheetyColors_Tests' do
inherit! :search_paths

pod 'Quick', '2.1.0'
pod 'Nimble', '8.0.2'
pod 'SnapshotTesting', '1.5.0'
pod 'Quick', '2.2.0'
pod 'Nimble', '8.0.7'
pod 'SnapshotTesting', '1.7.2'
end
end
28 changes: 14 additions & 14 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
PODS:
- Capable/Colors (1.1.3)
- Nimble (8.0.2)
- Quick (2.1.0)
- SheetyColors (1.0.2):
- Capable/Colors (1.1.4)
- Nimble (8.0.7)
- Quick (2.2.0)
- SheetyColors (1.1.0):
- Capable/Colors (~> 1.1)
- SnapshotTesting (1.5.0)
- SnapshotTesting (1.7.2)

DEPENDENCIES:
- Nimble (= 8.0.2)
- Quick (= 2.1.0)
- Nimble (= 8.0.7)
- Quick (= 2.2.0)
- SheetyColors (from `../`)
- SnapshotTesting (= 1.5.0)
- SnapshotTesting (= 1.7.2)

SPEC REPOS:
trunk:
Expand All @@ -24,12 +24,12 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Capable: 1568ec5d4dde7daf0925ea327463ee333c9f7341
Nimble: 622629381bda1dd5678162f21f1368cec7cbba60
Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d
SheetyColors: 1d0d56e5ee7923b3f12eea59a2815eae826479ee
SnapshotTesting: 9ca1d80f6322509a035856170c11d0571b1f7171
Capable: 9f420f2a80a12144814ea2f0ba196516a0827ca1
Nimble: a73af6ecd4c9106f434f3d55fc54570be3739e0b
Quick: 7fb19e13be07b5dfb3b90d4f9824c855a11af40e
SheetyColors: 8503d13ddcce9517906732ecda0193ba09ad5ee2
SnapshotTesting: 8caa6661fea7c8019d5b46de77c16bab99c36c5c

PODFILE CHECKSUM: 4d25efd32952718fd1b46a2d61df3cf0534d24cf
PODFILE CHECKSUM: 5095640969646fd5f5546f91228d960c22a55514

COCOAPODS: 1.8.4
24 changes: 17 additions & 7 deletions Example/SheetyColors.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
22AA8832D7526E840D7FA916 /* Pods_SheetyColors_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87B5CDD8C9040B059B8C1536 /* Pods_SheetyColors_Example.framework */; };
44B496B12233C0AB00CF8B38 /* ColorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44B496B02233C0AB00CF8B38 /* ColorCell.swift */; };
44D0F1F4243148E7001DF988 /* SheetyColorsDelegateMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44D0F1F3243148E7001DF988 /* SheetyColorsDelegateMock.swift */; };
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
607FACD81AFB9204008FA782 /* ColorsCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ColorsCollectionViewController.swift */; };
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
Expand All @@ -23,7 +24,7 @@
834A36E2224971F700DECD37 /* SheetyColorsViewFactoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36E1224971F700DECD37 /* SheetyColorsViewFactoryTests.swift */; };
834A36E52249829300DECD37 /* SheetyColorsConfigMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36E42249829300DECD37 /* SheetyColorsConfigMock.swift */; };
834A36E8224E88F400DECD37 /* RGBViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36E7224E88F400DECD37 /* RGBViewModelTests.swift */; };
834A36ED224E8C7400DECD37 /* SheetyColorsViewModelDelegateMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36EC224E8C7400DECD37 /* SheetyColorsViewModelDelegateMock.swift */; };
834A36ED224E8C7400DECD37 /* SheetyColorsViewDelegateMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36EC224E8C7400DECD37 /* SheetyColorsViewDelegateMock.swift */; };
834A36F2224E94FC00DECD37 /* SheetyColorsViewModelMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36F1224E94FC00DECD37 /* SheetyColorsViewModelMock.swift */; };
834A36F4224E98F900DECD37 /* SheetyColorsViewMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834A36F3224E98F900DECD37 /* SheetyColorsViewMock.swift */; };
83537FC222739E1400E91C39 /* UIColor+grayscaleColorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83537FC122739E1400E91C39 /* UIColor+grayscaleColorTests.swift */; };
Expand Down Expand Up @@ -53,6 +54,7 @@
1BB8CE96911C8C57D7DDDF3A /* Pods_SheetyColors_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SheetyColors_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3697BB2765259F63B9A5841A /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
44B496B02233C0AB00CF8B38 /* ColorCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorCell.swift; sourceTree = "<group>"; };
44D0F1F3243148E7001DF988 /* SheetyColorsDelegateMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsDelegateMock.swift; sourceTree = "<group>"; };
553AD8A7258AE141F7908ED0 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
607FACD01AFB9204008FA782 /* SheetyColors_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SheetyColors_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand All @@ -74,7 +76,7 @@
834A36E1224971F700DECD37 /* SheetyColorsViewFactoryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsViewFactoryTests.swift; sourceTree = "<group>"; };
834A36E42249829300DECD37 /* SheetyColorsConfigMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsConfigMock.swift; sourceTree = "<group>"; };
834A36E7224E88F400DECD37 /* RGBViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RGBViewModelTests.swift; sourceTree = "<group>"; };
834A36EC224E8C7400DECD37 /* SheetyColorsViewModelDelegateMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsViewModelDelegateMock.swift; sourceTree = "<group>"; };
834A36EC224E8C7400DECD37 /* SheetyColorsViewDelegateMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsViewDelegateMock.swift; sourceTree = "<group>"; };
834A36F1224E94FC00DECD37 /* SheetyColorsViewModelMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsViewModelMock.swift; sourceTree = "<group>"; };
834A36F3224E98F900DECD37 /* SheetyColorsViewMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetyColorsViewMock.swift; sourceTree = "<group>"; };
83537FC122739E1400E91C39 /* UIColor+grayscaleColorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+grayscaleColorTests.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -269,8 +271,9 @@
836D683C22F8B4C5005452FB /* AppearenceProviderMock.swift */,
834A36F1224E94FC00DECD37 /* SheetyColorsViewModelMock.swift */,
834A36E42249829300DECD37 /* SheetyColorsConfigMock.swift */,
834A36EC224E8C7400DECD37 /* SheetyColorsViewModelDelegateMock.swift */,
834A36EC224E8C7400DECD37 /* SheetyColorsViewDelegateMock.swift */,
834A36F3224E98F900DECD37 /* SheetyColorsViewMock.swift */,
44D0F1F3243148E7001DF988 /* SheetyColorsDelegateMock.swift */,
);
name = Mocks;
sourceTree = "<group>";
Expand Down Expand Up @@ -427,7 +430,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
Expand Down Expand Up @@ -543,7 +546,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "swift run swiftlint --path \"../\"\n";
shellScript = "#swift run swiftlint --path \"../\"\n";
};
831DB4A92253F980002C28CD /* Run SwiftFormat */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -561,7 +564,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "swift run swiftformat ../\n";
shellScript = "#swift run swiftformat ../\n";
};
AE9008059691A960F5E1E813 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -636,10 +639,11 @@
831FCF0022591DFE003C48A4 /* UIAlertController+customViewTests.swift in Sources */,
831FCF02225E62F8003C48A4 /* SheetyColorsViewTests.swift in Sources */,
836D683D22F8B4C5005452FB /* AppearenceProviderMock.swift in Sources */,
44D0F1F4243148E7001DF988 /* SheetyColorsDelegateMock.swift in Sources */,
83537FC52273A01000E91C39 /* GrayscaleViewModel.swift in Sources */,
83537FC222739E1400E91C39 /* UIColor+grayscaleColorTests.swift in Sources */,
834A36E8224E88F400DECD37 /* RGBViewModelTests.swift in Sources */,
834A36ED224E8C7400DECD37 /* SheetyColorsViewModelDelegateMock.swift in Sources */,
834A36ED224E8C7400DECD37 /* SheetyColorsViewDelegateMock.swift in Sources */,
834A36F4224E98F900DECD37 /* SheetyColorsViewMock.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -678,6 +682,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -686,12 +691,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -731,6 +738,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -739,12 +747,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,13 +40,22 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES"
onlyGenerateCoverageForSpecifiedTargets = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
onlyGenerateCoverageForSpecifiedTargets = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "SheetyColors_Example.app"
BlueprintName = "SheetyColors_Example"
ReferencedContainer = "container:SheetyColors.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CodeCoverageTargets>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "89213020570824DFA54D336CD8300747"
BlueprintIdentifier = "ECE08F087467D1E7D49C414E560769CE"
BuildableName = "SheetyColors.framework"
BlueprintName = "SheetyColors"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
Expand All @@ -69,17 +78,6 @@
</SkippedTests>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "SheetyColors_Example.app"
BlueprintName = "SheetyColors_Example"
ReferencedContainer = "container:SheetyColors.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -101,8 +99,6 @@
ReferencedContainer = "container:SheetyColors.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
23 changes: 18 additions & 5 deletions Example/Tests/GrayscaleViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@ class GrayscaleViewModelTests: QuickSpec {
override func spec() {
describe("The GrayscaleViewModel") {
var sut: GrayscaleViewModel!
var delegateMock: SheetyColorsViewModelDelegateMock!
var viewDelegateMock: SheetyColorsViewDelegateMock!
var delegateMock: SheetyColorsDelegateMock!

context("after initialization") {
var testColorModel: GrayscaleColor!
var testIsAlphaEnabled: Bool!
var testHasTextOrMessage: Bool!

beforeEach {
delegateMock = SheetyColorsViewModelDelegateMock()
viewDelegateMock = SheetyColorsViewDelegateMock()
delegateMock = SheetyColorsDelegateMock()
testIsAlphaEnabled = true
testHasTextOrMessage = true
testColorModel = GrayscaleColor(white: 123.0, alpha: 69.0)
sut = GrayscaleViewModel(withColorModel: testColorModel, isAlphaEnabled: testIsAlphaEnabled, hasTextOrMessage: testHasTextOrMessage)
sut.viewModelDelegate = delegateMock
sut.viewDelegate = viewDelegateMock
sut.delegate = delegateMock
}

context("when calling hasTextOrMessage property") {
Expand Down Expand Up @@ -230,8 +233,13 @@ class GrayscaleViewModelTests: QuickSpec {
sut.sliderValueChanged(forSliderAt: 0, value: testColorValue)
}

it("informs the viewDelegate") {
expect(viewDelegateMock.didCallDidUpdateColorComponent).to(beTrue())
}

it("informs the delegate") {
expect(delegateMock.didCallDidUpdateColorComponent).to(beTrue())
expect(delegateMock.didCallDidSelectColor).to(beTrue())
expect(delegateMock.selectedColor).to(equal(sut.colorModel.uiColor))
}

it("floors the value and updates the hue component of the color model") {
Expand All @@ -244,8 +252,13 @@ class GrayscaleViewModelTests: QuickSpec {
sut.sliderValueChanged(forSliderAt: 1, value: testColorValue)
}

it("informs the viewDelegate") {
expect(viewDelegateMock.didCallDidUpdateColorComponent).to(beTrue())
}

it("informs the delegate") {
expect(delegateMock.didCallDidUpdateColorComponent).to(beTrue())
expect(delegateMock.didCallDidSelectColor).to(beTrue())
expect(delegateMock.selectedColor).to(equal(sut.colorModel.uiColor))
}

it("floors the value and updates the alpha component of the color model") {
Expand Down
Loading

0 comments on commit d7e4e5e

Please sign in to comment.