Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

sunny-b/opening_act

Repository files navigation

OpeningAct

Do you use Sinatra often? Are you tired of creating the same boilerplate files every time and haven't had the time to automate your system yet? Well then this is the gem for you. OpeningAct creates the template files you need for your Sinatra application so you can start developing in moments.

OpeningAct was inspired by Bundler's gem template and Rails. The template files were partially inspired by zapnap's sinatra template.

Installation

To install OpeningAct, you just need to run this command on your machine:

$ gem install opening_act

Usage

Once you install OpeningAct on your machine, you will have access to the executable opening. To create your sinatra template, just run it on your command line:

$ opening

OpeningAct will prompt you to provide a name for your project and your preferred test framework (Rspec or Minitest).

You can also pass in a name and a test type (as a flag):

$ opening sample -minitest

OR

$ opening -minitest sample

It will create a project directory with all your starter files:

├── .git
├── Gemfile
├── Gemfile.lock
├── LICENSE.txt
├── Procfile
├── README.md
├── Rakefile
├── config.ru
├── environment.rb
├── public
│   ├── javascript
│   │   └── script.js
│   └── stylesheets
│       ├── main.css
│       └── reset.css
├── sample.rb
├── test
│   ├── sample_test.rb
│   └── test_helper.rb
└── views
    ├── index.erb
    └── layout.erb

5 directories, 17 files

Once OpeningAct has run, you're ready for development. Just run

$ ruby your_app_name.rb

OR

$ heroku local web

to see your Sinatra application.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sunny-b/opening_act.

License

The gem is available as open source under the terms of the MIT License.

About

A program that dynamically generates Sinatra boilerplate. Supports Minitest and Rspec

Resources

License

Stars

Watchers

Forks

Packages

No packages published