[
  {
    "path": ".gitignore",
    "content": "# OS X\n.DS_Store\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\n\n# CocoaPods\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control\n#\nPods/\nRome/\n\n# Carthage\n#\n# Add this line if you want to avoid checking in source code from Carthage dependencies.\nCarthage/\n\n# Apous\nbin/\n.apousscript\nVersionInfo.swift\nreleases/\n"
  },
  {
    "path": "Features.md",
    "content": "Features Planned for v0.2.0:\n\n  1. Refactoring project to support unit tests\n  2. Support nested directories for the script\n\nPossible for v0.2.0:\n\n  1. Creation of implicit Xcode file for Xcode authoring support\n "
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Kiad Software, LLC.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
  },
  {
    "path": "Makefile",
    "content": "TEMPORARY_FOLDER=/tmp/Apous.dst\nPREFIX=/usr/local\nBUILD_TOOL=xcodebuild\n\nXCODEFLAGS=-project 'apous.xcodeproj' -scheme 'apous' DSTROOT=$(TEMPORARY_FOLDER)\n\nAPOUS_EXECUTABLE=$(TEMPORARY_FOLDER)/apous\n\nFRAMEWORKS_FOLDER=/Library/Frameworks\nBINARIES_FOLDER=/usr/local/bin\n\nVERSION_STRING=v0.2.2\nCOMPONENTS_PLIST=misc/Components.plist\n\nOUTPUT_PACKAGE=Apous.pkg\n\n.PHONY: all bootstrap clean install package test uninstall\n\nall: bootstrap\n\t$(BUILD_TOOL) $(XCODEFLAGS) build\n\nbootstrap:\n\tmisc/scripts/bootstrap.sh\n\ntest: clean bootstrap\n\t$(BUILD_TOOL) $(XCODEFLAGS) test\n\nclean:\n\trm -f \"$(OUTPUT_PACKAGE)\"\n\trm -rf \"$(TEMPORARY_FOLDER)\"\n\t$(BUILD_TOOL) $(XCODEFLAGS) clean\n\ninstall: package\n\tsudo installer -pkg \"$(TEMPORARY_FOLDER)/$(OUTPUT_PACKAGE)\" -target /\n\nuninstall:\n\trm -f \"$(BINARIES_FOLDER)/apous\"\n\ninstallables: clean bootstrap\n\t$(BUILD_TOOL) $(XCODEFLAGS) install\n\n\tmkdir -p \"$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)\"\n\nprefix_install: installables\n\tmkdir -p \"$(PREFIX)/Frameworks\" \"$(PREFIX)/bin\"\n\tcp -f \"$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)/apous\" \"$(PREFIX)/bin/\"\n\npackage: installables\n\tpkgbuild \\\n\t\t--component-plist \"$(COMPONENTS_PLIST)\" \\\n\t\t--identifier \"io.owensd.apous\" \\\n\t\t--install-location \"/\" \\\n\t\t--root \"$(TEMPORARY_FOLDER)\" \\\n\t\t--version \"$(VERSION_STRING)\" \\\n\t\t\"$(TEMPORARY_FOLDER)/$(OUTPUT_PACKAGE)\"\n"
  },
  {
    "path": "README.md",
    "content": "     _______\n    |   _   .-----.-----.--.--.-----.\n    |.  1   |  _  |  _  |  |  |__ --|\n    |.  _   |   __|_____|_____|_____|\n    |:  |   |__|\n    |::.|:. |\n    `--- ---'\n\n# Apous [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://raw.githubusercontent.com/owensd/apous/master/LICENSE) [![GitHub release](https://img.shields.io/github/release/owensd/apous.svg)](https://github.com/owensd/Apous/releases)\n\n\nApous is a simple tool that allows for easier authoring of Swift scripts.\n\nPrimary features:\n\n  1. Allow the breaking up of scripts into multiple files.\n  2. Dependency management through [Carthage](https://github.com/Carthage/Carthage) or [CocoaPods](https://github.com/CocoaPods/CocoaPods/).\n\n## How it Works\n\nApous works by first checking for a `Cartfile` or `Podfile` in your script's directory. If one is\npresent, then `carthage update` or `pod install --no-integrate` will be run. \n\nNext, all of your Swift files are compiled into a single `.apousscript` binary that will then be\nrun automatically for you.\n\nIt's really that simple.\n\n## Getting Started\n\nFirst, you need to install the latest build of Apous.\n\n1. Download the latest version of `apous` from \"Releases\".\n2. Copy it to a location in your path, such as `/usr/local/bin/`.\n\nHomebrew support is pending: https://github.com/Homebrew/homebrew/pull/41473\n\n## Creating Your First Script\n\n1. Create a new directory for your scripts, say `mkdir demo`\n2. Change to that directory: `cd demo`\n3. Create a new script file: `touch demo.swift`\n4. Change the contents of the file to:\n\n    ```swift\n    import Foundation\n\n    print(\"Welcome to Apous!\")\n    ```\n\n5. Run the script: `apous .`\n\nThis will output: \n\n    Welcome to Apous!\n\nYou can see some other samples here: [Samples](https://github.com/owensd/apous/tree/master/samples).\n\n### Alternatively\n\nApous also supports running scripts with `#!`. Note that your entry point script **must** be named `main.swift`.\n\n```swift\n#!/usr/local/bin/apous\n\nimport Foundation\n\nprint(\"Welcome to Apous!\")\n```\n\nThen run:\n\n    > chmod +x main.swift\n    > ./main.swift\n    Welcome to Apous!\n\n\n## FAQ\n\n**Q: What is Apous mean?**\n\nA: It's from the ancient Greek απους, meaning \"without feet\".\n"
  },
  {
    "path": "apous.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t7D0373391B49021700E2711D /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D0373381B49021700E2711D /* main.swift */; };\n\t\t7D0F00941B4AF32F003B6EF0 /* Samples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D0F00931B4AF32F003B6EF0 /* Samples.swift */; };\n\t\t7D3AC3461B49F99B0068CC83 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3AC3451B49F99B0068CC83 /* Utils.swift */; };\n\t\t7D3AC3481B49FE170068CC83 /* ErrorCodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3AC3471B49FE170068CC83 /* ErrorCodes.swift */; };\n\t\t7D3AC34A1B4A37BC0068CC83 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3AC3491B4A37BC0068CC83 /* Tools.swift */; };\n\t\t7DF997441B4B33A200E90F56 /* VersionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DF997431B4B33A200E90F56 /* VersionInfo.swift */; };\n\t\t7DF997511B4B4A6900E90F56 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3AC3491B4A37BC0068CC83 /* Tools.swift */; };\n\t\t7DF9988C1B4B72FD00E90F56 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3AC3451B49F99B0068CC83 /* Utils.swift */; };\n\t\t7DF9988D1B4B730500E90F56 /* ErrorCodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3AC3471B49FE170068CC83 /* ErrorCodes.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t7DF9974B1B4B354000E90F56 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 7D03732D1B49021700E2711D /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 7DF997471B4B353600E90F56;\n\t\t\tremoteInfo = GenerateVersionInfo;\n\t\t};\n\t\t7DF9974D1B4B354800E90F56 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 7D03732D1B49021700E2711D /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 7DF997471B4B353600E90F56;\n\t\t\tremoteInfo = GenerateVersionInfo;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\t7D0373331B49021700E2711D /* CopyFiles */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = /usr/share/man/man1/;\n\t\t\tdstSubfolderSpec = 0;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 1;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t7D0373351B49021700E2711D /* apous */ = {isa = PBXFileReference; explicitFileType = \"compiled.mach-o.executable\"; includeInIndex = 0; path = apous; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t7D0373381B49021700E2711D /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = \"<group>\"; };\n\t\t7D0F00911B4AF32F003B6EF0 /* apoustest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = apoustest.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t7D0F00931B4AF32F003B6EF0 /* Samples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Samples.swift; sourceTree = \"<group>\"; };\n\t\t7D0F00951B4AF32F003B6EF0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t7D0F009A1B4AF3F1003B6EF0 /* Features.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = Features.md; sourceTree = \"<group>\"; };\n\t\t7D3AC3421B49F1FC0068CC83 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = \"<group>\"; };\n\t\t7D3AC3441B49F62F0068CC83 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = \"<group>\"; };\n\t\t7D3AC3451B49F99B0068CC83 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = \"<group>\"; };\n\t\t7D3AC3471B49FE170068CC83 /* ErrorCodes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorCodes.swift; sourceTree = \"<group>\"; };\n\t\t7D3AC3491B4A37BC0068CC83 /* Tools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tools.swift; sourceTree = \"<group>\"; };\n\t\t7DC546B91B4C55640070A858 /* samples */ = {isa = PBXFileReference; lastKnownFileType = folder; path = samples; sourceTree = SOURCE_ROOT; };\n\t\t7DF997431B4B33A200E90F56 /* VersionInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VersionInfo.swift; sourceTree = \"<group>\"; };\n\t\t7DF9974F1B4B356700E90F56 /* version.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = version.sh; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t7D0373321B49021700E2711D /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t7D0F008E1B4AF32F003B6EF0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t7D03732C1B49021700E2711D = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7D0F00991B4AF3D9003B6EF0 /* docs */,\n\t\t\t\t7D0373371B49021700E2711D /* src */,\n\t\t\t\t7D0F00921B4AF32F003B6EF0 /* test */,\n\t\t\t\t7D0373361B49021700E2711D /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7D0373361B49021700E2711D /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7D0373351B49021700E2711D /* apous */,\n\t\t\t\t7D0F00911B4AF32F003B6EF0 /* apoustest.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7D0373371B49021700E2711D /* src */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7DF997501B4B37B100E90F56 /* Versioning */,\n\t\t\t\t7D0373381B49021700E2711D /* main.swift */,\n\t\t\t\t7D3AC3451B49F99B0068CC83 /* Utils.swift */,\n\t\t\t\t7D3AC3471B49FE170068CC83 /* ErrorCodes.swift */,\n\t\t\t\t7D3AC3491B4A37BC0068CC83 /* Tools.swift */,\n\t\t\t);\n\t\t\tpath = src;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7D0F00921B4AF32F003B6EF0 /* test */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7DC546B91B4C55640070A858 /* samples */,\n\t\t\t\t7D0F00931B4AF32F003B6EF0 /* Samples.swift */,\n\t\t\t\t7D0F00951B4AF32F003B6EF0 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = test;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7D0F00991B4AF3D9003B6EF0 /* docs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7D0F009A1B4AF3F1003B6EF0 /* Features.md */,\n\t\t\t\t7D3AC3441B49F62F0068CC83 /* LICENSE */,\n\t\t\t\t7D3AC3421B49F1FC0068CC83 /* README.md */,\n\t\t\t);\n\t\t\tname = docs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7DF997501B4B37B100E90F56 /* Versioning */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7DF997431B4B33A200E90F56 /* VersionInfo.swift */,\n\t\t\t\t7DF9974F1B4B356700E90F56 /* version.sh */,\n\t\t\t);\n\t\t\tname = Versioning;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXLegacyTarget section */\n\t\t7DF997471B4B353600E90F56 /* GenerateVersionInfo */ = {\n\t\t\tisa = PBXLegacyTarget;\n\t\t\tbuildArgumentsString = version.sh;\n\t\t\tbuildConfigurationList = 7DF997481B4B353600E90F56 /* Build configuration list for PBXLegacyTarget \"GenerateVersionInfo\" */;\n\t\t\tbuildPhases = (\n\t\t\t);\n\t\t\tbuildToolPath = /bin/sh;\n\t\t\tbuildWorkingDirectory = \"$(SRCROOT)/src\";\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = GenerateVersionInfo;\n\t\t\tpassBuildSettingsInEnvironment = 1;\n\t\t\tproductName = GenerateVersionInfo;\n\t\t};\n/* End PBXLegacyTarget section */\n\n/* Begin PBXNativeTarget section */\n\t\t7D0373341B49021700E2711D /* apous */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 7D03733C1B49021700E2711D /* Build configuration list for PBXNativeTarget \"apous\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t7D0373311B49021700E2711D /* Sources */,\n\t\t\t\t7D0373321B49021700E2711D /* Frameworks */,\n\t\t\t\t7D0373331B49021700E2711D /* CopyFiles */,\n\t\t\t\t7DE115081B4C4A9100B198FB /* Package for GitHub Release */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t7DF9974C1B4B354000E90F56 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = apous;\n\t\t\tproductName = apous;\n\t\t\tproductReference = 7D0373351B49021700E2711D /* apous */;\n\t\t\tproductType = \"com.apple.product-type.tool\";\n\t\t};\n\t\t7D0F00901B4AF32F003B6EF0 /* apoustest */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 7D0F00981B4AF32F003B6EF0 /* Build configuration list for PBXNativeTarget \"apoustest\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t7D0F008D1B4AF32F003B6EF0 /* Sources */,\n\t\t\t\t7D0F008E1B4AF32F003B6EF0 /* Frameworks */,\n\t\t\t\t7D0F008F1B4AF32F003B6EF0 /* Resources */,\n\t\t\t\t7DF9988B1B4B4C5600E90F56 /* Copy Samples */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t7DF9974E1B4B354800E90F56 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = apoustest;\n\t\t\tproductName = apoustest;\n\t\t\tproductReference = 7D0F00911B4AF32F003B6EF0 /* apoustest.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t7D03732D1B49021700E2711D /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0700;\n\t\t\t\tORGANIZATIONNAME = owensd.io;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t7D0373341B49021700E2711D = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.0;\n\t\t\t\t\t};\n\t\t\t\t\t7D0F00901B4AF32F003B6EF0 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.0;\n\t\t\t\t\t};\n\t\t\t\t\t7DF997471B4B353600E90F56 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.0;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 7D0373301B49021700E2711D /* Build configuration list for PBXProject \"apous\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 7D03732C1B49021700E2711D;\n\t\t\tproductRefGroup = 7D0373361B49021700E2711D /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t7DF997471B4B353600E90F56 /* GenerateVersionInfo */,\n\t\t\t\t7D0373341B49021700E2711D /* apous */,\n\t\t\t\t7D0F00901B4AF32F003B6EF0 /* apoustest */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t7D0F008F1B4AF32F003B6EF0 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t7DE115081B4C4A9100B198FB /* Package for GitHub Release */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Package for GitHub Release\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"#mkdir -p releases\\n#rm -f $SRCROOT/releases/$TARGET_NAME.zip\\n#zip -j $SRCROOT/releases/$TARGET_NAME.zip $SRCROOT/bin/$TARGET_NAME\";\n\t\t};\n\t\t7DF9988B1B4B4C5600E90F56 /* Copy Samples */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"$(SRCROOT)/samples\",\n\t\t\t);\n\t\t\tname = \"Copy Samples\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"rm -rf \\\"$TARGET_BUILD_DIR/samples\\\"\\ncp -R \\\"$SRCROOT/samples\\\" \\\"$TARGET_BUILD_DIR\\\"\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t7D0373311B49021700E2711D /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t7D3AC3461B49F99B0068CC83 /* Utils.swift in Sources */,\n\t\t\t\t7D3AC3481B49FE170068CC83 /* ErrorCodes.swift in Sources */,\n\t\t\t\t7D0373391B49021700E2711D /* main.swift in Sources */,\n\t\t\t\t7DF997441B4B33A200E90F56 /* VersionInfo.swift in Sources */,\n\t\t\t\t7D3AC34A1B4A37BC0068CC83 /* Tools.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t7D0F008D1B4AF32F003B6EF0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t7D0F00941B4AF32F003B6EF0 /* Samples.swift in Sources */,\n\t\t\t\t7DF997511B4B4A6900E90F56 /* Tools.swift in Sources */,\n\t\t\t\t7DF9988C1B4B72FD00E90F56 /* Utils.swift in Sources */,\n\t\t\t\t7DF9988D1B4B730500E90F56 /* ErrorCodes.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t7DF9974C1B4B354000E90F56 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 7DF997471B4B353600E90F56 /* GenerateVersionInfo */;\n\t\t\ttargetProxy = 7DF9974B1B4B354000E90F56 /* PBXContainerItemProxy */;\n\t\t};\n\t\t7DF9974E1B4B354800E90F56 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 7DF997471B4B353600E90F56 /* GenerateVersionInfo */;\n\t\t\ttargetProxy = 7DF9974D1B4B354800E90F56 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t7D03733A1B49021700E2711D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t7D03733B1B49021700E2711D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tMACOSX_DEPLOYMENT_TARGET = 10.11;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = macosx;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t7D03733D1B49021700E2711D /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t7D03733E1B49021700E2711D /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t7D0F00961B4AF32F003B6EF0 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = test/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = io.owensd.apoustest;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t7D0F00971B4AF32F003B6EF0 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCOMBINE_HIDPI_IMAGES = YES;\n\t\t\t\tINFOPLIST_FILE = test/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = io.owensd.apoustest;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t7DF997491B4B353600E90F56 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEBUGGING_SYMBOLS = YES;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tGCC_GENERATE_DEBUGGING_SYMBOLS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t7DF9974A1B4B353600E90F56 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tOTHER_CFLAGS = \"\";\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t7D0373301B49021700E2711D /* Build configuration list for PBXProject \"apous\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t7D03733A1B49021700E2711D /* Debug */,\n\t\t\t\t7D03733B1B49021700E2711D /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t7D03733C1B49021700E2711D /* Build configuration list for PBXNativeTarget \"apous\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t7D03733D1B49021700E2711D /* Debug */,\n\t\t\t\t7D03733E1B49021700E2711D /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t7D0F00981B4AF32F003B6EF0 /* Build configuration list for PBXNativeTarget \"apoustest\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t7D0F00961B4AF32F003B6EF0 /* Debug */,\n\t\t\t\t7D0F00971B4AF32F003B6EF0 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t7DF997481B4B353600E90F56 /* Build configuration list for PBXLegacyTarget \"GenerateVersionInfo\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t7DF997491B4B353600E90F56 /* Debug */,\n\t\t\t\t7DF9974A1B4B353600E90F56 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 7D03732D1B49021700E2711D /* Project object */;\n}\n"
  },
  {
    "path": "apous.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:apous.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "apous.xcodeproj/xcshareddata/xcschemes/apous.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0700\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"7D0373341B49021700E2711D\"\n               BuildableName = \"apous\"\n               BlueprintName = \"apous\"\n               ReferencedContainer = \"container:apous.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      buildConfiguration = \"Debug\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"7D0F00901B4AF32F003B6EF0\"\n               BuildableName = \"apoustest.xctest\"\n               BlueprintName = \"apoustest\"\n               ReferencedContainer = \"container:apous.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"7D0373341B49021700E2711D\"\n            BuildableName = \"apous\"\n            BlueprintName = \"apous\"\n            ReferencedContainer = \"container:apous.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      customWorkingDirectory = \"/Users/owensd/Library/Developer/Xcode/DerivedData/apous-fvgxvrkkgylijchhwanxayhydwrh/Build/Products/Debug/samples/shebang\"\n      buildConfiguration = \"Debug\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"7D0373341B49021700E2711D\"\n            BuildableName = \"apous\"\n            BlueprintName = \"apous\"\n            ReferencedContainer = \"container:apous.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n      <CommandLineArguments>\n         <CommandLineArgument\n            argument = \"~/Projects/owensd.io/apous/samples/carthage\"\n            isEnabled = \"NO\">\n         </CommandLineArgument>\n         <CommandLineArgument\n            argument = \"/Users/owensd/Library/Developer/Xcode/DerivedData/apous-fvgxvrkkgylijchhwanxayhydwrh/Build/Products/Debug/samples/carthage\"\n            isEnabled = \"YES\">\n         </CommandLineArgument>\n         <CommandLineArgument\n            argument = \"~/Project/owensd.io/apous/samples/basic\"\n            isEnabled = \"NO\">\n         </CommandLineArgument>\n         <CommandLineArgument\n            argument = \"./samples/nested\"\n            isEnabled = \"NO\">\n         </CommandLineArgument>\n      </CommandLineArguments>\n      <EnvironmentVariables>\n         <EnvironmentVariable\n            key = \"PATH\"\n            value = \"/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/scripts:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\"\n            isEnabled = \"YES\">\n         </EnvironmentVariable>\n      </EnvironmentVariables>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      buildConfiguration = \"Release\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"7D0373341B49021700E2711D\"\n            BuildableName = \"apous\"\n            BlueprintName = \"apous\"\n            ReferencedContainer = \"container:apous.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "misc/Components.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<array>\n</array>\n</plist>"
  },
  {
    "path": "misc/scripts/bootstrap.sh",
    "content": "#!/bin/bash\n\nexport SCRIPT_DIR=$(dirname \"$0\")\n\n##\n## Bootstrap Process\n##\n\nmain ()\n{\n    local submodules=$(git submodule status)\n    local result=$?\n\n    if [ \"$result\" -ne \"0\" ]\n    then\n        exit $result\n    fi\n\n    if [ -n \"$submodules\" ]\n    then\n        echo \"*** Updating submodules...\"\n        update_submodules\n    fi\n}\n\nbootstrap_submodule ()\n{\n    local bootstrap=\"script/bootstrap\"\n\n    if [ -e \"$bootstrap\" ]\n    then\n        echo \"*** Bootstrapping $name...\"\n        \"$bootstrap\" >/dev/null\n    else\n        update_submodules\n    fi\n}\n\nupdate_submodules ()\n{\n    git submodule sync --quiet && git submodule update --init && git submodule foreach --quiet bootstrap_submodule\n}\n\nexport -f bootstrap_submodule\nexport -f update_submodules\n\nmain"
  },
  {
    "path": "samples/basic/basic.swift",
    "content": "\nprint(\"Hello! This is a simple sample that contains no dependencies.\")"
  },
  {
    "path": "samples/carthage/Cartfile",
    "content": "github \"thoughtbot/Argo\" \"td-swift-2\""
  },
  {
    "path": "samples/carthage/main.swift",
    "content": "import Argo\nimport Runes\n\nprint(\"dependencies imported properly\")"
  },
  {
    "path": "samples/cocoapods/Podfile",
    "content": "platform :osx, '10.10'\nuse_frameworks!\n\nplugin 'cocoapods-rome'\n\npod \"Argo\", :git => \"https://github.com/thoughtbot/Argo\",  :branch => \"td-swift-2\""
  },
  {
    "path": "samples/cocoapods/main.swift",
    "content": "import Argo\nimport Runes\n\nprint(\"dependencies imported properly\")"
  },
  {
    "path": "samples/multi/bar.swift",
    "content": "func bar() -> Int {\n\treturn 1\n}"
  },
  {
    "path": "samples/multi/foo.swift",
    "content": "func foo() -> Int {\n\treturn 2\n}"
  },
  {
    "path": "samples/multi/main.swift",
    "content": "print(\"foo: \\(foo())\")\nprint(\"bar: \\(bar())\")\n"
  },
  {
    "path": "samples/nested/main.swift",
    "content": "\nprint(\"Testing Nested Directories\")\nprint(\"abspath: \\(abspath())\")\nprint(\"basename: \\(basename())\")\n"
  },
  {
    "path": "samples/nested/os/path/abspath.swift",
    "content": "\nfunc abspath() -> String {\n    return \"abspath!\"\n}"
  },
  {
    "path": "samples/nested/os/path/basename.swift",
    "content": "\nfunc basename() -> String {\n    return \"basename!\"\n}"
  },
  {
    "path": "samples/shebang/main.swift",
    "content": "#!/usr/local/bin/apous\n\nprint(\"Hello! This is a simple sample that contains no dependencies.\")\n"
  },
  {
    "path": "src/ErrorCodes.swift",
    "content": "//\n//  ErrorCodes.swift\n//  apous\n//\n//  Created by David Owens on 7/5/15.\n//  Copyright © 2015 owensd.io. All rights reserved.\n//\n\nenum ErrorCode: Int, ErrorType {\n    case InvalidUsage = 1\n    case PathNotFound\n    case CarthageNotInstalled\n    case CocoaPodsNotInstalled\n    case SwiftNotInstalled\n    case PTYCreationFailed\n}\n"
  },
  {
    "path": "src/Tools.swift",
    "content": "//\n//  Tools.swift\n//  apous\n//\n//  Created by David Owens on 7/5/15.\n//  Copyright © 2015 owensd.io. All rights reserved.\n//\n\nimport Foundation\n\n// I'm playing around with using functions as the types here because that's all\n// that is really needed. The types with a protocol extension in the previous\n// version just felt like way too much for what was really needed, which is\n// essentially just a way to invoke the tool with some arguments.\n\n/// The output type for a `Tool`.\ntypealias TaskResult = (out: String,code: Int32)\n\n/// The function signature that all tools must conform to.\ntypealias Tool = (args: String...) throws -> TaskResult\n\n/// Runs the given tool at `launchPath` passing in `args`. The output is then captured\n/// by `output` and `error`.\nfunc runTask(launchPath: String, args: [String] = [], outputToStandardOut: Bool = true) throws -> TaskResult\n{\n    // This is the buffered output that will be returned.\n    var out = \"\"\n\n// It turns out this code is not robust; it does not seem to always get all of the stream data.\n// BUG #12 - https://github.com/owensd/apous/issues/12\n//\n//    // Ok, so stdout sucks the big one. If your NSTask actually does any redirection to another\n//    // tool that then outputs to stdout, that is going to be buffered and will only come back in\n//    // chunks.\n//    \n//    var master: Int32 = 0\n//    var slave: Int32 = 0\n//    if openpty(&master, &slave, nil, nil, nil) == -1 {\n//        throw ErrorCode.PTYCreationFailed\n//    }\n//    defer {\n//        close(master)\n//        close(slave)\n//    }\n//\n//    let output = NSFileHandle(fileDescriptor: master)\n\n    func stream(handle: NSFileHandle) -> String {\n        let data = handle.availableData\n        let str = NSString(data: data, encoding: NSUTF8StringEncoding) as? String ?? \"\"\n\n        // Sample string might look like this: ^[[34;1m***^[[0m Fetching ^[[1mArgo^[[0m\n        // However, we need the escape codes to look like this: \\e[34;1m***\\e[0m Fetching \\e[1mArgo\\e[0m\n        // Also, the normal output logged needs to have all of that stripped...\n        \n        func process(input: String, fn: (inout string: String, range: Range<String.Index>) -> ()) -> String {\n            var str = input\n            \n            var range: Range<String.Index>? = nil\n            var nextRange: Range<String.Index>? = nil\n            repeat {\n                range = str.rangeOfString(\n                    \"(\\\\^)\\\\[\\\\[(\\\\d+;\\\\d+m|\\\\d+m)\",\n                    options: NSStringCompareOptions.RegularExpressionSearch,\n                    range: nextRange)\n                \n                if let range = range {\n                    nextRange?.startIndex = range.endIndex\n                    fn(string: &str, range: range)\n                }\n            } while range != nil\n            \n            return str\n        }\n        \n        let replaced = process(str) { (inout string: String, range: Range<String.Index>) in\n            string.replaceRange(range.startIndex ..< range.startIndex.advancedBy(2), with: \"\\\\e\")\n        }\n        \n        let stripped = process(str) { (inout string: String, range: Range<String.Index>) in\n            string.removeRange(range)\n        }\n        \n        if outputToStandardOut {\n            // NOTE(owensd): Without the -n, additional newlines are getting in there...\n            NSTask.launchedTaskWithLaunchPath(\"/bin/bash\", arguments: [\"-c\", \"echo -en $'\\(replaced)'\"])\n        }\n        \n        return stripped\n    }\n\n    let output = NSPipe()\n    \n    output.fileHandleForReading.readabilityHandler = { out += stream($0) }\n    \n    let task = NSTask()\n    task.launchPath = try canonicalPath(launchPath)\n    task.arguments = args\n    task.standardOutput = output\n    task.standardError = output\n    task.terminationHandler = {\n        ($0.standardOutput as? NSFileHandle)?.readabilityHandler = nil\n    }\n    \n    task.launch()\n    task.waitUntilExit()\n    \n    return (\n        out: out.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()),\n        code: task.terminationStatus)\n}\n\n// Psuedo-namespace \"tools\" simulated with an enum with no cases.\nenum tools {}\n\nprivate func launchPathForTool(tool: String) throws -> String? {\n    let result = try tools.which(tool)\n    return result.out.characters.count == 0 ? nil : result.out\n}\n\nextension tools {\n    static func which(args: String...) throws -> TaskResult {\n        return try runTask(\"/usr/bin/which\", args: args, outputToStandardOut: false)\n    }\n    \n    static func pod(args: String...) throws -> TaskResult {\n        guard let path = try launchPathForTool(\"pod\") else { throw ErrorCode.CocoaPodsNotInstalled }\n\n        let info = args.reduce(\"\") { $0 + $1 + \" \" }\n        print(\"Running pod \\(info)\")\n        return try runTask(path, args: args)\n    }\n    \n    static func carthage(args: String...) throws -> TaskResult {\n        guard let path = try launchPathForTool(\"carthage\") else { throw ErrorCode.CarthageNotInstalled }\n        \n        let info = args.reduce(\"\") { $0 + $1 + \" \" }\n        print(\"Running carthage \\(info)\")\n        return try runTask(path, args: args)\n    }\n\n    static func swiftc(args: [String]) throws -> TaskResult {\n        guard let path = try launchPathForTool(\"swiftc\") else { throw ErrorCode.SwiftNotInstalled }\n        return try runTask(path, args: args)\n    }\n\n    static func swiftc(args: String...) throws -> TaskResult {\n        return try tools.swiftc(args)\n    }\n}\n\nextension tools {\n    static let CartfileConfig = \"Cartfile\"\n    static let PodfileConfig = \"Podfile\"\n\n    static func apous(path: String) throws -> TaskResult {\n        let fileManager = NSFileManager.defaultManager()\n        \n        // The tools need to be run under the context of the script directory.\n        fileManager.changeCurrentDirectoryPath(path)\n        \n        var frameworkPaths: [String] = []\n        \n        if fileManager.fileExistsAtPath(path.stringByAppendingPathComponent(CartfileConfig)) {\n            try tools.carthage(\"update\")\n            frameworkPaths += [\"-F\", \"Carthage/Build/Mac\"]\n        }\n        \n        if fileManager.fileExistsAtPath(path.stringByAppendingPathComponent(PodfileConfig)) {\n            try tools.pod(\"install\", \"--no-integrate\")\n            frameworkPaths += [\"-F\", \"Rome\"]\n        }\n        \n        let files = filesAtPath(path)\n        let args = frameworkPaths + [\"-o\", \".apousscript\"] + files\n        \n        try tools.swiftc(args)\n        return try runTask(\"./.apousscript\")\n    }\n}\n\n"
  },
  {
    "path": "src/Utils.swift",
    "content": "//\n//  Utils.swift\n//  apous\n//\n//  Created by David Owens on 7/5/15.\n//  Copyright © 2015 owensd.io. All rights reserved.\n//\n\nimport Foundation\n\npublic extension String {\n    public var pathExtension: String { return (self as NSString).pathExtension }\n    public var lastPathComponent: String { return (self as NSString).lastPathComponent }\n    public var stringByDeletingLastPathComponent: String { return (self as NSString).stringByDeletingLastPathComponent }\n    \n    public var pathComponents: [String] { return (self as NSString).pathComponents }\n    public func stringByAppendingPathComponent(str: String) -> String {\n        return (self as NSString).stringByAppendingPathComponent(str)\n    }\n}\n\n/// Returns the root path that contains the script(s).\nfunc canonicalPath(path: String) throws -> String {\n    guard let cpath = path.cStringUsingEncoding(NSUTF8StringEncoding) else { throw ErrorCode.PathNotFound }\n    \n    let rpath = realpath(cpath, nil)\n    if rpath == nil { throw ErrorCode.PathNotFound }\n    \n    guard let abspath = String(CString: rpath, encoding: NSUTF8StringEncoding) else { throw ErrorCode.PathNotFound }\n    return abspath\n}\n\n/// Exit the process error with the given `ErrorCode`.\n@noreturn func exit(code: ErrorCode) {\n    exit(Int32(code.rawValue))\n}\n\n/// Returns the full path of the valid script files at the given `path`.\nfunc filesAtPath(path: String) -> [String] {\n    let items: [String] = {\n        return NSFileManager.defaultManager().subpathsAtPath(path) ?? []\n    }()\n    \n    return items\n        .filter() {\n            let root = $0.pathComponents[0]\n            return $0.pathExtension == \"swift\" && (root != \"Carthage\" && root != \"Rome\" && root != \"Pods\")\n        }\n        .map() { path.stringByAppendingPathComponent($0) }\n}\n"
  },
  {
    "path": "src/main.swift",
    "content": "//\n//  main.swift\n//  apous\n//\n//  Created by David Owens on 7/4/15.\n//  Copyright © 2015 owensd.io. All rights reserved.\n//\n\nimport Foundation\n\nfunc printUsage() {\n    print(\"OVERVIEW: Apous Swift Script Runner (build: \\(VersionInfo.Version.rawValue)-\\(VersionInfo.Branch.rawValue))\")\n    print(\"\")\n    print(\"USAGE: apous [<script_file>|<path/to/scripts>]\")\n}\n\n\n//\n// The body of the script.\n//\n\nlet arguments = NSProcessInfo.processInfo().arguments\n\nif arguments.contains(\"-help\") {\n    printUsage()\n    exit(0)\n}\n\n// This is used to enable more verbose logging.\nlet DebugOutputEnabled = arguments.contains(\"-debug\")\n\n// NOTE(owensd): This method is a workaround because of Swift bugs and code in the top-level scope.\nfunc run() throws {\n    let scriptItem = arguments[1..<arguments.count].filter() { $0 != \"-debug\" }\n    \n    let path: String\n    switch scriptItem.count {\n    case 0:\n        path = NSFileManager.defaultManager().currentDirectoryPath\n        \n    case 1:\n        let item = scriptItem[0]\n        if item.pathExtension == \"swift\" {\n            if item.lastPathComponent == \"main.swift\" {\n                path = item.stringByDeletingLastPathComponent\n            }\n            else {\n                print(\"Only a 'main.swift' file can be specified.\")\n                exit(ErrorCode.InvalidUsage)\n            }\n        }\n        else {\n            path = try canonicalPath(item)\n        }\n        \n    default:\n        print(\"Invalid usage.\")\n        printUsage()\n        exit(ErrorCode.InvalidUsage)\n    }\n\n    try tools.apous(path)\n}\n\ndo {\n    try run()\n}\ncatch {\n    guard let error = error as? ErrorCode else { exit(1) }\n    exit(Int32(error.rawValue))\n}\n\n"
  },
  {
    "path": "src/version.sh",
    "content": "\nVERSION=0.2.2\nBRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)\nVERSION_FILE=VersionInfo.swift\n\necho \"// THIS IS A GENERATED FILE\\n\" > $VERSION_FILE\necho \"enum VersionInfo : String {\" >> $VERSION_FILE\necho \"    case Version = \\\"$VERSION\\\"\" >> $VERSION_FILE\necho \"    case Branch = \\\"$BRANCH_NAME\\\"\" >> $VERSION_FILE\necho \"}\" >> $VERSION_FILE\n"
  },
  {
    "path": "test/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "test/Samples.swift",
    "content": "//\n//  apoustest.swift\n//  apoustest\n//\n//  Created by David Owens on 7/6/15.\n//  Copyright © 2015 owensd.io. All rights reserved.\n//\n\nimport XCTest\n\nclass SamplesTest : XCTestCase {\n    \n    lazy var samplesPath: String = {\n        let path = NSBundle(forClass: self.dynamicType)\n            .bundlePath\n            .stringByDeletingLastPathComponent\n            .stringByAppendingPathComponent(\"samples\") ?? \"\"\n        return path\n    }()\n    \n    func validateSampleToolOutput(sample: String, output: String) {\n        do {\n            let path: String = samplesPath.stringByAppendingPathComponent(sample)\n            if !NSFileManager.defaultManager().fileExistsAtPath(path) {\n                XCTFail(\"The given samples path does not exist: \\(path)\")\n                return\n            }\n            \n            let result = try tools.apous(path)\n            XCTAssertEqual(\n                result.out.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()),\n                output.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()),\n                \"The sample output does not match the expected.\")\n        }\n        catch {\n            XCTFail(\"An error occurred during test execution.\")\n        }\n    }\n    \n    func testBasic() {\n        let output = \"Hello! This is a simple sample that contains no dependencies.\"\n        validateSampleToolOutput(\"basic\", output: output)\n    }\n\n    func testMulti() {\n        let output = \"foo: 2\\nbar: 1\"\n        validateSampleToolOutput(\"multi\", output: output)\n    }\n\n    func testNested() {\n        let output = \"Testing Nested Directories\\nabspath: abspath!\\nbasename: basename!\"\n        validateSampleToolOutput(\"nested\", output: output)\n    }\n}\n"
  }
]