Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #67 from hkellaway/release/1.0.1
Browse files Browse the repository at this point in the history
Release/1.0.1
  • Loading branch information
Harlan Kellaway committed Jun 20, 2015
2 parents 6b9b267 + cce6b6b commit 80a96c9
Show file tree
Hide file tree
Showing 28 changed files with 2,611 additions and 1,717 deletions.
Expand Up @@ -35,10 +35,6 @@ - (void)viewDidLoad

self.searchQuery = [HNKGooglePlacesAutocompleteQuery sharedQuery];
self.shouldBeginEditing = YES;

// TODO: Center to users's location on launch

// TODO: Provide button to recenter to user's location
}

#pragma mark - Protocol Conformance
Expand Down Expand Up @@ -73,8 +69,6 @@ - (MKAnnotationView *)mapView:(MKMapView *)mapViewIn viewForAnnotation:(id<MKAnn

- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views
{
// Whenever we've dropped a pin on the map, immediately select it to present
// its callout bubble.
[self.mapView selectAnnotation:self.selectedPlaceAnnotation animated:YES];
}

Expand Down Expand Up @@ -116,7 +110,6 @@ - (BOOL)searchDisplayController:(UISearchDisplayController *)controller
{
[self handleSearchForSearchString:searchString];

// Return YES to cause the search result table view to be reloaded.
return YES;
}

Expand All @@ -126,7 +119,6 @@ - (BOOL)searchDisplayController:(UISearchDisplayController *)controller
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
if (![searchBar isFirstResponder]) {
// User tapped the 'clear' button.
self.shouldBeginEditing = NO;
[self.searchDisplayController setActive:NO];
[self.mapView removeAnnotation:self.selectedPlaceAnnotation];
Expand Down Expand Up @@ -193,8 +185,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
} else if (placemark) {
[self addPlacemarkAnnotationToMap:placemark addressString:addressString];
[self recenterMapToPlacemark:placemark];
// ref:
// https://github.com/chenyuan/SPGooglePlacesAutocomplete/issues/10
[self.searchDisplayController setActive:NO];
[self.searchDisplayController.searchResultsTableView
deselectRowAtIndexPath:indexPath
Expand Down
Expand Up @@ -17,36 +17,24 @@

describe(@"Method: initialize",
^{
__block id mockServer;

beforeEach(^{

mockServer = [HNKServer nullMock];

[HNKServer stub:@selector(alloc) andReturn:mockServer];

});

it(@"Should setup HNKServer",
^{
[[HNKServer should] receive:@selector(setupWithBaseUrl:)
withArguments:@"https://maps.googleapis.com/maps/api/place/"];
[[mockServer should] receive:@selector(initWithBaseURL:) withArguments:@"https://maps.googleapis.com/maps/api/place/"];

[HNKGooglePlacesServer initialize];
});
});

describe(@"Method: GET:parameters:completion:",
^{
it(@"Should call HNKServer GET",
^{
[[HNKServer should] receive:@selector(GET:parameters:completion:)
withArguments:@"autocomplete/json",
@{ @"input" : @"Vict",
@"key" : @"apikey" },
any()];

[HNKGooglePlacesServer GET:@"autocomplete/json"
parameters:@{
@"input" : @"Vict",
@"key" : @"apikey"
}
completion:nil];

});
});

});

SPEC_END
2 changes: 1 addition & 1 deletion Example/Podfile
Expand Up @@ -3,7 +3,7 @@ platform :ios, '7.0'

target 'HNKGooglePlacesAutocomplete-Example' do

pod "HNKGooglePlacesAutocomplete", "~> 1.0"
pod 'HNKGooglePlacesAutocomplete', :git => 'https://github.com/hkellaway/HNKGooglePlacesAutocomplete.git', :branch => 'release/1.0.1'

end

Expand Down
35 changes: 23 additions & 12 deletions Example/Podfile.lock
Expand Up @@ -20,32 +20,43 @@ PODS:
- AFNetworking/UIKit (2.5.4):
- AFNetworking/NSURLConnection
- AFNetworking/NSURLSession
- HNKGooglePlacesAutocomplete (1.0.0):
- HNKGooglePlacesAutocomplete/Models (= 1.0.0)
- HNKServerFacade (~> 0.2)
- HNKGooglePlacesAutocomplete (1.0.1):
- HNKGooglePlacesAutocomplete/Models (= 1.0.1)
- HNKServerFacade (~> 0.3)
- Mantle (~> 1.5)
- HNKGooglePlacesAutocomplete/Models (1.0.0):
- HNKGooglePlacesAutocomplete/Models/Networking (= 1.0.0)
- HNKServerFacade (~> 0.2)
- HNKGooglePlacesAutocomplete/Models (1.0.1):
- HNKGooglePlacesAutocomplete/Models/Networking (= 1.0.1)
- HNKServerFacade (~> 0.3)
- Mantle (~> 1.5)
- HNKGooglePlacesAutocomplete/Models/Networking (1.0.0):
- HNKServerFacade (~> 0.2)
- HNKGooglePlacesAutocomplete/Models/Networking (1.0.1):
- HNKServerFacade (~> 0.3)
- Mantle (~> 1.5)
- HNKServerFacade (0.2.1):
- HNKServerFacade (0.3.0):
- AFNetworking (~> 2.5)
- Kiwi (2.3.1)
- Mantle (1.5.4):
- Mantle/extobjc (= 1.5.4)
- Mantle/extobjc (1.5.4)

DEPENDENCIES:
- HNKGooglePlacesAutocomplete (~> 1.0)
- HNKGooglePlacesAutocomplete (from `https://github.com/hkellaway/HNKGooglePlacesAutocomplete.git`,
branch `release/1.0.1`)
- Kiwi (~> 2.3)

EXTERNAL SOURCES:
HNKGooglePlacesAutocomplete:
:branch: release/1.0.1
:git: https://github.com/hkellaway/HNKGooglePlacesAutocomplete.git

CHECKOUT OPTIONS:
HNKGooglePlacesAutocomplete:
:commit: 1bf69dd762e93c5f63c23beebc72df0dce709e0a
:git: https://github.com/hkellaway/HNKGooglePlacesAutocomplete.git

SPEC CHECKSUMS:
AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
HNKGooglePlacesAutocomplete: 68a110a52782ab1cf32ffba0ac25acb6fa3ae8d8
HNKServerFacade: 54102383a22b3aa61171574ad0b50ff24fd504cd
HNKGooglePlacesAutocomplete: a6a60139a4831fc147a739ead3bb158b11e2439d
HNKServerFacade: 0fa3839353480b8862563a34903ad1406a38b4c9
Kiwi: f038a6c61f7a9e4d7766bff5717aa3b3fdb75f55
Mantle: 60acd0cd363e27d945bda0a6b8e90577112d28f3

Expand Down

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.

0 comments on commit 80a96c9

Please sign in to comment.