Skip to content

Commit 900d4cb

Browse files
authored
Merge pull request #159 from hyperoslo/fix/swift_hash
Inline SwiftHash
2 parents 2117b89 + dc3757c commit 900d4cb

File tree

12 files changed

+390
-131
lines changed

12 files changed

+390
-131
lines changed

Cache.podspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Pod::Spec.new do |s|
1919
s.tvos.source_files = 'Source/{iOS,Shared}/**/*'
2020

2121
s.frameworks = 'Foundation'
22-
s.dependency 'SwiftHash', '~> 2.0.0'
2322

2423
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
2524
end

Cache.xcodeproj/project.pbxproj

Lines changed: 24 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
D2CF98851F69598900CE8F68 /* TypeWrapperStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2CF98841F69598900CE8F68 /* TypeWrapperStorage.swift */; };
101101
D2CF98871F695B8F00CE8F68 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2CF98861F695B8F00CE8F68 /* Types.swift */; };
102102
D2CF98891F695F9400CE8F68 /* TypeWrapperStorageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2CF98881F695F9400CE8F68 /* TypeWrapperStorageTests.swift */; };
103+
D2D4CC161FA3145000E4A2D5 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2D4CC151FA3145000E4A2D5 /* MD5.swift */; };
104+
D2D4CC171FA3145000E4A2D5 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2D4CC151FA3145000E4A2D5 /* MD5.swift */; };
105+
D2D4CC181FA3145000E4A2D5 /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2D4CC151FA3145000E4A2D5 /* MD5.swift */; };
106+
D2D4CC1A1FA3166900E4A2D5 /* MD5Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2D4CC191FA3166900E4A2D5 /* MD5Tests.swift */; };
103107
D5291D1D1C2837DB00B702C9 /* Cache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5DC59E01C20593E003BD79B /* Cache.framework */; };
104108
D5291D6A1C283B5400B702C9 /* Cache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5291D601C283B5300B702C9 /* Cache.framework */; };
105109
D5291D851C283C7C00B702C9 /* TestHelper+OSX.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5291D811C283C7000B702C9 /* TestHelper+OSX.swift */; };
@@ -173,6 +177,8 @@
173177
D2CF98841F69598900CE8F68 /* TypeWrapperStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeWrapperStorage.swift; sourceTree = "<group>"; };
174178
D2CF98861F695B8F00CE8F68 /* Types.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Types.swift; sourceTree = "<group>"; };
175179
D2CF98881F695F9400CE8F68 /* TypeWrapperStorageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeWrapperStorageTests.swift; sourceTree = "<group>"; };
180+
D2D4CC151FA3145000E4A2D5 /* MD5.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MD5.swift; sourceTree = "<group>"; };
181+
D2D4CC191FA3166900E4A2D5 /* MD5Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MD5Tests.swift; sourceTree = "<group>"; };
176182
D5291CDF1C28374800B702C9 /* TestHelper+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TestHelper+iOS.swift"; sourceTree = "<group>"; };
177183
D5291D181C2837DB00B702C9 /* Cache-iOS-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Cache-iOS-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
178184
D5291D231C28380100B702C9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -288,6 +294,7 @@
288294
D2CF98591F694FFA00CE8F68 /* StorageError.swift */,
289295
D2CF98861F695B8F00CE8F68 /* Types.swift */,
290296
D292DAFC1F6A970B0060F614 /* Result.swift */,
297+
D2D4CC151FA3145000E4A2D5 /* MD5.swift */,
291298
);
292299
path = Library;
293300
sourceTree = "<group>";
@@ -334,6 +341,7 @@
334341
D2CF98761F69513800CE8F68 /* ImageWrapperTests.swift */,
335342
D2CF98771F69513800CE8F68 /* TypeWrapperTests.swift */,
336343
D285143E1F6FFE1F00C674D1 /* ObjectConverterTests.swift */,
344+
D2D4CC191FA3166900E4A2D5 /* MD5Tests.swift */,
337345
);
338346
path = Library;
339347
sourceTree = "<group>";
@@ -510,7 +518,6 @@
510518
BDEDD3741DBCEB8A007416A6 /* Sources */,
511519
BDEDD3751DBCEB8A007416A6 /* Frameworks */,
512520
BDEDD3761DBCEB8A007416A6 /* Resources */,
513-
BDEDD3971DBCEE2D007416A6 /* ShellScript */,
514521
);
515522
buildRules = (
516523
);
@@ -529,7 +536,6 @@
529536
D5291D141C2837DB00B702C9 /* Sources */,
530537
D5291D151C2837DB00B702C9 /* Frameworks */,
531538
D5291D161C2837DB00B702C9 /* Resources */,
532-
D5291D591C283AA700B702C9 /* ShellScript */,
533539
);
534540
buildRules = (
535541
);
@@ -567,7 +573,6 @@
567573
D5291D651C283B5400B702C9 /* Sources */,
568574
D5291D661C283B5400B702C9 /* Frameworks */,
569575
D5291D671C283B5400B702C9 /* Resources */,
570-
D5291D9F1C283ECD00B702C9 /* ShellScript */,
571576
);
572577
buildRules = (
573578
);
@@ -588,7 +593,6 @@
588593
D5DC59DD1C20593E003BD79B /* Headers */,
589594
D5DC59DE1C20593E003BD79B /* Resources */,
590595
BD58C3AD1CF2E9FD003F7141 /* SwiftLint */,
591-
D2AB91761F83936E008610B5 /* Carthage */,
592596
);
593597
buildRules = (
594598
);
@@ -743,63 +747,6 @@
743747
shellPath = /bin/sh;
744748
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
745749
};
746-
BDEDD3971DBCEE2D007416A6 /* ShellScript */ = {
747-
isa = PBXShellScriptBuildPhase;
748-
buildActionMask = 2147483647;
749-
files = (
750-
);
751-
inputPaths = (
752-
"$(SRCROOT)/Carthage/Build/tvOS/SwiftHash.framework",
753-
);
754-
outputPaths = (
755-
);
756-
runOnlyForDeploymentPostprocessing = 0;
757-
shellPath = /bin/sh;
758-
shellScript = "/usr/local/bin/carthage copy-frameworks";
759-
};
760-
D2AB91761F83936E008610B5 /* Carthage */ = {
761-
isa = PBXShellScriptBuildPhase;
762-
buildActionMask = 2147483647;
763-
files = (
764-
);
765-
inputPaths = (
766-
"$(SRCROOT)/Carthage/Build/iOS/SwiftHash.framework",
767-
);
768-
name = Carthage;
769-
outputPaths = (
770-
);
771-
runOnlyForDeploymentPostprocessing = 0;
772-
shellPath = /bin/sh;
773-
shellScript = "/usr/local/bin/carthage copy-frameworks";
774-
};
775-
D5291D591C283AA700B702C9 /* ShellScript */ = {
776-
isa = PBXShellScriptBuildPhase;
777-
buildActionMask = 2147483647;
778-
files = (
779-
);
780-
inputPaths = (
781-
"$(SRCROOT)/Carthage/Build/iOS/SwiftHash.framework",
782-
);
783-
outputPaths = (
784-
);
785-
runOnlyForDeploymentPostprocessing = 0;
786-
shellPath = /bin/sh;
787-
shellScript = "/usr/local/bin/carthage copy-frameworks";
788-
};
789-
D5291D9F1C283ECD00B702C9 /* ShellScript */ = {
790-
isa = PBXShellScriptBuildPhase;
791-
buildActionMask = 2147483647;
792-
files = (
793-
);
794-
inputPaths = (
795-
"$(SRCROOT)/Carthage/Build/Mac/SwiftHash.framework",
796-
);
797-
outputPaths = (
798-
);
799-
runOnlyForDeploymentPostprocessing = 0;
800-
shellPath = /bin/sh;
801-
shellScript = "/usr/local/bin/carthage copy-frameworks";
802-
};
803750
/* End PBXShellScriptBuildPhase section */
804751

