Punchcard is a project mainly written in RUBY and JAVASCRIPT, based on the MIT license.
Simple sinatra/active record app for tracking time when people have been in the office
= Punchcard
A simple Sinatra app that lets you track who is and has been in the office at what times.
== Bootstrap
Create a directory to hold your app, then create a Gemfile:
source :rubygems gem 'pg'
gem 'punchcard'
Create a Rakefile:
require 'bundler' require 'rake' Bundler.require
require 'punchcard/tasks'
Create a config.ru for rack:
require 'bundler' Bundler.require
Punchcard::App.use Rack::Auth::Basic do |username, password| [username, password] == ['someuser', 'secret'] end
run Punchcard::App
To run locally, make sure you have a proper ENV['DATABASE_URL'] configured or the sqlite3 gem installed with your bundle. Then:
$ bundle install $ rake db:migrate $ rackup
Open http://localhost:9292
== Supported Ruby versions
Punchcard is tested against MRI 1.8.7, 1.9.1, 1.9.2 and Ruby Enterprise Edition.
== Hosting on Heroku
Starting from the initial bootstrap above, make sure you have the pg gem in your bundle and did run bundle install to create the Gemfile.lock, then do the following in the terminal:
$ git init && git add . $ git commit -m "Initial commit" $ heroku create [APPNAME] --stack bamboo-mri-1.9.2 $ git push heroku master $ heroku rake db:migrate
Now head over to your app's url! You'll still need to add users, see below.
== Adding people
Currently, you'll have to add users directly from the console. After creating your app on heroku, you can do so by running
$ heroku console
Person.create!(:name => 'Forrest Gump', :email => '[email protected]')
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2010 Christoph Olszowka. See LICENSE for details.