A simple content management system built with Ruby on Rails and Twitter Bootstrap.
Ruby JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
lib
log
public
script
spec
vendor
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
config.ru

README.md

gamsjaga Dependency Status

A modern CMS for associations, clubs or school classes that is implemented with Ruby on Rails and Twitter Bootstrap.

Home page for signed-in users

Video page for signed-in users

Post admin page for signed-in users

Group SMS form for signed-in users

Features

  • Blog-like posts with simple formating and RSS feed
  • Static content in the form of pages that are listed in the main navigation (menu item names and ordering are flexible)
  • Administration of active and passive members with public display (member ordering is flexible)
  • Photo attachments for posts and members
  • Automatic image resize and thumbnail generation
  • Images are stored on Amazon S3
  • Video attachments for posts
  • Simple copy & paste of online video URL (e.g. youtube, vimeo)
  • No HTML required
  • Embed code is automatically fetched via oembed
  • Separate video section with all video attachments summarized on one page
  • Group SMS messaging to members through the Nexmo API
  • User management with admins and regular users
  • A download section where arbitrary files can be uploaded
  • Supports public and private (only accessible by signed in users) downloads
  • Utilizes Amazon S3 for file storage
  • Responsive UI optimized for mobile, tablet and desktop
  • Custom icon for iOS home screen shortcut

Requirements

  1. The latest version of Ruby and Ruby on Rails. Both can be conveniently installed along with RVM.
  2. The distributed version control system Git.
  3. If you want to run an instance of gamsjaga on your own system, make sure that ImageMagick is installed.

A convenient way to install Git and ImageMagick is through Homebrew:

brew install git
brew install imagemagick

Getting Started

Configuration

  1. Check out the git repository from your command-line:

     git clone https://github.com/nokinen/gamsjaga.git
     cd gamsjaga
    
  2. Signup for an AWS Account and get your security credentials for step 4.

  3. Signup for a Nexmo Account and get your API key and secret for step 4.

  4. Add a .env file with your project settings:

     # Thin settings
     RACK_ENV=development
    
     # General settings
     PROJECT="Project name"
     AUTHOR="Author name"
    
     # S3 Credentials
     S3_KEY=REPLACE_WITH_ACCESS_KEY_ID
     S3_SECRET=REPLACE_WITH_SECRET_ACCESS_KEY
    
     # S3 Settings
     S3_BUCKET=gamsjaga
     S3_LARGE_PHOTO_PREFIX="photos/"
     S3_THUMB_PHOTO_PREFIX="photos/thumbs/"
     S3_DOWNLOAD_PREFIX="downloads/"
    
     # Nexmo SMS API
     NEXMO_KEY=REPLACE_WITH_API_KEY
     NEXMO_SECRET=REPLACE_WITH_API_SECRET
    

Run local server

  1. Enter the following from your command line to install the required gems listed in the Gemfile, prepare the database, fill it with sample data, and start the server:

     bundle install
     rake db:migrate db:populate:sample
     foreman start
    
  2. Open http://localhost:5000 in your browser, click Login at the bottom of the home page and authenticate with admin@test.com and password.

Deploy to Heroku

  1. After signing up for a Heroku account, install the heroku gem and generate your access keys:

     gem install heroku
     heroku keys:add
    
  2. Create a new app on the Heroku platform:

     heroku create
    
  3. Deploy your gamsjaga instance to Heroku:

     git push heroku master
    
  4. Add project settings as environmental variables via heroku config:add KEY=VALUE:

     # General settings
     heroku config:add PROJECT="Project name" AUTHOR="Author name"
     
     # S3 credentials
     heroku config:add S3_KEY=REPLACE_WITH_ACCESS_KEY_ID S3_SECRET=REPLACE_WITH_SECRET_ACCESS_KEY
     
     # S3 Settings
     heroku config:add S3_BUCKET=gamsjaga S3_LARGE_PHOTO_PREFIX="photos/" S3_THUMB_PHOTO_PREFIX="photos/thumbs/" S3_DOWNLOAD_PREFIX="downloads/"
     
     # Nexmo SMS API
     heroku config:add NEXMO_KEY=REPLACE_WITH_API_KEY NEXMO_SECRET=REPLACE_WITH_API_SECRET
    
  5. Prepare the database and populate it with sample data:

     heroku run rake db:migrate db:populate:sample
    
  6. Open the fresh gamsjaga instance in your browser:

     heroku open
    
  7. Click Login at the bottom of the home page and authenticate with admin@test.com and password.

Running tests

Run tests with foreman run rspec.