805752
/* Begin PBXSourcesBuildPhase section */
@@ -814,6 +761,7 @@
814761
D21B66871F6A723C00125DE1 /* ExpirationMode.swift in Sources */,
815762
D21B66881F6A723C00125DE1 /* Expiry.swift in Sources */,
816763
D21B669E1F6A724700125DE1 /* MemoryConfig.swift in Sources */,
764+
D2D4CC181FA3145000E4A2D5 /* MD5.swift in Sources */,
817765
D21B66951F6A724000125DE1 /* MemoryStorage.swift in Sources */,
818766
D292DAF31F6A85F30060F614 /* SyncStorage.swift in Sources */,
819767
D21B668C1F6A723C00125DE1 /* Types.swift in Sources */,
@@ -856,6 +804,7 @@
856804
D28C9BAC1F67ECD400C180C1 /* TestHelper+iOS.swift in Sources */,
857805
D2CF98211F69427C00CE8F68 /* TestHelper.swift in Sources */,
858806
D2CF987F1F69513800CE8F68 /* ImageWrapperTests.swift in Sources */,
807+
D2D4CC1A1FA3166900E4A2D5 /* MD5Tests.swift in Sources */,
859808
D292DB041F6AA0730060F614 /* AsyncStorageTests.swift in Sources */,
860809
D28C9BAF1F67EF8300C180C1 /* UIImage+ExtensionsTests.swift in Sources */,
861810
D2CF987D1F69513800CE8F68 /* MemoryCapsuleTests.swift in Sources */,
@@ -879,6 +828,7 @@
879828
D21B667E1F6A723C00125DE1 /* ExpirationMode.swift in Sources */,
880829
D21B667F1F6A723C00125DE1 /* Expiry.swift in Sources */,
881830
D21B669C1F6A724600125DE1 /* MemoryConfig.swift in Sources */,
831+
D2D4CC171FA3145000E4A2D5 /* MD5.swift in Sources */,
882832
D21B668F1F6A723F00125DE1 /* MemoryStorage.swift in Sources */,
883833
D292DAF21F6A85F30060F614 /* SyncStorage.swift in Sources */,
884834
D21B66831F6A723C00125DE1 /* Types.swift in Sources */,
@@ -924,6 +874,7 @@
924874
D2CF98621F694FFA00CE8F68 /* Date+Extensions.swift in Sources */,
925875
D2CF98641F694FFA00CE8F68 /* DataSerializer.swift in Sources */,
926876
D2CF986B1F694FFA00CE8F68 /* DiskStorage.swift in Sources */,
877+
D2D4CC161FA3145000E4A2D5 /* MD5.swift in Sources */,
927878
D292DAF11F6A85F30060F614 /* SyncStorage.swift in Sources */,
928879
D2CF98601F694FFA00CE8F68 /* DiskConfig.swift in Sources */,
929880
D292DAFD1F6A970B0060F614 /* Result.swift in Sources */,
@@ -975,10 +926,7 @@
975926
DYLIB_COMPATIBILITY_VERSION = 1;
976927
DYLIB_CURRENT_VERSION = 1;
977928
DYLIB_INSTALL_NAME_BASE = "@rpath";
978-
FRAMEWORK_SEARCH_PATHS = (
979-
"$(inherited)",
980-
"$(PROJECT_DIR)/Carthage/Build/tvOS",
981-
);
929+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
982930
INFOPLIST_FILE = "$(SRCROOT)/SupportFiles/tvOS/Info.plist";
983931
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
984932
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -1004,10 +952,7 @@
1004952
DYLIB_COMPATIBILITY_VERSION = 1;
1005953
DYLIB_CURRENT_VERSION = 1;
1006954
DYLIB_INSTALL_NAME_BASE = "@rpath";
1007-
FRAMEWORK_SEARCH_PATHS = (
1008-
"$(inherited)",
1009-
"$(PROJECT_DIR)/Carthage/Build/tvOS",
1010-
);
955+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1011956
INFOPLIST_FILE = "$(SRCROOT)/SupportFiles/tvOS/Info.plist";
1012957
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1013958
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@@ -1028,10 +973,7 @@
1028973
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1029974
CLANG_WARN_SUSPICIOUS_MOVES = YES;
1030975
DEVELOPMENT_TEAM = "";
1031-
FRAMEWORK_SEARCH_PATHS = (
1032-
"$(inherited)",
1033-
"$(PROJECT_DIR)/Carthage/Build/tvOS",
1034-
);
976+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1035977
INFOPLIST_FILE = "$(SRCROOT)/Tests/tvOS/Info.plist";
1036978
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1037979
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Cache-tvOS-Tests";
@@ -1052,10 +994,7 @@
1052994
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1053995
CLANG_WARN_SUSPICIOUS_MOVES = YES;
1054996
DEVELOPMENT_TEAM = "";
1055-
FRAMEWORK_SEARCH_PATHS = (
1056-
"$(inherited)",
1057-
"$(PROJECT_DIR)/Carthage/Build/tvOS",
1058-
);
997+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
1059998
INFOPLIST_FILE = "$(SRCROOT)/Tests/tvOS/Info.plist";
1060999
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10611000
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Cache-tvOS-Tests";
@@ -1070,10 +1009,7 @@
10701009
isa = XCBuildConfiguration;
10711010
buildSettings = {
10721011
CLANG_ENABLE_MODULES = YES;
1073-
FRAMEWORK_SEARCH_PATHS = (
1074-
"$(inherited)",
1075-
"$(PROJECT_DIR)/Carthage/Build/iOS",
1076-
);
1012+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
10771013
INFOPLIST_FILE = "$(SRCROOT)/Tests/iOS/Info.plist";
10781014
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10791015
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Cache-iOS-Tests";
@@ -1087,10 +1023,7 @@
10871023
isa = XCBuildConfiguration;
10881024
buildSettings = {
10891025
CLANG_ENABLE_MODULES = YES;
1090-
FRAMEWORK_SEARCH_PATHS = (
1091-
"$(inherited)",
1092-
"$(PROJECT_DIR)/Carthage/Build/iOS",
1093-
);
1026+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
10941027
INFOPLIST_FILE = "$(SRCROOT)/Tests/iOS/Info.plist";
10951028
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10961029
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Cache-iOS-Tests";
@@ -1108,10 +1041,7 @@
11081041
DYLIB_COMPATIBILITY_VERSION = 1;
11091042
DYLIB_CURRENT_VERSION = 1;
11101043
DYLIB_INSTALL_NAME_BASE = "@rpath";
1111-
FRAMEWORK_SEARCH_PATHS = (
1112-
"$(inherited)",
1113-
"$(PROJECT_DIR)/Carthage/Build/Mac",
1114-
);
1044+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
11151045
FRAMEWORK_VERSION = A;
11161046
INFOPLIST_FILE = "$(SRCROOT)/SupportFiles/Mac/Info.plist";
11171047
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1133,10 +1063,7 @@
11331063
DYLIB_COMPATIBILITY_VERSION = 1;
11341064
DYLIB_CURRENT_VERSION = 1;
11351065
DYLIB_INSTALL_NAME_BASE = "@rpath";
1136-
FRAMEWORK_SEARCH_PATHS = (
1137-
"$(inherited)",
1138-
"$(PROJECT_DIR)/Carthage/Build/Mac",
1139-
);
1066+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
11401067
FRAMEWORK_VERSION = A;
11411068
INFOPLIST_FILE = "$(SRCROOT)/SupportFiles/Mac/Info.plist";
11421069
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1154,10 +1081,7 @@
11541081
buildSettings = {
11551082
CODE_SIGN_IDENTITY = "-";
11561083
COMBINE_HIDPI_IMAGES = YES;
1157-
FRAMEWORK_SEARCH_PATHS = (
1158-
"$(inherited)",
1159-
"$(PROJECT_DIR)/Carthage/Build/Mac",
1160-
);
1084+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
11611085
INFOPLIST_FILE = "$(SRCROOT)/Tests/Mac/Info.plist";
11621086
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
11631087
MACOSX_DEPLOYMENT_TARGET = 10.11;
@@ -1172,10 +1096,7 @@
11721096
buildSettings = {
11731097
CODE_SIGN_IDENTITY = "-";
11741098
COMBINE_HIDPI_IMAGES = YES;
1175-
FRAMEWORK_SEARCH_PATHS = (
1176-
"$(inherited)",
1177-
"$(PROJECT_DIR)/Carthage/Build/Mac",
1178-
);
1099+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
11791100
INFOPLIST_FILE = "$(SRCROOT)/Tests/Mac/Info.plist";
11801101
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
11811102
MACOSX_DEPLOYMENT_TARGET = 10.11;
@@ -1301,10 +1222,7 @@
13011222
DYLIB_COMPATIBILITY_VERSION = 1;
13021223
DYLIB_CURRENT_VERSION = 1;
13031224
DYLIB_INSTALL_NAME_BASE = "@rpath";
1304-
FRAMEWORK_SEARCH_PATHS = (
1305-
"$(inherited)",
1306-
"$(PROJECT_DIR)/Carthage/Build/iOS",
1307-
);
1225+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
13081226
INFOPLIST_FILE = "$(SRCROOT)/SupportFiles/iOS/Info.plist";
13091227
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13101228
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@@ -1323,10 +1241,7 @@
13231241
DYLIB_COMPATIBILITY_VERSION = 1;
13241242
DYLIB_CURRENT_VERSION = 1;
13251243
DYLIB_INSTALL_NAME_BASE = "@rpath";
1326-
FRAMEWORK_SEARCH_PATHS = (
1327-
"$(inherited)",
1328-
"$(PROJECT_DIR)/Carthage/Build/iOS",
1329-
);
1244+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
13301245
INFOPLIST_FILE = "$(SRCROOT)/SupportFiles/iOS/Info.plist";
13311246
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13321247
IPHONEOS_DEPLOYMENT_TARGET = 8.0;

Cartfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

Cartfile.resolved

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)