Skip to content

Commit 269c8b4

Browse files
committed
1.6.3
1 parent 4321688 commit 269c8b4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

JLRoutes.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Pod::Spec.new do |s|
22
s.name = "JLRoutes"
3-
s.version = "1.6.2"
3+
s.version = "1.6.3"
44
s.summary = "URL routing library for iOS with a simple block-based API."
55
s.homepage = "https://github.com/joeldev/JLRoutes"
66

77
s.license = "BSD 3-Clause \"New\" License"
88

99
s.author = { "Joel Levin" => "joel@joeldev.com" }
10-
s.source = { :git => "https://github.com/joeldev/JLRoutes.git", :tag => "1.6.2" }
10+
s.source = { :git => "https://github.com/joeldev/JLRoutes.git", :tag => "1.6.3" }
1111

1212
s.source_files = 'JLRoutes', 'JLRoutes/*.{h,m}'
1313
s.framework = 'Foundation'

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ JLRoutes is available for installation using CocoaPods or Carthage (add `github
3030

3131
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
3232
// ...
33-
[JLRoutes addRoute:@"/user/view/:userID" handler:^BOOL(NSDictionary *parameters) {
33+
[[JLRoutes globalRoutes] addRoute:@"/user/view/:userID" handler:^BOOL(NSDictionary *parameters) {
3434
NSString *userID = parameters[@"userID"]; // defined in the route by specifying ":userID"
3535
// present UI for viewing user with ID 'userID'
3636
return YES; // return YES to say we have handled the route
@@ -82,7 +82,7 @@ It is also important to note that if you pass nil for the handler block, an inte
8282
### More Complex Example ###
8383

8484
```objc
85-
[JLRoutes addRoute:@"/:object/:action/:primaryKey" handler:^BOOL(NSDictionary *parameters) {
85+
[[JLRoutes globalRoutes] addRoute:@"/:object/:action/:primaryKey" handler:^BOOL(NSDictionary *parameters) {
8686
NSString *object = parameters[@"object"];
8787
NSString *action = parameters[@"action"];
8888
NSString *primaryKey = parameters[@"primaryKey"];
@@ -119,7 +119,7 @@ JLRoutes supports setting up routes within the namespace of a given URL scheme.
119119
However, if you decide that you do need to handle multiple schemes with different sets of functionality, here is an example of how to do that:
120120

121121
```objc
122-
[JLRoutes addRoute:@"/foo" handler:^BOOL(NSDictionary *parameters) {
122+
[[JLRoutes globalRoutes] addRoute:@"/foo" handler:^BOOL(NSDictionary *parameters) {
123123
// This block is called if the scheme is not 'thing' or 'stuff' (see below)
124124
return YES;
125125
}];
@@ -140,7 +140,7 @@ This example shows that you can declare the same routes in different schemes and
140140
Continuing with this example, if you were to add the following route to the collection above:
141141
142142
```objc
143-
[JLRoutes addRoute:@"/global" handler:^BOOL(NSDictionary *parameters) {
143+
[[JLRoutes globalRoutes] addRoute:@"/global" handler:^BOOL(NSDictionary *parameters) {
144144
return YES;
145145
}];
146146
```
@@ -161,7 +161,7 @@ JLRoutes supports setting up routes that will match an arbitrary number of path
161161
For example, the following route would be triggered for any URL that started with `/wildcard/`, but would be rejected by the handler if the next component wasn't `joker`.
162162
163163
```objc
164-
[JLRoutes addRoute:@"/wildcard/*" handler:^BOOL(NSDictionary *parameters) {
164+
[[JLRoutes globalRoutes] addRoute:@"/wildcard/*" handler:^BOOL(NSDictionary *parameters) {
165165
NSArray *pathComponents = parameters[kJLRouteWildcardComponentsKey];
166166
if ([pathComponents count] > 0 && [pathComponents[0] isEqualToString:@"joker"]) {
167167
// the route matched; do stuff
@@ -171,7 +171,7 @@ For example, the following route would be triggered for any URL that started wit
171171
// not interested unless the joker's in it
172172
return NO;
173173
}];
174-
```
174+
```
175175

176176

177177
### Optional routes ###
@@ -186,9 +186,9 @@ JLRoutes supports setting up routes with optional parameters. At the route regis
186186
### License ###
187187
BSD 3-Clause License:
188188
> Copyright (c) 2016, Joel Levin. All rights reserved.
189-
189+
190190
> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
191-
191+
192192
>* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
193193
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
194194
* Neither the name of JLRoutes nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

0 commit comments

Comments
 (0)