PivotalTracker Github @Twitter
Arrow_up_small

README

Img_0091

CBA - Community Base Application Template

Issues

Known issues maintained in Github-Issues

Quickstart

I highly recommend to use RVM!

Requirements for CBA:

  • A running MongoDB Server
  • A rvm gemset for Rails Rails 3.1.0
   curl -o install_cba.rb \
   https://raw.github.com/iboard/CBA/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.textile on Github -- I try hard to keep both versions in synchronized state, but check out the Github-version too.

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

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.

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)

Resource '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 with 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

7 comments
Missing
Andreas Altendorfer, over 1 year ago

CBA installation on a fresh debian box works. There are a lot of debian packages to install and some bash-settings to set, which I will document later.

Missing
Andreas Altendorfer, over 1 year ago

I wrote an omniauth-strategie for campus.wwedu.com. so, wwedu-students may authenticate with their campus-account to our CBA-based micro-apps.

Missing
nickendell, over 1 year ago

Fixes:

bq. OAuth-Icons will not be displayed if no key is defined for a specific provider.
New comments since last log in are marked blue now.

Missing
nickendell, over 1 year ago

Admins can delete user-accounts now.

Andi
alta, over 1 year ago

"World Wide Education":http://wwedu.com/wwedu/startengl.html, the company I work for, will start using "CBA":http://cba.iboard.cc for new MicroApplications now.

Though CBA is a very young project, you can expect that CBA will be polished day by day to satisfy all needs for WWEDU when using CBA for enterprise purposes. This will guarantee that CBA will not die a silent death.

WWEDU uses a lot of OpenSource-stuff and this will be our give-back to the community.

Missing
nickendell, over 1 year ago

With this version of CBA you can define a file config/googleanalytics.head and put your javascript for Google-Analytics into this file. The file is then loaded in _production mode only.

2524d88e575593b85e370d29eb987d8c
Andreas, about 1 year ago

Testing with SPORK added to cba:master