Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scaffoldr

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scaffoldr

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

scaffoldr

Start your Rails 3.1+ application with some default layouts, styled by Twitter Bootstrap. The available layouts are the ones from The Twitter Bootstrap documentation.

Usage

Add to your Gemfile:

gem 'scaffoldr', :git => 'git@github.com:EncomLabs/scaffoldr.git'
gem 'twitter-bootstrap-rails'

Right now there is a bug where we can't add the twitter-bootstrap-rails gem as a dependency, due to bundler errors, so include that in your Gemfile as well.

Run the twitter-bootstrap-rails static or less installation so that the Twitter Bootstrap stylesheets and javascript are included in your application manifest files. The below example installs the static version:

rails g bootstrap:install static

Generate a bootstrap example layout for yourself. Either of the following will work:

Warning: This will remove and overwrite your application.html.erb/haml file.

rails g bootstrap:layout:starter
rails g bootstrap:layout:basic
rails g bootstrap:layout:fluid
rails g bootstrap:layout:marketing_narrow
rails g bootstrap:layout:justified_nav

The layouts are also available in HAML form:

rails g bootstrap:layout:starter --template-engine=haml

Examples

Starter

Starter

Basic

Basic

Fluid

Fluid

Marketing Narrow

Marketing Narrow

Justified Nav

Justified Nav

Development

Here are the commands mikedll uses to exercise the code manually. First we presume a Rails application template, named gemtest.rb:

gem 'twitter-bootstrap-rails'
gem 'haml'
gem 'scaffoldr', '0.1.0', :path => '/home/USERHOMEDIRECTORY/work/scaffoldr'

Then run these two commands to rapidly execute a full new app and scaffold action. The second assumes you're already in the target app directory, dino_dictionary. That is, it assumes you are in the middle of a redeploy loop. Below "dino dictionary" is used as the name of the app, but that's arbitrary of course.

rm -rf dino_dictionary; rails new dino_dictionary -m ~/PATH/TO/gemtest.rb 
cd ..; cd dino_dictionary; rails g bootstrap:install static; rails g bootstrap:layout:starter --template-engine=haml; rails s

Tips

  • Look at the rails generators from other gems such as simple_form to get an idea of how they work.

  • The command-line invocation is derived from the module namespacing, and directory structure, of where you place the generator file in the generators directory.

Contributors

Copyright (c) 2013 Encom Labs. See LICENSE.txt for further details.

FAQs

Package last updated on 13 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc