forked from kylef/Mockingjay
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make project be build with files built with Carthage
- Loading branch information
1 parent
9a795ad
commit 84a7e1c
Showing
27 changed files
with
2,393 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github "kylef/URITemplate.swift" ~> 2.0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github "apple/swift-corelibs-xctest" "swift-DEVELOPMENT-SNAPSHOT-2018-03-17-a" | ||
github "kylef/URITemplate.swift" "2.0.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.build/ | ||
Packages/ | ||
*.xcodeproj/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "Tests/URITemplateTests/Cases"] | ||
path = Tests/URITemplateTests/Cases | ||
url = https://github.com/uri-templates/uritemplate-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode8.3 | ||
- os: osx | ||
osx_image: xcode9 | ||
language: generic | ||
sudo: required | ||
dist: trusty | ||
install: | ||
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" | ||
script: | ||
- swift test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Changelog for URITemplate | ||
|
||
## 2.0.3 | ||
|
||
### Bug Fixes | ||
|
||
- Prevents using deprecated APIs when building on Swift 4. | ||
|
||
## 2.0.2 | ||
|
||
### Enhancements | ||
|
||
- Adds support for Swift 4.0. | ||
|
||
## 2.0.1 | ||
|
||
Internal refactoring to prevent use of deprecated system APIs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Kyle Fuller | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "PathKit", | ||
"repositoryURL": "https://github.com/kylef/PathKit", | ||
"state": { | ||
"branch": null, | ||
"revision": "4e02bcd2951fb4b7f60dbcaf6f3f47957bcfe0be", | ||
"version": "0.7.1" | ||
} | ||
}, | ||
{ | ||
"package": "Spectre", | ||
"repositoryURL": "https://github.com/kylef/Spectre", | ||
"state": { | ||
"branch": null, | ||
"revision": "e46b75cf03ad5e563b4b0a5068d3d6f04d77d80b", | ||
"version": "0.7.2" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "URITemplate", | ||
dependencies: [ | ||
.Package(url: "https://github.com/kylef/Spectre", majorVersion: 0, minor: 7), | ||
.Package(url: "https://github.com/kylef/PathKit", majorVersion: 0, minor: 7), | ||
], | ||
swiftLanguageVersions: [3, 4] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
URITemplate | ||
=========== | ||
|
||
Swift implementation of URI Template ([RFC6570](https://tools.ietf.org/html/rfc6570)). | ||
|
||
## Installation | ||
|
||
[CocoaPods](http://cocoapods.org/) is the recommended installation method. | ||
|
||
```ruby | ||
pod 'URITemplate' | ||
``` | ||
|
||
## Example | ||
|
||
### Expanding a URI Template | ||
|
||
```swift | ||
let template = URITemplate(template: "https://api.github.com/repos/{owner}/{repo}/") | ||
let url = template.expand(["owner": "kylef", "repo": "URITemplate.swift"]) | ||
=> "https://api.github.com/repos/kylef/URITemplate.swift/" | ||
``` | ||
|
||
### Determine which variables are in a template | ||
|
||
```swift | ||
let variables = template.variables | ||
=> ["owner", "repo"] | ||
``` | ||
|
||
### Extract the variables used in a given URL | ||
|
||
```swift | ||
let variables = template.extract("https://api.github.com/repos/kylef/PathKit/") | ||
=> ["owner":"kylef", "repo":"PathKit"] | ||
``` | ||
|
||
## [RFC6570](https://tools.ietf.org/html/rfc6570) | ||
|
||
The URITemplate library follows the [test suite](https://github.com/uri-templates/uritemplate-test). | ||
|
||
We have full support for level 4 of RFC6570 when expanding a template and retrieving the variables in a template. | ||
|
||
For extraction of variables from an already expanded template, level 3 is supported. | ||
|
||
## License | ||
|
||
URITemplate is licensed under the MIT license. See [LICENSE](LICENSE) for more | ||
info. |
Oops, something went wrong.