Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CocoPods instead of git-submodules for linking with AFNetworking in Unit Tests #90

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ profile
*.moved-aside
.DS_Store
*.xccheckout
# CocoaPods
Podfile.local
*.xcworkspace
!default.xcworkspace
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: objective-c

before_install:
- gem install cocoapods -v 0.36.0 --no-rdoc --no-ri --no-document --quiet
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet

env:
Expand All @@ -10,4 +11,5 @@ env:
- RAKETASK="osx[Mac Framework,x86_64,test]"

script:
- pod install
- rake "$RAKETASK"
6 changes: 3 additions & 3 deletions OHHTTPStubs.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "OHHTTPStubs"
s.version = "3.1.10"
s.version = "4.0.0"

s.summary = "Stubbing framework for network requests."
s.description = <<-DESC.gsub(/^ +\|/,'')
Expand Down Expand Up @@ -36,8 +36,8 @@ Pod::Spec.new do |s|
s.frameworks = 'Foundation', 'CFNetwork'

s.requires_arc = true
s.ios.deployment_target = '5.0'
s.osx.deployment_target = '10.7'
s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.8'
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => 'XCODE_VERSION=$(XCODE_VERSION_MAJOR)' }

end
164 changes: 97 additions & 67 deletions OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion OHHTTPStubs/UnitTests/AFNetworking
Submodule AFNetworking deleted from 8ccc3f
22 changes: 0 additions & 22 deletions OHHTTPStubsDemo.xcworkspace/contents.xcworkspacedata

This file was deleted.

This file was deleted.

69 changes: 65 additions & 4 deletions OHHTTPStubsDemo/OHHTTPStubsDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
097935A2161B654E006DB5D5 /* libOHHTTPStubs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 097935A1161B654E006DB5D5 /* libOHHTTPStubs.a */; };
0984831517805426002A99FF /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0984831417805426002A99FF /* CFNetwork.framework */; };
098FBDD415D704E800623941 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 098FBDD315D704E800623941 /* UIKit.framework */; };
098FBDD615D704E800623941 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 098FBDD515D704E800623941 /* Foundation.framework */; };
Expand All @@ -18,6 +17,7 @@
098FBDF815D70E2600623941 /* stub.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 098FBDF615D70E2600623941 /* stub.jpg */; };
098FBDF915D70E2600623941 /* stub.txt in Resources */ = {isa = PBXBuildFile; fileRef = 098FBDF715D70E2600623941 /* stub.txt */; };
099C7343169016D800239880 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 099C7342169016D800239880 /* Default-568h@2x.png */; };
76C30541E2A1B24B6848F032 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B8BA1C0EA8F8EC24B9024E1 /* libPods.a */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -36,18 +36,22 @@
098FBDF615D70E2600623941 /* stub.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = stub.jpg; sourceTree = "<group>"; };
098FBDF715D70E2600623941 /* stub.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stub.txt; sourceTree = "<group>"; };
099C7342169016D800239880 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
0EE81E095FF3A8AF6D3C4E77 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
1B8BA1C0EA8F8EC24B9024E1 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
48556A011AA6E9FD0074B154 /* libPods-OHHTTPStubs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-OHHTTPStubs.a"; path = "Pods/../build/Debug-iphoneos/libPods-OHHTTPStubs.a"; sourceTree = "<group>"; };
B5AD292FAB98FC9C7637896A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
098FBDCC15D704E800623941 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
097935A2161B654E006DB5D5 /* libOHHTTPStubs.a in Frameworks */,
0984831517805426002A99FF /* CFNetwork.framework in Frameworks */,
098FBDD415D704E800623941 /* UIKit.framework in Frameworks */,
098FBDD615D704E800623941 /* Foundation.framework in Frameworks */,
098FBDD815D704E800623941 /* CoreGraphics.framework in Frameworks */,
76C30541E2A1B24B6848F032 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -61,6 +65,7 @@
098FBDD915D704E800623941 /* OHHTTPStubsDemo */,
098FBDD215D704E800623941 /* Frameworks */,
098FBDD015D704E800623941 /* Products */,
DBC538A23E8B9FD8D58D30B1 /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -75,10 +80,12 @@
098FBDD215D704E800623941 /* Frameworks */ = {
isa = PBXGroup;
children = (
48556A011AA6E9FD0074B154 /* libPods-OHHTTPStubs.a */,
0984831417805426002A99FF /* CFNetwork.framework */,
098FBDD315D704E800623941 /* UIKit.framework */,
098FBDD515D704E800623941 /* Foundation.framework */,
098FBDD715D704E800623941 /* CoreGraphics.framework */,
1B8BA1C0EA8F8EC24B9024E1 /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -115,16 +122,27 @@
name = Stubs;
sourceTree = "<group>";
};
DBC538A23E8B9FD8D58D30B1 /* Pods */ = {
isa = PBXGroup;
children = (
B5AD292FAB98FC9C7637896A /* Pods.debug.xcconfig */,
0EE81E095FF3A8AF6D3C4E77 /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
098FBDCE15D704E800623941 /* OHHTTPStubsDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 098FBDE715D704E800623941 /* Build configuration list for PBXNativeTarget "OHHTTPStubsDemo" */;
buildPhases = (
5BF07CD1F1DEB3893534CA6D /* Check Pods Manifest.lock */,
098FBDCB15D704E800623941 /* Sources */,
098FBDCC15D704E800623941 /* Frameworks */,
098FBDCD15D704E800623941 /* Resources */,
D61C918AA467A72C9C508B4E /* Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -175,6 +193,39 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
5BF07CD1F1DEB3893534CA6D /* 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;
};
D61C918AA467A72C9C508B4E /* 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/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
098FBDCB15D704E800623941 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -278,25 +329,35 @@
};
098FBDE815D704E800623941 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B5AD292FAB98FC9C7637896A /* Pods.debug.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OHHTTPStubsDemo-Prefix.pch";
INFOPLIST_FILE = "OHHTTPStubsDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this change have other consequences, like raising the minimum iOS version for Carthage users (as Carthage use the settings in the Xcode project building the lib) — even if that's not big a deal as Carthage requires dynamic frameworks so every project using Carthage is probably iOS8+, but just wondering if it may have other side effects.

Note that I won't mind raising the minimum requirement to 6.0 (everything under 5.0 is quite dead anyway those days), but in that case be sure not to forget to bump the pod version up to the next major version to be semver-compliant.

LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/build/Debug-iphoneos",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
098FBDE915D704E800623941 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 0EE81E095FF3A8AF6D3C4E77 /* Pods.release.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OHHTTPStubsDemo-Prefix.pch";
INFOPLIST_FILE = "OHHTTPStubsDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/build/Debug-iphoneos",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down
5 changes: 5 additions & 0 deletions OHHTTPStubsDemo/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'OHHTTPStubsDemo.xcodeproj'
platform :ios, '6.0'

pod 'OHHTTPStubs', :path => '../'
16 changes: 16 additions & 0 deletions OHHTTPStubsDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PODS:
- OHHTTPStubs (3.1.10):
- OHHTTPStubs/Core (= 3.1.10)
- OHHTTPStubs/Core (3.1.10)

DEPENDENCIES:
- OHHTTPStubs (from `../`)

EXTERNAL SOURCES:
OHHTTPStubs:
:path: ../

SPEC CHECKSUMS:
OHHTTPStubs: 00152a63400246fcbc4b772a2a547ea34c97cbd6

COCOAPODS: 0.36.0

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions OHHTTPStubsDemo/Pods/Local Podspecs/OHHTTPStubs.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions OHHTTPStubsDemo/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading