├── .gitattributes ├── .gitignore ├── .gitmodules ├── Cartfile ├── Cartfile.resolved ├── Naught.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── Naught-Mac.xcscheme │ └── Naught-iOS.xcscheme ├── Naught.xcworkspace └── contents.xcworkspacedata ├── NaughtTests ├── Info.plist ├── JSONFileReader.swift ├── NaughtModel.swift ├── NaughtTests.swift ├── User.swift └── types.json ├── README.md └── Source ├── Info.plist ├── Naught.h ├── naught.swift └── try.swift /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj merge=union 2 | 3 | # Original .gitattributes contents 4 | *.pbxproj merge=union 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X Finder 2 | .DS_Store 3 | 4 | # Xcode per-user config 5 | *.mode1 6 | *.mode1v3 7 | *.mode2v3 8 | *.perspective 9 | *.perspectivev3 10 | *.pbxuser 11 | xcuserdata 12 | *.xccheckout 13 | 14 | # Build products 15 | build/ 16 | *.o 17 | *.LinkFileList 18 | *.hmap 19 | 20 | # Automatic backup files 21 | *~.nib/ 22 | *.swp 23 | *~ 24 | *.dat 25 | *.dep 26 | 27 | # Cocoapods 28 | Pods 29 | 30 | # AppCode specific files 31 | .idea/ 32 | *.iml 33 | 34 | Carthage/Build 35 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Carthage/Checkouts/runes"] 2 | path = Carthage/Checkouts/runes 3 | url = https://github.com/thoughtbot/runes.git 4 | [submodule "Carthage/Checkouts/Argo"] 5 | path = Carthage/Checkouts/Argo 6 | url = https://github.com/thoughtbot/Argo.git 7 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "thoughtbot/Argo" 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "thoughtbot/runes" "v1.1" 2 | github "thoughtbot/Argo" "v0.3.2" 3 | -------------------------------------------------------------------------------- /Naught.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | EAB003E61A64939F00A83BDC /* Naught.h in Headers */ = {isa = PBXBuildFile; fileRef = EAB003E51A64939F00A83BDC /* Naught.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | EAB003EC1A64939F00A83BDC /* Naught.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB003E01A64939F00A83BDC /* Naught.framework */; }; 12 | EAB003F31A64939F00A83BDC /* NaughtTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB003F21A64939F00A83BDC /* NaughtTests.swift */; }; 13 | EAB0042A1A64959900A83BDC /* Naught.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB0041F1A64959900A83BDC /* Naught.framework */; }; 14 | EAB0043B1A64997000A83BDC /* naught.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB0043A1A64997000A83BDC /* naught.swift */; }; 15 | EAB004401A649AB200A83BDC /* try.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB0043F1A649AB200A83BDC /* try.swift */; }; 16 | EAB004411A649ADB00A83BDC /* NaughtTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB003F21A64939F00A83BDC /* NaughtTests.swift */; }; 17 | EAB004421A649AE000A83BDC /* naught.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB0043A1A64997000A83BDC /* naught.swift */; }; 18 | EAB004431A649AE300A83BDC /* try.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB0043F1A649AB200A83BDC /* try.swift */; }; 19 | EAB004481A649B6700A83BDC /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB004461A649B4400A83BDC /* User.swift */; }; 20 | EAB004491A649B6800A83BDC /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB004461A649B4400A83BDC /* User.swift */; }; 21 | EAB0044A1A649B6D00A83BDC /* NaughtModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB004441A649B1C00A83BDC /* NaughtModel.swift */; }; 22 | EAB0044B1A649B6D00A83BDC /* NaughtModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB004441A649B1C00A83BDC /* NaughtModel.swift */; }; 23 | EAB004541A649DCE00A83BDC /* types.json in Resources */ = {isa = PBXBuildFile; fileRef = EAB004521A649DBD00A83BDC /* types.json */; }; 24 | EAB004551A649DCE00A83BDC /* types.json in Resources */ = {isa = PBXBuildFile; fileRef = EAB004521A649DBD00A83BDC /* types.json */; }; 25 | EAB004561A649DD200A83BDC /* JSONFileReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB004501A649D9F00A83BDC /* JSONFileReader.swift */; }; 26 | EAB004571A649DD300A83BDC /* JSONFileReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB004501A649D9F00A83BDC /* JSONFileReader.swift */; }; 27 | EAB004681A64A00900A83BDC /* Argo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB004671A64A00900A83BDC /* Argo.framework */; }; 28 | EAB0046C1A64A02900A83BDC /* Argo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB0046B1A64A02900A83BDC /* Argo.framework */; }; 29 | EAD02F4F1A68889600F27F96 /* Runes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAD02F4E1A68889600F27F96 /* Runes.framework */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | EAB003ED1A64939F00A83BDC /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = EAB003D71A64939F00A83BDC /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = EAB003DF1A64939F00A83BDC; 38 | remoteInfo = Naught; 39 | }; 40 | EAB0042B1A64959900A83BDC /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = EAB003D71A64939F00A83BDC /* Project object */; 43 | proxyType = 1; 44 | remoteGlobalIDString = EAB0041E1A64959900A83BDC; 45 | remoteInfo = "Naught-Mac"; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXFileReference section */ 50 | EAB003E01A64939F00A83BDC /* Naught.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Naught.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | EAB003E41A64939F00A83BDC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | EAB003E51A64939F00A83BDC /* Naught.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Naught.h; sourceTree = ""; }; 53 | EAB003EB1A64939F00A83BDC /* Naught-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Naught-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | EAB003F11A64939F00A83BDC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | EAB003F21A64939F00A83BDC /* NaughtTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NaughtTests.swift; sourceTree = ""; }; 56 | EAB0041F1A64959900A83BDC /* Naught.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Naught.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | EAB004291A64959900A83BDC /* Naught-MacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Naught-MacTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | EAB0043A1A64997000A83BDC /* naught.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = naught.swift; sourceTree = ""; }; 59 | EAB0043F1A649AB200A83BDC /* try.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = try.swift; sourceTree = ""; }; 60 | EAB004441A649B1C00A83BDC /* NaughtModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NaughtModel.swift; sourceTree = ""; }; 61 | EAB004461A649B4400A83BDC /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 62 | EAB004501A649D9F00A83BDC /* JSONFileReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONFileReader.swift; sourceTree = ""; }; 63 | EAB004521A649DBD00A83BDC /* types.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = types.json; sourceTree = ""; }; 64 | EAB004671A64A00900A83BDC /* Argo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Argo.framework; path = "Carthage/Checkouts/Argo/build/Debug-iphoneos/Argo.framework"; sourceTree = ""; }; 65 | EAB0046B1A64A02900A83BDC /* Argo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Argo.framework; path = Carthage/Checkouts/Argo/build/Debug/Argo.framework; sourceTree = ""; }; 66 | EAD02F4E1A68889600F27F96 /* Runes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Runes.framework; path = Carthage/Checkouts/Runes/build/Debug/Runes.framework; sourceTree = ""; }; 67 | /* End PBXFileReference section */ 68 | 69 | /* Begin PBXFrameworksBuildPhase section */ 70 | EAB003DC1A64939F00A83BDC /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | EAB004681A64A00900A83BDC /* Argo.framework in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | EAB003E81A64939F00A83BDC /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | EAB003EC1A64939F00A83BDC /* Naught.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | EAB0041B1A64959900A83BDC /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | EAD02F4F1A68889600F27F96 /* Runes.framework in Frameworks */, 91 | EAB0046C1A64A02900A83BDC /* Argo.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | EAB004261A64959900A83BDC /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | EAB0042A1A64959900A83BDC /* Naught.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | /* End PBXFrameworksBuildPhase section */ 104 | 105 | /* Begin PBXGroup section */ 106 | EAB003D61A64939F00A83BDC = { 107 | isa = PBXGroup; 108 | children = ( 109 | EAB003E21A64939F00A83BDC /* Source */, 110 | EAB003EF1A64939F00A83BDC /* NaughtTests */, 111 | EAB0046A1A64A01C00A83BDC /* Frameworks */, 112 | EAB003E11A64939F00A83BDC /* Products */, 113 | ); 114 | indentWidth = 2; 115 | sourceTree = ""; 116 | tabWidth = 2; 117 | usesTabs = 0; 118 | }; 119 | EAB003E11A64939F00A83BDC /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | EAB003E01A64939F00A83BDC /* Naught.framework */, 123 | EAB003EB1A64939F00A83BDC /* Naught-iOSTests.xctest */, 124 | EAB0041F1A64959900A83BDC /* Naught.framework */, 125 | EAB004291A64959900A83BDC /* Naught-MacTests.xctest */, 126 | ); 127 | name = Products; 128 | sourceTree = ""; 129 | }; 130 | EAB003E21A64939F00A83BDC /* Source */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | EAB0043A1A64997000A83BDC /* naught.swift */, 134 | EAB0043F1A649AB200A83BDC /* try.swift */, 135 | EAB003E31A64939F00A83BDC /* Supporting Files */, 136 | ); 137 | path = Source; 138 | sourceTree = ""; 139 | }; 140 | EAB003E31A64939F00A83BDC /* Supporting Files */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | EAB003E51A64939F00A83BDC /* Naught.h */, 144 | EAB003E41A64939F00A83BDC /* Info.plist */, 145 | ); 146 | name = "Supporting Files"; 147 | sourceTree = ""; 148 | }; 149 | EAB003EF1A64939F00A83BDC /* NaughtTests */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | EAB003F21A64939F00A83BDC /* NaughtTests.swift */, 153 | EAB004441A649B1C00A83BDC /* NaughtModel.swift */, 154 | EAB004461A649B4400A83BDC /* User.swift */, 155 | EAB004501A649D9F00A83BDC /* JSONFileReader.swift */, 156 | EAB004521A649DBD00A83BDC /* types.json */, 157 | EAB003F01A64939F00A83BDC /* Supporting Files */, 158 | ); 159 | path = NaughtTests; 160 | sourceTree = ""; 161 | }; 162 | EAB003F01A64939F00A83BDC /* Supporting Files */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | EAB003F11A64939F00A83BDC /* Info.plist */, 166 | ); 167 | name = "Supporting Files"; 168 | sourceTree = ""; 169 | }; 170 | EAB0046A1A64A01C00A83BDC /* Frameworks */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | EAD02F4E1A68889600F27F96 /* Runes.framework */, 174 | EAB0046B1A64A02900A83BDC /* Argo.framework */, 175 | EAB004671A64A00900A83BDC /* Argo.framework */, 176 | ); 177 | name = Frameworks; 178 | sourceTree = ""; 179 | }; 180 | /* End PBXGroup section */ 181 | 182 | /* Begin PBXHeadersBuildPhase section */ 183 | EAB003DD1A64939F00A83BDC /* Headers */ = { 184 | isa = PBXHeadersBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | EAB003E61A64939F00A83BDC /* Naught.h in Headers */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | EAB0041C1A64959900A83BDC /* Headers */ = { 192 | isa = PBXHeadersBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXHeadersBuildPhase section */ 199 | 200 | /* Begin PBXNativeTarget section */ 201 | EAB003DF1A64939F00A83BDC /* Naught-iOS */ = { 202 | isa = PBXNativeTarget; 203 | buildConfigurationList = EAB003F61A64939F00A83BDC /* Build configuration list for PBXNativeTarget "Naught-iOS" */; 204 | buildPhases = ( 205 | EAB003DB1A64939F00A83BDC /* Sources */, 206 | EAB003DC1A64939F00A83BDC /* Frameworks */, 207 | EAB003DD1A64939F00A83BDC /* Headers */, 208 | EAB003DE1A64939F00A83BDC /* Resources */, 209 | 1C8A6C2E72DB7DBA3E4276F9 /* Warn for TODO and FIXME comments */, 210 | ); 211 | buildRules = ( 212 | ); 213 | dependencies = ( 214 | ); 215 | name = "Naught-iOS"; 216 | productName = Naught; 217 | productReference = EAB003E01A64939F00A83BDC /* Naught.framework */; 218 | productType = "com.apple.product-type.framework"; 219 | }; 220 | EAB003EA1A64939F00A83BDC /* Naught-iOSTests */ = { 221 | isa = PBXNativeTarget; 222 | buildConfigurationList = EAB003F91A64939F00A83BDC /* Build configuration list for PBXNativeTarget "Naught-iOSTests" */; 223 | buildPhases = ( 224 | EAB003E71A64939F00A83BDC /* Sources */, 225 | EAB003E81A64939F00A83BDC /* Frameworks */, 226 | EAB003E91A64939F00A83BDC /* Resources */, 227 | ); 228 | buildRules = ( 229 | ); 230 | dependencies = ( 231 | EAB003EE1A64939F00A83BDC /* PBXTargetDependency */, 232 | ); 233 | name = "Naught-iOSTests"; 234 | productName = NaughtTests; 235 | productReference = EAB003EB1A64939F00A83BDC /* Naught-iOSTests.xctest */; 236 | productType = "com.apple.product-type.bundle.unit-test"; 237 | }; 238 | EAB0041E1A64959900A83BDC /* Naught-Mac */ = { 239 | isa = PBXNativeTarget; 240 | buildConfigurationList = EAB004321A64959900A83BDC /* Build configuration list for PBXNativeTarget "Naught-Mac" */; 241 | buildPhases = ( 242 | EAB0041A1A64959900A83BDC /* Sources */, 243 | EAB0041B1A64959900A83BDC /* Frameworks */, 244 | EAB0041C1A64959900A83BDC /* Headers */, 245 | EAB0041D1A64959900A83BDC /* Resources */, 246 | C35A10D4373599C760AD0230 /* Warn for TODO and FIXME comments */, 247 | ); 248 | buildRules = ( 249 | ); 250 | dependencies = ( 251 | ); 252 | name = "Naught-Mac"; 253 | productName = "Naught-Mac"; 254 | productReference = EAB0041F1A64959900A83BDC /* Naught.framework */; 255 | productType = "com.apple.product-type.framework"; 256 | }; 257 | EAB004281A64959900A83BDC /* Naught-MacTests */ = { 258 | isa = PBXNativeTarget; 259 | buildConfigurationList = EAB004351A64959900A83BDC /* Build configuration list for PBXNativeTarget "Naught-MacTests" */; 260 | buildPhases = ( 261 | EAB004251A64959900A83BDC /* Sources */, 262 | EAB004261A64959900A83BDC /* Frameworks */, 263 | EAB004271A64959900A83BDC /* Resources */, 264 | ); 265 | buildRules = ( 266 | ); 267 | dependencies = ( 268 | EAB0042C1A64959900A83BDC /* PBXTargetDependency */, 269 | ); 270 | name = "Naught-MacTests"; 271 | productName = "Naught-MacTests"; 272 | productReference = EAB004291A64959900A83BDC /* Naught-MacTests.xctest */; 273 | productType = "com.apple.product-type.bundle.unit-test"; 274 | }; 275 | /* End PBXNativeTarget section */ 276 | 277 | /* Begin PBXProject section */ 278 | EAB003D71A64939F00A83BDC /* Project object */ = { 279 | isa = PBXProject; 280 | attributes = { 281 | LastUpgradeCheck = 0620; 282 | ORGANIZATIONNAME = thoughtbot; 283 | TargetAttributes = { 284 | EAB003DF1A64939F00A83BDC = { 285 | CreatedOnToolsVersion = 6.2; 286 | }; 287 | EAB003EA1A64939F00A83BDC = { 288 | CreatedOnToolsVersion = 6.2; 289 | }; 290 | EAB0041E1A64959900A83BDC = { 291 | CreatedOnToolsVersion = 6.2; 292 | }; 293 | EAB004281A64959900A83BDC = { 294 | CreatedOnToolsVersion = 6.2; 295 | }; 296 | }; 297 | }; 298 | buildConfigurationList = EAB003DA1A64939F00A83BDC /* Build configuration list for PBXProject "Naught" */; 299 | compatibilityVersion = "Xcode 3.2"; 300 | developmentRegion = English; 301 | hasScannedForEncodings = 0; 302 | knownRegions = ( 303 | en, 304 | ); 305 | mainGroup = EAB003D61A64939F00A83BDC; 306 | productRefGroup = EAB003E11A64939F00A83BDC /* Products */; 307 | projectDirPath = ""; 308 | projectRoot = ""; 309 | targets = ( 310 | EAB003DF1A64939F00A83BDC /* Naught-iOS */, 311 | EAB003EA1A64939F00A83BDC /* Naught-iOSTests */, 312 | EAB0041E1A64959900A83BDC /* Naught-Mac */, 313 | EAB004281A64959900A83BDC /* Naught-MacTests */, 314 | ); 315 | }; 316 | /* End PBXProject section */ 317 | 318 | /* Begin PBXResourcesBuildPhase section */ 319 | EAB003DE1A64939F00A83BDC /* Resources */ = { 320 | isa = PBXResourcesBuildPhase; 321 | buildActionMask = 2147483647; 322 | files = ( 323 | ); 324 | runOnlyForDeploymentPostprocessing = 0; 325 | }; 326 | EAB003E91A64939F00A83BDC /* Resources */ = { 327 | isa = PBXResourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | EAB004541A649DCE00A83BDC /* types.json in Resources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | EAB0041D1A64959900A83BDC /* Resources */ = { 335 | isa = PBXResourcesBuildPhase; 336 | buildActionMask = 2147483647; 337 | files = ( 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | }; 341 | EAB004271A64959900A83BDC /* Resources */ = { 342 | isa = PBXResourcesBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | EAB004551A649DCE00A83BDC /* types.json in Resources */, 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | /* End PBXResourcesBuildPhase section */ 350 | 351 | /* Begin PBXShellScriptBuildPhase section */ 352 | 1C8A6C2E72DB7DBA3E4276F9 /* Warn for TODO and FIXME comments */ = { 353 | isa = PBXShellScriptBuildPhase; 354 | buildActionMask = 2147483647; 355 | files = ( 356 | ); 357 | inputPaths = ( 358 | ); 359 | name = "Warn for TODO and FIXME comments"; 360 | outputPaths = ( 361 | ); 362 | runOnlyForDeploymentPostprocessing = 0; 363 | shellPath = /bin/sh; 364 | shellScript = "KEYWORDS=\"TODO:|FIXME:|\\?\\?\\?:|\\!\\!\\!:\"\nFILE_EXTENSIONS=\"h|m|mm|c|cpp\"\nfind -E \"${SRCROOT}\" -ipath \"${SRCROOT}/pods\" -prune -o \\( -regex \".*\\.($FILE_EXTENSIONS)$\" \\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($KEYWORDS).*\\$\" | perl -p -e \"s/($KEYWORDS)/ warning: \\$1/\"\n"; 365 | }; 366 | C35A10D4373599C760AD0230 /* Warn for TODO and FIXME comments */ = { 367 | isa = PBXShellScriptBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | ); 371 | inputPaths = ( 372 | ); 373 | name = "Warn for TODO and FIXME comments"; 374 | outputPaths = ( 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | shellPath = /bin/sh; 378 | shellScript = "KEYWORDS=\"TODO:|FIXME:|\\?\\?\\?:|\\!\\!\\!:\"\nFILE_EXTENSIONS=\"h|m|mm|c|cpp\"\nfind -E \"${SRCROOT}\" -ipath \"${SRCROOT}/pods\" -prune -o \\( -regex \".*\\.($FILE_EXTENSIONS)$\" \\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($KEYWORDS).*\\$\" | perl -p -e \"s/($KEYWORDS)/ warning: \\$1/\"\n"; 379 | }; 380 | /* End PBXShellScriptBuildPhase section */ 381 | 382 | /* Begin PBXSourcesBuildPhase section */ 383 | EAB003DB1A64939F00A83BDC /* Sources */ = { 384 | isa = PBXSourcesBuildPhase; 385 | buildActionMask = 2147483647; 386 | files = ( 387 | EAB0043B1A64997000A83BDC /* naught.swift in Sources */, 388 | EAB004401A649AB200A83BDC /* try.swift in Sources */, 389 | ); 390 | runOnlyForDeploymentPostprocessing = 0; 391 | }; 392 | EAB003E71A64939F00A83BDC /* Sources */ = { 393 | isa = PBXSourcesBuildPhase; 394 | buildActionMask = 2147483647; 395 | files = ( 396 | EAB004561A649DD200A83BDC /* JSONFileReader.swift in Sources */, 397 | EAB004481A649B6700A83BDC /* User.swift in Sources */, 398 | EAB0044B1A649B6D00A83BDC /* NaughtModel.swift in Sources */, 399 | EAB003F31A64939F00A83BDC /* NaughtTests.swift in Sources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | EAB0041A1A64959900A83BDC /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | EAB004421A649AE000A83BDC /* naught.swift in Sources */, 408 | EAB004431A649AE300A83BDC /* try.swift in Sources */, 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | }; 412 | EAB004251A64959900A83BDC /* Sources */ = { 413 | isa = PBXSourcesBuildPhase; 414 | buildActionMask = 2147483647; 415 | files = ( 416 | EAB004571A649DD300A83BDC /* JSONFileReader.swift in Sources */, 417 | EAB004491A649B6800A83BDC /* User.swift in Sources */, 418 | EAB0044A1A649B6D00A83BDC /* NaughtModel.swift in Sources */, 419 | EAB004411A649ADB00A83BDC /* NaughtTests.swift in Sources */, 420 | ); 421 | runOnlyForDeploymentPostprocessing = 0; 422 | }; 423 | /* End PBXSourcesBuildPhase section */ 424 | 425 | /* Begin PBXTargetDependency section */ 426 | EAB003EE1A64939F00A83BDC /* PBXTargetDependency */ = { 427 | isa = PBXTargetDependency; 428 | target = EAB003DF1A64939F00A83BDC /* Naught-iOS */; 429 | targetProxy = EAB003ED1A64939F00A83BDC /* PBXContainerItemProxy */; 430 | }; 431 | EAB0042C1A64959900A83BDC /* PBXTargetDependency */ = { 432 | isa = PBXTargetDependency; 433 | target = EAB0041E1A64959900A83BDC /* Naught-Mac */; 434 | targetProxy = EAB0042B1A64959900A83BDC /* PBXContainerItemProxy */; 435 | }; 436 | /* End PBXTargetDependency section */ 437 | 438 | /* Begin XCBuildConfiguration section */ 439 | EAB003F41A64939F00A83BDC /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | ALWAYS_SEARCH_USER_PATHS = NO; 443 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 444 | CLANG_CXX_LIBRARY = "libc++"; 445 | CLANG_ENABLE_MODULES = YES; 446 | CLANG_ENABLE_OBJC_ARC = YES; 447 | CLANG_WARN_BOOL_CONVERSION = YES; 448 | CLANG_WARN_CONSTANT_CONVERSION = YES; 449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 451 | CLANG_WARN_EMPTY_BODY = YES; 452 | CLANG_WARN_ENUM_CONVERSION = YES; 453 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 454 | CLANG_WARN_INT_CONVERSION = YES; 455 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 456 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 457 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 458 | CLANG_WARN_UNREACHABLE_CODE = YES; 459 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 460 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 461 | COPY_PHASE_STRIP = NO; 462 | CURRENT_PROJECT_VERSION = 1; 463 | ENABLE_STRICT_OBJC_MSGSEND = YES; 464 | GCC_C_LANGUAGE_STANDARD = gnu99; 465 | GCC_DYNAMIC_NO_PIC = NO; 466 | GCC_OPTIMIZATION_LEVEL = 0; 467 | GCC_PREPROCESSOR_DEFINITIONS = ( 468 | "DEBUG=1", 469 | "$(inherited)", 470 | ); 471 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 472 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 473 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 474 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 475 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 476 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 477 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 478 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 479 | GCC_WARN_MISSING_PARENTHESES = YES; 480 | GCC_WARN_SHADOW = YES; 481 | GCC_WARN_SIGN_COMPARE = YES; 482 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 483 | GCC_WARN_UNDECLARED_SELECTOR = YES; 484 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 485 | GCC_WARN_UNUSED_FUNCTION = YES; 486 | GCC_WARN_UNUSED_LABEL = YES; 487 | GCC_WARN_UNUSED_VALUE = YES; 488 | GCC_WARN_UNUSED_VARIABLE = YES; 489 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 490 | MTL_ENABLE_DEBUG_INFO = YES; 491 | ONLY_ACTIVE_ARCH = YES; 492 | RUN_CLANG_STATIC_ANALYZER = YES; 493 | SDKROOT = iphoneos; 494 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 495 | TARGETED_DEVICE_FAMILY = "1,2"; 496 | VERSIONING_SYSTEM = "apple-generic"; 497 | VERSION_INFO_PREFIX = ""; 498 | }; 499 | name = Debug; 500 | }; 501 | EAB003F51A64939F00A83BDC /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | buildSettings = { 504 | ALWAYS_SEARCH_USER_PATHS = NO; 505 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 506 | CLANG_CXX_LIBRARY = "libc++"; 507 | CLANG_ENABLE_MODULES = YES; 508 | CLANG_ENABLE_OBJC_ARC = YES; 509 | CLANG_WARN_BOOL_CONVERSION = YES; 510 | CLANG_WARN_CONSTANT_CONVERSION = YES; 511 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 512 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 513 | CLANG_WARN_EMPTY_BODY = YES; 514 | CLANG_WARN_ENUM_CONVERSION = YES; 515 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 516 | CLANG_WARN_INT_CONVERSION = YES; 517 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 518 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 519 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 520 | CLANG_WARN_UNREACHABLE_CODE = YES; 521 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 522 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 523 | COPY_PHASE_STRIP = NO; 524 | CURRENT_PROJECT_VERSION = 1; 525 | ENABLE_NS_ASSERTIONS = NO; 526 | ENABLE_STRICT_OBJC_MSGSEND = YES; 527 | GCC_C_LANGUAGE_STANDARD = gnu99; 528 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 529 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 530 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 531 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 532 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 533 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 534 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 535 | GCC_WARN_MISSING_PARENTHESES = YES; 536 | GCC_WARN_SHADOW = YES; 537 | GCC_WARN_SIGN_COMPARE = YES; 538 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 539 | GCC_WARN_UNDECLARED_SELECTOR = YES; 540 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 541 | GCC_WARN_UNUSED_FUNCTION = YES; 542 | GCC_WARN_UNUSED_LABEL = YES; 543 | GCC_WARN_UNUSED_VALUE = YES; 544 | GCC_WARN_UNUSED_VARIABLE = YES; 545 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 546 | MTL_ENABLE_DEBUG_INFO = NO; 547 | RUN_CLANG_STATIC_ANALYZER = YES; 548 | SDKROOT = iphoneos; 549 | TARGETED_DEVICE_FAMILY = "1,2"; 550 | VALIDATE_PRODUCT = YES; 551 | VERSIONING_SYSTEM = "apple-generic"; 552 | VERSION_INFO_PREFIX = ""; 553 | }; 554 | name = Release; 555 | }; 556 | EAB003F71A64939F00A83BDC /* Debug */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | CLANG_ENABLE_MODULES = YES; 560 | DEFINES_MODULE = YES; 561 | DYLIB_COMPATIBILITY_VERSION = 1; 562 | DYLIB_CURRENT_VERSION = 1; 563 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 564 | INFOPLIST_FILE = Source/Info.plist; 565 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 566 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 567 | PRODUCT_NAME = Naught; 568 | SKIP_INSTALL = YES; 569 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 570 | }; 571 | name = Debug; 572 | }; 573 | EAB003F81A64939F00A83BDC /* Release */ = { 574 | isa = XCBuildConfiguration; 575 | buildSettings = { 576 | CLANG_ENABLE_MODULES = YES; 577 | DEFINES_MODULE = YES; 578 | DYLIB_COMPATIBILITY_VERSION = 1; 579 | DYLIB_CURRENT_VERSION = 1; 580 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 581 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 582 | INFOPLIST_FILE = Source/Info.plist; 583 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 584 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 585 | PRODUCT_NAME = Naught; 586 | SKIP_INSTALL = YES; 587 | }; 588 | name = Release; 589 | }; 590 | EAB003FA1A64939F00A83BDC /* Debug */ = { 591 | isa = XCBuildConfiguration; 592 | buildSettings = { 593 | FRAMEWORK_SEARCH_PATHS = ( 594 | "$(SDKROOT)/Developer/Library/Frameworks", 595 | "$(inherited)", 596 | "$(PROJECT_DIR)/Carthage/Build/iOS", 597 | ); 598 | GCC_PREPROCESSOR_DEFINITIONS = ( 599 | "DEBUG=1", 600 | "$(inherited)", 601 | ); 602 | INFOPLIST_FILE = NaughtTests/Info.plist; 603 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 604 | PRODUCT_NAME = "$(TARGET_NAME)"; 605 | }; 606 | name = Debug; 607 | }; 608 | EAB003FB1A64939F00A83BDC /* Release */ = { 609 | isa = XCBuildConfiguration; 610 | buildSettings = { 611 | FRAMEWORK_SEARCH_PATHS = ( 612 | "$(SDKROOT)/Developer/Library/Frameworks", 613 | "$(inherited)", 614 | "$(PROJECT_DIR)/Carthage/Build/iOS", 615 | ); 616 | INFOPLIST_FILE = NaughtTests/Info.plist; 617 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 618 | PRODUCT_NAME = "$(TARGET_NAME)"; 619 | }; 620 | name = Release; 621 | }; 622 | EAB004331A64959900A83BDC /* Debug */ = { 623 | isa = XCBuildConfiguration; 624 | buildSettings = { 625 | COMBINE_HIDPI_IMAGES = YES; 626 | DEFINES_MODULE = YES; 627 | DYLIB_COMPATIBILITY_VERSION = 1; 628 | DYLIB_CURRENT_VERSION = 1; 629 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 630 | FRAMEWORK_VERSION = A; 631 | GCC_PREPROCESSOR_DEFINITIONS = ( 632 | "DEBUG=1", 633 | "$(inherited)", 634 | ); 635 | INFOPLIST_FILE = Source/Info.plist; 636 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 637 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 638 | MACOSX_DEPLOYMENT_TARGET = 10.10; 639 | PRODUCT_NAME = Naught; 640 | SDKROOT = macosx; 641 | SKIP_INSTALL = YES; 642 | }; 643 | name = Debug; 644 | }; 645 | EAB004341A64959900A83BDC /* Release */ = { 646 | isa = XCBuildConfiguration; 647 | buildSettings = { 648 | COMBINE_HIDPI_IMAGES = YES; 649 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 650 | DEFINES_MODULE = YES; 651 | DYLIB_COMPATIBILITY_VERSION = 1; 652 | DYLIB_CURRENT_VERSION = 1; 653 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 654 | FRAMEWORK_VERSION = A; 655 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 656 | INFOPLIST_FILE = Source/Info.plist; 657 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 658 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 659 | MACOSX_DEPLOYMENT_TARGET = 10.10; 660 | PRODUCT_NAME = Naught; 661 | SDKROOT = macosx; 662 | SKIP_INSTALL = YES; 663 | }; 664 | name = Release; 665 | }; 666 | EAB004361A64959900A83BDC /* Debug */ = { 667 | isa = XCBuildConfiguration; 668 | buildSettings = { 669 | COMBINE_HIDPI_IMAGES = YES; 670 | FRAMEWORK_SEARCH_PATHS = ( 671 | "$(DEVELOPER_FRAMEWORKS_DIR)", 672 | "$(inherited)", 673 | "$(PROJECT_DIR)/Carthage/Build/Mac", 674 | ); 675 | GCC_PREPROCESSOR_DEFINITIONS = ( 676 | "DEBUG=1", 677 | "$(inherited)", 678 | ); 679 | INFOPLIST_FILE = NaughtTests/Info.plist; 680 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 681 | MACOSX_DEPLOYMENT_TARGET = 10.10; 682 | PRODUCT_NAME = "$(TARGET_NAME)"; 683 | SDKROOT = macosx; 684 | }; 685 | name = Debug; 686 | }; 687 | EAB004371A64959900A83BDC /* Release */ = { 688 | isa = XCBuildConfiguration; 689 | buildSettings = { 690 | COMBINE_HIDPI_IMAGES = YES; 691 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 692 | FRAMEWORK_SEARCH_PATHS = ( 693 | "$(DEVELOPER_FRAMEWORKS_DIR)", 694 | "$(inherited)", 695 | "$(PROJECT_DIR)/Carthage/Build/Mac", 696 | ); 697 | INFOPLIST_FILE = NaughtTests/Info.plist; 698 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 699 | MACOSX_DEPLOYMENT_TARGET = 10.10; 700 | PRODUCT_NAME = "$(TARGET_NAME)"; 701 | SDKROOT = macosx; 702 | }; 703 | name = Release; 704 | }; 705 | /* End XCBuildConfiguration section */ 706 | 707 | /* Begin XCConfigurationList section */ 708 | EAB003DA1A64939F00A83BDC /* Build configuration list for PBXProject "Naught" */ = { 709 | isa = XCConfigurationList; 710 | buildConfigurations = ( 711 | EAB003F41A64939F00A83BDC /* Debug */, 712 | EAB003F51A64939F00A83BDC /* Release */, 713 | ); 714 | defaultConfigurationIsVisible = 0; 715 | defaultConfigurationName = Release; 716 | }; 717 | EAB003F61A64939F00A83BDC /* Build configuration list for PBXNativeTarget "Naught-iOS" */ = { 718 | isa = XCConfigurationList; 719 | buildConfigurations = ( 720 | EAB003F71A64939F00A83BDC /* Debug */, 721 | EAB003F81A64939F00A83BDC /* Release */, 722 | ); 723 | defaultConfigurationIsVisible = 0; 724 | defaultConfigurationName = Release; 725 | }; 726 | EAB003F91A64939F00A83BDC /* Build configuration list for PBXNativeTarget "Naught-iOSTests" */ = { 727 | isa = XCConfigurationList; 728 | buildConfigurations = ( 729 | EAB003FA1A64939F00A83BDC /* Debug */, 730 | EAB003FB1A64939F00A83BDC /* Release */, 731 | ); 732 | defaultConfigurationIsVisible = 0; 733 | defaultConfigurationName = Release; 734 | }; 735 | EAB004321A64959900A83BDC /* Build configuration list for PBXNativeTarget "Naught-Mac" */ = { 736 | isa = XCConfigurationList; 737 | buildConfigurations = ( 738 | EAB004331A64959900A83BDC /* Debug */, 739 | EAB004341A64959900A83BDC /* Release */, 740 | ); 741 | defaultConfigurationIsVisible = 0; 742 | defaultConfigurationName = Release; 743 | }; 744 | EAB004351A64959900A83BDC /* Build configuration list for PBXNativeTarget "Naught-MacTests" */ = { 745 | isa = XCConfigurationList; 746 | buildConfigurations = ( 747 | EAB004361A64959900A83BDC /* Debug */, 748 | EAB004371A64959900A83BDC /* Release */, 749 | ); 750 | defaultConfigurationIsVisible = 0; 751 | defaultConfigurationName = Release; 752 | }; 753 | /* End XCConfigurationList section */ 754 | }; 755 | rootObject = EAB003D71A64939F00A83BDC /* Project object */; 756 | } 757 | -------------------------------------------------------------------------------- /Naught.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Naught.xcodeproj/xcshareddata/xcschemes/Naught-Mac.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Naught.xcodeproj/xcshareddata/xcschemes/Naught-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Naught.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /NaughtTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.thoughtbot.$(PRODUCT_NAME:rfc1034identifier) 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 | -------------------------------------------------------------------------------- /NaughtTests/JSONFileReader.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class JSONFileReader { 4 | class func JSON(fromFile file: String) -> AnyObject? { 5 | let path = NSBundle(forClass: self).pathForResource(file, ofType: "json") 6 | 7 | if path != nil { 8 | if let data = NSData(contentsOfFile: path!) { 9 | return NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions(0), error: nil) 10 | } 11 | } 12 | 13 | return .None 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /NaughtTests/NaughtModel.swift: -------------------------------------------------------------------------------- 1 | import Argo 2 | import Naught 3 | 4 | struct NautModel { 5 | let int: Int 6 | let string: String 7 | let double: Double 8 | let bool: Bool 9 | let intOpt: Int? 10 | let stringArray: [String] 11 | let stringArrayOpt: [String]? 12 | let eStringArray: [String] 13 | let eStringArrayOpt: [String]? 14 | let userOpt: User? 15 | } 16 | 17 | extension NautModel: JSONDecodable { 18 | static func create(int: Int)(string: String)(double: Double)(bool: Bool)(intOpt: Int?)(stringArray: [String])(stringArrayOpt: [String]?)(eStringArray: [String])(eStringArrayOpt: [String]?)(userOpt: User?) -> NautModel { 19 | return NautModel(int: int, string: string, double: double, bool: bool, intOpt: intOpt, stringArray: stringArray, stringArrayOpt: stringArrayOpt, eStringArray: eStringArray, eStringArrayOpt: eStringArrayOpt, userOpt: userOpt) 20 | } 21 | 22 | static func decode(j: JSONValue) -> NautModel? { 23 | return try(NautModel.create 24 | , getValue (j, "int") 25 | , getValue (j, ["user_opt", "name"]) 26 | , getValue (j, "double") 27 | , getValue (j, "bool") 28 | , getValueO(j, "int_opt") 29 | , getArray (j, "string_array") 30 | , getArrayO(j, "string_array_opt") 31 | , getArray (j, ["embedded", "string_array"]) 32 | , getArrayO(j, ["embedded", "string_array_opt"]) 33 | , getValueO(j, "user_opt")) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /NaughtTests/NaughtTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Argo 3 | import Naught 4 | 5 | class NautTests: XCTestCase { 6 | func testNaut() { 7 | let json: AnyObject? = JSONFileReader.JSON(fromFile: "types") 8 | let value = json.map(JSONValue.parse) 9 | 10 | if let v = value { 11 | let model = NautModel.decode(v) 12 | 13 | XCTAssert(model != nil) 14 | XCTAssert(model?.int == 5) 15 | XCTAssert(model?.string == "Cooler User") 16 | XCTAssert(model?.double == 3.4) 17 | XCTAssert(model?.bool == false) 18 | XCTAssert(model?.intOpt != nil) 19 | XCTAssert(model?.intOpt! == 4) 20 | XCTAssert(model?.stringArray.count == 2) 21 | XCTAssert(model?.stringArrayOpt == nil) 22 | XCTAssert(model?.eStringArray.count == 2) 23 | XCTAssert(model?.eStringArrayOpt != nil) 24 | XCTAssert(model?.eStringArrayOpt?.count == 0) 25 | XCTAssert(model?.userOpt != nil) 26 | XCTAssert(model?.userOpt?.id == 6) 27 | } else { 28 | XCTFail("Couldn't parse json.") 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /NaughtTests/User.swift: -------------------------------------------------------------------------------- 1 | import Argo 2 | import Naught 3 | 4 | struct User { 5 | let id: Int 6 | let name: String 7 | let email: String? 8 | } 9 | 10 | extension User: JSONDecodable { 11 | static func create(id: Int)(name: String)(email: String?) -> User { 12 | return User(id: id, name: name, email: email) 13 | } 14 | 15 | static func decode(j: JSONValue) -> User? { 16 | return try(User.create 17 | , getValue(j, "id") 18 | , getValue(j, "name") 19 | , getValueO(j, "email")) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /NaughtTests/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "int": 5, 3 | "double": 3.4, 4 | "bool": false, 5 | "int_opt": 4, 6 | "string_array": [ 7 | "hello", 8 | "world" 9 | ], 10 | "embedded": { 11 | "string_array": [ 12 | "hello", 13 | "world" 14 | ], 15 | "string_array_opt": [] 16 | }, 17 | "user_opt": { 18 | "id": 6, 19 | "name": "Cooler User" 20 | } 21 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Naught # 2 | 3 | For people who want to use [Argo] but do naught want to use custom operators. 4 | 5 | [Argo]: https://github.com/thoughtbot/Argo 6 | 7 | Naught is meant to use in conjunction with Argo to form ... 8 | 9 | **ArgoNaught** 10 | 11 | ... Get it? 12 | 13 | ## Installation ## 14 | 15 | ### [Carthage](https://github.com/Carthage/Carthage) ## 16 | 17 | `github "thoughtbot/Naught"` 18 | 19 | Carthage will automatically download Argo as well since it is a dependency of 20 | Naught. However, if you want to use anything in Argo (most likely you will be) 21 | you will have to bring it into your project along with Naught. 22 | 23 | ### [CocoaPods](http://cocoapods.org/) ### 24 | 25 | _coming soon_ 26 | 27 | ## What's included? ## 28 | 29 | You get 4 global functions to replace Argo's custom operators to use when 30 | parsing JSON: 31 | 32 | - `getValue (json: JSONValue, key: String)` replaces `<|` 33 | - `getValueO(json: JSONValue, key: String)` replaces `<|?` 34 | - `getArray (json: JSONValue, key: String)` replaces `<||` 35 | - `getArrayO(json: JSONValue, key: String)` replaces `<||?` 36 | 37 | You also get a `try` function, good to up to 12 parameter model create 38 | functions. `try` let's you ignore fmap `<^>` and apply `<*>` and use a 39 | function instead. 40 | 41 | ```swift 42 | struct User { 43 | let id: Int 44 | let name: String 45 | let email: String? 46 | } 47 | 48 | extension User: JSONDecodable { 49 | static func create(id: Int)(name: String)(email: String?) -> User { 50 | return User(id: id, name: name, email: email) 51 | } 52 | 53 | static func decode(j: JSONValue) -> User? { 54 | return try(User.create 55 | , getValue (j, "id") 56 | , getValue (j, "name") 57 | , getValueO(j, "email")) 58 | } 59 | } 60 | ``` 61 | 62 | To see a full example of Naught's usage, please check out the tests. 63 | 64 | -------------------------------------------------------------------------------- /Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.thoughtbot.naught 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Source/Naught.h: -------------------------------------------------------------------------------- 1 | // 2 | // Naught.h 3 | // Naught 4 | // 5 | // Created by Tony DiPasquale on 1/12/15. 6 | // Copyright (c) 2015 thoughtbot. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Naught. 12 | FOUNDATION_EXPORT double NaughtVersionNumber; 13 | 14 | //! Project version string for Naught. 15 | FOUNDATION_EXPORT const unsigned char NaughtVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/naught.swift: -------------------------------------------------------------------------------- 1 | import Argo 2 | 3 | public func getValue(j: JSONValue, key: String) -> A? { 4 | return j <| [key] 5 | } 6 | 7 | public func getValue(j: JSONValue, key: [String]) -> A? { 8 | return j <| key 9 | } 10 | 11 | public func getValueO(j: JSONValue, key: String) -> A?? { 12 | return j <|? [key] 13 | } 14 | 15 | public func getValueO(j: JSONValue, key: [String]) -> A?? { 16 | return j <|? key 17 | } 18 | 19 | public func getArray(j: JSONValue, key: String) -> [A]? { 20 | return j <|| [key] 21 | } 22 | 23 | public func getArray(j: JSONValue, key: [String]) -> [A]? { 24 | return j <|| key 25 | } 26 | 27 | public func getArrayO(j: JSONValue, key: String) -> [A]?? { 28 | return j <||? [key] 29 | } 30 | 31 | public func getArrayO(j: JSONValue, key: [String]) -> [A]?? { 32 | return j <||? key 33 | } 34 | -------------------------------------------------------------------------------- /Source/try.swift: -------------------------------------------------------------------------------- 1 | import Runes 2 | 3 | public func try(fx: A -> Z, a: A?) -> Z? { 4 | return fx <^> a 5 | } 6 | 7 | public func try(fx: A -> B -> Z, a: A?, b: B?) -> Z? { 8 | return fx <^> a <*> b 9 | } 10 | 11 | public func try(fx: A -> B -> C -> Z, a: A?, b: B?, c: C?) -> Z? { 12 | return fx <^> a <*> b <*> c 13 | } 14 | 15 | public func try(fx: A -> B -> C -> D -> Z, a: A?, b: B?, c: C?, d: D?) -> Z? { 16 | return fx <^> a <*> b <*> c <*> d 17 | } 18 | 19 | public func try(fx: A -> B -> C -> D -> E -> Z, a: A?, b: B?, c: C?, d: D?, e: E?) -> Z? { 20 | return fx <^> a <*> b <*> c <*> d <*> e 21 | } 22 | 23 | public func try(fx: A -> B -> C -> D -> E -> F -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?) -> Z? { 24 | return fx <^> a <*> b <*> c <*> d <*> e <*> f 25 | } 26 | 27 | public func try(fx: A -> B -> C -> D -> E -> F -> G -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?, g: G?) -> Z? { 28 | return fx <^> a <*> b <*> c <*> d <*> e <*> f <*> g 29 | } 30 | 31 | public func try(fx: A -> B -> C -> D -> E -> F -> G -> H -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?, g: G?, h: H?) -> Z? { 32 | return fx <^> a <*> b <*> c <*> d <*> e <*> f <*> g <*> h 33 | } 34 | 35 | public func try(fx: A -> B -> C -> D -> E -> F -> G -> H -> I -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?, g: G?, h: H?, i: I?) -> Z? { 36 | return fx <^> a <*> b <*> c <*> d <*> e <*> f <*> g <*> h <*> i 37 | } 38 | 39 | public func try(fx: A -> B -> C -> D -> E -> F -> G -> H -> I -> J -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?, g: G?, h: H?, i: I?, j: J?) -> Z? { 40 | return fx <^> a <*> b <*> c <*> d <*> e <*> f <*> g <*> h <*> i <*> j 41 | } 42 | 43 | public func try(fx: A -> B -> C -> D -> E -> F -> G -> H -> I -> J -> K -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?, g: G?, h: H?, i: I?, j: J?, k: K?) -> Z? { 44 | return fx <^> a <*> b <*> c <*> d <*> e <*> f <*> g <*> h <*> i <*> j <*> k 45 | } 46 | 47 | public func try(fx: A -> B -> C -> D -> E -> F -> G -> H -> I -> J -> K -> L -> Z, a: A?, b: B?, c: C?, d: D?, e: E?, f: F?, g: G?, h: H?, i: I?, j: J?, k: K?, l: L?) -> Z? { 48 | return fx <^> a <*> b <*> c <*> d <*> e <*> f <*> g <*> h <*> i <*> j <*> k <*> l 49 | } 50 | --------------------------------------------------------------------------------