[
  {
    "path": ".gitignore",
    "content": "*gem\n.DS_store\nGemfile.lock\npkg\ntmp\nspec/dummy\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "We love pull requests from everyone. By participating in this project, you\nagree to abide by the thoughtbot [code of conduct]. Here’s a quick guide:\n\n[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct\n\n1. Fork the repository.\n2. Make your changes in a topic branch.\n3. Squash your commits into a single one (more on that\n   [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)).\n4. Rebase against `origin/master`, push to your fork and submit a pull request.\n\nAt this point you’re waiting on us. We like to at least comment on, if not\naccept, pull requests within three business days (and, typically, one business\nday). We may suggest some changes or improvements or alternatives.\n\nSome things that will increase the chance that your pull request is accepted:\n\n* Write your code according to the [thoughtbot Style Guide][guide]\n* Fix a bug, refactor code or expand an existing feature.\n* Use the right syntax and naming conventions.\n* Update parts of the documentation that are affected by your contribution.\n\n[guide]: https://github.com/thoughtbot/guides/tree/master/style\n\n**Git Commit Messages**\n\n* Capitalize your commit messages.\n* Start your message with a verb.\n* Use present tense.\n* Refer to the issue/PR number in your squashed commit message.\n"
  },
  {
    "path": "Gemfile",
    "content": "source 'https://rubygems.org'\n\ngemspec\n"
  },
  {
    "path": "LICENSE.md",
    "content": "The MIT License (MIT)\n\nCopyright © 2014–2016 [thoughtbot, inc.](http://thoughtbot.com)\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 all\ncopies 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 THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Proteus\n\n**Note:** Proteus is no longer being actively maintained.\n\nProteus is a collection of useful starter kits to help you prototype\nfaster. They follow the [thoughtbot styleguide](https://github.com/thoughtbot/guides)\nand includes our favorite front-end development tools.\n\n## Kits\n\n* [Middleman](http://github.com/thoughtbot/proteus-middleman)\n* [Jekyll](http://github.com/thoughtbot/proteus-jekyll)\n* Have a request for another kit? Open an issue to let us know.\n\n## Installation\n\n1. Install the Proteus gem using the [RubyGems](https://rubygems.org) package manager:\n\n  ```bash\n  gem install proteus-kits\n  ```\n\n2. Then kick off a new project with the kit you want to use (i.e. Middleman):\n\n  ```bash\n  proteus new middleman your-project-name\n  ```\n\n## Shortcuts\n\nWe’ve also included some handy shortcuts with Proteus:\n\n- Install dependencies and clear the Git remote:\n\n  ```bash\n  proteus setup\n  ```\n\n- Start the kit-specific server (i.e. `bundle exec middleman server`):\n\n  ```bash\n  proteus server\n  ```\n\n- Run the kit-specific deploy (i.e. `middleman deploy`):\n\n  ```bash\n  proteus deploy\n  ```\n\n## Contributing\n\nIf you'd like to contribute a feature or bugfix: Thanks! To make sure your\nfix/feature has a high chance of being included, please read the following\nguidelines:\n\n1. Fork the repository\n2. Make your changes\n3. Push your branch to your fork\n4. Post a [pull request](https://github.com/thoughtbot/proteus/compare).\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for more details on contributing and running test.\n\nThank you to all [the contributors](https://github.com/thoughtbot/proteus-middleman/contributors)!\n\n## Credits\n\n[![thoughtbot](http://images.thoughtbot.com/bourbon/thoughtbot-logo.svg)](http://thoughtbot.com)\n\nProteus is maintained and funded by [thoughtbot, inc](http://thoughtbot.com). Thank you to all of [the contributors](https://github.com/thoughtbot/proteus-middleman/contributors)!\n\n## License\n\nCopyright © 2014–2016 [thoughtbot, inc](http://thoughtbot.com). Proteus is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).\n"
  },
  {
    "path": "Rakefile",
    "content": "require \"bundler/gem_tasks\"\nrequire \"rspec/core/rake_task\"\n\nRSpec::Core::RakeTask.new\n\ntask :default => :spec\ntask :test => :spec\n"
  },
  {
    "path": "bin/proteus",
    "content": "#!/usr/bin/env ruby\n\nrequire 'rubygems'\n\nbegin\n  require 'proteus/kit'\nrescue LoadError => e\nwarn 'Could not load \"proteus/kit\"'\n  exit -1\nend\n\nProteus::Kit.start\n"
  },
  {
    "path": "lib/proteus/kit.rb",
    "content": "require \"proteus/version\"\nrequire \"proteus/repos\"\nrequire \"thor\"\n\nmodule Proteus\n  class Kit < Thor\n    include Thor::Actions\n\n    no_commands do\n      def url(id)\n        kit = Proteus::REPOS[id.to_sym]\n        kit[:url]\n      end\n\n      def name(id)\n        kit = Proteus::REPOS[id.to_sym]\n        kit[:name]\n      end\n    end\n\n    desc \"list\", \"shows a list of available kits\"\n    def list\n      repos = Proteus::REPOS\n      repos.each do |id, repo|\n        puts \"#{id} - #{repo[:name]}\"\n      end\n    end\n\n    desc \"new\", \"runs the command to clone a particular kit\"\n    def new(id, dir = nil)\n      dir ||= id\n      kit = Proteus::REPOS[id.to_sym]\n\n      if kit\n        name = kit[:name]\n        url = kit[:url]\n\n        if system \"git ls-remote #{url} #{dir} > /dev/null 2>&1\"\n          puts \"Starting a new #{name} project in #{dir} from #{url}\"\n          system %{\n            git clone \"#{url}\" \"#{dir}\" &&\n            cd \"#{dir}\" &&\n            rm -rf .git &&\n            git init &&\n            git add . &&\n            git commit -m 'New #{name} project' &&\n            cd -\n          }\n        else\n          puts \"Can't find a repo at #{url}.\"\n        end\n      else\n        puts \"Kit not found. Run `proteus list` to see available kits.\"\n      end\n    end\n\n    desc \"setup\", \"Sets up the project\"\n    def setup\n      puts \"Setting up your project\"\n      system \"bin/setup\"\n    end\n\n    desc \"server\", \"Runs the server\"\n    def server\n      puts \"Starting the server\"\n      system \"bin/server\"\n    end\n\n    desc \"deploy\", \"Deploys the site to Github\"\n    def deploy\n      puts \"Deploying the site to Github\"\n      system \"bin/deploy\"\n    end\n\n    desc \"version\", \"Show Proteus version\"\n    def version\n      version_number = Proteus::VERSION\n      puts \"Proteus #{version_number}\"\n    end\n  end\nend\n"
  },
  {
    "path": "lib/proteus/repos.rb",
    "content": "module Proteus\n  REPOS = {\n    middleman: {\n      name: \"Middleman Starter\",\n      url: \"https://github.com/thoughtbot/proteus-middleman.git\"\n    },\n\n    jekyll: {\n      name: \"Jekyll Starter\",\n      url: \"https://github.com/thoughtbot/proteus-jekyll.git\"\n    }\n  }\nend\n"
  },
  {
    "path": "lib/proteus/version.rb",
    "content": "module Proteus\n  VERSION = \"0.4\"\nend\n"
  },
  {
    "path": "lib/proteus.rb",
    "content": "require \"proteus/version\"\nrequire \"proteus/repos\"\nrequire \"proteus/kit\"\n"
  },
  {
    "path": "proteus-kits.gemspec",
    "content": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"proteus/version\"\n\nGem::Specification.new do |spec|\n  spec.name          = \"proteus-kits\"\n  spec.version       = Proteus::VERSION\n  spec.authors       = [\"Joshua Ogle\"]\n  spec.email         = [\"support@thoughtbot.com\"]\n  spec.summary       = %q{Starter kits to help you prototype faster}\n  spec.description   = %q{A collection of useful starter kits to help you prototype faster}\n  spec.homepage      = \"http://github.com/thoughtbot/proteus\"\n  spec.license       = \"MIT\"\n\n  spec.files         = `git ls-files`.split($/)\n  spec.executable    = \"proteus\"\n  spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})\n  spec.require_paths = [\"lib\"]\n\n  spec.add_development_dependency \"bundler\", \"~> 1.7\"\n  spec.add_development_dependency \"rake\", \"~> 10.0\"\n  spec.add_development_dependency \"rspec\", \"~> 3.3\"\n\n  spec.add_dependency \"thor\", \"~> 0.19\"\nend\n"
  },
  {
    "path": "spec/proteus_spec.rb",
    "content": "require \"spec_helper\"\n\ndescribe Proteus do\n  before do\n    remove_dummy_repo\n    @proteus = Proteus::Kit.new\n    @repos = Proteus::REPOS\n  end\n\n  it \"has a list of repos\" do\n    expect(@repos).not_to be_nil\n  end\n\n  it \"gets repos in the list\" do\n    expect(@repos.size).to be > 0\n  end\n\n  it \"gets the kit name\" do\n    expect(@proteus.name(\"jekyll\")).to eq(\"Jekyll Starter\")\n  end\n\n  it \"gets the Git url\" do\n    url = \"https://github.com/thoughtbot/proteus-middleman.git\"\n    expect(@proteus.url(\"middleman\")).to eq(url)\n  end\n\n  it \"displays a list of repos\" do\n    expect { @proteus.list }.to output().to_stdout\n  end\n\n  it \"displays a friendly message if the kit isn't in the list\" do\n    message = \"Kit not found. Run `proteus list` to see available kits.\\n\"\n    expect { @proteus.new(\"invalid\") }.to output(message).to_stdout\n  end\n\n  it \"displays the current version\" do\n    version = Proteus::VERSION\n    expect { @proteus.version }.to output(\"Proteus #{version}\\n\").to_stdout\n  end\n\n  def remove_dummy_repo\n    FileUtils.rm_rf(Dir[\"./spec/dummy\"])\n  end\nend\n"
  },
  {
    "path": "spec/spec_helper.rb",
    "content": "$LOAD_PATH << File.join('../lib')\n\nrequire 'proteus'\n\ndef quietly\n  streams = STDOUT, STDERR\n  on_hold = streams.collect { |stream| stream.dup }\n  streams.each do |stream|\n    stream.reopen(null_stream)\n    stream.sync = true\n  end\n  yield\n  ensure\n    streams.each_with_index do |stream, i|\n      stream.reopen(on_hold[i])\n    end\nend\n\ndef null_stream\n  if RUBY_PLATFORM =~ /mswin/\n    'NUL:'\n  else\n    '/dev/null'\n  end\nend\n"
  }
]