Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Book group rooms at Chalmers University of Technology
JavaScript Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
config
lib
public
spec
views
.env
.gitignore
.rspec
Capfile
Gemfile
Gemfile.lock
Procfile
README.md
app.rb
config.ru

README.md

Room Booker

Chalmers room booking application. An alternative to Timeedit, which sucks.

A live demo can be found @ timeedit.oleander.nu.
Your browser must support HTML5's local storage, you can test your browser here.

Web application

Setup

  1. Install beanstalkd. brew install beanstalkd can be used in OS X
  2. Clone project git clone git://github.com/Tarrasch/room-booker-rb.git
  3. Navigate to room-booker and install dependencies using bundle install
  4. Install foreman globaly using [sudo] gem install foreman
  5. Start Faye, beanstalkd, Sinatra and Stalker using foreman start
  6. Navigate to localhost:4000 and you're done!

RoomBooker class

Core class, may be used without the web interface.

Initialize

room_booker = RoomBooker.new({
  username: "username",
  password: "password",
  from: "12",
  to: "14",
  date: Time.now
})

Get a list of available rooms

room_booker.rooms # => ["1234", "5678"]

Book a room

room_booker.book!("1234") # => true

Constructor params

  • username (String) Chalmers id, CID
  • password (String) CID password.
  • from (Fixnum) When does it start? (24 hour clock).
  • to (Fixnum) When does it end? (24 hour clock).
  • date (Time) What day?

Other methods

  • valid_credentials? (Bool) Is the given username and password valid?

Testing

  1. Export USERR and PASSWORD vars using export USERR="username", export PASSWORD="password".
  2. Run specs using rspec .

License

Room Booker is released under the MIT license.

Something went wrong with that request. Please try again.