tegon / ditty

Sinatra Based Application Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Code Climate Test Coverage

Ditty

Ditty provides an extra layer of functionality on top of Sinatra to give structure and basic tools to an already great framework. You can get a new application, with user authentication and basic CRUD / REST interfaces, up and running in minutes.

Installation

Add these lines to your application's Gemfile:

gem 'ditty'
gem 'sqlite3'

You can replace sqlite3 with a DB adapter of your choice.

And then execute:

bundle install

Or install it yourself as:

gem install ditty

Usage

  1. Add the components to your rack config file. See the included config.ru file for an example setup
  2. Add the Ditty rake tasks to your Rakefile: require 'ditty/rake_tasks'
  3. Set the DB connection as the DATABASE_URL ENV variable: DATABASE_URL=sqlite://development.db
  4. Create and populate the DB and secret tokens:
bundle exec rake proxes:prep
bundle exec rake proxes:generate_tokens
bundle exec rake proxes:migrate
bundle exec rake proxes:seed
  1. Start up the web app: bundle exec rackup

Components

The application can now be further extended by creating components.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec 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/EagerELK/ditty.

License

The Ditty gem is an Open Source project licensed under the terms of the MIT license. Please see MIT license for license text.

About

Sinatra Based Application Framework

License:MIT License


Languages

Language:Ruby 79.4%Language:HTML 20.6%