diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 751c6cf94..e4dc1cb50 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -12,14 +12,28 @@ 1A42C2921C0E3883000F2137 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C2901C0E3883000F2137 /* Main.storyboard */; }; 1A42C2941C0E3883000F2137 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C2931C0E3883000F2137 /* Assets.xcassets */; }; 1A42C2A21C0E3A8D000F2137 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C2A01C0E3A8D000F2137 /* LaunchScreen.storyboard */; }; + 43E4985F3523CE0C9B954A9A /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08CBBA924122CA63A22357A3 /* Pods_Example.framework */; }; 6E3C4A3F1C3C6708009CBC8C /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3C4A3E1C3C6708009CBC8C /* MediaPlayer.framework */; }; 6E5C9B051C4037B7008F6FD9 /* The Silver Chair.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B031C4037B7008F6FD9 /* The Silver Chair.epub */; }; 6E5C9B091C403968008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B081C403942008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub */; }; - F2DF7E310FE62B1F477F22A1 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37A980705BFFE71CCA6F9C31 /* Pods.framework */; }; + AFEE21EECDD3E66362208447 /* Pods_FolioReaderTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D259D296445144554E8136D /* Pods_FolioReaderTests.framework */; }; + CA10C1341C572A4B0049165D /* FolioReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA10C1331C572A4B0049165D /* FolioReaderTests.swift */; }; + CA61603F1C572C4C00ACD034 /* The Adventures Of Sherlock Holmes - Adventure I.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B081C403942008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub */; }; + CA6160401C572C4C00ACD034 /* The Silver Chair.epub in Resources */ = {isa = PBXBuildFile; fileRef = 6E5C9B031C4037B7008F6FD9 /* The Silver Chair.epub */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + CA10C1361C572A4B0049165D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1A42C2811C0E3882000F2137 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1A42C2881C0E3882000F2137; + remoteInfo = Example; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 03D9210FDD7C97E6298F7245 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 08CBBA924122CA63A22357A3 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1A42C2891C0E3882000F2137 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1A42C28C1C0E3882000F2137 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 1A42C28E1C0E3882000F2137 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -27,11 +41,17 @@ 1A42C2931C0E3883000F2137 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 1A42C2981C0E3883000F2137 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1A42C2A11C0E3A8D000F2137 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 37A980705BFFE71CCA6F9C31 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5D259D296445144554E8136D /* Pods_FolioReaderTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FolioReaderTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6E3C4A3E1C3C6708009CBC8C /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 6E5C9B031C4037B7008F6FD9 /* The Silver Chair.epub */ = {isa = PBXFileReference; lastKnownFileType = file; path = "The Silver Chair.epub"; sourceTree = ""; }; 6E5C9B081C403942008F6FD9 /* The Adventures Of Sherlock Holmes - Adventure I.epub */ = {isa = PBXFileReference; lastKnownFileType = file; path = "The Adventures Of Sherlock Holmes - Adventure I.epub"; sourceTree = ""; }; - 8BCB174DF233A59B81E828D3 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + CA10C1311C572A4B0049165D /* FolioReaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FolioReaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + CA10C1331C572A4B0049165D /* FolioReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolioReaderTests.swift; sourceTree = ""; }; + CA10C1351C572A4B0049165D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CF0BE619497BB80F68421DFD /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; + D92D71D4A92CE71CA9A6CF5A /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; + DC3BF5678D61F199F4ECC2BD /* Pods-FolioReaderTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FolioReaderTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests.debug.xcconfig"; sourceTree = ""; }; + E892772F8400DE1863DFA3A6 /* Pods-FolioReaderTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FolioReaderTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -40,7 +60,15 @@ buildActionMask = 2147483647; files = ( 6E3C4A3F1C3C6708009CBC8C /* MediaPlayer.framework in Frameworks */, - F2DF7E310FE62B1F477F22A1 /* Pods.framework in Frameworks */, + 43E4985F3523CE0C9B954A9A /* Pods_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CA10C12E1C572A4B0049165D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AFEE21EECDD3E66362208447 /* Pods_FolioReaderTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -51,6 +79,7 @@ isa = PBXGroup; children = ( 1A42C28B1C0E3882000F2137 /* Example */, + CA10C1321C572A4B0049165D /* FolioReaderTests */, 1A42C28A1C0E3882000F2137 /* Products */, FD06DBD55314F5656C9B1B47 /* Pods */, D394FAB8B11D7C692E7BE00D /* Frameworks */, @@ -61,6 +90,7 @@ isa = PBXGroup; children = ( 1A42C2891C0E3882000F2137 /* Example.app */, + CA10C1311C572A4B0049165D /* FolioReaderTests.xctest */, ); name = Products; sourceTree = ""; @@ -88,11 +118,21 @@ path = "Sample eBooks"; sourceTree = ""; }; + CA10C1321C572A4B0049165D /* FolioReaderTests */ = { + isa = PBXGroup; + children = ( + CA10C1331C572A4B0049165D /* FolioReaderTests.swift */, + CA10C1351C572A4B0049165D /* Info.plist */, + ); + path = FolioReaderTests; + sourceTree = ""; + }; D394FAB8B11D7C692E7BE00D /* Frameworks */ = { isa = PBXGroup; children = ( 6E3C4A3E1C3C6708009CBC8C /* MediaPlayer.framework */, - 37A980705BFFE71CCA6F9C31 /* Pods.framework */, + 08CBBA924122CA63A22357A3 /* Pods_Example.framework */, + 5D259D296445144554E8136D /* Pods_FolioReaderTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -100,8 +140,10 @@ FD06DBD55314F5656C9B1B47 /* Pods */ = { isa = PBXGroup; children = ( - 03D9210FDD7C97E6298F7245 /* Pods.debug.xcconfig */, - 8BCB174DF233A59B81E828D3 /* Pods.release.xcconfig */, + CF0BE619497BB80F68421DFD /* Pods-Example.debug.xcconfig */, + D92D71D4A92CE71CA9A6CF5A /* Pods-Example.release.xcconfig */, + DC3BF5678D61F199F4ECC2BD /* Pods-FolioReaderTests.debug.xcconfig */, + E892772F8400DE1863DFA3A6 /* Pods-FolioReaderTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -129,13 +171,34 @@ productReference = 1A42C2891C0E3882000F2137 /* Example.app */; productType = "com.apple.product-type.application"; }; + CA10C1301C572A4B0049165D /* FolioReaderTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = CA10C1381C572A4B0049165D /* Build configuration list for PBXNativeTarget "FolioReaderTests" */; + buildPhases = ( + E80A76B0C9A40B8EF2E8A419 /* Check Pods Manifest.lock */, + CA10C12D1C572A4B0049165D /* Sources */, + CA10C12E1C572A4B0049165D /* Frameworks */, + CA10C12F1C572A4B0049165D /* Resources */, + 48136CF7CAD29C27140CD2FE /* Embed Pods Frameworks */, + CED5D1AE93CEE0D4CF17D666 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + CA10C1371C572A4B0049165D /* PBXTargetDependency */, + ); + name = FolioReaderTests; + productName = FolioReaderTests; + productReference = CA10C1311C572A4B0049165D /* FolioReaderTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 1A42C2811C0E3882000F2137 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0710; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0710; ORGANIZATIONNAME = FolioReader; TargetAttributes = { @@ -147,6 +210,10 @@ }; }; }; + CA10C1301C572A4B0049165D = { + CreatedOnToolsVersion = 7.3; + TestTargetID = 1A42C2881C0E3882000F2137; + }; }; }; buildConfigurationList = 1A42C2841C0E3882000F2137 /* Build configuration list for PBXProject "Example" */; @@ -163,6 +230,7 @@ projectRoot = ""; targets = ( 1A42C2881C0E3882000F2137 /* Example */, + CA10C1301C572A4B0049165D /* FolioReaderTests */, ); }; /* End PBXProject section */ @@ -180,6 +248,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CA10C12F1C572A4B0049165D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CA6160401C572C4C00ACD034 /* The Silver Chair.epub in Resources */, + CA61603F1C572C4C00ACD034 /* The Adventures Of Sherlock Holmes - Adventure I.epub in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -195,7 +272,22 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 48136CF7CAD29C27140CD2FE /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 6E798FB93F65253E182BC2D3 /* Embed Pods Frameworks */ = { @@ -210,7 +302,22 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + CED5D1AE93CEE0D4CF17D666 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FolioReaderTests/Pods-FolioReaderTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; D73CA4A39E92155A6948FFC6 /* Check Pods Manifest.lock */ = { @@ -228,6 +335,21 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; + E80A76B0C9A40B8EF2E8A419 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -240,8 +362,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CA10C12D1C572A4B0049165D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CA10C1341C572A4B0049165D /* FolioReaderTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + CA10C1371C572A4B0049165D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1A42C2881C0E3882000F2137 /* Example */; + targetProxy = CA10C1361C572A4B0049165D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 1A42C2901C0E3883000F2137 /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -348,7 +486,7 @@ }; 1A42C29C1C0E3883000F2137 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 03D9210FDD7C97E6298F7245 /* Pods.debug.xcconfig */; + baseConfigurationReference = CF0BE619497BB80F68421DFD /* Pods-Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; @@ -360,7 +498,7 @@ }; 1A42C29D1C0E3883000F2137 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8BCB174DF233A59B81E828D3 /* Pods.release.xcconfig */; + baseConfigurationReference = D92D71D4A92CE71CA9A6CF5A /* Pods-Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; @@ -370,6 +508,34 @@ }; name = Release; }; + CA10C1391C572A4B0049165D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DC3BF5678D61F199F4ECC2BD /* Pods-FolioReaderTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = FolioReaderTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.folioreader.FolioReaderTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; + }; + name = Debug; + }; + CA10C13A1C572A4B0049165D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E892772F8400DE1863DFA3A6 /* Pods-FolioReaderTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = FolioReaderTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.folioreader.FolioReaderTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -391,6 +557,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + CA10C1381C572A4B0049165D /* Build configuration list for PBXNativeTarget "FolioReaderTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CA10C1391C572A4B0049165D /* Debug */, + CA10C13A1C572A4B0049165D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 1A42C2811C0E3882000F2137 /* Project object */; diff --git a/Example/FolioReaderTests/FolioReaderTests.swift b/Example/FolioReaderTests/FolioReaderTests.swift new file mode 100644 index 000000000..dec6db055 --- /dev/null +++ b/Example/FolioReaderTests/FolioReaderTests.swift @@ -0,0 +1,30 @@ +// +// FolioReaderTests.swift +// FolioReaderTests +// +// Created by Brandon Kobilansky on 1/25/16. +// Copyright © 2016 FolioReader. All rights reserved. +// + +@testable import FolioReaderKit + +import Quick +import Nimble + +class FolioReaderTests: QuickSpec { + override func spec() { + context("epub parsing") { + var subject: FREpubParser! + + beforeEach { + let path = NSBundle(forClass: self.dynamicType).pathForResource("The Silver Chair", ofType: "epub")! + subject = FREpubParser() + subject.readEpub(epubPath: path) + } + + it("correctly parses a properly formatted document") { + expect(subject.book.tableOfContents.count).to(equal(17)) + } + } + } +} diff --git a/Example/FolioReaderTests/Info.plist b/Example/FolioReaderTests/Info.plist new file mode 100644 index 000000000..ba72822e8 --- /dev/null +++ b/Example/FolioReaderTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Example/Podfile b/Example/Podfile index 377d72cf0..5009e2197 100755 --- a/Example/Podfile +++ b/Example/Podfile @@ -3,4 +3,31 @@ platform :ios, '8.0' use_frameworks! inhibit_all_warnings! -pod 'FolioReaderKit', path: '../' +def shared_pods + pod 'FolioReaderKit', path: '../' +end + +def testing_pods + pod 'Quick' + pod 'Nimble' +end + +target 'Example' do + shared_pods +end + +target 'FolioReaderTests' do + shared_pods + testing_pods +end + +# ensure testability is set https://github.com/CocoaPods/CocoaPods/issues/4505 +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + if config.name == 'Debug' + config.build_settings['ENABLE_TESTABILITY'] = 'YES' + end + end + end +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 41934a5ba..2c8fee0ce 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -9,22 +9,28 @@ PODS: - ZFDragableModalTransition - FontBlaster (2.0.2) - JSQWebViewController (2.0.1) + - Nimble (3.1.0) + - Quick (0.8.0) - SSZipArchive (1.0.1) - UIMenuItem-CXAImageSupport (0.0.1) - ZFDragableModalTransition (0.6) DEPENDENCIES: - FolioReaderKit (from `../`) + - Nimble + - Quick EXTERNAL SOURCES: FolioReaderKit: - :path: "../" + :path: ../ SPEC CHECKSUMS: AEXML: d6bb5b994521fcf3667ee8ccc1ed533f31b19218 FolioReaderKit: 8f67f16fe474a588c3ddc9f45557e6bd9a4dbf34 FontBlaster: 8165fef7f0556ba766836a2f5654a16cd0251e27 JSQWebViewController: 2e416ae6604676510812bbda050d63a1488003a4 + Nimble: 79d40f4d69d47314229bbabacaa02b8838c779b9 + Quick: 563d0f6ec5f72e394645adb377708639b7dd38ab SSZipArchive: 5f30a0af2cb3d48c0ff83b1e18029f7041ac3c38 UIMenuItem-CXAImageSupport: 2945e2af4487414caad801ed8ff6ac8db274e986 ZFDragableModalTransition: 0d294eaaba6edfcb9839595de765f9ca06a4b524