Skip to content

durangatan/SiReGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

SiReGen

A CRUD resource generator for Sinatra. Currently supports the creation of generic CRUD controllers for a given model name.

Installation

This repo contains two files: siregen.rb and raketask. You also need to have the gem dry-inflector installed.

  • To run the runner file, pass in the model name as ARGV. The runner file will generate the controller file with the proper name. It will be up to you to place it in the right directory.

    ruby siregen.rb user
  • To use the raketask, copy and paste its text into your Rakefile. The raketask assumes you have a directory called app/controllers. You may want to namespace the task with any other generation tasks you have:

    rake generate:controller NAME=user
  • The task will also work in isolation:

    rake controller NAME=user

ENJOY!

About

A command-line resource generator for Sinatra.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages