Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 8126641

Browse files
committed
consolidated use of localhost
1 parent 2073fa5 commit 8126641

File tree

6 files changed

+28
-25
lines changed

6 files changed

+28
-25
lines changed

Diff for: Code/Testing/RKTestFactory.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ - (instancetype)init
7474
{
7575
self = [super init];
7676
if (self) {
77-
self.baseURL = [NSURL URLWithString:@"http://127.0.0.1:4567"];
77+
self.baseURL = [NSURL URLWithString:@"http://localhost:4567"];
7878
self.factoryBlocks = [NSMutableDictionary new];
7979
self.sharedObjectsByFactoryName = [NSMutableDictionary new];
8080
[self defineDefaultFactories];

Diff for: Gemfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ source "https://rubygems.org"
22

33
gem 'bundler'
44
gem 'rakeup', '~> 1.2.0'
5-
gem 'sinatra', '~> 1.4.0'
6-
gem 'sinatra-contrib', '~> 1.4.0'
7-
gem 'thin', '~> 1.5.0'
5+
gem 'sinatra', '~> 1.4.8'
6+
gem 'sinatra-contrib', '~> 1.4.7'
7+
gem 'thin', '~> 1.7.1'
88
gem 'cocoapods', '1.2.1'
9-
gem 'xctasks', '~> 0.5.0'
10-
gem 'xcpretty', '~> 0.1.6'
9+
gem 'xctasks', '~> 0.6.0'
10+
gem 'xcpretty', '~> 0.2.8'

Diff for: Gemfile.lock

+14-11
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ GEM
6868
rakeup (1.2.0)
6969
rack (~> 1.5.0)
7070
rake (~> 10.3.0)
71+
rouge (2.0.7)
7172
ruby-macho (1.1.0)
7273
sinatra (1.4.8)
7374
rack (~> 1.5)
@@ -80,10 +81,10 @@ GEM
8081
rack-test
8182
sinatra (~> 1.4.0)
8283
tilt (>= 1.3, < 3)
83-
thin (1.5.1)
84-
daemons (>= 1.0.9)
85-
eventmachine (>= 0.12.6)
86-
rack (>= 1.0.0)
84+
thin (1.7.1)
85+
daemons (~> 1.0, >= 1.0.9)
86+
eventmachine (~> 1.0, >= 1.0.4)
87+
rack (>= 1, < 3)
8788
thread_safe (0.3.6)
8889
tilt (2.0.7)
8990
tzinfo (1.2.3)
@@ -93,22 +94,24 @@ GEM
9394
claide (>= 1.0.2, < 2.0)
9495
colored2 (~> 3.1)
9596
nanaimo (~> 0.2.3)
96-
xcpretty (0.1.12)
97-
xctasks (0.5.0)
97+
xcpretty (0.2.8)
98+
rouge (~> 2.0.7)
99+
xctasks (0.6.0)
98100
nokogiri (~> 1.6, >= 1.6.3.1)
99101
rake (~> 10.0, >= 10.0.0)
100102

101103
PLATFORMS
102104
ruby
103105

104106
DEPENDENCIES
107+
bundler
105108
cocoapods (= 1.2.1)
106109
rakeup (~> 1.2.0)
107-
sinatra (~> 1.4.0)
108-
sinatra-contrib (~> 1.4.0)
109-
thin (~> 1.5.0)
110-
xcpretty (~> 0.1.6)
111-
xctasks (~> 0.5.0)
110+
sinatra (~> 1.4.8)
111+
sinatra-contrib (~> 1.4.7)
112+
thin (~> 1.7.1)
113+
xcpretty (~> 0.2.8)
114+
xctasks (~> 0.6.0)
112115

113116
BUNDLED WITH
114117
1.15.1

Diff for: Tests/Fixtures/JSON/ComplexNestedUser.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"request": {
88
"http_host": "api2safer.localhost",
99
"http_user_agent": "ST\/2.0 CFNetwork\/485.13.9 Darwin\/10.7.0",
10-
"server_addr": "127.0.0.1",
11-
"remote_addr": "127.0.0.1",
10+
"server_addr": "localhost",
11+
"remote_addr": "localhost",
1212
"server_protocol": "HTTP\/1.1",
1313
"request_method": "GET",
1414
"request_uri": "\/users\/login.json",

Diff for: Tests/Logic/Network/RKObjectRequestOperationTest.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -494,9 +494,9 @@ - (void)testErrorReportingForPathPatternMismatch
494494
expect([requestOperation isFinished]).will.beTruthy();
495495
expect(requestOperation.error).notTo.beNil();
496496
NSString *failureReason = [[requestOperation.error userInfo] valueForKey:NSLocalizedFailureReasonErrorKey];
497-
assertThat(failureReason, containsString(@"A 200 response was loaded from the URL 'http://127.0.0.1:4567/users/empty', which failed to match all (2) response descriptors:"));
498-
assertThat(failureReason, containsString(@"failed to match: response URL 'http://127.0.0.1:4567/users/empty' is not relative to the baseURL 'http://restkit.org/api/v1'."));
499-
assertThat(failureReason, containsString(@"failed to match: response URL 'http://127.0.0.1:4567/users/empty' is not relative to the baseURL 'http://restkit.org/api/v1'."));
497+
assertThat(failureReason, containsString(@"A 200 response was loaded from the URL 'http://localhost:4567/users/empty', which failed to match all (2) response descriptors:"));
498+
assertThat(failureReason, containsString(@"failed to match: response URL 'http://localhost:4567/users/empty' is not relative to the baseURL 'http://restkit.org/api/v1'."));
499+
assertThat(failureReason, containsString(@"failed to match: response URL 'http://localhost:4567/users/empty' is not relative to the baseURL 'http://restkit.org/api/v1'."));
500500
}
501501

502502
// Test trailing slash on the baseURL

Diff for: Tests/Logic/ObjectMapping/RKObjectManagerTest.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ - (void)testThatObjectParametersAreNotSentDuringGetObject
478478
temporaryHuman.name = @"My Name";
479479
temporaryHuman.railsID = @204;
480480
RKManagedObjectRequestOperation *operation = [_objectManager appropriateObjectRequestOperationWithObject:temporaryHuman method:RKRequestMethodGET path:nil parameters:@{@"this": @"that"}];
481-
expect([operation.HTTPRequestOperation.request.URL absoluteString]).to.equal(@"http://127.0.0.1:4567/humans/204?this=that");
481+
expect([operation.HTTPRequestOperation.request.URL absoluteString]).to.equal(@"http://localhost:4567/humans/204?this=that");
482482
}
483483

484484
- (void)testThatObjectParametersAreNotSentDuringDeleteObject
@@ -487,14 +487,14 @@ - (void)testThatObjectParametersAreNotSentDuringDeleteObject
487487
temporaryHuman.name = @"My Name";
488488
temporaryHuman.railsID = @204;
489489
RKManagedObjectRequestOperation *operation = [_objectManager appropriateObjectRequestOperationWithObject:temporaryHuman method:RKRequestMethodDELETE path:nil parameters:@{@"this": @"that"}];
490-
expect([operation.HTTPRequestOperation.request.URL absoluteString]).to.equal(@"http://127.0.0.1:4567/humans/204?this=that");
490+
expect([operation.HTTPRequestOperation.request.URL absoluteString]).to.equal(@"http://localhost:4567/humans/204?this=that");
491491
}
492492

493493
- (void)testInitializationOfObjectRequestOperationProducesCorrectURLRequest
494494
{
495495
RKHuman *temporaryHuman = [RKTestFactory insertManagedObjectForEntityForName:@"Human" inManagedObjectContext:nil withProperties:nil];
496496
NSURLRequest *request = [_objectManager requestWithObject:temporaryHuman method:RKRequestMethodPATCH path:@"/the/path" parameters:@{@"key": @"value"}];
497-
expect([request.URL absoluteString]).to.equal(@"http://127.0.0.1:4567/the/path");
497+
expect([request.URL absoluteString]).to.equal(@"http://localhost:4567/the/path");
498498
expect(request.HTTPMethod).to.equal(@"PATCH");
499499
expect(request.HTTPBody).notTo.beNil();
500500
NSString *string = [[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding];

0 commit comments

Comments
 (0)