Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
-- RMU SESSION #1 | PROBLEM 2 -- Submissions due 12:00 UTC 2010.09.15 == MODEL There main entites modeled are users, commits, projects and achivements. The goal of this design is to allow easy extension for new kinds of achivements. There are two main kinds of achivements: * Static achivements which once earned, the user can't lose. They are modeled as subclasses of StaticAchivement. Each subclass of StaticAchivement must override StaticAchivement#should_be_achived_by?(user) to determine if a user should earn an achivement. * Dynamic achivements which a user can lose if she no longer meets the requirements for the achivment. They inherith from DynamicAchivement. DynamicAchivement subclasses must override DynamicAchivement#grant_to_users to grant the achivement to users taht deserve it and eliminate from the users that no longer do. Static achivements are granted whenever a user is saved, while dynamic achivements can be calculated asynchronously -say, once a day- triggering the method DynamicAchivemnt.calculate_dynamic_achivements! == DEPENDENCIES The project depends on the gems activerecord 3.0, contest and sqlite3-ruby. The can be installed with bundler running bundle install.