Sha256: 85572269a9ae1141edfddc7924f8cddcb57e69ca7877e370252de1658e749a84

Contents?: true

Size: 1.72 KB

Versions: 3

Compression:

Stored size: 1.72 KB

Contents

Saucy
=====

Saucy is a Rails engine for monthly subscription-style SaaS apps.

Example scenarios covered by Saucy:

* I sign up for "Free" plan under new account "thoughtbot"
* I am an admin and can be reached at "dan@example.com"
* I create a project "Hoptoad"
* I upgrade to the "Basic" plan and my credit card is charged
* I now have permissions to add users and projects to the "thoughtbot" account
* I invite "joe@example.com" to "Hoptoad"
* I create a project "Trajectory"
* I invite "mike@example.com" to "Trajectory"

Installation
------------

In your Gemfile:

    gem "saucy", :git => 'git@github.com:thoughtbot/saucy.git'

After you bundle, run the generators:

    rails generate saucy:install
    rails generate saucy:views

Development environment
-----------------------

Plans need to exist for users to sign up for. In db/seeds.rb:

    %w(free expensive mega-expensive).each do |plan_name|
      Plan.find_or_create_by_name(plan_name)
    end

Then run: rake db:seed

Test environment
----------------

Generate the Braintree Fake for your specs:

    rails generate saucy:specs

Generate feature coverage:

    rails generate saucy:features

To use seed data in your Cucumber, add this to features/support/seed.rb:

    require Rails.root.join('db','seeds')

Customization
-------------

To change the layout for a controller inside of saucy, add a line like this to
your config/application.rb:

    config.saucy.layouts.accounts.index = "custom"

Your layout should yield(:header) in order to get the headers from saucy views.

To extend the ProjectsController:

    class ProjectsController < ApplicationController
      include Saucy::ProjectsController

      def edit
        super
        @deleters = @project.deleters
      end
    end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
saucy-0.2.2 README.md
saucy-0.2.1 README.md
saucy-0.2.0 README.md