├── .gitignore ├── .swift-version ├── .travis.yml ├── Cartfile ├── Cartfile.resolved ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Makefile ├── README.md ├── TrashCanKit.podspec ├── TrashCanKit.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── TrashCanKit Mac.xcscheme │ ├── TrashCanKit tvOS.xcscheme │ ├── TrashCanKit watchOS.xcscheme │ └── TrashCanKit.xcscheme ├── TrashCanKit ├── Dictionary+Additions.swift ├── Info.plist ├── NSURL+URLParameters.swift ├── OAuthConfiguration.swift ├── OAuthRouter.swift ├── Repositories.swift ├── String+QueryParameters.swift ├── Token.swift ├── TokenConfiguration.swift ├── TrashCanKit.h ├── TrashCanKit.swift └── User.swift ├── TrashCanKitTests ├── ConfigurationTests.swift ├── Fixtures │ ├── Email.json │ ├── Emails.json │ ├── Repositories.json │ ├── Repository.json │ └── User.json ├── Info.plist ├── Me.json ├── RepositoriesTests.swift ├── TestHelper.swift ├── TokenTests.swift ├── TrashCanKitTestURLSession.swift ├── UserTests.swift ├── authorize.json └── refresh_token_error.json └── fastlane ├── .env ├── .env.default ├── .env.deploy ├── .env.ios93 ├── .env.osx ├── .env.tvos92 └── Fastfile /.gitignore: -------------------------------------------------------------------------------- 1 | *.pbxuser 2 | *.mode1v3 3 | *.perspectivev3 4 | .DS_Store 5 | .LSOverride 6 | .idea/ 7 | xcuserdata/ 8 | *.xccheckout 9 | *.xcscmblueprint 10 | *.gcno 11 | Pods/ 12 | report/ 13 | Carthage/ 14 | Build/ 15 | Licenses.plist 16 | fastlane/README.md 17 | fastlane/test-output 18 | fastlane/report.xml 19 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode8.3 3 | sudo: false 4 | env: 5 | global: 6 | - LC_CTYPE=en_US.UTF-8 7 | - LANG=en_US.UTF-8 8 | - FASTLANE_LANE=ci_commit 9 | matrix: 10 | include: 11 | - osx_image: xcode8.3 12 | env: FASTLANE_LANE=code_coverage FASTLANE_ENV=default 13 | - osx_image: xcode8.3 14 | env: FASTLANE_ENV=ios93 15 | - osx_image: xcode8.3 16 | env: FASTLANE_ENV=tvos92 17 | - osx_image: xcode8.3 18 | env: FASTLANE_ENV=osx 19 | before_install: 20 | - make install 21 | script: 22 | - export FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 23 | - set -o pipefail 24 | - bundle exec fastlane $FASTLANE_LANE configuration:Debug --env $FASTLANE_ENV 25 | - bundle exec fastlane $FASTLANE_LANE configuration:Release --env $FASTLANE_ENV 26 | after_success: 27 | - if [ "$FASTLANE_LANE" == "code_coverage" ]; then 28 | make post_coverage; 29 | fi 30 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "nerdishbynature/RequestKit" ~>2.0 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "nerdishbynature/RequestKit" "2.0.2" 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "slather", "~> 2.0" 4 | gem "fastlane" 5 | gem "cocoapods" 6 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (2.3.5) 5 | activesupport (4.2.8) 6 | i18n (~> 0.7) 7 | minitest (~> 5.1) 8 | thread_safe (~> 0.3, >= 0.3.4) 9 | tzinfo (~> 1.1) 10 | addressable (2.5.1) 11 | public_suffix (~> 2.0, >= 2.0.2) 12 | babosa (1.0.2) 13 | claide (1.0.1) 14 | clamp (0.6.5) 15 | cocoapods (1.1.1) 16 | activesupport (>= 4.0.2, < 5) 17 | claide (>= 1.0.1, < 2.0) 18 | cocoapods-core (= 1.1.1) 19 | cocoapods-deintegrate (>= 1.0.1, < 2.0) 20 | cocoapods-downloader (>= 1.1.2, < 2.0) 21 | cocoapods-plugins (>= 1.0.0, < 2.0) 22 | cocoapods-search (>= 1.0.0, < 2.0) 23 | cocoapods-stats (>= 1.0.0, < 2.0) 24 | cocoapods-trunk (>= 1.1.1, < 2.0) 25 | cocoapods-try (>= 1.1.0, < 2.0) 26 | colored (~> 1.2) 27 | escape (~> 0.0.4) 28 | fourflusher (~> 2.0.1) 29 | gh_inspector (~> 1.0) 30 | molinillo (~> 0.5.1) 31 | nap (~> 1.0) 32 | xcodeproj (>= 1.3.3, < 2.0) 33 | cocoapods-core (1.1.1) 34 | activesupport (>= 4.0.2, < 5) 35 | fuzzy_match (~> 2.0.4) 36 | nap (~> 1.0) 37 | cocoapods-deintegrate (1.0.1) 38 | cocoapods-downloader (1.1.3) 39 | cocoapods-plugins (1.0.0) 40 | nap 41 | cocoapods-search (1.0.0) 42 | cocoapods-stats (1.0.0) 43 | cocoapods-trunk (1.1.2) 44 | nap (>= 0.8, < 2.0) 45 | netrc (= 0.7.8) 46 | cocoapods-try (1.1.0) 47 | colored (1.2) 48 | commander-fastlane (4.4.4) 49 | highline (~> 1.7.2) 50 | domain_name (0.5.20170223) 51 | unf (>= 0.0.5, < 1.0.0) 52 | dotenv (2.2.0) 53 | escape (0.0.4) 54 | excon (0.55.0) 55 | faraday (0.11.0) 56 | multipart-post (>= 1.2, < 3) 57 | faraday-cookie_jar (0.0.6) 58 | faraday (>= 0.7.4) 59 | http-cookie (~> 1.0.0) 60 | faraday_middleware (0.11.0.1) 61 | faraday (>= 0.7.4, < 1.0) 62 | fastimage (2.1.0) 63 | fastlane (2.24.0) 64 | activesupport (< 5) 65 | addressable (>= 2.3, < 3.0.0) 66 | babosa (>= 1.0.2, < 2.0.0) 67 | bundler (>= 1.12.0, < 2.0.0) 68 | colored 69 | commander-fastlane (>= 4.4.0, < 5.0.0) 70 | dotenv (>= 2.1.1, < 3.0.0) 71 | excon (>= 0.45.0, < 1.0.0) 72 | faraday (~> 0.9) 73 | faraday-cookie_jar (~> 0.0.6) 74 | faraday_middleware (~> 0.9) 75 | fastimage (>= 1.6) 76 | gh_inspector (>= 1.0.1, < 2.0.0) 77 | google-api-client (~> 0.9.2) 78 | highline (>= 1.7.2, < 2.0.0) 79 | json (< 3.0.0) 80 | mini_magick (~> 4.5.1) 81 | multi_json 82 | multi_xml (~> 0.5) 83 | multipart-post (~> 2.0.0) 84 | plist (>= 3.1.0, < 4.0.0) 85 | rubyzip (>= 1.1.0, < 2.0.0) 86 | security (= 0.1.3) 87 | slack-notifier (>= 1.3, < 2.0.0) 88 | terminal-notifier (>= 1.6.2, < 2.0.0) 89 | terminal-table (>= 1.4.5, < 2.0.0) 90 | tty-screen (~> 0.5.0) 91 | word_wrap (~> 1.0.0) 92 | xcodeproj (>= 0.20, < 2.0.0) 93 | xcpretty (>= 0.2.4, < 1.0.0) 94 | xcpretty-travis-formatter (>= 0.0.3) 95 | fourflusher (2.0.1) 96 | fuzzy_match (2.0.4) 97 | gh_inspector (1.0.3) 98 | google-api-client (0.9.28) 99 | addressable (~> 2.3) 100 | googleauth (~> 0.5) 101 | httpclient (~> 2.7) 102 | hurley (~> 0.1) 103 | memoist (~> 0.11) 104 | mime-types (>= 1.6) 105 | representable (~> 2.3.0) 106 | retriable (~> 2.0) 107 | googleauth (0.5.1) 108 | faraday (~> 0.9) 109 | jwt (~> 1.4) 110 | logging (~> 2.0) 111 | memoist (~> 0.12) 112 | multi_json (~> 1.11) 113 | os (~> 0.9) 114 | signet (~> 0.7) 115 | highline (1.7.8) 116 | http-cookie (1.0.3) 117 | domain_name (~> 0.5) 118 | httpclient (2.8.3) 119 | hurley (0.2) 120 | i18n (0.8.1) 121 | json (2.0.3) 122 | jwt (1.5.6) 123 | little-plugger (1.1.4) 124 | logging (2.2.0) 125 | little-plugger (~> 1.1) 126 | multi_json (~> 1.10) 127 | memoist (0.15.0) 128 | mime-types (3.1) 129 | mime-types-data (~> 3.2015) 130 | mime-types-data (3.2016.0521) 131 | mini_magick (4.5.1) 132 | mini_portile2 (2.1.0) 133 | minitest (5.10.1) 134 | molinillo (0.5.5) 135 | multi_json (1.12.1) 136 | multi_xml (0.6.0) 137 | multipart-post (2.0.0) 138 | nanaimo (0.2.3) 139 | nap (1.1.0) 140 | netrc (0.7.8) 141 | nokogiri (1.6.8.1) 142 | mini_portile2 (~> 2.1.0) 143 | os (0.9.6) 144 | plist (3.2.0) 145 | public_suffix (2.0.5) 146 | representable (2.3.0) 147 | uber (~> 0.0.7) 148 | retriable (2.1.0) 149 | rouge (1.11.1) 150 | rubyzip (1.2.1) 151 | security (0.1.3) 152 | signet (0.7.3) 153 | addressable (~> 2.3) 154 | faraday (~> 0.9) 155 | jwt (~> 1.5) 156 | multi_json (~> 1.10) 157 | slack-notifier (1.5.1) 158 | slather (2.3.0) 159 | activesupport (>= 4.0.2, < 5) 160 | clamp (~> 0.6) 161 | nokogiri (~> 1.6.3) 162 | xcodeproj (>= 0.20, < 2.0.0) 163 | terminal-notifier (1.7.1) 164 | terminal-table (1.7.3) 165 | unicode-display_width (~> 1.1.1) 166 | thread_safe (0.3.6) 167 | tty-screen (0.5.0) 168 | tzinfo (1.2.3) 169 | thread_safe (~> 0.1) 170 | uber (0.0.15) 171 | unf (0.1.4) 172 | unf_ext 173 | unf_ext (0.0.7.2) 174 | unicode-display_width (1.1.3) 175 | word_wrap (1.0.0) 176 | xcodeproj (1.4.2) 177 | CFPropertyList (~> 2.3.3) 178 | activesupport (>= 3) 179 | claide (>= 1.0.1, < 2.0) 180 | colored (~> 1.2) 181 | nanaimo (~> 0.2.3) 182 | xcpretty (0.2.4) 183 | rouge (~> 1.8) 184 | xcpretty-travis-formatter (0.0.4) 185 | xcpretty (~> 0.2, >= 0.0.7) 186 | 187 | PLATFORMS 188 | ruby 189 | 190 | DEPENDENCIES 191 | cocoapods 192 | fastlane 193 | slather (~> 2.0) 194 | 195 | BUNDLED WITH 196 | 1.13.6 197 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Piet Brauer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SHA=$(shell git rev-parse HEAD) 2 | BRANCH=$(shell git name-rev --name-only HEAD) 3 | 4 | install: 5 | brew outdated carthage || brew upgrade carthage || brew install carthage 6 | carthage bootstrap 7 | 8 | test: 9 | bundle exec fastlane code_coverage configuration:Debug --env default 10 | 11 | post_coverage: 12 | bundle exec slather coverage --input-format profdata -x --ignore "../**/*/Xcode*" --ignore "Carthage/**" --output-directory slather-report --scheme TrashCanKit TrashCanKit.xcodeproj 13 | curl -X POST -d @slather-report/cobertura.xml "https://codecov.io/upload/v2?token="$(CODECOV_TOKEN)"&commit="$(SHA)"&branch="$(BRANCH)"&job="$(TRAVIS_BUILD_NUMBER) 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TrashCanKit 2 | 3 | [![Build Status](https://travis-ci.org/nerdishbynature/TrashCanKit.svg?branch=master)](https://travis-ci.org/nerdishbynature/TrashCanKit) 4 | [![codecov.io](https://codecov.io/github/nerdishbynature/TrashCanKit/coverage.svg?branch=master)](https://codecov.io/github/nerdishbynature/TrashCanKit?branch=master) 5 | 6 | A Swift 2.0 API Client for Bitbuckets 2.0 API. 7 | 8 | ## Name 9 | 10 | The name derives from how I, Piet Brauer, see the Bitbucket logo everytime I look at it and maybe my experience working with the API. 11 | 12 | ## Authentication 13 | 14 | TrashCanKit supports both, Bitbucket Cloud and Bitbucket Enterprise. 15 | Authentication is handled using Configurations. 16 | 17 | There are two types of Configurations, `TokenConfiguration` and `OAuthConfiguration`. 18 | 19 | ### TokenConfiguration 20 | 21 | `TokenConfiguration` is used if you are using Access Token based Authentication (e.g. the user 22 | offered you an access token he generated on the website) or if you got an Access Token through 23 | the OAuth Flow 24 | 25 | You can initialize a new config for `bitbucket.com` as follows: 26 | 27 | ```swift 28 | let config = TokenConfiguration(token: "12345") 29 | ``` 30 | 31 | or for Bitbucket Enterprise 32 | 33 | ```swift 34 | let config = TokenConfiguration("https://bitbucket.example.com/api/2.0/", token: "12345") 35 | ``` 36 | 37 | After you got your token you can use it with `TrashCanKit` 38 | 39 | ```swift 40 | TrashCanKit(config).me() { response in 41 | switch response { 42 | case .Success(let user): 43 | println(user.login) 44 | case .Failure(let error): 45 | println(error) 46 | } 47 | } 48 | ``` 49 | 50 | ### OAuthConfiguration 51 | 52 | `OAuthConfiguration` is meant to be used, if you don't have an access token already and the 53 | user has to login to your application. This also handles the OAuth flow. 54 | 55 | You can authenticate an user for `bitbucket.com` as follows: 56 | 57 | ```swift 58 | let config = OAuthConfiguration(token: "", secret: "", scopes: []) // Scopes are not supported by the API yet 59 | config.authenticate() 60 | 61 | ``` 62 | 63 | or for Bitbucket Enterprise 64 | 65 | ```swift 66 | let config = OAuthConfiguration("https://bitbucket.example.com/api/v3/", webURL: "https://bitbucket.example.com/", token: "", secret: "", scopes: []) // Scopes are not supported by the API yet 67 | ``` 68 | 69 | After you got your config you can authenticate the user: 70 | 71 | ```swift 72 | // AppDelegate.swift 73 | 74 | config.authenticate() 75 | 76 | func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool { 77 | config.handleOpenURL(url) { config in 78 | self.loadCurrentUser(config) // purely optional of course 79 | } 80 | return false 81 | } 82 | 83 | func loadCurrentUser(config: TokenConfiguration) { 84 | TrashCanKit(config).me() { response in 85 | switch response { 86 | case .Success(let user): 87 | println(user.login) 88 | case .Failure(let error): 89 | println(error) 90 | } 91 | } 92 | } 93 | ``` 94 | 95 | Please note that you will be given a `TokenConfiguration` back from the OAuth flow. 96 | You have to store the `accessToken` yourself. If you want to make further requests it is not 97 | necessary to do the OAuth Flow again. You can just use a `TokenConfiguration`. 98 | 99 | ```swift 100 | let token = // get your token from your keychain, user defaults (not recommended) etc. 101 | let config = TokenConfiguration(token) 102 | TrashCanKit(config).user("bitbucketcat") { response in 103 | switch response { 104 | case .Success(let user): 105 | println(user.login) 106 | case .Failure(let error): 107 | println(error) 108 | } 109 | } 110 | ``` 111 | 112 | ## Users 113 | 114 | ### Get a single user 115 | 116 | ```swift 117 | let username = ... // set the username 118 | TrashCanKit().user(username) { response in 119 | switch response { 120 | case .Success(let user): 121 | // do something with the user 122 | case .Failure(let error): 123 | // handle any errors 124 | } 125 | } 126 | ``` 127 | 128 | ### Get the authenticated user 129 | 130 | ```swift 131 | TrashCanKit().me() { response in 132 | switch response { 133 | case .Success(let user): 134 | // do something with the user 135 | case .Failure(let error): 136 | // handle any errors 137 | } 138 | ``` 139 | 140 | ## Repositories 141 | 142 | ### Get repositories of authenticated user 143 | 144 | ```swift 145 | TrashCanKit().repositories() { response in 146 | switch response { 147 | case .Success(let repositories): 148 | // do something 149 | case .Failure(let error): 150 | // handle any errors 151 | } 152 | } 153 | ``` 154 | 155 | ### Get repository 156 | 157 | ```swift 158 | TrashCanKit().repository("nerdishbynature", name: "octokit.swift") { response in 159 | switch response { 160 | case .Success(let repository): 161 | // do something 162 | case .Failure(let error): 163 | // handle any errors 164 | } 165 | } 166 | ``` 167 | -------------------------------------------------------------------------------- /TrashCanKit.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "TrashCanKit" 3 | s.version = "0.6.3" 4 | s.summary = "A Swift API Client for Bitbucket.org" 5 | s.description = <<-DESC 6 | You are looking at the A Swift API Client for GitHub and GitHub Enterprise. 7 | This is very unofficial and not maintained by Github. 8 | DESC 9 | s.homepage = "https://github.com/nerdishbynature/trashcankit" 10 | s.license = { :type => "MIT", :file => "LICENSE" } 11 | s.author = { "Piet Brauer" => "piet@nerdishbynature.com" } 12 | s.source = { :git => "https://github.com/nerdishbynature/trashcankit.git", :tag => s.version.to_s } 13 | s.social_media_url = "https://twitter.com/pietbrauer" 14 | s.module_name = "TrashCanKit" 15 | s.dependency "NBNRequestKit", "~> 2.0" 16 | s.requires_arc = true 17 | s.source_files = "TrashCanKit/*.swift" 18 | s.ios.deployment_target = '8.0' 19 | s.osx.deployment_target = '10.10' 20 | s.watchos.deployment_target = '2.0' 21 | s.tvos.deployment_target = '9.0' 22 | end 23 | -------------------------------------------------------------------------------- /TrashCanKit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 231069D31C06BE3400101BCC /* String+QueryParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D21C06BE3400101BCC /* String+QueryParameters.swift */; }; 11 | 231069D51C06BE6D00101BCC /* Dictionary+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D41C06BE6D00101BCC /* Dictionary+Additions.swift */; }; 12 | 231B684E1BE99852007AE2A6 /* OAuthConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684D1BE99852007AE2A6 /* OAuthConfiguration.swift */; }; 13 | 231B68501BE99886007AE2A6 /* NSURL+URLParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684F1BE99886007AE2A6 /* NSURL+URLParameters.swift */; }; 14 | 231B68521BE9989C007AE2A6 /* TokenConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68511BE9989C007AE2A6 /* TokenConfiguration.swift */; }; 15 | 231B68541BE998C7007AE2A6 /* OAuthRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68531BE998C7007AE2A6 /* OAuthRouter.swift */; }; 16 | 231B68561BE9997C007AE2A6 /* ConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68551BE9997C007AE2A6 /* ConfigurationTests.swift */; }; 17 | 231B68581BE9A13C007AE2A6 /* authorize.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68571BE9A13C007AE2A6 /* authorize.json */; }; 18 | 231B685A1BE9A3DD007AE2A6 /* TokenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68591BE9A3DD007AE2A6 /* TokenTests.swift */; }; 19 | 231B685C1BE9A699007AE2A6 /* refresh_token_error.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B685B1BE9A699007AE2A6 /* refresh_token_error.json */; }; 20 | 231B685F1BE9AAC6007AE2A6 /* Repositories.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B685D1BE9AA66007AE2A6 /* Repositories.json */; }; 21 | 231B68611BE9AD30007AE2A6 /* Me.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68601BE9AD30007AE2A6 /* Me.json */; }; 22 | 231B68631BE9AD8D007AE2A6 /* Emails.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68621BE9AD8D007AE2A6 /* Emails.json */; }; 23 | 233BEC921CAA3278005F9C19 /* TrashCanKitTestURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 233BEC911CAA3278005F9C19 /* TrashCanKitTestURLSession.swift */; }; 24 | 233BEC931CAA3278005F9C19 /* TrashCanKitTestURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 233BEC911CAA3278005F9C19 /* TrashCanKitTestURLSession.swift */; }; 25 | 233BEC941CAA3278005F9C19 /* TrashCanKitTestURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 233BEC911CAA3278005F9C19 /* TrashCanKitTestURLSession.swift */; }; 26 | 236364741BE22F1000AA7104 /* TrashCanKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 236364731BE22F1000AA7104 /* TrashCanKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 27 | 2363647B1BE22F1000AA7104 /* TrashCanKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 236364701BE22F1000AA7104 /* TrashCanKit.framework */; }; 28 | 2363648E1BE22FCC00AA7104 /* TrashCanKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648A1BE22FCC00AA7104 /* TrashCanKit.swift */; }; 29 | 2363648F1BE22FCC00AA7104 /* Repositories.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648B1BE22FCC00AA7104 /* Repositories.swift */; }; 30 | 236364901BE22FCC00AA7104 /* Token.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648C1BE22FCC00AA7104 /* Token.swift */; }; 31 | 236364911BE22FCC00AA7104 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648D1BE22FCC00AA7104 /* User.swift */; }; 32 | 236364961BE2301200AA7104 /* RepositoriesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364921BE2301200AA7104 /* RepositoriesTests.swift */; }; 33 | 236364971BE2301200AA7104 /* TestHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364931BE2301200AA7104 /* TestHelper.swift */; }; 34 | 236364991BE2301200AA7104 /* UserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364951BE2301200AA7104 /* UserTests.swift */; }; 35 | 2363649B1BE230B500AA7104 /* RequestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2363649A1BE230B500AA7104 /* RequestKit.framework */; }; 36 | 236364A01BE2310D00AA7104 /* RequestKit.framework in Carthage embed */ = {isa = PBXBuildFile; fileRef = 2363649A1BE230B500AA7104 /* RequestKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 37 | 236364A51BE2313B00AA7104 /* Email.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A21BE2313B00AA7104 /* Email.json */; }; 38 | 236364A61BE2313B00AA7104 /* Repository.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A31BE2313B00AA7104 /* Repository.json */; }; 39 | 236364A71BE2313B00AA7104 /* User.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A41BE2313B00AA7104 /* User.json */; }; 40 | 238EB1C11C7C660800289C37 /* TrashCanKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 238EB1B71C7C660800289C37 /* TrashCanKit.framework */; }; 41 | 238EB1DD1C7C662100289C37 /* TrashCanKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 238EB1D31C7C662100289C37 /* TrashCanKit.framework */; }; 42 | 238EB1EA1C7C669400289C37 /* TrashCanKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648A1BE22FCC00AA7104 /* TrashCanKit.swift */; }; 43 | 238EB1EB1C7C669400289C37 /* NSURL+URLParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684F1BE99886007AE2A6 /* NSURL+URLParameters.swift */; }; 44 | 238EB1EC1C7C669400289C37 /* OAuthConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684D1BE99852007AE2A6 /* OAuthConfiguration.swift */; }; 45 | 238EB1ED1C7C669400289C37 /* OAuthRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68531BE998C7007AE2A6 /* OAuthRouter.swift */; }; 46 | 238EB1EE1C7C669400289C37 /* TokenConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68511BE9989C007AE2A6 /* TokenConfiguration.swift */; }; 47 | 238EB1EF1C7C669400289C37 /* Repositories.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648B1BE22FCC00AA7104 /* Repositories.swift */; }; 48 | 238EB1F01C7C669400289C37 /* String+QueryParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D21C06BE3400101BCC /* String+QueryParameters.swift */; }; 49 | 238EB1F11C7C669400289C37 /* Dictionary+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D41C06BE6D00101BCC /* Dictionary+Additions.swift */; }; 50 | 238EB1F21C7C669400289C37 /* Token.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648C1BE22FCC00AA7104 /* Token.swift */; }; 51 | 238EB1F31C7C669400289C37 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648D1BE22FCC00AA7104 /* User.swift */; }; 52 | 238EB1F41C7C669A00289C37 /* TrashCanKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 236364731BE22F1000AA7104 /* TrashCanKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 53 | 238EB1F51C7C66A500289C37 /* TrashCanKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648A1BE22FCC00AA7104 /* TrashCanKit.swift */; }; 54 | 238EB1F61C7C66A500289C37 /* NSURL+URLParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684F1BE99886007AE2A6 /* NSURL+URLParameters.swift */; }; 55 | 238EB1F71C7C66A500289C37 /* OAuthConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684D1BE99852007AE2A6 /* OAuthConfiguration.swift */; }; 56 | 238EB1F81C7C66A500289C37 /* OAuthRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68531BE998C7007AE2A6 /* OAuthRouter.swift */; }; 57 | 238EB1F91C7C66A500289C37 /* TokenConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68511BE9989C007AE2A6 /* TokenConfiguration.swift */; }; 58 | 238EB1FA1C7C66A500289C37 /* Repositories.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648B1BE22FCC00AA7104 /* Repositories.swift */; }; 59 | 238EB1FB1C7C66A500289C37 /* String+QueryParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D21C06BE3400101BCC /* String+QueryParameters.swift */; }; 60 | 238EB1FC1C7C66A500289C37 /* Dictionary+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D41C06BE6D00101BCC /* Dictionary+Additions.swift */; }; 61 | 238EB1FD1C7C66A500289C37 /* Token.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648C1BE22FCC00AA7104 /* Token.swift */; }; 62 | 238EB1FE1C7C66A500289C37 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648D1BE22FCC00AA7104 /* User.swift */; }; 63 | 238EB1FF1C7C66A900289C37 /* TrashCanKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 236364731BE22F1000AA7104 /* TrashCanKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 64 | 238EB2001C7C66B100289C37 /* TestHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364931BE2301200AA7104 /* TestHelper.swift */; }; 65 | 238EB2011C7C66B100289C37 /* RepositoriesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364921BE2301200AA7104 /* RepositoriesTests.swift */; }; 66 | 238EB2021C7C66B100289C37 /* UserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364951BE2301200AA7104 /* UserTests.swift */; }; 67 | 238EB2031C7C66B100289C37 /* ConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68551BE9997C007AE2A6 /* ConfigurationTests.swift */; }; 68 | 238EB2041C7C66B100289C37 /* TokenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68591BE9A3DD007AE2A6 /* TokenTests.swift */; }; 69 | 238EB2051C7C66B700289C37 /* Email.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A21BE2313B00AA7104 /* Email.json */; }; 70 | 238EB2061C7C66B700289C37 /* Repository.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A31BE2313B00AA7104 /* Repository.json */; }; 71 | 238EB2071C7C66B700289C37 /* User.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A41BE2313B00AA7104 /* User.json */; }; 72 | 238EB2081C7C66B700289C37 /* authorize.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68571BE9A13C007AE2A6 /* authorize.json */; }; 73 | 238EB2091C7C66B700289C37 /* refresh_token_error.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B685B1BE9A699007AE2A6 /* refresh_token_error.json */; }; 74 | 238EB20A1C7C66B700289C37 /* Repositories.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B685D1BE9AA66007AE2A6 /* Repositories.json */; }; 75 | 238EB20B1C7C66B700289C37 /* Me.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68601BE9AD30007AE2A6 /* Me.json */; }; 76 | 238EB20C1C7C66B700289C37 /* Emails.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68621BE9AD8D007AE2A6 /* Emails.json */; }; 77 | 238EB20D1C7C66BD00289C37 /* Email.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A21BE2313B00AA7104 /* Email.json */; }; 78 | 238EB20E1C7C66BD00289C37 /* Repository.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A31BE2313B00AA7104 /* Repository.json */; }; 79 | 238EB20F1C7C66BD00289C37 /* User.json in Resources */ = {isa = PBXBuildFile; fileRef = 236364A41BE2313B00AA7104 /* User.json */; }; 80 | 238EB2101C7C66BD00289C37 /* authorize.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68571BE9A13C007AE2A6 /* authorize.json */; }; 81 | 238EB2111C7C66BD00289C37 /* refresh_token_error.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B685B1BE9A699007AE2A6 /* refresh_token_error.json */; }; 82 | 238EB2121C7C66BD00289C37 /* Repositories.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B685D1BE9AA66007AE2A6 /* Repositories.json */; }; 83 | 238EB2131C7C66BD00289C37 /* Me.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68601BE9AD30007AE2A6 /* Me.json */; }; 84 | 238EB2141C7C66BD00289C37 /* Emails.json in Resources */ = {isa = PBXBuildFile; fileRef = 231B68621BE9AD8D007AE2A6 /* Emails.json */; }; 85 | 238EB2151C7C66C200289C37 /* TestHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364931BE2301200AA7104 /* TestHelper.swift */; }; 86 | 238EB2161C7C66C200289C37 /* RepositoriesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364921BE2301200AA7104 /* RepositoriesTests.swift */; }; 87 | 238EB2171C7C66C200289C37 /* UserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 236364951BE2301200AA7104 /* UserTests.swift */; }; 88 | 238EB2181C7C66C200289C37 /* ConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68551BE9997C007AE2A6 /* ConfigurationTests.swift */; }; 89 | 238EB2191C7C66C200289C37 /* TokenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68591BE9A3DD007AE2A6 /* TokenTests.swift */; }; 90 | 238EB21A1C7C66C800289C37 /* TrashCanKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648A1BE22FCC00AA7104 /* TrashCanKit.swift */; }; 91 | 238EB21B1C7C66C800289C37 /* NSURL+URLParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684F1BE99886007AE2A6 /* NSURL+URLParameters.swift */; }; 92 | 238EB21C1C7C66C800289C37 /* OAuthConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B684D1BE99852007AE2A6 /* OAuthConfiguration.swift */; }; 93 | 238EB21D1C7C66C800289C37 /* OAuthRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68531BE998C7007AE2A6 /* OAuthRouter.swift */; }; 94 | 238EB21E1C7C66C800289C37 /* TokenConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231B68511BE9989C007AE2A6 /* TokenConfiguration.swift */; }; 95 | 238EB21F1C7C66C800289C37 /* Repositories.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648B1BE22FCC00AA7104 /* Repositories.swift */; }; 96 | 238EB2201C7C66C800289C37 /* String+QueryParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D21C06BE3400101BCC /* String+QueryParameters.swift */; }; 97 | 238EB2211C7C66C800289C37 /* Dictionary+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231069D41C06BE6D00101BCC /* Dictionary+Additions.swift */; }; 98 | 238EB2221C7C66C800289C37 /* Token.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648C1BE22FCC00AA7104 /* Token.swift */; }; 99 | 238EB2231C7C66C800289C37 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2363648D1BE22FCC00AA7104 /* User.swift */; }; 100 | 238EB2241C7C66CC00289C37 /* TrashCanKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 236364731BE22F1000AA7104 /* TrashCanKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 101 | 238EB2261C7C675A00289C37 /* RequestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 238EB2251C7C675A00289C37 /* RequestKit.framework */; }; 102 | 238EB2281C7C676900289C37 /* RequestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 238EB2271C7C676900289C37 /* RequestKit.framework */; }; 103 | 238EB22C1C7C678300289C37 /* RequestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 238EB22B1C7C678300289C37 /* RequestKit.framework */; }; 104 | 238EB2311C7C67E000289C37 /* RequestKit.framework in Carthage embed */ = {isa = PBXBuildFile; fileRef = 238EB2271C7C676900289C37 /* RequestKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 105 | 238EB2351C7C67FF00289C37 /* RequestKit.framework in Carthage embed */ = {isa = PBXBuildFile; fileRef = 238EB22B1C7C678300289C37 /* RequestKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 106 | /* End PBXBuildFile section */ 107 | 108 | /* Begin PBXContainerItemProxy section */ 109 | 2363647C1BE22F1000AA7104 /* PBXContainerItemProxy */ = { 110 | isa = PBXContainerItemProxy; 111 | containerPortal = 236364671BE22F1000AA7104 /* Project object */; 112 | proxyType = 1; 113 | remoteGlobalIDString = 2363646F1BE22F1000AA7104; 114 | remoteInfo = TrashCanKit; 115 | }; 116 | 238EB1C21C7C660800289C37 /* PBXContainerItemProxy */ = { 117 | isa = PBXContainerItemProxy; 118 | containerPortal = 236364671BE22F1000AA7104 /* Project object */; 119 | proxyType = 1; 120 | remoteGlobalIDString = 238EB1B61C7C660800289C37; 121 | remoteInfo = "TrashCanKit tvOS"; 122 | }; 123 | 238EB1DE1C7C662100289C37 /* PBXContainerItemProxy */ = { 124 | isa = PBXContainerItemProxy; 125 | containerPortal = 236364671BE22F1000AA7104 /* Project object */; 126 | proxyType = 1; 127 | remoteGlobalIDString = 238EB1D21C7C662100289C37; 128 | remoteInfo = "TrashCanKit Mac"; 129 | }; 130 | /* End PBXContainerItemProxy section */ 131 | 132 | /* Begin PBXCopyFilesBuildPhase section */ 133 | 2363649E1BE2310200AA7104 /* Carthage embed */ = { 134 | isa = PBXCopyFilesBuildPhase; 135 | buildActionMask = 2147483647; 136 | dstPath = ""; 137 | dstSubfolderSpec = 10; 138 | files = ( 139 | 236364A01BE2310D00AA7104 /* RequestKit.framework in Carthage embed */, 140 | ); 141 | name = "Carthage embed"; 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | 238EB2301C7C67C700289C37 /* Carthage embed */ = { 145 | isa = PBXCopyFilesBuildPhase; 146 | buildActionMask = 2147483647; 147 | dstPath = ""; 148 | dstSubfolderSpec = 10; 149 | files = ( 150 | 238EB2311C7C67E000289C37 /* RequestKit.framework in Carthage embed */, 151 | ); 152 | name = "Carthage embed"; 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | 238EB2331C7C67EC00289C37 /* Carthage embed */ = { 156 | isa = PBXCopyFilesBuildPhase; 157 | buildActionMask = 2147483647; 158 | dstPath = ""; 159 | dstSubfolderSpec = 10; 160 | files = ( 161 | 238EB2351C7C67FF00289C37 /* RequestKit.framework in Carthage embed */, 162 | ); 163 | name = "Carthage embed"; 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXCopyFilesBuildPhase section */ 167 | 168 | /* Begin PBXFileReference section */ 169 | 231069D21C06BE3400101BCC /* String+QueryParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+QueryParameters.swift"; sourceTree = ""; }; 170 | 231069D41C06BE6D00101BCC /* Dictionary+Additions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Dictionary+Additions.swift"; sourceTree = ""; }; 171 | 231B684D1BE99852007AE2A6 /* OAuthConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuthConfiguration.swift; sourceTree = ""; }; 172 | 231B684F1BE99886007AE2A6 /* NSURL+URLParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSURL+URLParameters.swift"; sourceTree = ""; }; 173 | 231B68511BE9989C007AE2A6 /* TokenConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenConfiguration.swift; sourceTree = ""; }; 174 | 231B68531BE998C7007AE2A6 /* OAuthRouter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuthRouter.swift; sourceTree = ""; }; 175 | 231B68551BE9997C007AE2A6 /* ConfigurationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurationTests.swift; sourceTree = ""; }; 176 | 231B68571BE9A13C007AE2A6 /* authorize.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = authorize.json; sourceTree = ""; }; 177 | 231B68591BE9A3DD007AE2A6 /* TokenTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenTests.swift; sourceTree = ""; }; 178 | 231B685B1BE9A699007AE2A6 /* refresh_token_error.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = refresh_token_error.json; sourceTree = ""; }; 179 | 231B685D1BE9AA66007AE2A6 /* Repositories.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = Repositories.json; path = Fixtures/Repositories.json; sourceTree = ""; }; 180 | 231B68601BE9AD30007AE2A6 /* Me.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Me.json; sourceTree = ""; }; 181 | 231B68621BE9AD8D007AE2A6 /* Emails.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = Emails.json; path = Fixtures/Emails.json; sourceTree = ""; }; 182 | 233BEC911CAA3278005F9C19 /* TrashCanKitTestURLSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrashCanKitTestURLSession.swift; sourceTree = ""; }; 183 | 236364701BE22F1000AA7104 /* TrashCanKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TrashCanKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 184 | 236364731BE22F1000AA7104 /* TrashCanKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TrashCanKit.h; sourceTree = ""; }; 185 | 236364751BE22F1000AA7104 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 186 | 2363647A1BE22F1000AA7104 /* TrashCanKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TrashCanKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 187 | 236364811BE22F1000AA7104 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 188 | 2363648A1BE22FCC00AA7104 /* TrashCanKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrashCanKit.swift; sourceTree = ""; }; 189 | 2363648B1BE22FCC00AA7104 /* Repositories.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Repositories.swift; sourceTree = ""; }; 190 | 2363648C1BE22FCC00AA7104 /* Token.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Token.swift; sourceTree = ""; }; 191 | 2363648D1BE22FCC00AA7104 /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 192 | 236364921BE2301200AA7104 /* RepositoriesTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RepositoriesTests.swift; sourceTree = ""; }; 193 | 236364931BE2301200AA7104 /* TestHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestHelper.swift; sourceTree = ""; }; 194 | 236364951BE2301200AA7104 /* UserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserTests.swift; sourceTree = ""; }; 195 | 2363649A1BE230B500AA7104 /* RequestKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RequestKit.framework; path = Carthage/Build/iOS/RequestKit.framework; sourceTree = ""; }; 196 | 2363649C1BE230F900AA7104 /* Nocilla.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nocilla.framework; path = Carthage/Build/iOS/Nocilla.framework; sourceTree = ""; }; 197 | 236364A21BE2313B00AA7104 /* Email.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = Email.json; path = Fixtures/Email.json; sourceTree = ""; }; 198 | 236364A31BE2313B00AA7104 /* Repository.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = Repository.json; path = Fixtures/Repository.json; sourceTree = ""; }; 199 | 236364A41BE2313B00AA7104 /* User.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = User.json; path = Fixtures/User.json; sourceTree = ""; }; 200 | 238EB1AA1C7C65CA00289C37 /* TrashCanKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TrashCanKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 201 | 238EB1B71C7C660800289C37 /* TrashCanKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TrashCanKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 202 | 238EB1C01C7C660800289C37 /* TrashCanKit tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TrashCanKit tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 203 | 238EB1D31C7C662100289C37 /* TrashCanKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TrashCanKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 204 | 238EB1DC1C7C662100289C37 /* TrashCanKit MacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TrashCanKit MacTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 205 | 238EB2251C7C675A00289C37 /* RequestKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RequestKit.framework; path = Carthage/Build/watchOS/RequestKit.framework; sourceTree = ""; }; 206 | 238EB2271C7C676900289C37 /* RequestKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RequestKit.framework; path = Carthage/Build/tvOS/RequestKit.framework; sourceTree = ""; }; 207 | 238EB2291C7C677400289C37 /* Nocilla.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nocilla.framework; path = Carthage/Build/tvOS/Nocilla.framework; sourceTree = ""; }; 208 | 238EB22B1C7C678300289C37 /* RequestKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RequestKit.framework; path = Carthage/Build/Mac/RequestKit.framework; sourceTree = ""; }; 209 | 238EB22E1C7C679A00289C37 /* Nocilla.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nocilla.framework; path = Carthage/Build/Mac/Nocilla.framework; sourceTree = ""; }; 210 | /* End PBXFileReference section */ 211 | 212 | /* Begin PBXFrameworksBuildPhase section */ 213 | 2363646C1BE22F1000AA7104 /* Frameworks */ = { 214 | isa = PBXFrameworksBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | 2363649B1BE230B500AA7104 /* RequestKit.framework in Frameworks */, 218 | ); 219 | runOnlyForDeploymentPostprocessing = 0; 220 | }; 221 | 236364771BE22F1000AA7104 /* Frameworks */ = { 222 | isa = PBXFrameworksBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | 2363647B1BE22F1000AA7104 /* TrashCanKit.framework in Frameworks */, 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | 238EB1A61C7C65CA00289C37 /* Frameworks */ = { 230 | isa = PBXFrameworksBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | 238EB2261C7C675A00289C37 /* RequestKit.framework in Frameworks */, 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | }; 237 | 238EB1B31C7C660800289C37 /* Frameworks */ = { 238 | isa = PBXFrameworksBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 238EB2281C7C676900289C37 /* RequestKit.framework in Frameworks */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | 238EB1BD1C7C660800289C37 /* Frameworks */ = { 246 | isa = PBXFrameworksBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 238EB1C11C7C660800289C37 /* TrashCanKit.framework in Frameworks */, 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | 238EB1CF1C7C662100289C37 /* Frameworks */ = { 254 | isa = PBXFrameworksBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | 238EB22C1C7C678300289C37 /* RequestKit.framework in Frameworks */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | 238EB1D91C7C662100289C37 /* Frameworks */ = { 262 | isa = PBXFrameworksBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 238EB1DD1C7C662100289C37 /* TrashCanKit.framework in Frameworks */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXFrameworksBuildPhase section */ 270 | 271 | /* Begin PBXGroup section */ 272 | 236364661BE22F1000AA7104 = { 273 | isa = PBXGroup; 274 | children = ( 275 | 236364721BE22F1000AA7104 /* TrashCanKit */, 276 | 2363647E1BE22F1000AA7104 /* TrashCanKitTests */, 277 | 236364A81BE2319200AA7104 /* Frameworks */, 278 | 236364711BE22F1000AA7104 /* Products */, 279 | ); 280 | sourceTree = ""; 281 | }; 282 | 236364711BE22F1000AA7104 /* Products */ = { 283 | isa = PBXGroup; 284 | children = ( 285 | 236364701BE22F1000AA7104 /* TrashCanKit.framework */, 286 | 2363647A1BE22F1000AA7104 /* TrashCanKitTests.xctest */, 287 | 238EB1AA1C7C65CA00289C37 /* TrashCanKit.framework */, 288 | 238EB1B71C7C660800289C37 /* TrashCanKit.framework */, 289 | 238EB1C01C7C660800289C37 /* TrashCanKit tvOSTests.xctest */, 290 | 238EB1D31C7C662100289C37 /* TrashCanKit.framework */, 291 | 238EB1DC1C7C662100289C37 /* TrashCanKit MacTests.xctest */, 292 | ); 293 | name = Products; 294 | sourceTree = ""; 295 | }; 296 | 236364721BE22F1000AA7104 /* TrashCanKit */ = { 297 | isa = PBXGroup; 298 | children = ( 299 | 236364731BE22F1000AA7104 /* TrashCanKit.h */, 300 | 2363648A1BE22FCC00AA7104 /* TrashCanKit.swift */, 301 | 231B684F1BE99886007AE2A6 /* NSURL+URLParameters.swift */, 302 | 231B684D1BE99852007AE2A6 /* OAuthConfiguration.swift */, 303 | 231B68531BE998C7007AE2A6 /* OAuthRouter.swift */, 304 | 231B68511BE9989C007AE2A6 /* TokenConfiguration.swift */, 305 | 2363648B1BE22FCC00AA7104 /* Repositories.swift */, 306 | 231069D21C06BE3400101BCC /* String+QueryParameters.swift */, 307 | 231069D41C06BE6D00101BCC /* Dictionary+Additions.swift */, 308 | 2363648C1BE22FCC00AA7104 /* Token.swift */, 309 | 2363648D1BE22FCC00AA7104 /* User.swift */, 310 | 236364751BE22F1000AA7104 /* Info.plist */, 311 | ); 312 | path = TrashCanKit; 313 | sourceTree = ""; 314 | }; 315 | 2363647E1BE22F1000AA7104 /* TrashCanKitTests */ = { 316 | isa = PBXGroup; 317 | children = ( 318 | 236364931BE2301200AA7104 /* TestHelper.swift */, 319 | 233BEC911CAA3278005F9C19 /* TrashCanKitTestURLSession.swift */, 320 | 236364921BE2301200AA7104 /* RepositoriesTests.swift */, 321 | 236364951BE2301200AA7104 /* UserTests.swift */, 322 | 231B68551BE9997C007AE2A6 /* ConfigurationTests.swift */, 323 | 231B68591BE9A3DD007AE2A6 /* TokenTests.swift */, 324 | 236364A11BE2313200AA7104 /* Fixtures */, 325 | 236364811BE22F1000AA7104 /* Info.plist */, 326 | ); 327 | path = TrashCanKitTests; 328 | sourceTree = ""; 329 | }; 330 | 236364A11BE2313200AA7104 /* Fixtures */ = { 331 | isa = PBXGroup; 332 | children = ( 333 | 236364A21BE2313B00AA7104 /* Email.json */, 334 | 236364A31BE2313B00AA7104 /* Repository.json */, 335 | 236364A41BE2313B00AA7104 /* User.json */, 336 | 231B68571BE9A13C007AE2A6 /* authorize.json */, 337 | 231B685B1BE9A699007AE2A6 /* refresh_token_error.json */, 338 | 231B685D1BE9AA66007AE2A6 /* Repositories.json */, 339 | 231B68601BE9AD30007AE2A6 /* Me.json */, 340 | 231B68621BE9AD8D007AE2A6 /* Emails.json */, 341 | ); 342 | name = Fixtures; 343 | sourceTree = ""; 344 | }; 345 | 236364A81BE2319200AA7104 /* Frameworks */ = { 346 | isa = PBXGroup; 347 | children = ( 348 | 238EB22E1C7C679A00289C37 /* Nocilla.framework */, 349 | 238EB22B1C7C678300289C37 /* RequestKit.framework */, 350 | 238EB2291C7C677400289C37 /* Nocilla.framework */, 351 | 238EB2271C7C676900289C37 /* RequestKit.framework */, 352 | 238EB2251C7C675A00289C37 /* RequestKit.framework */, 353 | 2363649C1BE230F900AA7104 /* Nocilla.framework */, 354 | 2363649A1BE230B500AA7104 /* RequestKit.framework */, 355 | ); 356 | name = Frameworks; 357 | sourceTree = ""; 358 | }; 359 | /* End PBXGroup section */ 360 | 361 | /* Begin PBXHeadersBuildPhase section */ 362 | 2363646D1BE22F1000AA7104 /* Headers */ = { 363 | isa = PBXHeadersBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | 236364741BE22F1000AA7104 /* TrashCanKit.h in Headers */, 367 | ); 368 | runOnlyForDeploymentPostprocessing = 0; 369 | }; 370 | 238EB1A71C7C65CA00289C37 /* Headers */ = { 371 | isa = PBXHeadersBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | 238EB1F41C7C669A00289C37 /* TrashCanKit.h in Headers */, 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | }; 378 | 238EB1B41C7C660800289C37 /* Headers */ = { 379 | isa = PBXHeadersBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | 238EB1FF1C7C66A900289C37 /* TrashCanKit.h in Headers */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | 238EB1D01C7C662100289C37 /* Headers */ = { 387 | isa = PBXHeadersBuildPhase; 388 | buildActionMask = 2147483647; 389 | files = ( 390 | 238EB2241C7C66CC00289C37 /* TrashCanKit.h in Headers */, 391 | ); 392 | runOnlyForDeploymentPostprocessing = 0; 393 | }; 394 | /* End PBXHeadersBuildPhase section */ 395 | 396 | /* Begin PBXNativeTarget section */ 397 | 2363646F1BE22F1000AA7104 /* TrashCanKit */ = { 398 | isa = PBXNativeTarget; 399 | buildConfigurationList = 236364841BE22F1100AA7104 /* Build configuration list for PBXNativeTarget "TrashCanKit" */; 400 | buildPhases = ( 401 | 2363646B1BE22F1000AA7104 /* Sources */, 402 | 2363646C1BE22F1000AA7104 /* Frameworks */, 403 | 2363646D1BE22F1000AA7104 /* Headers */, 404 | 2363646E1BE22F1000AA7104 /* Resources */, 405 | ); 406 | buildRules = ( 407 | ); 408 | dependencies = ( 409 | ); 410 | name = TrashCanKit; 411 | productName = TrashCanKit; 412 | productReference = 236364701BE22F1000AA7104 /* TrashCanKit.framework */; 413 | productType = "com.apple.product-type.framework"; 414 | }; 415 | 236364791BE22F1000AA7104 /* TrashCanKitTests */ = { 416 | isa = PBXNativeTarget; 417 | buildConfigurationList = 236364871BE22F1100AA7104 /* Build configuration list for PBXNativeTarget "TrashCanKitTests" */; 418 | buildPhases = ( 419 | 236364761BE22F1000AA7104 /* Sources */, 420 | 236364771BE22F1000AA7104 /* Frameworks */, 421 | 236364781BE22F1000AA7104 /* Resources */, 422 | 2363649E1BE2310200AA7104 /* Carthage embed */, 423 | ); 424 | buildRules = ( 425 | ); 426 | dependencies = ( 427 | 2363647D1BE22F1000AA7104 /* PBXTargetDependency */, 428 | ); 429 | name = TrashCanKitTests; 430 | productName = TrashCanKitTests; 431 | productReference = 2363647A1BE22F1000AA7104 /* TrashCanKitTests.xctest */; 432 | productType = "com.apple.product-type.bundle.unit-test"; 433 | }; 434 | 238EB1A91C7C65CA00289C37 /* TrashCanKit watchOS */ = { 435 | isa = PBXNativeTarget; 436 | buildConfigurationList = 238EB1B11C7C65CA00289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit watchOS" */; 437 | buildPhases = ( 438 | 238EB1A51C7C65CA00289C37 /* Sources */, 439 | 238EB1A61C7C65CA00289C37 /* Frameworks */, 440 | 238EB1A71C7C65CA00289C37 /* Headers */, 441 | 238EB1A81C7C65CA00289C37 /* Resources */, 442 | ); 443 | buildRules = ( 444 | ); 445 | dependencies = ( 446 | ); 447 | name = "TrashCanKit watchOS"; 448 | productName = "TrashCanKit watchOS"; 449 | productReference = 238EB1AA1C7C65CA00289C37 /* TrashCanKit.framework */; 450 | productType = "com.apple.product-type.framework"; 451 | }; 452 | 238EB1B61C7C660800289C37 /* TrashCanKit tvOS */ = { 453 | isa = PBXNativeTarget; 454 | buildConfigurationList = 238EB1C81C7C660800289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit tvOS" */; 455 | buildPhases = ( 456 | 238EB1B21C7C660800289C37 /* Sources */, 457 | 238EB1B31C7C660800289C37 /* Frameworks */, 458 | 238EB1B41C7C660800289C37 /* Headers */, 459 | 238EB1B51C7C660800289C37 /* Resources */, 460 | ); 461 | buildRules = ( 462 | ); 463 | dependencies = ( 464 | ); 465 | name = "TrashCanKit tvOS"; 466 | productName = "TrashCanKit tvOS"; 467 | productReference = 238EB1B71C7C660800289C37 /* TrashCanKit.framework */; 468 | productType = "com.apple.product-type.framework"; 469 | }; 470 | 238EB1BF1C7C660800289C37 /* TrashCanKit tvOSTests */ = { 471 | isa = PBXNativeTarget; 472 | buildConfigurationList = 238EB1CB1C7C660800289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit tvOSTests" */; 473 | buildPhases = ( 474 | 238EB1BC1C7C660800289C37 /* Sources */, 475 | 238EB1BD1C7C660800289C37 /* Frameworks */, 476 | 238EB1BE1C7C660800289C37 /* Resources */, 477 | 238EB2301C7C67C700289C37 /* Carthage embed */, 478 | ); 479 | buildRules = ( 480 | ); 481 | dependencies = ( 482 | 238EB1C31C7C660800289C37 /* PBXTargetDependency */, 483 | ); 484 | name = "TrashCanKit tvOSTests"; 485 | productName = "TrashCanKit tvOSTests"; 486 | productReference = 238EB1C01C7C660800289C37 /* TrashCanKit tvOSTests.xctest */; 487 | productType = "com.apple.product-type.bundle.unit-test"; 488 | }; 489 | 238EB1D21C7C662100289C37 /* TrashCanKit Mac */ = { 490 | isa = PBXNativeTarget; 491 | buildConfigurationList = 238EB1E41C7C662100289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit Mac" */; 492 | buildPhases = ( 493 | 238EB1CE1C7C662100289C37 /* Sources */, 494 | 238EB1CF1C7C662100289C37 /* Frameworks */, 495 | 238EB1D01C7C662100289C37 /* Headers */, 496 | 238EB1D11C7C662100289C37 /* Resources */, 497 | ); 498 | buildRules = ( 499 | ); 500 | dependencies = ( 501 | ); 502 | name = "TrashCanKit Mac"; 503 | productName = "TrashCanKit Mac"; 504 | productReference = 238EB1D31C7C662100289C37 /* TrashCanKit.framework */; 505 | productType = "com.apple.product-type.framework"; 506 | }; 507 | 238EB1DB1C7C662100289C37 /* TrashCanKit MacTests */ = { 508 | isa = PBXNativeTarget; 509 | buildConfigurationList = 238EB1E71C7C662100289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit MacTests" */; 510 | buildPhases = ( 511 | 238EB1D81C7C662100289C37 /* Sources */, 512 | 238EB1D91C7C662100289C37 /* Frameworks */, 513 | 238EB1DA1C7C662100289C37 /* Resources */, 514 | 238EB2331C7C67EC00289C37 /* Carthage embed */, 515 | ); 516 | buildRules = ( 517 | ); 518 | dependencies = ( 519 | 238EB1DF1C7C662100289C37 /* PBXTargetDependency */, 520 | ); 521 | name = "TrashCanKit MacTests"; 522 | productName = "TrashCanKit MacTests"; 523 | productReference = 238EB1DC1C7C662100289C37 /* TrashCanKit MacTests.xctest */; 524 | productType = "com.apple.product-type.bundle.unit-test"; 525 | }; 526 | /* End PBXNativeTarget section */ 527 | 528 | /* Begin PBXProject section */ 529 | 236364671BE22F1000AA7104 /* Project object */ = { 530 | isa = PBXProject; 531 | attributes = { 532 | LastSwiftUpdateCheck = 0720; 533 | LastUpgradeCheck = 0800; 534 | ORGANIZATIONNAME = nerdishbynature; 535 | TargetAttributes = { 536 | 2363646F1BE22F1000AA7104 = { 537 | CreatedOnToolsVersion = 7.1; 538 | DevelopmentTeam = 3NPZ2HXWU8; 539 | DevelopmentTeamName = "Piet Brauer"; 540 | LastSwiftMigration = 0800; 541 | }; 542 | 236364791BE22F1000AA7104 = { 543 | CreatedOnToolsVersion = 7.1; 544 | DevelopmentTeam = 3NPZ2HXWU8; 545 | DevelopmentTeamName = "Piet Brauer"; 546 | LastSwiftMigration = 0800; 547 | }; 548 | 238EB1A91C7C65CA00289C37 = { 549 | CreatedOnToolsVersion = 7.2.1; 550 | DevelopmentTeam = 3NPZ2HXWU8; 551 | DevelopmentTeamName = "Piet Brauer"; 552 | }; 553 | 238EB1B61C7C660800289C37 = { 554 | CreatedOnToolsVersion = 7.2.1; 555 | DevelopmentTeam = 3NPZ2HXWU8; 556 | DevelopmentTeamName = "Piet Brauer"; 557 | }; 558 | 238EB1BF1C7C660800289C37 = { 559 | CreatedOnToolsVersion = 7.2.1; 560 | DevelopmentTeam = 3NPZ2HXWU8; 561 | DevelopmentTeamName = "Piet Brauer"; 562 | }; 563 | 238EB1D21C7C662100289C37 = { 564 | CreatedOnToolsVersion = 7.2.1; 565 | }; 566 | 238EB1DB1C7C662100289C37 = { 567 | CreatedOnToolsVersion = 7.2.1; 568 | }; 569 | }; 570 | }; 571 | buildConfigurationList = 2363646A1BE22F1000AA7104 /* Build configuration list for PBXProject "TrashCanKit" */; 572 | compatibilityVersion = "Xcode 3.2"; 573 | developmentRegion = English; 574 | hasScannedForEncodings = 0; 575 | knownRegions = ( 576 | en, 577 | ); 578 | mainGroup = 236364661BE22F1000AA7104; 579 | productRefGroup = 236364711BE22F1000AA7104 /* Products */; 580 | projectDirPath = ""; 581 | projectRoot = ""; 582 | targets = ( 583 | 2363646F1BE22F1000AA7104 /* TrashCanKit */, 584 | 236364791BE22F1000AA7104 /* TrashCanKitTests */, 585 | 238EB1A91C7C65CA00289C37 /* TrashCanKit watchOS */, 586 | 238EB1B61C7C660800289C37 /* TrashCanKit tvOS */, 587 | 238EB1BF1C7C660800289C37 /* TrashCanKit tvOSTests */, 588 | 238EB1D21C7C662100289C37 /* TrashCanKit Mac */, 589 | 238EB1DB1C7C662100289C37 /* TrashCanKit MacTests */, 590 | ); 591 | }; 592 | /* End PBXProject section */ 593 | 594 | /* Begin PBXResourcesBuildPhase section */ 595 | 2363646E1BE22F1000AA7104 /* Resources */ = { 596 | isa = PBXResourcesBuildPhase; 597 | buildActionMask = 2147483647; 598 | files = ( 599 | ); 600 | runOnlyForDeploymentPostprocessing = 0; 601 | }; 602 | 236364781BE22F1000AA7104 /* Resources */ = { 603 | isa = PBXResourcesBuildPhase; 604 | buildActionMask = 2147483647; 605 | files = ( 606 | 231B68611BE9AD30007AE2A6 /* Me.json in Resources */, 607 | 231B685F1BE9AAC6007AE2A6 /* Repositories.json in Resources */, 608 | 231B68581BE9A13C007AE2A6 /* authorize.json in Resources */, 609 | 231B685C1BE9A699007AE2A6 /* refresh_token_error.json in Resources */, 610 | 236364A51BE2313B00AA7104 /* Email.json in Resources */, 611 | 236364A71BE2313B00AA7104 /* User.json in Resources */, 612 | 231B68631BE9AD8D007AE2A6 /* Emails.json in Resources */, 613 | 236364A61BE2313B00AA7104 /* Repository.json in Resources */, 614 | ); 615 | runOnlyForDeploymentPostprocessing = 0; 616 | }; 617 | 238EB1A81C7C65CA00289C37 /* Resources */ = { 618 | isa = PBXResourcesBuildPhase; 619 | buildActionMask = 2147483647; 620 | files = ( 621 | ); 622 | runOnlyForDeploymentPostprocessing = 0; 623 | }; 624 | 238EB1B51C7C660800289C37 /* Resources */ = { 625 | isa = PBXResourcesBuildPhase; 626 | buildActionMask = 2147483647; 627 | files = ( 628 | ); 629 | runOnlyForDeploymentPostprocessing = 0; 630 | }; 631 | 238EB1BE1C7C660800289C37 /* Resources */ = { 632 | isa = PBXResourcesBuildPhase; 633 | buildActionMask = 2147483647; 634 | files = ( 635 | 238EB2051C7C66B700289C37 /* Email.json in Resources */, 636 | 238EB2061C7C66B700289C37 /* Repository.json in Resources */, 637 | 238EB2071C7C66B700289C37 /* User.json in Resources */, 638 | 238EB2081C7C66B700289C37 /* authorize.json in Resources */, 639 | 238EB2091C7C66B700289C37 /* refresh_token_error.json in Resources */, 640 | 238EB20A1C7C66B700289C37 /* Repositories.json in Resources */, 641 | 238EB20B1C7C66B700289C37 /* Me.json in Resources */, 642 | 238EB20C1C7C66B700289C37 /* Emails.json in Resources */, 643 | ); 644 | runOnlyForDeploymentPostprocessing = 0; 645 | }; 646 | 238EB1D11C7C662100289C37 /* Resources */ = { 647 | isa = PBXResourcesBuildPhase; 648 | buildActionMask = 2147483647; 649 | files = ( 650 | ); 651 | runOnlyForDeploymentPostprocessing = 0; 652 | }; 653 | 238EB1DA1C7C662100289C37 /* Resources */ = { 654 | isa = PBXResourcesBuildPhase; 655 | buildActionMask = 2147483647; 656 | files = ( 657 | 238EB20D1C7C66BD00289C37 /* Email.json in Resources */, 658 | 238EB20E1C7C66BD00289C37 /* Repository.json in Resources */, 659 | 238EB20F1C7C66BD00289C37 /* User.json in Resources */, 660 | 238EB2101C7C66BD00289C37 /* authorize.json in Resources */, 661 | 238EB2111C7C66BD00289C37 /* refresh_token_error.json in Resources */, 662 | 238EB2121C7C66BD00289C37 /* Repositories.json in Resources */, 663 | 238EB2131C7C66BD00289C37 /* Me.json in Resources */, 664 | 238EB2141C7C66BD00289C37 /* Emails.json in Resources */, 665 | ); 666 | runOnlyForDeploymentPostprocessing = 0; 667 | }; 668 | /* End PBXResourcesBuildPhase section */ 669 | 670 | /* Begin PBXSourcesBuildPhase section */ 671 | 2363646B1BE22F1000AA7104 /* Sources */ = { 672 | isa = PBXSourcesBuildPhase; 673 | buildActionMask = 2147483647; 674 | files = ( 675 | 231B68521BE9989C007AE2A6 /* TokenConfiguration.swift in Sources */, 676 | 231B684E1BE99852007AE2A6 /* OAuthConfiguration.swift in Sources */, 677 | 236364911BE22FCC00AA7104 /* User.swift in Sources */, 678 | 231B68501BE99886007AE2A6 /* NSURL+URLParameters.swift in Sources */, 679 | 236364901BE22FCC00AA7104 /* Token.swift in Sources */, 680 | 231069D31C06BE3400101BCC /* String+QueryParameters.swift in Sources */, 681 | 2363648E1BE22FCC00AA7104 /* TrashCanKit.swift in Sources */, 682 | 231B68541BE998C7007AE2A6 /* OAuthRouter.swift in Sources */, 683 | 2363648F1BE22FCC00AA7104 /* Repositories.swift in Sources */, 684 | 231069D51C06BE6D00101BCC /* Dictionary+Additions.swift in Sources */, 685 | ); 686 | runOnlyForDeploymentPostprocessing = 0; 687 | }; 688 | 236364761BE22F1000AA7104 /* Sources */ = { 689 | isa = PBXSourcesBuildPhase; 690 | buildActionMask = 2147483647; 691 | files = ( 692 | 236364991BE2301200AA7104 /* UserTests.swift in Sources */, 693 | 233BEC921CAA3278005F9C19 /* TrashCanKitTestURLSession.swift in Sources */, 694 | 231B685A1BE9A3DD007AE2A6 /* TokenTests.swift in Sources */, 695 | 236364961BE2301200AA7104 /* RepositoriesTests.swift in Sources */, 696 | 231B68561BE9997C007AE2A6 /* ConfigurationTests.swift in Sources */, 697 | 236364971BE2301200AA7104 /* TestHelper.swift in Sources */, 698 | ); 699 | runOnlyForDeploymentPostprocessing = 0; 700 | }; 701 | 238EB1A51C7C65CA00289C37 /* Sources */ = { 702 | isa = PBXSourcesBuildPhase; 703 | buildActionMask = 2147483647; 704 | files = ( 705 | 238EB1EA1C7C669400289C37 /* TrashCanKit.swift in Sources */, 706 | 238EB1EB1C7C669400289C37 /* NSURL+URLParameters.swift in Sources */, 707 | 238EB1EC1C7C669400289C37 /* OAuthConfiguration.swift in Sources */, 708 | 238EB1ED1C7C669400289C37 /* OAuthRouter.swift in Sources */, 709 | 238EB1EE1C7C669400289C37 /* TokenConfiguration.swift in Sources */, 710 | 238EB1EF1C7C669400289C37 /* Repositories.swift in Sources */, 711 | 238EB1F01C7C669400289C37 /* String+QueryParameters.swift in Sources */, 712 | 238EB1F11C7C669400289C37 /* Dictionary+Additions.swift in Sources */, 713 | 238EB1F21C7C669400289C37 /* Token.swift in Sources */, 714 | 238EB1F31C7C669400289C37 /* User.swift in Sources */, 715 | ); 716 | runOnlyForDeploymentPostprocessing = 0; 717 | }; 718 | 238EB1B21C7C660800289C37 /* Sources */ = { 719 | isa = PBXSourcesBuildPhase; 720 | buildActionMask = 2147483647; 721 | files = ( 722 | 238EB1F51C7C66A500289C37 /* TrashCanKit.swift in Sources */, 723 | 238EB1F61C7C66A500289C37 /* NSURL+URLParameters.swift in Sources */, 724 | 238EB1F71C7C66A500289C37 /* OAuthConfiguration.swift in Sources */, 725 | 238EB1F81C7C66A500289C37 /* OAuthRouter.swift in Sources */, 726 | 238EB1F91C7C66A500289C37 /* TokenConfiguration.swift in Sources */, 727 | 238EB1FA1C7C66A500289C37 /* Repositories.swift in Sources */, 728 | 238EB1FB1C7C66A500289C37 /* String+QueryParameters.swift in Sources */, 729 | 238EB1FC1C7C66A500289C37 /* Dictionary+Additions.swift in Sources */, 730 | 238EB1FD1C7C66A500289C37 /* Token.swift in Sources */, 731 | 238EB1FE1C7C66A500289C37 /* User.swift in Sources */, 732 | ); 733 | runOnlyForDeploymentPostprocessing = 0; 734 | }; 735 | 238EB1BC1C7C660800289C37 /* Sources */ = { 736 | isa = PBXSourcesBuildPhase; 737 | buildActionMask = 2147483647; 738 | files = ( 739 | 238EB2001C7C66B100289C37 /* TestHelper.swift in Sources */, 740 | 233BEC931CAA3278005F9C19 /* TrashCanKitTestURLSession.swift in Sources */, 741 | 238EB2011C7C66B100289C37 /* RepositoriesTests.swift in Sources */, 742 | 238EB2021C7C66B100289C37 /* UserTests.swift in Sources */, 743 | 238EB2031C7C66B100289C37 /* ConfigurationTests.swift in Sources */, 744 | 238EB2041C7C66B100289C37 /* TokenTests.swift in Sources */, 745 | ); 746 | runOnlyForDeploymentPostprocessing = 0; 747 | }; 748 | 238EB1CE1C7C662100289C37 /* Sources */ = { 749 | isa = PBXSourcesBuildPhase; 750 | buildActionMask = 2147483647; 751 | files = ( 752 | 238EB21A1C7C66C800289C37 /* TrashCanKit.swift in Sources */, 753 | 238EB21B1C7C66C800289C37 /* NSURL+URLParameters.swift in Sources */, 754 | 238EB21C1C7C66C800289C37 /* OAuthConfiguration.swift in Sources */, 755 | 238EB21D1C7C66C800289C37 /* OAuthRouter.swift in Sources */, 756 | 238EB21E1C7C66C800289C37 /* TokenConfiguration.swift in Sources */, 757 | 238EB21F1C7C66C800289C37 /* Repositories.swift in Sources */, 758 | 238EB2201C7C66C800289C37 /* String+QueryParameters.swift in Sources */, 759 | 238EB2211C7C66C800289C37 /* Dictionary+Additions.swift in Sources */, 760 | 238EB2221C7C66C800289C37 /* Token.swift in Sources */, 761 | 238EB2231C7C66C800289C37 /* User.swift in Sources */, 762 | ); 763 | runOnlyForDeploymentPostprocessing = 0; 764 | }; 765 | 238EB1D81C7C662100289C37 /* Sources */ = { 766 | isa = PBXSourcesBuildPhase; 767 | buildActionMask = 2147483647; 768 | files = ( 769 | 238EB2151C7C66C200289C37 /* TestHelper.swift in Sources */, 770 | 233BEC941CAA3278005F9C19 /* TrashCanKitTestURLSession.swift in Sources */, 771 | 238EB2161C7C66C200289C37 /* RepositoriesTests.swift in Sources */, 772 | 238EB2171C7C66C200289C37 /* UserTests.swift in Sources */, 773 | 238EB2181C7C66C200289C37 /* ConfigurationTests.swift in Sources */, 774 | 238EB2191C7C66C200289C37 /* TokenTests.swift in Sources */, 775 | ); 776 | runOnlyForDeploymentPostprocessing = 0; 777 | }; 778 | /* End PBXSourcesBuildPhase section */ 779 | 780 | /* Begin PBXTargetDependency section */ 781 | 2363647D1BE22F1000AA7104 /* PBXTargetDependency */ = { 782 | isa = PBXTargetDependency; 783 | target = 2363646F1BE22F1000AA7104 /* TrashCanKit */; 784 | targetProxy = 2363647C1BE22F1000AA7104 /* PBXContainerItemProxy */; 785 | }; 786 | 238EB1C31C7C660800289C37 /* PBXTargetDependency */ = { 787 | isa = PBXTargetDependency; 788 | target = 238EB1B61C7C660800289C37 /* TrashCanKit tvOS */; 789 | targetProxy = 238EB1C21C7C660800289C37 /* PBXContainerItemProxy */; 790 | }; 791 | 238EB1DF1C7C662100289C37 /* PBXTargetDependency */ = { 792 | isa = PBXTargetDependency; 793 | target = 238EB1D21C7C662100289C37 /* TrashCanKit Mac */; 794 | targetProxy = 238EB1DE1C7C662100289C37 /* PBXContainerItemProxy */; 795 | }; 796 | /* End PBXTargetDependency section */ 797 | 798 | /* Begin XCBuildConfiguration section */ 799 | 236364821BE22F1000AA7104 /* Debug */ = { 800 | isa = XCBuildConfiguration; 801 | buildSettings = { 802 | ALWAYS_SEARCH_USER_PATHS = NO; 803 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 804 | CLANG_CXX_LIBRARY = "libc++"; 805 | CLANG_ENABLE_MODULES = YES; 806 | CLANG_ENABLE_OBJC_ARC = YES; 807 | CLANG_WARN_BOOL_CONVERSION = YES; 808 | CLANG_WARN_CONSTANT_CONVERSION = YES; 809 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 810 | CLANG_WARN_EMPTY_BODY = YES; 811 | CLANG_WARN_ENUM_CONVERSION = YES; 812 | CLANG_WARN_INFINITE_RECURSION = YES; 813 | CLANG_WARN_INT_CONVERSION = YES; 814 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 815 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 816 | CLANG_WARN_UNREACHABLE_CODE = YES; 817 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 818 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 819 | COPY_PHASE_STRIP = NO; 820 | CURRENT_PROJECT_VERSION = 1; 821 | DEBUG_INFORMATION_FORMAT = dwarf; 822 | ENABLE_STRICT_OBJC_MSGSEND = YES; 823 | ENABLE_TESTABILITY = YES; 824 | GCC_C_LANGUAGE_STANDARD = gnu99; 825 | GCC_DYNAMIC_NO_PIC = NO; 826 | GCC_NO_COMMON_BLOCKS = YES; 827 | GCC_OPTIMIZATION_LEVEL = 0; 828 | GCC_PREPROCESSOR_DEFINITIONS = ( 829 | "DEBUG=1", 830 | "$(inherited)", 831 | ); 832 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 833 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 834 | GCC_WARN_UNDECLARED_SELECTOR = YES; 835 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 836 | GCC_WARN_UNUSED_FUNCTION = YES; 837 | GCC_WARN_UNUSED_VARIABLE = YES; 838 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 839 | MTL_ENABLE_DEBUG_INFO = YES; 840 | ONLY_ACTIVE_ARCH = YES; 841 | PRODUCT_BUNDLE_IDENTIFIER = com.nerdishbynature.TrashCanKit; 842 | PRODUCT_NAME = TrashCanKit; 843 | SDKROOT = iphoneos; 844 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 845 | SWIFT_VERSION = 3.0; 846 | TARGETED_DEVICE_FAMILY = "1,2"; 847 | VERSIONING_SYSTEM = "apple-generic"; 848 | VERSION_INFO_PREFIX = ""; 849 | }; 850 | name = Debug; 851 | }; 852 | 236364831BE22F1000AA7104 /* Release */ = { 853 | isa = XCBuildConfiguration; 854 | buildSettings = { 855 | ALWAYS_SEARCH_USER_PATHS = NO; 856 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 857 | CLANG_CXX_LIBRARY = "libc++"; 858 | CLANG_ENABLE_MODULES = YES; 859 | CLANG_ENABLE_OBJC_ARC = YES; 860 | CLANG_WARN_BOOL_CONVERSION = YES; 861 | CLANG_WARN_CONSTANT_CONVERSION = YES; 862 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 863 | CLANG_WARN_EMPTY_BODY = YES; 864 | CLANG_WARN_ENUM_CONVERSION = YES; 865 | CLANG_WARN_INFINITE_RECURSION = YES; 866 | CLANG_WARN_INT_CONVERSION = YES; 867 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 868 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 869 | CLANG_WARN_UNREACHABLE_CODE = YES; 870 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 871 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 872 | COPY_PHASE_STRIP = NO; 873 | CURRENT_PROJECT_VERSION = 1; 874 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 875 | ENABLE_NS_ASSERTIONS = NO; 876 | ENABLE_STRICT_OBJC_MSGSEND = YES; 877 | GCC_C_LANGUAGE_STANDARD = gnu99; 878 | GCC_NO_COMMON_BLOCKS = YES; 879 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 880 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 881 | GCC_WARN_UNDECLARED_SELECTOR = YES; 882 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 883 | GCC_WARN_UNUSED_FUNCTION = YES; 884 | GCC_WARN_UNUSED_VARIABLE = YES; 885 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 886 | MTL_ENABLE_DEBUG_INFO = NO; 887 | PRODUCT_BUNDLE_IDENTIFIER = com.nerdishbynature.TrashCanKit; 888 | PRODUCT_NAME = TrashCanKit; 889 | SDKROOT = iphoneos; 890 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 891 | SWIFT_VERSION = 3.0; 892 | TARGETED_DEVICE_FAMILY = "1,2"; 893 | VALIDATE_PRODUCT = YES; 894 | VERSIONING_SYSTEM = "apple-generic"; 895 | VERSION_INFO_PREFIX = ""; 896 | }; 897 | name = Release; 898 | }; 899 | 236364851BE22F1100AA7104 /* Debug */ = { 900 | isa = XCBuildConfiguration; 901 | buildSettings = { 902 | CLANG_ENABLE_MODULES = YES; 903 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 904 | DEFINES_MODULE = YES; 905 | DYLIB_COMPATIBILITY_VERSION = 1; 906 | DYLIB_CURRENT_VERSION = 1; 907 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 908 | FRAMEWORK_SEARCH_PATHS = ( 909 | "$(inherited)", 910 | "$(PROJECT_DIR)/Carthage/Build/iOS", 911 | ); 912 | INFOPLIST_FILE = TrashCanKit/Info.plist; 913 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 914 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 915 | SKIP_INSTALL = YES; 916 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 917 | SWIFT_VERSION = 3.0; 918 | }; 919 | name = Debug; 920 | }; 921 | 236364861BE22F1100AA7104 /* Release */ = { 922 | isa = XCBuildConfiguration; 923 | buildSettings = { 924 | CLANG_ENABLE_MODULES = YES; 925 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 926 | DEFINES_MODULE = YES; 927 | DYLIB_COMPATIBILITY_VERSION = 1; 928 | DYLIB_CURRENT_VERSION = 1; 929 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 930 | FRAMEWORK_SEARCH_PATHS = ( 931 | "$(inherited)", 932 | "$(PROJECT_DIR)/Carthage/Build/iOS", 933 | ); 934 | INFOPLIST_FILE = TrashCanKit/Info.plist; 935 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 936 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 937 | SKIP_INSTALL = YES; 938 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 939 | SWIFT_VERSION = 3.0; 940 | }; 941 | name = Release; 942 | }; 943 | 236364881BE22F1100AA7104 /* Debug */ = { 944 | isa = XCBuildConfiguration; 945 | buildSettings = { 946 | CLANG_ENABLE_MODULES = YES; 947 | FRAMEWORK_SEARCH_PATHS = ( 948 | "$(inherited)", 949 | "$(PROJECT_DIR)/Carthage/Build/iOS", 950 | ); 951 | INFOPLIST_FILE = TrashCanKitTests/Info.plist; 952 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 953 | PRODUCT_BUNDLE_IDENTIFIER = com.nerdishbynature.TrashCanKitTests; 954 | PRODUCT_NAME = "$(TARGET_NAME)"; 955 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 956 | SWIFT_VERSION = 3.0; 957 | }; 958 | name = Debug; 959 | }; 960 | 236364891BE22F1100AA7104 /* Release */ = { 961 | isa = XCBuildConfiguration; 962 | buildSettings = { 963 | CLANG_ENABLE_MODULES = YES; 964 | FRAMEWORK_SEARCH_PATHS = ( 965 | "$(inherited)", 966 | "$(PROJECT_DIR)/Carthage/Build/iOS", 967 | ); 968 | INFOPLIST_FILE = TrashCanKitTests/Info.plist; 969 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 970 | PRODUCT_BUNDLE_IDENTIFIER = com.nerdishbynature.TrashCanKitTests; 971 | PRODUCT_NAME = "$(TARGET_NAME)"; 972 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 973 | SWIFT_VERSION = 3.0; 974 | }; 975 | name = Release; 976 | }; 977 | 238EB1AF1C7C65CA00289C37 /* Debug */ = { 978 | isa = XCBuildConfiguration; 979 | buildSettings = { 980 | APPLICATION_EXTENSION_API_ONLY = YES; 981 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 982 | DEFINES_MODULE = YES; 983 | DYLIB_COMPATIBILITY_VERSION = 1; 984 | DYLIB_CURRENT_VERSION = 1; 985 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 986 | FRAMEWORK_SEARCH_PATHS = ( 987 | "$(inherited)", 988 | "$(PROJECT_DIR)/Carthage/Build/watchOS", 989 | ); 990 | INFOPLIST_FILE = TrashCanKit/Info.plist; 991 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 992 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 993 | SDKROOT = watchos; 994 | SKIP_INSTALL = YES; 995 | TARGETED_DEVICE_FAMILY = 4; 996 | WATCHOS_DEPLOYMENT_TARGET = 2.1; 997 | }; 998 | name = Debug; 999 | }; 1000 | 238EB1B01C7C65CA00289C37 /* Release */ = { 1001 | isa = XCBuildConfiguration; 1002 | buildSettings = { 1003 | APPLICATION_EXTENSION_API_ONLY = YES; 1004 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 1005 | DEFINES_MODULE = YES; 1006 | DYLIB_COMPATIBILITY_VERSION = 1; 1007 | DYLIB_CURRENT_VERSION = 1; 1008 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1009 | FRAMEWORK_SEARCH_PATHS = ( 1010 | "$(inherited)", 1011 | "$(PROJECT_DIR)/Carthage/Build/watchOS", 1012 | ); 1013 | INFOPLIST_FILE = TrashCanKit/Info.plist; 1014 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1015 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1016 | SDKROOT = watchos; 1017 | SKIP_INSTALL = YES; 1018 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 1019 | TARGETED_DEVICE_FAMILY = 4; 1020 | WATCHOS_DEPLOYMENT_TARGET = 2.1; 1021 | }; 1022 | name = Release; 1023 | }; 1024 | 238EB1C91C7C660800289C37 /* Debug */ = { 1025 | isa = XCBuildConfiguration; 1026 | buildSettings = { 1027 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 1028 | DEFINES_MODULE = YES; 1029 | DYLIB_COMPATIBILITY_VERSION = 1; 1030 | DYLIB_CURRENT_VERSION = 1; 1031 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1032 | FRAMEWORK_SEARCH_PATHS = ( 1033 | "$(inherited)", 1034 | "$(PROJECT_DIR)/Carthage/Build/tvOS", 1035 | ); 1036 | INFOPLIST_FILE = TrashCanKit/Info.plist; 1037 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1038 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1039 | SDKROOT = appletvos; 1040 | SKIP_INSTALL = YES; 1041 | TARGETED_DEVICE_FAMILY = 3; 1042 | TVOS_DEPLOYMENT_TARGET = 9.0; 1043 | }; 1044 | name = Debug; 1045 | }; 1046 | 238EB1CA1C7C660800289C37 /* Release */ = { 1047 | isa = XCBuildConfiguration; 1048 | buildSettings = { 1049 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 1050 | DEFINES_MODULE = YES; 1051 | DYLIB_COMPATIBILITY_VERSION = 1; 1052 | DYLIB_CURRENT_VERSION = 1; 1053 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1054 | FRAMEWORK_SEARCH_PATHS = ( 1055 | "$(inherited)", 1056 | "$(PROJECT_DIR)/Carthage/Build/tvOS", 1057 | ); 1058 | INFOPLIST_FILE = TrashCanKit/Info.plist; 1059 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1060 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1061 | SDKROOT = appletvos; 1062 | SKIP_INSTALL = YES; 1063 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 1064 | TARGETED_DEVICE_FAMILY = 3; 1065 | TVOS_DEPLOYMENT_TARGET = 9.0; 1066 | }; 1067 | name = Release; 1068 | }; 1069 | 238EB1CC1C7C660800289C37 /* Debug */ = { 1070 | isa = XCBuildConfiguration; 1071 | buildSettings = { 1072 | FRAMEWORK_SEARCH_PATHS = ( 1073 | "$(inherited)", 1074 | "$(PROJECT_DIR)/Carthage/Build/tvOS", 1075 | ); 1076 | INFOPLIST_FILE = TrashCanKitTests/Info.plist; 1077 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1078 | PRODUCT_BUNDLE_IDENTIFIER = "com.nerdishbynature.TrashCanKit-tvOSTests"; 1079 | PRODUCT_NAME = "$(TARGET_NAME)"; 1080 | SDKROOT = appletvos; 1081 | TVOS_DEPLOYMENT_TARGET = 9.1; 1082 | }; 1083 | name = Debug; 1084 | }; 1085 | 238EB1CD1C7C660800289C37 /* Release */ = { 1086 | isa = XCBuildConfiguration; 1087 | buildSettings = { 1088 | FRAMEWORK_SEARCH_PATHS = ( 1089 | "$(inherited)", 1090 | "$(PROJECT_DIR)/Carthage/Build/tvOS", 1091 | ); 1092 | INFOPLIST_FILE = TrashCanKitTests/Info.plist; 1093 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1094 | PRODUCT_BUNDLE_IDENTIFIER = "com.nerdishbynature.TrashCanKit-tvOSTests"; 1095 | PRODUCT_NAME = "$(TARGET_NAME)"; 1096 | SDKROOT = appletvos; 1097 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 1098 | TVOS_DEPLOYMENT_TARGET = 9.1; 1099 | }; 1100 | name = Release; 1101 | }; 1102 | 238EB1E51C7C662100289C37 /* Debug */ = { 1103 | isa = XCBuildConfiguration; 1104 | buildSettings = { 1105 | CODE_SIGN_IDENTITY = ""; 1106 | COMBINE_HIDPI_IMAGES = YES; 1107 | DEFINES_MODULE = YES; 1108 | DYLIB_COMPATIBILITY_VERSION = 1; 1109 | DYLIB_CURRENT_VERSION = 1; 1110 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1111 | FRAMEWORK_SEARCH_PATHS = ( 1112 | "$(inherited)", 1113 | "$(PROJECT_DIR)/Carthage/Build/Mac", 1114 | ); 1115 | FRAMEWORK_VERSION = A; 1116 | INFOPLIST_FILE = TrashCanKit/Info.plist; 1117 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1118 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 1119 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1120 | SDKROOT = macosx; 1121 | SKIP_INSTALL = YES; 1122 | }; 1123 | name = Debug; 1124 | }; 1125 | 238EB1E61C7C662100289C37 /* Release */ = { 1126 | isa = XCBuildConfiguration; 1127 | buildSettings = { 1128 | CODE_SIGN_IDENTITY = ""; 1129 | COMBINE_HIDPI_IMAGES = YES; 1130 | DEFINES_MODULE = YES; 1131 | DYLIB_COMPATIBILITY_VERSION = 1; 1132 | DYLIB_CURRENT_VERSION = 1; 1133 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1134 | FRAMEWORK_SEARCH_PATHS = ( 1135 | "$(inherited)", 1136 | "$(PROJECT_DIR)/Carthage/Build/Mac", 1137 | ); 1138 | FRAMEWORK_VERSION = A; 1139 | INFOPLIST_FILE = TrashCanKit/Info.plist; 1140 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1141 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 1142 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1143 | SDKROOT = macosx; 1144 | SKIP_INSTALL = YES; 1145 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 1146 | }; 1147 | name = Release; 1148 | }; 1149 | 238EB1E81C7C662100289C37 /* Debug */ = { 1150 | isa = XCBuildConfiguration; 1151 | buildSettings = { 1152 | CODE_SIGN_IDENTITY = "-"; 1153 | COMBINE_HIDPI_IMAGES = YES; 1154 | FRAMEWORK_SEARCH_PATHS = ( 1155 | "$(inherited)", 1156 | "$(PROJECT_DIR)/Carthage/Build/Mac", 1157 | ); 1158 | INFOPLIST_FILE = TrashCanKitTests/Info.plist; 1159 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 1160 | MACOSX_DEPLOYMENT_TARGET = 10.11; 1161 | PRODUCT_NAME = "TrashCanKit MacTests"; 1162 | SDKROOT = macosx; 1163 | }; 1164 | name = Debug; 1165 | }; 1166 | 238EB1E91C7C662100289C37 /* Release */ = { 1167 | isa = XCBuildConfiguration; 1168 | buildSettings = { 1169 | CODE_SIGN_IDENTITY = "-"; 1170 | COMBINE_HIDPI_IMAGES = YES; 1171 | FRAMEWORK_SEARCH_PATHS = ( 1172 | "$(inherited)", 1173 | "$(PROJECT_DIR)/Carthage/Build/Mac", 1174 | ); 1175 | INFOPLIST_FILE = TrashCanKitTests/Info.plist; 1176 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 1177 | MACOSX_DEPLOYMENT_TARGET = 10.11; 1178 | PRODUCT_NAME = "TrashCanKit MacTests"; 1179 | SDKROOT = macosx; 1180 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 1181 | }; 1182 | name = Release; 1183 | }; 1184 | /* End XCBuildConfiguration section */ 1185 | 1186 | /* Begin XCConfigurationList section */ 1187 | 2363646A1BE22F1000AA7104 /* Build configuration list for PBXProject "TrashCanKit" */ = { 1188 | isa = XCConfigurationList; 1189 | buildConfigurations = ( 1190 | 236364821BE22F1000AA7104 /* Debug */, 1191 | 236364831BE22F1000AA7104 /* Release */, 1192 | ); 1193 | defaultConfigurationIsVisible = 0; 1194 | defaultConfigurationName = Release; 1195 | }; 1196 | 236364841BE22F1100AA7104 /* Build configuration list for PBXNativeTarget "TrashCanKit" */ = { 1197 | isa = XCConfigurationList; 1198 | buildConfigurations = ( 1199 | 236364851BE22F1100AA7104 /* Debug */, 1200 | 236364861BE22F1100AA7104 /* Release */, 1201 | ); 1202 | defaultConfigurationIsVisible = 0; 1203 | defaultConfigurationName = Release; 1204 | }; 1205 | 236364871BE22F1100AA7104 /* Build configuration list for PBXNativeTarget "TrashCanKitTests" */ = { 1206 | isa = XCConfigurationList; 1207 | buildConfigurations = ( 1208 | 236364881BE22F1100AA7104 /* Debug */, 1209 | 236364891BE22F1100AA7104 /* Release */, 1210 | ); 1211 | defaultConfigurationIsVisible = 0; 1212 | defaultConfigurationName = Release; 1213 | }; 1214 | 238EB1B11C7C65CA00289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit watchOS" */ = { 1215 | isa = XCConfigurationList; 1216 | buildConfigurations = ( 1217 | 238EB1AF1C7C65CA00289C37 /* Debug */, 1218 | 238EB1B01C7C65CA00289C37 /* Release */, 1219 | ); 1220 | defaultConfigurationIsVisible = 0; 1221 | defaultConfigurationName = Release; 1222 | }; 1223 | 238EB1C81C7C660800289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit tvOS" */ = { 1224 | isa = XCConfigurationList; 1225 | buildConfigurations = ( 1226 | 238EB1C91C7C660800289C37 /* Debug */, 1227 | 238EB1CA1C7C660800289C37 /* Release */, 1228 | ); 1229 | defaultConfigurationIsVisible = 0; 1230 | defaultConfigurationName = Release; 1231 | }; 1232 | 238EB1CB1C7C660800289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit tvOSTests" */ = { 1233 | isa = XCConfigurationList; 1234 | buildConfigurations = ( 1235 | 238EB1CC1C7C660800289C37 /* Debug */, 1236 | 238EB1CD1C7C660800289C37 /* Release */, 1237 | ); 1238 | defaultConfigurationIsVisible = 0; 1239 | defaultConfigurationName = Release; 1240 | }; 1241 | 238EB1E41C7C662100289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit Mac" */ = { 1242 | isa = XCConfigurationList; 1243 | buildConfigurations = ( 1244 | 238EB1E51C7C662100289C37 /* Debug */, 1245 | 238EB1E61C7C662100289C37 /* Release */, 1246 | ); 1247 | defaultConfigurationIsVisible = 0; 1248 | defaultConfigurationName = Release; 1249 | }; 1250 | 238EB1E71C7C662100289C37 /* Build configuration list for PBXNativeTarget "TrashCanKit MacTests" */ = { 1251 | isa = XCConfigurationList; 1252 | buildConfigurations = ( 1253 | 238EB1E81C7C662100289C37 /* Debug */, 1254 | 238EB1E91C7C662100289C37 /* Release */, 1255 | ); 1256 | defaultConfigurationIsVisible = 0; 1257 | defaultConfigurationName = Release; 1258 | }; 1259 | /* End XCConfigurationList section */ 1260 | }; 1261 | rootObject = 236364671BE22F1000AA7104 /* Project object */; 1262 | } 1263 | -------------------------------------------------------------------------------- /TrashCanKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TrashCanKit.xcodeproj/xcshareddata/xcschemes/TrashCanKit Mac.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /TrashCanKit.xcodeproj/xcshareddata/xcschemes/TrashCanKit tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /TrashCanKit.xcodeproj/xcshareddata/xcschemes/TrashCanKit watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /TrashCanKit.xcodeproj/xcshareddata/xcschemes/TrashCanKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 84 | 90 | 91 | 92 | 93 | 95 | 96 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /TrashCanKit/Dictionary+Additions.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal func += (left: inout Dictionary, right: Dictionary) { 4 | for (k, v) in right { 5 | left.updateValue(v, forKey: k) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /TrashCanKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.6.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /TrashCanKit/NSURL+URLParameters.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal extension URL { 4 | func URLParameters() -> [String: String] { 5 | let stringParams = absoluteString.components(separatedBy: "?").last 6 | let params = stringParams?.components(separatedBy: "&") 7 | var returnParams: [String: String] = [:] 8 | if let params = params { 9 | for param in params { 10 | let keyValue = param.components(separatedBy: "=") 11 | if let key = keyValue.first, let value = keyValue.last { 12 | returnParams[key] = value 13 | } 14 | } 15 | } 16 | return returnParams 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /TrashCanKit/OAuthConfiguration.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import RequestKit 3 | 4 | public struct OAuthConfiguration: Configuration { 5 | public var apiEndpoint: String 6 | public var accessToken: String? 7 | public let token: String 8 | public let secret: String 9 | public let scopes: [String] 10 | public let webEndpoint: String 11 | public let errorDomain = TrashCanKitErrorDomain 12 | 13 | public init(_ url: String = bitbucketBaseURL, webURL: String = bitbucketWebURL, 14 | token: String, secret: String, scopes: [String]) { 15 | apiEndpoint = url 16 | webEndpoint = webURL 17 | self.token = token 18 | self.secret = secret 19 | self.scopes = [] 20 | } 21 | 22 | public func authenticate() -> URL? { 23 | return OAuthRouter.authorize(self).URLRequest?.url 24 | } 25 | 26 | fileprivate func basicAuthenticationString() -> String { 27 | let clientIDSecretString = [token, secret].joined(separator: ":") 28 | let clientIDSecretData = clientIDSecretString.data(using: String.Encoding.utf8) 29 | let base64 = clientIDSecretData?.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)) 30 | return "Basic \(base64 ?? "")" 31 | } 32 | 33 | public func basicAuthConfig() -> URLSessionConfiguration { 34 | let config = URLSessionConfiguration.default 35 | config.httpAdditionalHeaders = ["Authorization" : basicAuthenticationString()] 36 | return config 37 | } 38 | 39 | public func authorize(_ session: RequestKitURLSession, code: String, completion: @escaping (_ config: TokenConfiguration) -> Void) { 40 | let request = OAuthRouter.accessToken(self, code).URLRequest 41 | if let request = request { 42 | let task = session.dataTask(with: request) { data, response, err in 43 | if let response = response as? HTTPURLResponse { 44 | if response.statusCode != 200 { 45 | return 46 | } else { 47 | if let config = self.configFromData(data) { 48 | completion(config) 49 | } 50 | } 51 | } 52 | } 53 | task.resume() 54 | } 55 | } 56 | 57 | private func configFromData(_ data: Data?) -> TokenConfiguration? { 58 | guard let data = data else { return nil } 59 | do { 60 | guard let json = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: AnyObject] else { return nil } 61 | let config = TokenConfiguration(json: json) 62 | return config 63 | } catch { 64 | return nil 65 | } 66 | } 67 | 68 | public func handleOpenURL(_ session: RequestKitURLSession = URLSession.shared, url: URL, completion: @escaping (_ config: TokenConfiguration) -> Void) { 69 | let params = url.URLParameters() 70 | if let code = params["code"] { 71 | authorize(session, code: code) { config in 72 | completion(config) 73 | } 74 | } 75 | } 76 | 77 | public func accessTokenFromResponse(_ response: String) -> String? { 78 | let accessTokenParam = response.components(separatedBy: "&").first 79 | if let accessTokenParam = accessTokenParam { 80 | return accessTokenParam.components(separatedBy: "=").last 81 | } 82 | return nil 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /TrashCanKit/OAuthRouter.swift: -------------------------------------------------------------------------------- 1 | import RequestKit 2 | 3 | public enum OAuthRouter: Router { 4 | case authorize(OAuthConfiguration) 5 | case accessToken(OAuthConfiguration, String) 6 | 7 | public var configuration: Configuration { 8 | switch self { 9 | case .authorize(let config): return config 10 | case .accessToken(let config, _): return config 11 | } 12 | } 13 | 14 | public var method: HTTPMethod { 15 | switch self { 16 | case .authorize: 17 | return .GET 18 | case .accessToken: 19 | return .POST 20 | } 21 | } 22 | 23 | public var encoding: HTTPEncoding { 24 | switch self { 25 | case .authorize: 26 | return .url 27 | case .accessToken: 28 | return .form 29 | } 30 | } 31 | 32 | public var path: String { 33 | switch self { 34 | case .authorize: 35 | return "site/oauth2/authorize" 36 | case .accessToken: 37 | return "site/oauth2/access_token" 38 | } 39 | } 40 | 41 | public var params: [String: Any] { 42 | switch self { 43 | case .authorize(let config): 44 | return ["client_id": config.token, "response_type": "code"] 45 | case .accessToken(_, let code): 46 | return ["code": code, "grant_type": "authorization_code"] 47 | } 48 | } 49 | 50 | public var URLRequest: Foundation.URLRequest? { 51 | switch self { 52 | case .authorize(let config): 53 | let url = URL(string: path, relativeTo: URL(string: config.webEndpoint)!) 54 | let components = URLComponents(url: url!, resolvingAgainstBaseURL: true) 55 | return request(components!, parameters: params) 56 | case .accessToken(let config, _): 57 | let url = URL(string: path, relativeTo: URL(string: config.webEndpoint)!) 58 | let components = URLComponents(url: url!, resolvingAgainstBaseURL: true) 59 | return request(components!, parameters: params) 60 | } 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /TrashCanKit/Repositories.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import RequestKit 3 | 4 | // MARK: model 5 | 6 | @objc open class Repository: NSObject { 7 | open let id: String 8 | open let owner: User 9 | open var name: String? 10 | open var fullName: String? 11 | open var isPrivate: Bool 12 | open var repositoryDescription: String? 13 | open var gitURL: String? 14 | open var sshURL: String? 15 | open var cloneURL: String? 16 | open var size: Int 17 | open var scm: String? 18 | 19 | public init(json: [String: AnyObject]) { 20 | owner = User(json["owner"] as? [String: AnyObject] ?? [:]) 21 | if let id = json["uuid"] as? String { 22 | self.id = id 23 | name = json["name"] as? String 24 | fullName = json["full_name"] as? String 25 | isPrivate = json["is_private"] as? Bool ?? false 26 | repositoryDescription = json["description"] as? String 27 | if let linksDict = json["links"] as? [String: AnyObject], 28 | let cloneArray = linksDict["clone"] as? [[String: String]] { 29 | for urlDict in cloneArray { 30 | if urlDict["name"] == "https" { 31 | let prefix = "https://\(owner.login ?? "")@" 32 | gitURL = urlDict["href"]?.replacingOccurrences(of: prefix, with: "git://") 33 | cloneURL = urlDict["href"]?.replacingOccurrences(of: prefix, with: "https://") 34 | } 35 | if urlDict["name"] == "ssh" { 36 | sshURL = urlDict["href"]?.replacingOccurrences(of: "ssh://", with: "") 37 | } 38 | } 39 | } 40 | size = json["size"] as? Int ?? 0 41 | scm = json["scm"] as? String 42 | } else { 43 | id = "-1" 44 | isPrivate = false 45 | size = 0 46 | } 47 | } 48 | } 49 | 50 | // MARK: request 51 | 52 | public enum PaginatedResponse { 53 | case success(values: T, nextParameters: [String: String]) 54 | case failure(Error) 55 | } 56 | 57 | public extension TrashCanKit { 58 | public func repositories(_ session: RequestKitURLSession = URLSession.shared, userName: String? = nil, nextParameters: [String: String] = [:], completion: @escaping (_ response: PaginatedResponse<[Repository]>) -> Void) -> URLSessionDataTaskProtocol? { 59 | let router = RepositoryRouter.readRepositories(configuration, userName, nextParameters) 60 | return router.loadJSON(session, expectedResultType: [String: AnyObject].self) { json, error in 61 | if let error = error { 62 | completion(PaginatedResponse.failure(error)) 63 | } 64 | 65 | if let json = json, let values = json["values"] as? [[String: AnyObject]] { 66 | let repos = values.map { Repository(json: $0) } 67 | if let nextURL = json["next"] as? String, let parameterString = nextURL.components(separatedBy: "?").last { 68 | completion(PaginatedResponse.success(values: repos, nextParameters: parameterString.tkk_queryParameters)) 69 | } else { 70 | completion(PaginatedResponse.success(values: repos, nextParameters: [String: String]())) 71 | } 72 | } 73 | } 74 | } 75 | 76 | public func repository(_ session: RequestKitURLSession = URLSession.shared, owner: String, name: String, completion: @escaping (_ response: Response) -> Void) -> URLSessionDataTaskProtocol? { 77 | let router = RepositoryRouter.readRepository(configuration, owner, name) 78 | return router.loadJSON(session, expectedResultType: [String: AnyObject].self) { json, error in 79 | if let error = error { 80 | completion(Response.failure(error)) 81 | } 82 | 83 | if let json = json { 84 | let repo = Repository(json: json) 85 | completion(Response.success(repo)) 86 | } 87 | } 88 | } 89 | } 90 | 91 | // MARK: Router 92 | 93 | public enum RepositoryRouter: Router { 94 | case readRepositories(Configuration, String?, [String: String]) 95 | case readRepository(Configuration, String, String) 96 | 97 | public var configuration: Configuration { 98 | switch self { 99 | case .readRepositories(let config, _, _): return config 100 | case .readRepository(let config, _, _): return config 101 | } 102 | } 103 | 104 | public var method: HTTPMethod { 105 | return .GET 106 | } 107 | 108 | public var encoding: HTTPEncoding { 109 | return .url 110 | } 111 | 112 | public var params: [String: Any] { 113 | switch self { 114 | case .readRepositories(_, let userName, var nextParameters): 115 | if let _ = userName { 116 | return nextParameters as [String : Any] 117 | } else { 118 | nextParameters += ["role": "member"] 119 | return nextParameters as [String : Any] 120 | } 121 | case .readRepository: 122 | return [:] 123 | } 124 | } 125 | 126 | public var path: String { 127 | switch self { 128 | case .readRepositories(_, let userName, _): 129 | if let userName = userName { 130 | return "repositories/\(userName)" 131 | } else { 132 | return "repositories" 133 | } 134 | case .readRepository(_, let owner, let name): 135 | return "repositories/\(owner)/\(name)" 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /TrashCanKit/String+QueryParameters.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension String { 4 | internal var tkk_queryParameters: [String: String] { 5 | let parametersArray = components(separatedBy: "&") 6 | var parameters = [String: String]() 7 | parametersArray.forEach() { parameter in 8 | let keyValueArray = parameter.components(separatedBy: "=") 9 | let (key, value) = (keyValueArray.first, keyValueArray.last) 10 | if let key = key?.removingPercentEncoding, let value = value?.removingPercentEncoding { 11 | parameters[key] = value 12 | } 13 | } 14 | return parameters 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /TrashCanKit/Token.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import RequestKit 3 | 4 | // MARK: request 5 | 6 | public extension TrashCanKit { 7 | public func refreshToken(_ session: RequestKitURLSession, oauthConfig: OAuthConfiguration, refreshToken: String, completion: @escaping (_ response: Response) -> Void) -> URLSessionDataTaskProtocol? { 8 | let request = TokenRouter.refreshToken(oauthConfig, refreshToken).URLRequest 9 | var task: URLSessionDataTaskProtocol? 10 | if let request = request { 11 | task = session.dataTask(with: request) { data, response, err in 12 | guard let response = response as? HTTPURLResponse else { return } 13 | guard let data = data else { return } 14 | do { 15 | let responseJSON = try? JSONSerialization.jsonObject(with: data, options: .allowFragments) 16 | if let responseJSON = responseJSON as? [String: AnyObject] { 17 | if response.statusCode != 200 { 18 | let errorDescription = responseJSON["error_description"] as? String ?? "" 19 | let error = NSError(domain: TrashCanKitErrorDomain, code: response.statusCode, userInfo: [NSLocalizedDescriptionKey: errorDescription]) 20 | completion(Response.failure(error)) 21 | } else { 22 | let tokenConfig = TokenConfiguration(json: responseJSON) 23 | completion(Response.success(tokenConfig)) 24 | } 25 | } 26 | } 27 | } 28 | task?.resume() 29 | } 30 | return task 31 | } 32 | } 33 | 34 | public enum TokenRouter: Router { 35 | case refreshToken(OAuthConfiguration, String) 36 | 37 | public var configuration: Configuration { 38 | switch self { 39 | case .refreshToken(let config, _): return config 40 | } 41 | } 42 | 43 | public var method: HTTPMethod { 44 | return .POST 45 | } 46 | 47 | public var encoding: HTTPEncoding { 48 | return .form 49 | } 50 | 51 | public var params: [String: Any] { 52 | switch self { 53 | case .refreshToken(_, let token): 54 | return ["refresh_token": token, "grant_type": "refresh_token"] 55 | } 56 | } 57 | 58 | public var path: String { 59 | switch self { 60 | case .refreshToken(_, _): 61 | return "site/oauth2/access_token" 62 | } 63 | } 64 | 65 | public var URLRequest: Foundation.URLRequest? { 66 | switch self { 67 | case .refreshToken(let config, _): 68 | let url = URL(string: path, relativeTo: URL(string: config.webEndpoint)!) 69 | let components = URLComponents(url: url!, resolvingAgainstBaseURL: true) 70 | return request(components!, parameters: params) 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /TrashCanKit/TokenConfiguration.swift: -------------------------------------------------------------------------------- 1 | import RequestKit 2 | 3 | public struct TokenConfiguration: Configuration { 4 | public var apiEndpoint: String 5 | public var accessToken: String? 6 | public var refreshToken: String? 7 | public var expirationDate: Date? 8 | public let errorDomain = TrashCanKitErrorDomain 9 | 10 | public init(json: [String: AnyObject], url: String = bitbucketBaseURL) { 11 | apiEndpoint = url 12 | accessToken = json["access_token"] as? String 13 | refreshToken = json["refresh_token"] as? String 14 | let expiresIn = json["expires_in"] as? Int 15 | let currentDate = Date() 16 | expirationDate = currentDate.addingTimeInterval(TimeInterval(expiresIn ?? 0)) 17 | } 18 | 19 | public init(_ token: String? = nil, refreshToken: String? = nil, expirationDate: Date? = nil, url: String = bitbucketBaseURL) { 20 | apiEndpoint = url 21 | accessToken = token 22 | self.expirationDate = expirationDate 23 | self.refreshToken = refreshToken 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /TrashCanKit/TrashCanKit.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double TrashCanKitVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char TrashCanKitVersionString[]; 5 | -------------------------------------------------------------------------------- /TrashCanKit/TrashCanKit.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import RequestKit 3 | 4 | let bitbucketBaseURL = "https://bitbucket.org/api/2.0/" 5 | let bitbucketWebURL = "https://bitbucket.org/" 6 | public let TrashCanKitErrorDomain = "com.nerdishbynature.TrashCanKit" 7 | 8 | public struct TrashCanKit { 9 | public let configuration: TokenConfiguration 10 | 11 | public init(_ config: TokenConfiguration = TokenConfiguration()) { 12 | configuration = config 13 | } 14 | } 15 | 16 | internal extension Router { 17 | internal var URLRequest: Foundation.URLRequest? { 18 | return request() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /TrashCanKit/User.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import RequestKit 3 | 4 | @objc open class User: NSObject { 5 | open let id: String 6 | open var login: String? 7 | open var name: String? 8 | 9 | public init(_ json: [String: AnyObject]) { 10 | if let id = json["uuid"] as? String { 11 | self.id = id 12 | login = json["username"] as? String 13 | name = json["display_name"] as? String 14 | } else { 15 | id = "-1" 16 | } 17 | } 18 | } 19 | 20 | @objc open class Email: NSObject { 21 | open let isPrimary: Bool 22 | open let isConfirmed: Bool 23 | open var type: String? 24 | open var email: String? 25 | 26 | public init(json: [String: AnyObject]) { 27 | if let _ = json["email"] as? String { 28 | isPrimary = json["is_primary"] as? Bool ?? false 29 | isConfirmed = json["is_confirmed"] as? Bool ?? false 30 | type = json["type"] as? String 31 | email = json["email"] as? String 32 | } else { 33 | isPrimary = false 34 | isConfirmed = false 35 | } 36 | super.init() 37 | } 38 | } 39 | 40 | public extension TrashCanKit { 41 | public func me(_ session: RequestKitURLSession = URLSession.shared, completion: @escaping (_ response: Response) -> Void) -> URLSessionDataTaskProtocol? { 42 | let router = UserRouter.readAuthenticatedUser(configuration) 43 | return router.loadJSON(session, expectedResultType: [String: AnyObject].self) { json, error in 44 | if let error = error { 45 | completion(Response.failure(error)) 46 | } else { 47 | if let json = json { 48 | let parsedUser = User(json) 49 | completion(Response.success(parsedUser)) 50 | } 51 | } 52 | } 53 | } 54 | 55 | public func emails(_ session: RequestKitURLSession = URLSession.shared, completion: @escaping (_ response: Response<[Email]>) -> Void) -> URLSessionDataTaskProtocol? { 56 | let router = UserRouter.readEmails(configuration) 57 | return router.loadJSON(session, expectedResultType: [String: AnyObject].self) { json, error in 58 | if let error = error { 59 | completion(Response.failure(error)) 60 | } else { 61 | if let json = json, let values = json["values"] as? [[String: AnyObject]] { 62 | let emails = values.map({ Email(json: $0) }) 63 | completion(Response.success(emails)) 64 | } 65 | } 66 | } 67 | } 68 | } 69 | 70 | // MARK: Router 71 | 72 | public enum UserRouter: Router { 73 | case readAuthenticatedUser(Configuration) 74 | case readEmails(Configuration) 75 | 76 | public var configuration: Configuration { 77 | switch self { 78 | case .readAuthenticatedUser(let config): return config 79 | case .readEmails(let config): return config 80 | } 81 | } 82 | 83 | public var method: HTTPMethod { 84 | return .GET 85 | } 86 | 87 | public var encoding: HTTPEncoding { 88 | return .url 89 | } 90 | 91 | public var path: String { 92 | switch self { 93 | case .readAuthenticatedUser: 94 | return "user" 95 | case .readEmails: 96 | return "user/emails" 97 | } 98 | } 99 | 100 | public var params: [String: Any] { 101 | return [:] 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /TrashCanKitTests/ConfigurationTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import RequestKit 3 | import TrashCanKit 4 | 5 | class ConfigurationTests: XCTestCase { 6 | func testTokenConfiguration() { 7 | let subject = TokenConfiguration("12345") 8 | XCTAssertEqual(subject.accessToken, "12345") 9 | XCTAssertEqual(subject.apiEndpoint, "https://bitbucket.org/api/2.0/") 10 | } 11 | 12 | func testOAuthConfiguration() { 13 | let subject = OAuthConfiguration(token: "12345", secret: "6789", scopes: []) 14 | XCTAssertEqual(subject.token, "12345") 15 | XCTAssertEqual(subject.secret, "6789") 16 | XCTAssertEqual(subject.apiEndpoint, "https://bitbucket.org/api/2.0/") 17 | } 18 | 19 | func testAuthorizeURLRequest() { 20 | let config = OAuthConfiguration(token: "12345", secret: "6789", scopes: []) 21 | let request = OAuthRouter.authorize(config).URLRequest 22 | let expected = URL(string: "https://bitbucket.org/site/oauth2/authorize?client_id=12345&response_type=code") 23 | XCTAssertEqual(request?.url, expected) 24 | } 25 | 26 | func testAccessTokenURLRequest() { 27 | let config = OAuthConfiguration(token: "12345", secret: "6789", scopes: []) 28 | let request = OAuthRouter.accessToken(config, "dhfjgh23493").URLRequest 29 | let expected = URL(string: "https://bitbucket.org/site/oauth2/access_token") 30 | let expectedBody = "code=dhfjgh23493&grant_type=authorization_code" 31 | XCTAssertEqual(request?.url, expected) 32 | let string = NSString(data: request!.httpBody!, encoding: String.Encoding.utf8.rawValue)! 33 | XCTAssertEqual(string as String, expectedBody) 34 | } 35 | 36 | func testAccessTokenFromResponse() { 37 | let config = OAuthConfiguration(token: "12345", secret: "6789", scopes: []) 38 | let response = "access_token=017ec60f4a182&token_type=bearer" 39 | let expectation = "017ec60f4a182" 40 | XCTAssertEqual(config.accessTokenFromResponse(response)!, expectation) 41 | } 42 | 43 | func testHandleOpenURL() { 44 | let config = OAuthConfiguration(token: "12345", secret: "6789", scopes: []) 45 | let session = BasicAuthMockSession() 46 | let url = URL(string: "urlscheme://authorize?code=dhfjgh23493")! 47 | var token: TokenConfiguration? 48 | config.handleOpenURL(session, url: url) { inToken in 49 | token = inToken 50 | } 51 | XCTAssertEqual(token?.refreshToken, "14567") 52 | XCTAssertEqual(token?.accessToken, "017ec60f4a182") 53 | } 54 | } 55 | 56 | class BasicAuthMockSession: RequestKitURLSession { 57 | var wasCalled = false 58 | 59 | func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskProtocol { 60 | XCTAssertEqual(request.allHTTPHeaderFields?["Content-Type"], "application/x-www-form-urlencoded") 61 | XCTAssertEqual(request.url?.absoluteString, "https://bitbucket.org/site/oauth2/access_token") 62 | XCTAssertEqual(request.httpMethod, "POST") 63 | let data = TestHelper.loadJSONString("authorize").data(using: String.Encoding.utf8) 64 | let response = HTTPURLResponse(url: request.url!, statusCode: 200, httpVersion: "http/1.1", headerFields: ["Content-Type": "application/json"]) 65 | completionHandler(data, response, nil) 66 | wasCalled = true 67 | return MockURLSessionDataTask() 68 | } 69 | 70 | func uploadTask(with request: URLRequest, fromData bodyData: Data?, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskProtocol { 71 | XCTFail() 72 | return MockURLSessionDataTask() 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /TrashCanKitTests/Fixtures/Email.json: -------------------------------------------------------------------------------- 1 | { 2 | "is_primary": true, 3 | "is_confirmed": true, 4 | "type": "email", 5 | "email": "me@supercooldomain.io", 6 | "links": { 7 | "self": { 8 | "href": "https://bitbucket.org/!api/2.0/user/emails/piet@nerdishbynature.com" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /TrashCanKitTests/Fixtures/Emails.json: -------------------------------------------------------------------------------- 1 | { 2 | "page": 1, 3 | "pagelen": 10, 4 | "size": 1, 5 | "values": [ 6 | { 7 | "email": "tutorials@bitbucket.org", 8 | "is_confirmed": true, 9 | "is_primary": true, 10 | "links": { 11 | "self": { 12 | "href": "https://api.bitbucket.org/2.0/user/emails/tutorials@bitbucket.org" 13 | } 14 | }, 15 | "type": "email" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /TrashCanKitTests/Fixtures/Repositories.json: -------------------------------------------------------------------------------- 1 | { 2 | "next": "https://api.bitbucket.org/2.0/repositories?access_token=123456%3D%3D&after=2015-11-06T03%3A45%3A07.833168%2B00%3A00&role=member&page=2", 3 | "page": 1, 4 | "pagelen": 10, 5 | "values": [ 6 | { 7 | "created_on": "2015-10-27T06:11:31.611823+00:00", 8 | "description": "", 9 | "fork_policy": "allow_forks", 10 | "full_name": "pietbrauer/octokit.swift", 11 | "has_issues": false, 12 | "has_wiki": false, 13 | "is_private": false, 14 | "language": "", 15 | "links": { 16 | "avatar": { 17 | "href": "https://bitbucket.org/pietbrauer/octokit.swift/avatar/32/" 18 | }, 19 | "clone": [ 20 | { 21 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/octokit.swift.git", 22 | "name": "https" 23 | }, 24 | { 25 | "href": "ssh://git@bitbucket.org/pietbrauer/octokit.swift.git", 26 | "name": "ssh" 27 | } 28 | ], 29 | "commits": { 30 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift/commits" 31 | }, 32 | "downloads": { 33 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift/downloads" 34 | }, 35 | "forks": { 36 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift/forks" 37 | }, 38 | "hooks": { 39 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift/hooks" 40 | }, 41 | "html": { 42 | "href": "https://bitbucket.org/pietbrauer/octokit.swift" 43 | }, 44 | "pullrequests": { 45 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift/pullrequests" 46 | }, 47 | "self": { 48 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift" 49 | }, 50 | "watchers": { 51 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/octokit.swift/watchers" 52 | } 53 | }, 54 | "name": "octokit.swift", 55 | "owner": { 56 | "display_name": "Piet Brauer", 57 | "links": { 58 | "avatar": { 59 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 60 | }, 61 | "html": { 62 | "href": "https://bitbucket.org/pietbrauer/" 63 | }, 64 | "self": { 65 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 66 | } 67 | }, 68 | "type": "user", 69 | "username": "pietbrauer", 70 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 71 | }, 72 | "scm": "git", 73 | "size": 163892, 74 | "type": "repository", 75 | "updated_on": "2015-11-16T04:18:54.576351+00:00", 76 | "uuid": "{cb706a3e-1e13-41fb-ac9d-e53e8adc2bd7}" 77 | }, 78 | { 79 | "created_on": "2015-10-29T14:25:42.896852+00:00", 80 | "description": "", 81 | "fork_policy": "allow_forks", 82 | "full_name": "pietbrauer/git2go-test-repo", 83 | "has_issues": false, 84 | "has_wiki": false, 85 | "is_private": true, 86 | "language": "", 87 | "links": { 88 | "avatar": { 89 | "href": "https://bitbucket.org/pietbrauer/git2go-test-repo/avatar/32/" 90 | }, 91 | "clone": [ 92 | { 93 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/git2go-test-repo.git", 94 | "name": "https" 95 | }, 96 | { 97 | "href": "ssh://git@bitbucket.org/pietbrauer/git2go-test-repo.git", 98 | "name": "ssh" 99 | } 100 | ], 101 | "commits": { 102 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo/commits" 103 | }, 104 | "downloads": { 105 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo/downloads" 106 | }, 107 | "forks": { 108 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo/forks" 109 | }, 110 | "hooks": { 111 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo/hooks" 112 | }, 113 | "html": { 114 | "href": "https://bitbucket.org/pietbrauer/git2go-test-repo" 115 | }, 116 | "pullrequests": { 117 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo/pullrequests" 118 | }, 119 | "self": { 120 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo" 121 | }, 122 | "watchers": { 123 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/git2go-test-repo/watchers" 124 | } 125 | }, 126 | "name": "git2go-test-repo", 127 | "owner": { 128 | "display_name": "Piet Brauer", 129 | "links": { 130 | "avatar": { 131 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 132 | }, 133 | "html": { 134 | "href": "https://bitbucket.org/pietbrauer/" 135 | }, 136 | "self": { 137 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 138 | } 139 | }, 140 | "type": "user", 141 | "username": "pietbrauer", 142 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 143 | }, 144 | "scm": "git", 145 | "size": 126378, 146 | "type": "repository", 147 | "updated_on": "2015-11-11T18:47:13.943751+00:00", 148 | "uuid": "{21133e9a-a538-43bc-a35a-94c0e294bbf6}" 149 | }, 150 | { 151 | "created_on": "2015-11-06T03:44:20.647748+00:00", 152 | "description": "", 153 | "fork_policy": "no_public_forks", 154 | "full_name": "pietbrauer/test1", 155 | "has_issues": false, 156 | "has_wiki": false, 157 | "is_private": true, 158 | "language": "", 159 | "links": { 160 | "avatar": { 161 | "href": "https://bitbucket.org/pietbrauer/test1/avatar/32/" 162 | }, 163 | "clone": [ 164 | { 165 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test1.git", 166 | "name": "https" 167 | }, 168 | { 169 | "href": "ssh://git@bitbucket.org/pietbrauer/test1.git", 170 | "name": "ssh" 171 | } 172 | ], 173 | "commits": { 174 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1/commits" 175 | }, 176 | "downloads": { 177 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1/downloads" 178 | }, 179 | "forks": { 180 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1/forks" 181 | }, 182 | "hooks": { 183 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1/hooks" 184 | }, 185 | "html": { 186 | "href": "https://bitbucket.org/pietbrauer/test1" 187 | }, 188 | "pullrequests": { 189 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1/pullrequests" 190 | }, 191 | "self": { 192 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1" 193 | }, 194 | "watchers": { 195 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test1/watchers" 196 | } 197 | }, 198 | "name": "test1", 199 | "owner": { 200 | "display_name": "Piet Brauer", 201 | "links": { 202 | "avatar": { 203 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 204 | }, 205 | "html": { 206 | "href": "https://bitbucket.org/pietbrauer/" 207 | }, 208 | "self": { 209 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 210 | } 211 | }, 212 | "type": "user", 213 | "username": "pietbrauer", 214 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 215 | }, 216 | "scm": "git", 217 | "size": 33348, 218 | "type": "repository", 219 | "updated_on": "2015-11-06T03:44:20.665234+00:00", 220 | "uuid": "{d08277c5-4f46-459a-b9e5-2e85bba01cd1}" 221 | }, 222 | { 223 | "created_on": "2015-11-06T03:44:27.859020+00:00", 224 | "description": "", 225 | "fork_policy": "no_public_forks", 226 | "full_name": "pietbrauer/test2", 227 | "has_issues": false, 228 | "has_wiki": false, 229 | "is_private": true, 230 | "language": "", 231 | "links": { 232 | "avatar": { 233 | "href": "https://bitbucket.org/pietbrauer/test2/avatar/32/" 234 | }, 235 | "clone": [ 236 | { 237 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test2.git", 238 | "name": "https" 239 | }, 240 | { 241 | "href": "ssh://git@bitbucket.org/pietbrauer/test2.git", 242 | "name": "ssh" 243 | } 244 | ], 245 | "commits": { 246 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2/commits" 247 | }, 248 | "downloads": { 249 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2/downloads" 250 | }, 251 | "forks": { 252 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2/forks" 253 | }, 254 | "hooks": { 255 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2/hooks" 256 | }, 257 | "html": { 258 | "href": "https://bitbucket.org/pietbrauer/test2" 259 | }, 260 | "pullrequests": { 261 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2/pullrequests" 262 | }, 263 | "self": { 264 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2" 265 | }, 266 | "watchers": { 267 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test2/watchers" 268 | } 269 | }, 270 | "name": "test2", 271 | "owner": { 272 | "display_name": "Piet Brauer", 273 | "links": { 274 | "avatar": { 275 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 276 | }, 277 | "html": { 278 | "href": "https://bitbucket.org/pietbrauer/" 279 | }, 280 | "self": { 281 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 282 | } 283 | }, 284 | "type": "user", 285 | "username": "pietbrauer", 286 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 287 | }, 288 | "scm": "git", 289 | "size": 33348, 290 | "type": "repository", 291 | "updated_on": "2015-11-06T03:44:27.879182+00:00", 292 | "uuid": "{c41ff971-988c-4224-9211-8a12437801b9}" 293 | }, 294 | { 295 | "created_on": "2015-11-06T03:44:33.373046+00:00", 296 | "description": "", 297 | "fork_policy": "no_public_forks", 298 | "full_name": "pietbrauer/test3", 299 | "has_issues": false, 300 | "has_wiki": false, 301 | "is_private": true, 302 | "language": "", 303 | "links": { 304 | "avatar": { 305 | "href": "https://bitbucket.org/pietbrauer/test3/avatar/32/" 306 | }, 307 | "clone": [ 308 | { 309 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test3.git", 310 | "name": "https" 311 | }, 312 | { 313 | "href": "ssh://git@bitbucket.org/pietbrauer/test3.git", 314 | "name": "ssh" 315 | } 316 | ], 317 | "commits": { 318 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3/commits" 319 | }, 320 | "downloads": { 321 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3/downloads" 322 | }, 323 | "forks": { 324 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3/forks" 325 | }, 326 | "hooks": { 327 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3/hooks" 328 | }, 329 | "html": { 330 | "href": "https://bitbucket.org/pietbrauer/test3" 331 | }, 332 | "pullrequests": { 333 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3/pullrequests" 334 | }, 335 | "self": { 336 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3" 337 | }, 338 | "watchers": { 339 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test3/watchers" 340 | } 341 | }, 342 | "name": "test3", 343 | "owner": { 344 | "display_name": "Piet Brauer", 345 | "links": { 346 | "avatar": { 347 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 348 | }, 349 | "html": { 350 | "href": "https://bitbucket.org/pietbrauer/" 351 | }, 352 | "self": { 353 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 354 | } 355 | }, 356 | "type": "user", 357 | "username": "pietbrauer", 358 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 359 | }, 360 | "scm": "git", 361 | "size": 33348, 362 | "type": "repository", 363 | "updated_on": "2015-11-06T03:44:33.391666+00:00", 364 | "uuid": "{8f6f5447-4cb4-4a6d-9b91-15489596b39f}" 365 | }, 366 | { 367 | "created_on": "2015-11-06T03:44:40.051998+00:00", 368 | "description": "", 369 | "fork_policy": "no_public_forks", 370 | "full_name": "pietbrauer/test4", 371 | "has_issues": false, 372 | "has_wiki": false, 373 | "is_private": true, 374 | "language": "", 375 | "links": { 376 | "avatar": { 377 | "href": "https://bitbucket.org/pietbrauer/test4/avatar/32/" 378 | }, 379 | "clone": [ 380 | { 381 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test4.git", 382 | "name": "https" 383 | }, 384 | { 385 | "href": "ssh://git@bitbucket.org/pietbrauer/test4.git", 386 | "name": "ssh" 387 | } 388 | ], 389 | "commits": { 390 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4/commits" 391 | }, 392 | "downloads": { 393 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4/downloads" 394 | }, 395 | "forks": { 396 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4/forks" 397 | }, 398 | "hooks": { 399 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4/hooks" 400 | }, 401 | "html": { 402 | "href": "https://bitbucket.org/pietbrauer/test4" 403 | }, 404 | "pullrequests": { 405 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4/pullrequests" 406 | }, 407 | "self": { 408 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4" 409 | }, 410 | "watchers": { 411 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test4/watchers" 412 | } 413 | }, 414 | "name": "test4", 415 | "owner": { 416 | "display_name": "Piet Brauer", 417 | "links": { 418 | "avatar": { 419 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 420 | }, 421 | "html": { 422 | "href": "https://bitbucket.org/pietbrauer/" 423 | }, 424 | "self": { 425 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 426 | } 427 | }, 428 | "type": "user", 429 | "username": "pietbrauer", 430 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 431 | }, 432 | "scm": "git", 433 | "size": 33348, 434 | "type": "repository", 435 | "updated_on": "2015-11-06T03:44:40.070129+00:00", 436 | "uuid": "{53a1cc22-0d3c-4534-816b-e431c098ddf9}" 437 | }, 438 | { 439 | "created_on": "2015-11-06T03:44:45.500360+00:00", 440 | "description": "", 441 | "fork_policy": "no_public_forks", 442 | "full_name": "pietbrauer/test5", 443 | "has_issues": false, 444 | "has_wiki": false, 445 | "is_private": true, 446 | "language": "", 447 | "links": { 448 | "avatar": { 449 | "href": "https://bitbucket.org/pietbrauer/test5/avatar/32/" 450 | }, 451 | "clone": [ 452 | { 453 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test5.git", 454 | "name": "https" 455 | }, 456 | { 457 | "href": "ssh://git@bitbucket.org/pietbrauer/test5.git", 458 | "name": "ssh" 459 | } 460 | ], 461 | "commits": { 462 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5/commits" 463 | }, 464 | "downloads": { 465 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5/downloads" 466 | }, 467 | "forks": { 468 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5/forks" 469 | }, 470 | "hooks": { 471 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5/hooks" 472 | }, 473 | "html": { 474 | "href": "https://bitbucket.org/pietbrauer/test5" 475 | }, 476 | "pullrequests": { 477 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5/pullrequests" 478 | }, 479 | "self": { 480 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5" 481 | }, 482 | "watchers": { 483 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test5/watchers" 484 | } 485 | }, 486 | "name": "test5", 487 | "owner": { 488 | "display_name": "Piet Brauer", 489 | "links": { 490 | "avatar": { 491 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 492 | }, 493 | "html": { 494 | "href": "https://bitbucket.org/pietbrauer/" 495 | }, 496 | "self": { 497 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 498 | } 499 | }, 500 | "type": "user", 501 | "username": "pietbrauer", 502 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 503 | }, 504 | "scm": "git", 505 | "size": 33348, 506 | "type": "repository", 507 | "updated_on": "2015-11-06T03:44:45.522458+00:00", 508 | "uuid": "{938a6598-bdc0-4e6d-9d80-27f12cc2c493}" 509 | }, 510 | { 511 | "created_on": "2015-11-06T03:44:51.266699+00:00", 512 | "description": "", 513 | "fork_policy": "no_public_forks", 514 | "full_name": "pietbrauer/test6", 515 | "has_issues": false, 516 | "has_wiki": false, 517 | "is_private": true, 518 | "language": "", 519 | "links": { 520 | "avatar": { 521 | "href": "https://bitbucket.org/pietbrauer/test6/avatar/32/" 522 | }, 523 | "clone": [ 524 | { 525 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test6.git", 526 | "name": "https" 527 | }, 528 | { 529 | "href": "ssh://git@bitbucket.org/pietbrauer/test6.git", 530 | "name": "ssh" 531 | } 532 | ], 533 | "commits": { 534 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6/commits" 535 | }, 536 | "downloads": { 537 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6/downloads" 538 | }, 539 | "forks": { 540 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6/forks" 541 | }, 542 | "hooks": { 543 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6/hooks" 544 | }, 545 | "html": { 546 | "href": "https://bitbucket.org/pietbrauer/test6" 547 | }, 548 | "pullrequests": { 549 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6/pullrequests" 550 | }, 551 | "self": { 552 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6" 553 | }, 554 | "watchers": { 555 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test6/watchers" 556 | } 557 | }, 558 | "name": "test6", 559 | "owner": { 560 | "display_name": "Piet Brauer", 561 | "links": { 562 | "avatar": { 563 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 564 | }, 565 | "html": { 566 | "href": "https://bitbucket.org/pietbrauer/" 567 | }, 568 | "self": { 569 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 570 | } 571 | }, 572 | "type": "user", 573 | "username": "pietbrauer", 574 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 575 | }, 576 | "scm": "git", 577 | "size": 33348, 578 | "type": "repository", 579 | "updated_on": "2015-11-06T03:44:51.285527+00:00", 580 | "uuid": "{ebf4b8e7-4bfa-40fd-877d-034b6e9d5931}" 581 | }, 582 | { 583 | "created_on": "2015-11-06T03:44:56.464053+00:00", 584 | "description": "", 585 | "fork_policy": "no_public_forks", 586 | "full_name": "pietbrauer/test7", 587 | "has_issues": false, 588 | "has_wiki": false, 589 | "is_private": true, 590 | "language": "", 591 | "links": { 592 | "avatar": { 593 | "href": "https://bitbucket.org/pietbrauer/test7/avatar/32/" 594 | }, 595 | "clone": [ 596 | { 597 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test7.git", 598 | "name": "https" 599 | }, 600 | { 601 | "href": "ssh://git@bitbucket.org/pietbrauer/test7.git", 602 | "name": "ssh" 603 | } 604 | ], 605 | "commits": { 606 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7/commits" 607 | }, 608 | "downloads": { 609 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7/downloads" 610 | }, 611 | "forks": { 612 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7/forks" 613 | }, 614 | "hooks": { 615 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7/hooks" 616 | }, 617 | "html": { 618 | "href": "https://bitbucket.org/pietbrauer/test7" 619 | }, 620 | "pullrequests": { 621 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7/pullrequests" 622 | }, 623 | "self": { 624 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7" 625 | }, 626 | "watchers": { 627 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test7/watchers" 628 | } 629 | }, 630 | "name": "test7", 631 | "owner": { 632 | "display_name": "Piet Brauer", 633 | "links": { 634 | "avatar": { 635 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 636 | }, 637 | "html": { 638 | "href": "https://bitbucket.org/pietbrauer/" 639 | }, 640 | "self": { 641 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 642 | } 643 | }, 644 | "type": "user", 645 | "username": "pietbrauer", 646 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 647 | }, 648 | "scm": "git", 649 | "size": 33348, 650 | "type": "repository", 651 | "updated_on": "2015-11-06T03:44:56.481230+00:00", 652 | "uuid": "{b9df8881-1dfd-4679-b1d5-1c3326bfebf4}" 653 | }, 654 | { 655 | "created_on": "2015-11-06T03:45:02.231202+00:00", 656 | "description": "", 657 | "fork_policy": "no_public_forks", 658 | "full_name": "pietbrauer/test8", 659 | "has_issues": false, 660 | "has_wiki": false, 661 | "is_private": true, 662 | "language": "", 663 | "links": { 664 | "avatar": { 665 | "href": "https://bitbucket.org/pietbrauer/test8/avatar/32/" 666 | }, 667 | "clone": [ 668 | { 669 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/test8.git", 670 | "name": "https" 671 | }, 672 | { 673 | "href": "ssh://git@bitbucket.org/pietbrauer/test8.git", 674 | "name": "ssh" 675 | } 676 | ], 677 | "commits": { 678 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8/commits" 679 | }, 680 | "downloads": { 681 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8/downloads" 682 | }, 683 | "forks": { 684 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8/forks" 685 | }, 686 | "hooks": { 687 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8/hooks" 688 | }, 689 | "html": { 690 | "href": "https://bitbucket.org/pietbrauer/test8" 691 | }, 692 | "pullrequests": { 693 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8/pullrequests" 694 | }, 695 | "self": { 696 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8" 697 | }, 698 | "watchers": { 699 | "href": "https://api.bitbucket.org/2.0/repositories/pietbrauer/test8/watchers" 700 | } 701 | }, 702 | "name": "test8", 703 | "owner": { 704 | "display_name": "Piet Brauer", 705 | "links": { 706 | "avatar": { 707 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 708 | }, 709 | "html": { 710 | "href": "https://bitbucket.org/pietbrauer/" 711 | }, 712 | "self": { 713 | "href": "https://api.bitbucket.org/2.0/users/pietbrauer" 714 | } 715 | }, 716 | "type": "user", 717 | "username": "pietbrauer", 718 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}" 719 | }, 720 | "scm": "git", 721 | "size": 33348, 722 | "type": "repository", 723 | "updated_on": "2015-11-06T03:45:02.247397+00:00", 724 | "uuid": "{0aed65df-ebeb-4b33-8856-32461d137e4b}" 725 | } 726 | ] 727 | } 728 | -------------------------------------------------------------------------------- /TrashCanKitTests/Fixtures/Repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "scm": "git", 3 | "has_wiki": false, 4 | "name": "octokit.swift", 5 | "links": { 6 | "watchers": { 7 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift/watchers" 8 | }, 9 | "hooks": { 10 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift/hooks" 11 | }, 12 | "clone": [ 13 | { 14 | "href": "https://pietbrauer@bitbucket.org/pietbrauer/octokit.swift.git", 15 | "name": "https" 16 | }, 17 | { 18 | "href": "ssh://git@bitbucket.org/pietbrauer/octokit.swift.git", 19 | "name": "ssh" 20 | } 21 | ], 22 | "self": { 23 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift" 24 | }, 25 | "html": { 26 | "href": "https://bitbucket.org/pietbrauer/octokit.swift" 27 | }, 28 | "avatar": { 29 | "href": "https://bitbucket.org/pietbrauer/octokit.swift/avatar/32/" 30 | }, 31 | "commits": { 32 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift/commits" 33 | }, 34 | "forks": { 35 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift/forks" 36 | }, 37 | "downloads": { 38 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift/downloads" 39 | }, 40 | "pullrequests": { 41 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer/octokit.swift/pullrequests" 42 | } 43 | }, 44 | "fork_policy": "allow_forks", 45 | "uuid": "{cb706a3e-1e13-41fb-ac9d-e53e8adc2bd7}", 46 | "language": "", 47 | "created_on": "2015-10-27T06:11:31.611823+00:00", 48 | "full_name": "pietbrauer/octokit.swift", 49 | "has_issues": false, 50 | "owner": { 51 | "username": "pietbrauer", 52 | "display_name": "Piet Brauer", 53 | "type": "user", 54 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}", 55 | "links": { 56 | "self": { 57 | "href": "https://bitbucket.org/!api/2.0/users/pietbrauer" 58 | }, 59 | "html": { 60 | "href": "https://bitbucket.org/pietbrauer/" 61 | }, 62 | "avatar": { 63 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 64 | } 65 | } 66 | }, 67 | "updated_on": "2015-10-27T06:12:31.160918+00:00", 68 | "size": 156382, 69 | "type": "repository", 70 | "is_private": true, 71 | "description": "Dummy Description" 72 | } 73 | -------------------------------------------------------------------------------- /TrashCanKitTests/Fixtures/User.json: -------------------------------------------------------------------------------- 1 | { 2 | "username": "pietbrauer", 3 | "website": null, 4 | "display_name": "Piet Brauer", 5 | "uuid": "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}", 6 | "links": { 7 | "hooks": { 8 | "href": "https://bitbucket.org/!api/internal/users/pietbrauer/hooks" 9 | }, 10 | "self": { 11 | "href": "https://bitbucket.org/!api/2.0/users/pietbrauer" 12 | }, 13 | "repositories": { 14 | "href": "https://bitbucket.org/!api/2.0/repositories/pietbrauer" 15 | }, 16 | "html": { 17 | "href": "https://bitbucket.org/pietbrauer/" 18 | }, 19 | "followers": { 20 | "href": "https://bitbucket.org/!api/2.0/users/pietbrauer/followers" 21 | }, 22 | "avatar": { 23 | "href": "https://bitbucket.org/account/pietbrauer/avatar/32/" 24 | }, 25 | "following": { 26 | "href": "https://bitbucket.org/!api/2.0/users/pietbrauer/following" 27 | }, 28 | "snippets": { 29 | "href": "https://bitbucket.org/!api/2.0/snippets/pietbrauer" 30 | } 31 | }, 32 | "created_on": "2014-09-04T12:49:46.396809+00:00", 33 | "location": null, 34 | "type": "user" 35 | } 36 | -------------------------------------------------------------------------------- /TrashCanKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TrashCanKitTests/Me.json: -------------------------------------------------------------------------------- 1 | { 2 | "created_on": "2011-12-20T16:34:07.132459+00:00", 3 | "display_name": "tutorials account", 4 | "links": { 5 | "avatar": { 6 | "href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png" 7 | }, 8 | "followers": { 9 | "href": "https://api.bitbucket.org/2.0/users/tutorials/followers" 10 | }, 11 | "following": { 12 | "href": "https://api.bitbucket.org/2.0/users/tutorials/following" 13 | }, 14 | "html": { 15 | "href": "https://bitbucket.org/tutorials" 16 | }, 17 | "repositories": { 18 | "href": "https://api.bitbucket.org/2.0/repositories/tutorials" 19 | }, 20 | "self": { 21 | "href": "https://api.bitbucket.org/2.0/users/tutorials" 22 | } 23 | }, 24 | "location": "Santa Monica, CA", 25 | "type": "user", 26 | "username": "tutorials", 27 | "uuid": "{c788b2da-b7a2-404c-9e26-d3f077557007}", 28 | "website": "https://tutorials.bitbucket.org/" 29 | } -------------------------------------------------------------------------------- /TrashCanKitTests/RepositoriesTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import TrashCanKit 3 | 4 | class RepositoriesTests: XCTestCase { 5 | func testConstructFromJSON() { 6 | let repository = Repository(json: TestHelper.loadJSON("Repository")) 7 | XCTAssertEqual(repository.id, "{cb706a3e-1e13-41fb-ac9d-e53e8adc2bd7}") 8 | XCTAssertEqual(repository.owner.login, "pietbrauer") 9 | XCTAssertEqual(repository.name, "octokit.swift") 10 | XCTAssertEqual(repository.fullName, "pietbrauer/octokit.swift") 11 | XCTAssertEqual(repository.isPrivate, true) 12 | XCTAssertEqual(repository.repositoryDescription, "Dummy Description") 13 | XCTAssertEqual(repository.sshURL, "git@bitbucket.org/pietbrauer/octokit.swift.git") 14 | XCTAssertEqual(repository.gitURL, "git://bitbucket.org/pietbrauer/octokit.swift.git") 15 | XCTAssertEqual(repository.cloneURL, "https://bitbucket.org/pietbrauer/octokit.swift.git") 16 | XCTAssertEqual(repository.size, 156382) 17 | XCTAssertEqual(repository.scm, "git") 18 | } 19 | 20 | func testFailToConstructFromJSON() { 21 | let repository = Repository(json: [:]) 22 | XCTAssertEqual(repository.id, "-1") 23 | XCTAssertEqual(repository.isPrivate, false) 24 | XCTAssertEqual(repository.size, 0) 25 | } 26 | 27 | func testGetRepositories() { 28 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 29 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/repositories?access_token=123456&role=member", expectedHTTPMethod: "GET", jsonFile: "Repositories", statusCode: 200) 30 | let task = TrashCanKit(tokenConfig).repositories(session) { response in 31 | switch response { 32 | case .success(let repos, let nextParameters): 33 | XCTAssertEqual(nextParameters["access_token"], "123456==") 34 | XCTAssertEqual(nextParameters["after"], "2015-11-06T03:45:07.833168+00:00") 35 | XCTAssertEqual(nextParameters["role"], "member") 36 | XCTAssertEqual(nextParameters["page"], "2") 37 | XCTAssertEqual(repos.count, 10) 38 | case .failure: 39 | XCTAssertFalse(true) 40 | } 41 | } 42 | XCTAssertNotNil(task) 43 | XCTAssertTrue(session.wasCalled) 44 | } 45 | 46 | func testGetUserRepositories() { 47 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 48 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/repositories/bitbucketCat?access_token=123456", expectedHTTPMethod: "GET", jsonFile: "Repositories", statusCode: 200) 49 | let task = TrashCanKit(tokenConfig).repositories(session, userName: "bitbucketCat") { response in 50 | switch response { 51 | case .success(let repos, _): 52 | XCTAssertEqual(repos.count, 10) 53 | case .failure: 54 | XCTAssertFalse(true) 55 | } 56 | } 57 | XCTAssertNotNil(task) 58 | XCTAssertTrue(session.wasCalled) 59 | } 60 | 61 | func testGetSecondPageRepositories() { 62 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 63 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/repositories?access_token=123456&after=2015-11-06T03%3A45%3A07.833168%2B00%3A00&page=2&role=member", expectedHTTPMethod: "GET", jsonFile: "Repositories", statusCode: 200) 64 | let nextParameters = ["access_token": "123456==", "after": "2015-11-06T03:45:07.833168+00:00", "role": "member", "page": "2"] 65 | let task = TrashCanKit(tokenConfig).repositories(session, nextParameters: nextParameters) { response in 66 | switch response { 67 | case .success(let repos, _): 68 | XCTAssertEqual(repos.count, 10) 69 | case .failure: 70 | XCTAssertFalse(true) 71 | } 72 | } 73 | XCTAssertNotNil(task) 74 | XCTAssertTrue(session.wasCalled) 75 | } 76 | 77 | func testFailToGetRepositories() { 78 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 79 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/repositories/bitbucketCat?access_token=123456", expectedHTTPMethod: "GET", jsonFile: "refresh_token_error", statusCode: 401) 80 | let task = TrashCanKit(tokenConfig).repositories(session, userName: "bitbucketCat") { response in 81 | switch response { 82 | case .success: 83 | XCTAssertTrue(false) 84 | case .failure(let error): 85 | XCTAssertEqual((error as NSError).code, 401) 86 | XCTAssertEqual((error as NSError).domain, TrashCanKitErrorDomain) 87 | } 88 | } 89 | XCTAssertNotNil(task) 90 | XCTAssertTrue(session.wasCalled) 91 | } 92 | 93 | func testGetRepository() { 94 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 95 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/repositories/pietbrauer/octokit.swift?access_token=123456", expectedHTTPMethod: "GET", jsonFile: nil, statusCode: 200) 96 | let task = TrashCanKit(tokenConfig).repository(session, owner: "pietbrauer", name: "octokit.swift") { response in 97 | switch response { 98 | case .success(let repo): 99 | XCTAssertEqual(repo.name, "octokit.swift") 100 | case .failure: 101 | XCTAssertFalse(true) 102 | } 103 | } 104 | XCTAssertNotNil(task) 105 | XCTAssertTrue(session.wasCalled) 106 | } 107 | 108 | func testFailToGetRepository() { 109 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 110 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/repositories/pietbrauer/octokit.swift?access_token=123456", expectedHTTPMethod: "GET", jsonFile: nil, statusCode: 401) 111 | let task = TrashCanKit(tokenConfig).repository(session, owner: "pietbrauer", name: "octokit.swift") { response in 112 | switch response { 113 | case .success: 114 | XCTAssertTrue(false) 115 | case .failure(let error): 116 | XCTAssertEqual((error as NSError).code, 401) 117 | XCTAssertEqual((error as NSError).domain, TrashCanKitErrorDomain) 118 | } 119 | } 120 | XCTAssertNotNil(task) 121 | XCTAssertTrue(session.wasCalled) 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /TrashCanKitTests/TestHelper.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class TestHelper { 4 | static func loadJSON(_ name: String) -> [String: AnyObject] { 5 | let bundle = Bundle(for: self) 6 | let path = bundle.path(forResource: name, ofType: "json") 7 | if let path = path, let data = try? Data(contentsOf: URL(fileURLWithPath: path)) { 8 | let json: AnyObject? = try! JSONSerialization.jsonObject(with: data, 9 | options: JSONSerialization.ReadingOptions.mutableContainers) as AnyObject? 10 | if let json = json as! [String: AnyObject]? { 11 | return json 12 | } 13 | } 14 | 15 | return Dictionary() 16 | } 17 | 18 | static func loadJSONString(_ name: String) -> String { 19 | let bundle = Bundle(for: self) 20 | let path = bundle.path(forResource: name, ofType: "json") 21 | if let path = path, let data = try? Data(contentsOf: URL(fileURLWithPath: path)) { 22 | let jsonString = String(data: data, encoding: String.Encoding.utf8) 23 | if let json = jsonString { 24 | return json 25 | } 26 | } 27 | 28 | return "" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /TrashCanKitTests/TokenTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import TrashCanKit 3 | import RequestKit 4 | 5 | class TokenTests: XCTestCase { 6 | func testRefreshToken() { 7 | let oauthConfig = OAuthConfiguration(token: "12345", secret: "67890", scopes: []) 8 | let tokenConfig = TokenConfiguration("09876", refreshToken: "54321") 9 | let kit = TrashCanKit(tokenConfig) 10 | let session = RefreshTokenMockSession() 11 | let task = kit.refreshToken(session, oauthConfig: oauthConfig, refreshToken: tokenConfig.refreshToken!) { response in 12 | switch response { 13 | case .success(let newToken): 14 | XCTAssertEqual(newToken.accessToken, "017ec60f4a182") 15 | XCTAssertNotNil(newToken.expirationDate) 16 | XCTAssertEqual(newToken.refreshToken, "14567") 17 | case .failure: 18 | XCTAssertFalse(true) 19 | } 20 | } 21 | XCTAssertNotNil(task) 22 | XCTAssertTrue(session.wasCalled) 23 | } 24 | 25 | func testFailGettingRefreshToken() { 26 | let oauthConfig = OAuthConfiguration(token: "12345", secret: "67890", scopes: []) 27 | let tokenConfig = TokenConfiguration("09876", refreshToken: "54321") 28 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/site/oauth2/access_token", expectedHTTPMethod: "POST", jsonFile: "refresh_token_error", statusCode: 401) 29 | let task = TrashCanKit(tokenConfig).refreshToken(session, oauthConfig: oauthConfig, refreshToken: tokenConfig.refreshToken!) { response in 30 | switch response { 31 | case .success: 32 | XCTAssertFalse(true) 33 | case .failure(let error as NSError): 34 | XCTAssertEqual(error.domain, TrashCanKitErrorDomain) 35 | XCTAssertEqual(error.code, 401) 36 | XCTAssertEqual(error.localizedDescription, "Oh Oh, another error.") 37 | case .failure: 38 | XCTAssertFalse(true) 39 | } 40 | } 41 | XCTAssertNotNil(task) 42 | XCTAssertTrue(session.wasCalled) 43 | } 44 | } 45 | 46 | class RefreshTokenMockSession: RequestKitURLSession { 47 | var wasCalled = false 48 | 49 | func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskProtocol { 50 | XCTAssertEqual(request.allHTTPHeaderFields?["Content-Type"], "application/x-www-form-urlencoded") 51 | XCTAssertEqual(request.url?.absoluteString, "https://bitbucket.org/site/oauth2/access_token") 52 | let body = NSString(data: request.httpBody!, encoding: String.Encoding.utf8.rawValue) 53 | XCTAssertEqual(body, "grant_type=refresh_token&refresh_token=54321") 54 | XCTAssertEqual(request.httpMethod, "POST") 55 | let data = TestHelper.loadJSONString("authorize").data(using: String.Encoding.utf8) 56 | let response = HTTPURLResponse(url: request.url!, statusCode: 200, httpVersion: "http/1.1", headerFields: ["Content-Type": "application/json"]) 57 | completionHandler(data, response, nil) 58 | wasCalled = true 59 | return MockURLSessionDataTask() 60 | } 61 | 62 | func uploadTask(with request: URLRequest, fromData bodyData: Data?, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskProtocol { 63 | XCTFail() 64 | return MockURLSessionDataTask() 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /TrashCanKitTests/TrashCanKitTestURLSession.swift: -------------------------------------------------------------------------------- 1 | import RequestKit 2 | import XCTest 3 | 4 | class MockURLSessionDataTask: URLSessionDataTaskProtocol { 5 | fileprivate (set) var resumeWasCalled = false 6 | 7 | func resume() { 8 | resumeWasCalled = true 9 | } 10 | } 11 | 12 | class TrashCanKitURLTestSession: RequestKitURLSession { 13 | var wasCalled: Bool = false 14 | let expectedURL: String 15 | let expectedHTTPMethod: String 16 | let responseString: String? 17 | let statusCode: Int 18 | 19 | init(expectedURL: String, expectedHTTPMethod: String, response: String?, statusCode: Int) { 20 | self.expectedURL = expectedURL 21 | self.expectedHTTPMethod = expectedHTTPMethod 22 | self.responseString = response 23 | self.statusCode = statusCode 24 | } 25 | 26 | init(expectedURL: String, expectedHTTPMethod: String, jsonFile: String?, statusCode: Int) { 27 | self.expectedURL = expectedURL 28 | self.expectedHTTPMethod = expectedHTTPMethod 29 | if let jsonFile = jsonFile { 30 | self.responseString = TestHelper.loadJSONString(jsonFile) 31 | } else { 32 | self.responseString = nil 33 | } 34 | self.statusCode = statusCode 35 | } 36 | 37 | func dataTask(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskProtocol { 38 | XCTAssertEqual(request.url?.absoluteString, expectedURL) 39 | XCTAssertEqual(request.httpMethod, expectedHTTPMethod) 40 | let data = responseString?.data(using: String.Encoding.utf8) 41 | let response = HTTPURLResponse(url: request.url!, statusCode: statusCode, httpVersion: "http/1.1", headerFields: ["Content-Type": "application/json"]) 42 | completionHandler(data, response, nil) 43 | wasCalled = true 44 | return MockURLSessionDataTask() 45 | } 46 | 47 | func uploadTask(with request: URLRequest, fromData bodyData: Data?, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTaskProtocol { 48 | XCTAssertEqual(request.url?.absoluteString, expectedURL) 49 | XCTAssertEqual(request.httpMethod, expectedHTTPMethod) 50 | let data = responseString?.data(using: String.Encoding.utf8) 51 | let response = HTTPURLResponse(url: request.url!, statusCode: statusCode, httpVersion: "http/1.1", headerFields: ["Content-Type": "application/json"]) 52 | completionHandler(data, response, nil) 53 | wasCalled = true 54 | return MockURLSessionDataTask() 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /TrashCanKitTests/UserTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import TrashCanKit 3 | 4 | class UserTests: XCTestCase { 5 | func testConstructFromJSON() { 6 | let subject = User(TestHelper.loadJSON("User")) 7 | XCTAssertEqual(subject.id, "{e9f0168c-cdf8-404a-95bb-3943dd2a65b6}") 8 | XCTAssertEqual(subject.login, "pietbrauer") 9 | XCTAssertEqual(subject.name, "Piet Brauer") 10 | } 11 | 12 | func testConstructEmailFromJSON() { 13 | let subject = Email(json: TestHelper.loadJSON("Email")) 14 | XCTAssertEqual(subject.isPrimary, true) 15 | XCTAssertEqual(subject.isConfirmed, true) 16 | XCTAssertEqual(subject.email, "me@supercooldomain.io") 17 | XCTAssertEqual(subject.type, "email") 18 | } 19 | 20 | func testConstructEmailFromEmptyJSON() { 21 | let subject = Email(json: [:]) 22 | XCTAssertEqual(subject.isPrimary, false) 23 | XCTAssertEqual(subject.isConfirmed, false) 24 | XCTAssertEqual(subject.email, nil) 25 | XCTAssertEqual(subject.type, nil) 26 | } 27 | 28 | func testMe() { 29 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 30 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/user?access_token=123456", expectedHTTPMethod: "GET", jsonFile: "Me", statusCode: 200) 31 | let task = TrashCanKit(tokenConfig).me(session) { response in 32 | switch response { 33 | case .success(let user): 34 | XCTAssertEqual(user.name, "tutorials account") 35 | case .failure: 36 | XCTAssertFalse(true) 37 | } 38 | } 39 | XCTAssertNotNil(task) 40 | XCTAssertTrue(session.wasCalled) 41 | } 42 | 43 | func testMyEmail() { 44 | let tokenConfig = TokenConfiguration("123456", refreshToken: "7890") 45 | let session = TrashCanKitURLTestSession(expectedURL: "https://bitbucket.org/api/2.0/user/emails?access_token=123456", expectedHTTPMethod: "GET", jsonFile: "Emails", statusCode: 200) 46 | let task = TrashCanKit(tokenConfig).emails(session) { response in 47 | switch response { 48 | case .success(let emails): 49 | XCTAssertEqual(emails.first?.email, "tutorials@bitbucket.org") 50 | case .failure: 51 | XCTAssertFalse(true) 52 | } 53 | } 54 | XCTAssertNotNil(task) 55 | XCTAssertTrue(session.wasCalled) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /TrashCanKitTests/authorize.json: -------------------------------------------------------------------------------- 1 | { 2 | "access_token": "017ec60f4a182", 3 | "scope": "read%3Aorg%2Crepo", 4 | "token_type": "bearer", 5 | "refresh_token": "14567", 6 | "expires_in": 3600 7 | } -------------------------------------------------------------------------------- /TrashCanKitTests/refresh_token_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "error_description": "Oh Oh, another error." 3 | } -------------------------------------------------------------------------------- /fastlane/.env: -------------------------------------------------------------------------------- 1 | AF_IOS_FRAMEWORK_SCHEME="TrashCanKit" 2 | AF_TVOS_FRAMEWORK_SCHEME="TrashCanKit tvOS" 3 | AF_OSX_FRAMEWORK_SCHEME="TrashCanKit Mac" 4 | 5 | -------------------------------------------------------------------------------- /fastlane/.env.default: -------------------------------------------------------------------------------- 1 | AF_IOS_SDK=iphonesimulator10.3 2 | AF_MAC_SDK=macosx10.12 3 | AF_TVOS_SDK=appletvsimulator10.2 4 | 5 | AF_CONFIGURATION=Release 6 | 7 | SCAN_SCHEME=$AF_IOS_FRAMEWORK_SCHEME 8 | SCAN_SDK=$AF_IOS_SDK 9 | SCAN_OUTPUT_DIRECTORY=fastlane/test-output 10 | DEPLOY_PODSPEC=TrashCanKit.podspec 11 | 12 | EXAMPLE_WORKSPACE=$AF_WORKSPACE 13 | EXAMPLE_SCHEME=$AF_IOS_EXAMPLE_SCHEME 14 | EXAMPLE_DESTINATION=$SCAN_DESTINATION 15 | -------------------------------------------------------------------------------- /fastlane/.env.deploy: -------------------------------------------------------------------------------- 1 | DEPLOY_BRANCH=master 2 | DEPLOY_PLIST_PATH=Framework/Info.plist 3 | DEPLOY_PODSPEC=TrashCanKit.podspec 4 | DEPLOY_REMOTE=origin 5 | 6 | DEPLOY_CHANGELOG_PATH=CHANGELOG.md 7 | DEPLOY_CHANGELOG_DELIMITER=--- 8 | 9 | # Used for CHANGELOG Generation and Github Release Management 10 | GITHUB_OWNER=nerdishbynature 11 | GITHUB_REPOSITORY=TrashCanKit 12 | # CI Should Provide GITHUB_API_TOKEN 13 | 14 | CARTHAGE_FRAMEWORK_NAME=TrashCanKit 15 | -------------------------------------------------------------------------------- /fastlane/.env.ios93: -------------------------------------------------------------------------------- 1 | SCAN_DEVICE="iPhone 6s" 2 | SCAN_SDK=iphonesimulator10.3 3 | EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 6s" 4 | -------------------------------------------------------------------------------- /fastlane/.env.osx: -------------------------------------------------------------------------------- 1 | SCAN_SCHEME=$AF_OSX_FRAMEWORK_SCHEME 2 | SCAN_SDK=$AF_OSX_SDK 3 | 4 | EXAMPLE_SCHEME=$AF_OSX_EXAMPLE_SCHEME 5 | EXAMPLE_DESTINATION="platform=macOS" -------------------------------------------------------------------------------- /fastlane/.env.tvos92: -------------------------------------------------------------------------------- 1 | SCAN_SCHEME=$AF_TVOS_FRAMEWORK_SCHEME 2 | SCAN_DEVICE="Apple TV 1080p" 3 | SCAN_SDK=$AF_TVOS_SDK 4 | 5 | EXAMPLE_SCHEME=$AF_TVOS_EXAMPLE_SCHEME 6 | EXAMPLE_DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p" -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | import_from_git( 2 | url: 'https://github.com/nerdishbynature/requestkit_fastlane.git', 3 | branch: 'master' 4 | ) 5 | --------------------------------------------------------------------------------