Giter Site home page Giter Site logo

provisional's Introduction

Provisional

Description

Provisional creates a new Rails project, using a standard Rails 2.3 application template, and checks it into a new SCM repository.

In the future, Provisional may be expanded to create production and staging environments, set up continuous integration, and automate other tasks that are usually performed at the beginning of a project.

Requirements

Provisional requires Rails 2.3.0 or greater.

Provisional is only tested on Mac OS X. It should also work on Linux. It is not tested or supported on Windows.

Installation

sudo gem install provisional

Usage

Options:
      --name, -n <s>:   Name of the project
       --scm, -s <s>:   SCM to use (default: git)
  --template, -t <s>:   Rails template to use (default: viget)
    --domain, -d <s>:   Domain (for some SCMs, see below)
  --username, -u <s>:   Username (for some SCMs, see below)
  --password, -p <s>:   Password (for some SCMs, see below)
        --id, -i <s>:   Id (for some SCMs, see below)
    --config, -c <s>:   Config file (optional)
       --private, -r:   Private repository (for some SCMs, see documentation)
          --help, -h:   Show this message

All of these options can be specified either on the command line, or in a YAML file indicated by the --config option. The YAML file should be in simple key: value format:

name: awesome_project
scm: git

Options specified via the command line take precedence over options specified in a YAML file, if both are specified.

The SCM option can be one of the following ("project_name" refers to the value of the --name option):

  • git: creates a Git repository in the project_name directory.
  • github: creates a Git repository in the project_name directory, creates project_name on GitHub, adds it as the "origin" remote, and pushes. (See section below about required configuration.)
  • unfuddle: creates a Git repository in the project_name directory, creates a repository called project_name under an existing Unfuddle project using the specified credentials, and adds it as the "origin" remote. You must push manually because Unfuddle typically has a lag of a few minutes between when a repository is created and when it can be accessed. (See section below about required configuration.)
  • unfuddle_svn: creates a Subversion repository called project_name under an existing Unfuddle project using the specified credentials, and checks it out into the project_name directory.
  • beanstalk: creates a Subversion repository called project_name on Beanstalk using the specified credentials, and checks it out into the project_name directory.
  • heroku: creates a Git repository in the project_name directory, creates an application called project_name on Heroku, adds it as the "heroku" remote, and pushes. (See section below about required configuration.)
  • hg: creates a Mercurial repository in the project_name directory.
  • bzr: creates a Bazaar repository in the project_name directory.

The domain, username, password, and id options are used by certain SCMs to provide information needed to use an API. The documentation on these SCMs (below) will indicate how they are to be used.

The template option can be either a literal path to a template file, a URL for a template on a remote server, or the name of one of the templates found in lib/provisional/templates (without the .rb suffix.) The default viget template does the following:

  • freezes rails from currently installed gems
  • installs gems: mocha, factory_girl, shoulda, webrat
  • installs plugins: hoptoad_notifier, jrails, model_generator_with_factories, viget_deployment, vl_cruise_control, asset_packager
  • installs a .gitignore file to ignore logs, temp files, sqlite3 databases, rcov reports, and database.yml
  • generates Capistrano configuration with viget_deployment
  • copies database.yml to database.yml-sample
  • removes public/index.html, test/fixtures, prototype, and script.aculo.us
  • creates an SCM repository and checks the application in

A few other templates are provided:

  • The braces template installs an environment similar, but not exactly identical, to Thoughtbot's Suspenders bootstrap.
  • The rspec_and_friends template installs RSpec, Cucumber and Webrat.

GitHub

To use GitHub, you will need to place your GitHub username and token in your Git configuration as described here. Since there is already this established convention for GitHub credentials, to prevent redundant configuration, Provisional does not use its own configuration options for GitHub access.

By default, repositories are publicly accessible. Use --private to make it private.

Unfuddle

To use Unfuddle (for either Git or Subversion) you will need to specify the --domain, --id, --username and --password options. --domain is used to specify your unfuddle.com subdomain; --id is used to specify a project ID. Using a YAML file containing these options is recommended and should be helpful.

Beanstalk

As of this writing (May 2009) Beanstalk's API is in private beta. See the API documentation for details on how to gain access. Thanks to Wildbit for giving us access to the private beta.

To use Beanstalk you will need to specify the --domain, ---username and --password options. --domain is used to specify your beanstalkapp.com subdomain. Using a YAML file containing these options is recommended and should be helpful.

Heroku

To use Heroku, you will need to install the Heroku gem with gem install heroku and run its command-line tool to enter your Heroku username and password. Since there is already this established convention for Heroku credentials, to prevent redundant configuration, Provisional does not use its own configuration options for Heroku access.

Acknowledgements

Provisional acknowledges the support of Viewers Like You, and also the following significant contributors:

  • Clinton R. Nixon (crnixon)
  • David Eisinger (dce)

License

Copyright (c) 2009 Mark Cornick of Viget Labs [email protected]

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.

provisional's People

Contributors

mcornick avatar cndreisbach avatar dce avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.