Skip to content

Commit

Permalink
Merge pull request #143 from andydrizen/remove-private-api
Browse files Browse the repository at this point in the history
Remove non-public API usage
  • Loading branch information
Andrew K. Boyd committed Jul 26, 2016
2 parents e325d9b + e420f2b commit d20e91a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Nocilla.podspec
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = "Nocilla"
s.version = "0.10.0"
s.version = "0.11.0"
s.summary = "Stunning HTTP stubbing for iOS. Testing HTTP requests has never been easier."
s.homepage = "https://github.com/luisobo/Nocilla"

s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Luis Solano" => "contact@luissolano.com" }

s.source = { :git => "https://github.com/luisobo/Nocilla.git", :tag => "0.10.0" }
s.source = { :git => "https://github.com/luisobo/Nocilla.git", :tag => "0.11.0" }

s.ios.deployment_target = '4.0'
s.ios.deployment_target = '5.0'
s.osx.deployment_target = '10.7'
s.tvos.deployment_target = '9.0'

Expand Down
10 changes: 3 additions & 7 deletions Nocilla/Hooks/NSURLRequest/LSHTTPStubURLProtocol.m
Expand Up @@ -4,10 +4,6 @@
#import "LSStubRequest.h"
#import "NSURLRequest+DSL.h"

@interface NSHTTPURLResponse(UndocumentedInitializer)
- (id)initWithURL:(NSURL*)URL statusCode:(NSInteger)statusCode headerFields:(NSDictionary*)headerFields requestTime:(double)requestTime;
@end

@implementation LSHTTPStubURLProtocol

+ (BOOL)canInitWithRequest:(NSURLRequest *)request {
Expand Down Expand Up @@ -35,9 +31,9 @@ - (void)startLoading {
[client URLProtocol:self didFailWithError:stubbedResponse.error];
} else {
NSHTTPURLResponse* urlResponse = [[NSHTTPURLResponse alloc] initWithURL:request.URL
statusCode:stubbedResponse.statusCode
headerFields:stubbedResponse.headers
requestTime:0];
statusCode:stubbedResponse.statusCode
HTTPVersion:nil
headerFields:stubbedResponse.headers];

if (stubbedResponse.statusCode < 300 || stubbedResponse.statusCode > 399
|| stubbedResponse.statusCode == 304 || stubbedResponse.statusCode == 305 ) {
Expand Down

0 comments on commit d20e91a

Please sign in to comment.