Full Code of thoughtbot/proteus for AI

master a7c8fe5fa6f9 cached
14 files
9.3 KB
2.9k tokens
15 symbols
1 requests
Download .txt
Repository: thoughtbot/proteus
Branch: master
Commit: a7c8fe5fa6f9
Files: 14
Total size: 9.3 KB

Directory structure:
gitextract_jwqlroy7/

├── .gitignore
├── CONTRIBUTING.md
├── Gemfile
├── LICENSE.md
├── README.md
├── Rakefile
├── bin/
│   └── proteus
├── lib/
│   ├── proteus/
│   │   ├── kit.rb
│   │   ├── repos.rb
│   │   └── version.rb
│   └── proteus.rb
├── proteus-kits.gemspec
└── spec/
    ├── proteus_spec.rb
    └── spec_helper.rb

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
*gem
.DS_store
Gemfile.lock
pkg
tmp
spec/dummy


================================================
FILE: CONTRIBUTING.md
================================================
We love pull requests from everyone. By participating in this project, you
agree to abide by the thoughtbot [code of conduct]. Here’s a quick guide:

[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct

1. Fork the repository.
2. Make your changes in a topic branch.
3. Squash your commits into a single one (more on that
   [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)).
4. Rebase against `origin/master`, push to your fork and submit a pull request.

At this point you’re waiting on us. We like to at least comment on, if not
accept, pull requests within three business days (and, typically, one business
day). We may suggest some changes or improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

* Write your code according to the [thoughtbot Style Guide][guide]
* Fix a bug, refactor code or expand an existing feature.
* Use the right syntax and naming conventions.
* Update parts of the documentation that are affected by your contribution.

[guide]: https://github.com/thoughtbot/guides/tree/master/style

**Git Commit Messages**

* Capitalize your commit messages.
* Start your message with a verb.
* Use present tense.
* Refer to the issue/PR number in your squashed commit message.


================================================
FILE: Gemfile
================================================
source 'https://rubygems.org'

gemspec


================================================
FILE: LICENSE.md
================================================
The MIT License (MIT)

Copyright © 2014–2016 [thoughtbot, inc.](http://thoughtbot.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# Proteus

**Note:** Proteus is no longer being actively maintained.

Proteus is a collection of useful starter kits to help you prototype
faster. They follow the [thoughtbot styleguide](https://github.com/thoughtbot/guides)
and includes our favorite front-end development tools.

## Kits

* [Middleman](http://github.com/thoughtbot/proteus-middleman)
* [Jekyll](http://github.com/thoughtbot/proteus-jekyll)
* Have a request for another kit? Open an issue to let us know.

## Installation

1. Install the Proteus gem using the [RubyGems](https://rubygems.org) package manager:

  ```bash
  gem install proteus-kits
  ```

2. Then kick off a new project with the kit you want to use (i.e. Middleman):

  ```bash
  proteus new middleman your-project-name
  ```

## Shortcuts

We’ve also included some handy shortcuts with Proteus:

- Install dependencies and clear the Git remote:

  ```bash
  proteus setup
  ```

- Start the kit-specific server (i.e. `bundle exec middleman server`):

  ```bash
  proteus server
  ```

- Run the kit-specific deploy (i.e. `middleman deploy`):

  ```bash
  proteus deploy
  ```

## Contributing

If you'd like to contribute a feature or bugfix: Thanks! To make sure your
fix/feature has a high chance of being included, please read the following
guidelines:

1. Fork the repository
2. Make your changes
3. Push your branch to your fork
4. Post a [pull request](https://github.com/thoughtbot/proteus/compare).

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more details on contributing and running test.

Thank you to all [the contributors](https://github.com/thoughtbot/proteus-middleman/contributors)!

## Credits

[![thoughtbot](http://images.thoughtbot.com/bourbon/thoughtbot-logo.svg)](http://thoughtbot.com)

Proteus is maintained and funded by [thoughtbot, inc](http://thoughtbot.com). Thank you to all of [the contributors](https://github.com/thoughtbot/proteus-middleman/contributors)!

## License

Copyright © 2014–2016 [thoughtbot, inc](http://thoughtbot.com). Proteus is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).


================================================
FILE: Rakefile
================================================
require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new

task :default => :spec
task :test => :spec


================================================
FILE: bin/proteus
================================================
#!/usr/bin/env ruby

require 'rubygems'

begin
  require 'proteus/kit'
rescue LoadError => e
warn 'Could not load "proteus/kit"'
  exit -1
end

Proteus::Kit.start


================================================
FILE: lib/proteus/kit.rb
================================================
require "proteus/version"
require "proteus/repos"
require "thor"

module Proteus
  class Kit < Thor
    include Thor::Actions

    no_commands do
      def url(id)
        kit = Proteus::REPOS[id.to_sym]
        kit[:url]
      end

      def name(id)
        kit = Proteus::REPOS[id.to_sym]
        kit[:name]
      end
    end

    desc "list", "shows a list of available kits"
    def list
      repos = Proteus::REPOS
      repos.each do |id, repo|
        puts "#{id} - #{repo[:name]}"
      end
    end

    desc "new", "runs the command to clone a particular kit"
    def new(id, dir = nil)
      dir ||= id
      kit = Proteus::REPOS[id.to_sym]

      if kit
        name = kit[:name]
        url = kit[:url]

        if system "git ls-remote #{url} #{dir} > /dev/null 2>&1"
          puts "Starting a new #{name} project in #{dir} from #{url}"
          system %{
            git clone "#{url}" "#{dir}" &&
            cd "#{dir}" &&
            rm -rf .git &&
            git init &&
            git add . &&
            git commit -m 'New #{name} project' &&
            cd -
          }
        else
          puts "Can't find a repo at #{url}."
        end
      else
        puts "Kit not found. Run `proteus list` to see available kits."
      end
    end

    desc "setup", "Sets up the project"
    def setup
      puts "Setting up your project"
      system "bin/setup"
    end

    desc "server", "Runs the server"
    def server
      puts "Starting the server"
      system "bin/server"
    end

    desc "deploy", "Deploys the site to Github"
    def deploy
      puts "Deploying the site to Github"
      system "bin/deploy"
    end

    desc "version", "Show Proteus version"
    def version
      version_number = Proteus::VERSION
      puts "Proteus #{version_number}"
    end
  end
end


================================================
FILE: lib/proteus/repos.rb
================================================
module Proteus
  REPOS = {
    middleman: {
      name: "Middleman Starter",
      url: "https://github.com/thoughtbot/proteus-middleman.git"
    },

    jekyll: {
      name: "Jekyll Starter",
      url: "https://github.com/thoughtbot/proteus-jekyll.git"
    }
  }
end


================================================
FILE: lib/proteus/version.rb
================================================
module Proteus
  VERSION = "0.4"
end


================================================
FILE: lib/proteus.rb
================================================
require "proteus/version"
require "proteus/repos"
require "proteus/kit"


================================================
FILE: proteus-kits.gemspec
================================================
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "proteus/version"

Gem::Specification.new do |spec|
  spec.name          = "proteus-kits"
  spec.version       = Proteus::VERSION
  spec.authors       = ["Joshua Ogle"]
  spec.email         = ["support@thoughtbot.com"]
  spec.summary       = %q{Starter kits to help you prototype faster}
  spec.description   = %q{A collection of useful starter kits to help you prototype faster}
  spec.homepage      = "http://github.com/thoughtbot/proteus"
  spec.license       = "MIT"

  spec.files         = `git ls-files`.split($/)
  spec.executable    = "proteus"
  spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
  spec.require_paths = ["lib"]

  spec.add_development_dependency "bundler", "~> 1.7"
  spec.add_development_dependency "rake", "~> 10.0"
  spec.add_development_dependency "rspec", "~> 3.3"

  spec.add_dependency "thor", "~> 0.19"
end


================================================
FILE: spec/proteus_spec.rb
================================================
require "spec_helper"

describe Proteus do
  before do
    remove_dummy_repo
    @proteus = Proteus::Kit.new
    @repos = Proteus::REPOS
  end

  it "has a list of repos" do
    expect(@repos).not_to be_nil
  end

  it "gets repos in the list" do
    expect(@repos.size).to be > 0
  end

  it "gets the kit name" do
    expect(@proteus.name("jekyll")).to eq("Jekyll Starter")
  end

  it "gets the Git url" do
    url = "https://github.com/thoughtbot/proteus-middleman.git"
    expect(@proteus.url("middleman")).to eq(url)
  end

  it "displays a list of repos" do
    expect { @proteus.list }.to output().to_stdout
  end

  it "displays a friendly message if the kit isn't in the list" do
    message = "Kit not found. Run `proteus list` to see available kits.\n"
    expect { @proteus.new("invalid") }.to output(message).to_stdout
  end

  it "displays the current version" do
    version = Proteus::VERSION
    expect { @proteus.version }.to output("Proteus #{version}\n").to_stdout
  end

  def remove_dummy_repo
    FileUtils.rm_rf(Dir["./spec/dummy"])
  end
end


================================================
FILE: spec/spec_helper.rb
================================================
$LOAD_PATH << File.join('../lib')

require 'proteus'

def quietly
  streams = STDOUT, STDERR
  on_hold = streams.collect { |stream| stream.dup }
  streams.each do |stream|
    stream.reopen(null_stream)
    stream.sync = true
  end
  yield
  ensure
    streams.each_with_index do |stream, i|
      stream.reopen(on_hold[i])
    end
end

def null_stream
  if RUBY_PLATFORM =~ /mswin/
    'NUL:'
  else
    '/dev/null'
  end
end
Download .txt
gitextract_jwqlroy7/

├── .gitignore
├── CONTRIBUTING.md
├── Gemfile
├── LICENSE.md
├── README.md
├── Rakefile
├── bin/
│   └── proteus
├── lib/
│   ├── proteus/
│   │   ├── kit.rb
│   │   ├── repos.rb
│   │   └── version.rb
│   └── proteus.rb
├── proteus-kits.gemspec
└── spec/
    ├── proteus_spec.rb
    └── spec_helper.rb
Download .txt
SYMBOL INDEX (15 symbols across 5 files)

FILE: lib/proteus/kit.rb
  type Proteus (line 5) | module Proteus
    class Kit (line 6) | class Kit < Thor
      method url (line 10) | def url(id)
      method name (line 15) | def name(id)
      method list (line 22) | def list
      method new (line 30) | def new(id, dir = nil)
      method setup (line 58) | def setup
      method server (line 64) | def server
      method deploy (line 70) | def deploy
      method version (line 76) | def version

FILE: lib/proteus/repos.rb
  type Proteus (line 1) | module Proteus

FILE: lib/proteus/version.rb
  type Proteus (line 1) | module Proteus

FILE: spec/proteus_spec.rb
  function remove_dummy_repo (line 41) | def remove_dummy_repo

FILE: spec/spec_helper.rb
  function quietly (line 5) | def quietly
  function null_stream (line 19) | def null_stream
Condensed preview — 14 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (11K chars).
[
  {
    "path": ".gitignore",
    "chars": 47,
    "preview": "*gem\n.DS_store\nGemfile.lock\npkg\ntmp\nspec/dummy\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1303,
    "preview": "We love pull requests from everyone. By participating in this project, you\nagree to abide by the thoughtbot [code of con"
  },
  {
    "path": "Gemfile",
    "chars": 39,
    "preview": "source 'https://rubygems.org'\n\ngemspec\n"
  },
  {
    "path": "LICENSE.md",
    "chars": 1111,
    "preview": "The MIT License (MIT)\n\nCopyright © 2014–2016 [thoughtbot, inc.](http://thoughtbot.com)\n\nPermission is hereby granted, fr"
  },
  {
    "path": "README.md",
    "chars": 2114,
    "preview": "# Proteus\n\n**Note:** Proteus is no longer being actively maintained.\n\nProteus is a collection of useful starter kits to "
  },
  {
    "path": "Rakefile",
    "chars": 130,
    "preview": "require \"bundler/gem_tasks\"\nrequire \"rspec/core/rake_task\"\n\nRSpec::Core::RakeTask.new\n\ntask :default => :spec\ntask :test"
  },
  {
    "path": "bin/proteus",
    "chars": 163,
    "preview": "#!/usr/bin/env ruby\n\nrequire 'rubygems'\n\nbegin\n  require 'proteus/kit'\nrescue LoadError => e\nwarn 'Could not load \"prote"
  },
  {
    "path": "lib/proteus/kit.rb",
    "chars": 1813,
    "preview": "require \"proteus/version\"\nrequire \"proteus/repos\"\nrequire \"thor\"\n\nmodule Proteus\n  class Kit < Thor\n    include Thor::Ac"
  },
  {
    "path": "lib/proteus/repos.rb",
    "chars": 270,
    "preview": "module Proteus\n  REPOS = {\n    middleman: {\n      name: \"Middleman Starter\",\n      url: \"https://github.com/thoughtbot/p"
  },
  {
    "path": "lib/proteus/version.rb",
    "chars": 37,
    "preview": "module Proteus\n  VERSION = \"0.4\"\nend\n"
  },
  {
    "path": "lib/proteus.rb",
    "chars": 72,
    "preview": "require \"proteus/version\"\nrequire \"proteus/repos\"\nrequire \"proteus/kit\"\n"
  },
  {
    "path": "proteus-kits.gemspec",
    "chars": 978,
    "preview": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequi"
  },
  {
    "path": "spec/proteus_spec.rb",
    "chars": 1068,
    "preview": "require \"spec_helper\"\n\ndescribe Proteus do\n  before do\n    remove_dummy_repo\n    @proteus = Proteus::Kit.new\n    @repos "
  },
  {
    "path": "spec/spec_helper.rb",
    "chars": 427,
    "preview": "$LOAD_PATH << File.join('../lib')\n\nrequire 'proteus'\n\ndef quietly\n  streams = STDOUT, STDERR\n  on_hold = streams.collect"
  }
]

About this extraction

This page contains the full source code of the thoughtbot/proteus GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 14 files (9.3 KB), approximately 2.9k tokens, and a symbol index with 15 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!