Speed up your Sinatra development with OpeningAct
OpeningAct creates a template for your Sinatra application.
Having built a handful of Sinatra applications, I’ve come to enjoy the charming lightweight framework and the control it provides. However, the initial file creation can be tedious, especially when you add in databases and tests. I was sure I wasn’t the first person to think this, especially with other ruby gems and frameworks that take care of file creation for you, such as Bundler’s gem template andRails.
However, when I looked online for such gems, I came up empty handed. There is a Sinatra template on GitHub (which I used to help create the OpeningAct template) but that still didn’t provide me a quick and easy way of creating a template from the command line. That’s where OpeningAct was born.
OpeningAct is a gem that provides a simple Sinatra template so you can focus on your application development. Using OpeningAct is as simple as a two commands:
$ gem install opening_act
After being prompted for a name and test framework preference, a project directory will be created:
│ │ └── script.js
│ └── stylesheets
│ ├── main.css
│ └── reset.css
│ ├── sample_test.rb
│ └── test_helper.rb
5 directories, 17 files
And you will be ready for development. It even comes with some built in
rake tasks that make testing a cinch.
If you want to see the progress of your application at any time, just run:
heroku local web
As of right now, OpeningAct only supports a template for the main application and testing. However, I’m hoping to add template support for databases, such as Datamapper and Sequel/PostgreSQL.
If this gem interests you, install it on your machine via the CLI
gem install opening_act. And if you wish to contribute, please fork the project on Github.