Skip to content
This repository

Community Base Application Template

branch: rails31

This branch is 0 commits ahead and 283 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 public
Octocat-spinner-32 script Cucumber works but tests has to be rewritten for CBA January 12, 2011
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .autotest Removed/Remarked google-search April 23, 2011
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile Initial commit w/o tests January 11, 2011
Octocat-spinner-32 TODO.md Prepared and green for merging into WWEDU projects August 11, 2011
Octocat-spinner-32 config.ru Updated to Rails 3.0.9 June 21, 2011
Octocat-spinner-32 cucumber.yml Cucumber format for textmate-bundle August 05, 2011
Octocat-spinner-32 install.rb
README.md

CBA - Community Base Application Template

Version note

Quickstart

   curl -o install_cba.rb https://github.com/iboard/CBA/raw/master/install.rb
   ruby install_cba.rb

This will install a fully functional web-application, with user-authentication (incl. omniAuth) on a document oriented, non-SQL, MongoDB/MongoID database. Just ready to be extended by your 'real' application code. As a benefit, CBA will offer two MVCs Page and Blog.

Note: Project's README should be identical to README.md on Github -- I try hard to keep both versions in synchronized state, but check out the Github-version too.

What it is

CBA is forked from Rails3-Mongoid-Devise by fortuity, extended by Andi Altendorfer with

  • OmniAuth
  • Paperclip
  • CanCan
  • jQuery

CBA's own implementations

  • Models/MVC
    • User
    • Blog
    • Posting
    • Page
  • Features:
    • Comments and Attachments for all models
    • i18n enabled (en/de)
    • installation.rb (See: Posting)
    • Configuration in application.yml

More about installation

  • See: Posting 'installation.rb'
  • CBA is in heavy development age, so please read CBA Blog from bottom to top. There are some latest news, not mentioned in this README.

Layout and Templates

  • Edit cba.css or 'your_name_given_at_install'.css
  • Edit views/layout/application.html or views/layout/'your_name_given_at_install'.html.erb
  • Read Posting
  • Visit Demo Page

Tasks

Delayed Jobs

There is a rake-task to start the background jobs

  rake delayed_jobs:work

Unfortunatley DelayedJobs by 'tobi' doesn't work with MongoId. So I did this my own way. To define new background-workers follow this steps:

1 Define a worker in app/workers (See new_sign_up_notifier.rb) 2 Enqueue new Jobs like shown in app/model/user.rb, method async_notify_on_creation (Source)

Resources

'Page'

Since nearly any website needs some kind of 'semi-static pages' and we need some kind of object to test the application, there is a resource Page with the following features

  • Consists of a title and a body
  • The body is rendered with RedCloth
  • The MongoId of /page/MONGO_ID in the browser-address will be replaced by /p/title_of_the_page with JS.

Testing

Spork

To run autotests you have to start the spork-server and then run autotest command

  1. AUTOFEATURE=true bundle exec spark
  2. AUTOFEATURE=true bundle exec autotest

To run your unit-tests using spork do

  1. bundle exec spork TestUnit --port 8988
  2. testdrb -I test test/unit/*rb

Start all at once with thor-task

You can use thor application:run_autotests to start the spork-server and autotest. The shortest way to jump into continuos testing

Layout and Templates

  • Edit application.css or 'your_name_given_at_install'.css
  • Edit views/layout/application.html or views/layout/'your_name_given_at_install'.html.erb
  • Read Posting
  • Visit Demo Page

License

See: Freedom

Links

See: Link-page

Something went wrong with that request. Please try again.