Livoris.de

CRToDo

Simple web-based to-do managing application
Version: 
1.0
License: 
Programming Language: 
Ruby
Screenshots: 

Description

CRToDo is a to-do managing application similar to RememberTheMilk but restricted to basic features.

CRToDo consists of two parts:

  1. The server is written in Ruby and offers a RESTful webservice.
  2. The client is written in JavaScript and runs in the browser.

Features

  • OpenID 2.0 login
  • Managing multiple to-do lists
  • Adding simple, one-line to-do entries
  • Ordering to-do entries by drag-and-drop
  • Finishing and deleting to-do entries by drag-and-drop
  • History of finished to-do entries

Usage

To use the service you can either go to http://todo.livoris.de/ or install it on your own server.

Requirements

  • Ruby 1.8.6 or newer
  • RubyGems 1.3.5 or newer
  • Sinatra 0.9.6
  • Ruby JSON implementation 1.2.0
  • Ruby-OpenID 2.1.7
  • RSpec 1.2.9 for running the tests
  • RCov 0.9.7.1 for test coverage
  • Reek 1.2.1 for code style
  • fcgi 0.8.8 for FastCGI
  • fcgiwrap 0.1.6 for FastCGI

Installation

The service is implemented with Sinatra and runs either stand-alone or in a webserver with FastCGI.

Stand-alone

To start the CRToDo server with the built-in webserver, start a terminal and change to the directory where you downloaded CRToDo and type the following command:

$ rake run

As can be seen by the ouput of the command, the WEBrick webserver starts on port 4567. The web interface can now be accessed by typing http://localhost:4567/ into the browser.

FastCGI

In a production environment you typically have a webserver like Apache HTTP Server or lighttpd.

To configure FastCGI in your webserver please refer to your webserver's documentation. An example configuration for Apache might look like below.

httd.conf:

<VirtualHost myhost:80>
  ServerName todo.livoris.de
  DocumentRoot /.../crtodo
  DefaultMaxClassProcessCount 1
</VirtualHost>

.htaccess:

RewriteEngine on
AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

You need to make sure that the data and the openid directory exist and are writable by the webserver.

Known problems

In dispatch.fcgi the file /srv/fastcgi/todo.log is configured as logfile. Make sure the path exists and is writable by the webserver.

If the error message "return_to path does not match" is displayed after the OpenID login then the Ruby OpenID implementation used the rewritten FastCGI path that obviously does not match the path of the original request. This is a bug in the Ruby FastCGI implementation and can be fixed by changing the line

[:scheme, :host, :port, :path].each do |meth|
to
[:scheme, :host, :port].each do |meth|

in ruby-openid-2.1.7/lib/openid/consumer/idres.rb line 199.

Acknowledgement

Apart from all the other components, this project is notably inspired by the simplicity and power of Sinatra and jQuery. The icons were provided under the Creative Commons Attribution License by the Axialis Team.

© 2014 Christopher Schuster. Drupal theme by Kiwi Themes.