
sponger
Sponger now works with rails 2.1!
Sponger is a simple plug-in for creating and modifying calendars, events, and calendar widgets with the Spongecell API. This will easily allow you to create any sort of application or web site that uses events. Sponger is built on top ActiveResource which is included in Rails 2.0. ActiveResource can be used outside of rails if you copy out the ActiveResource libraries from the rails project.
Sponger is developed inside of the Spongewolf project located at: http://github.com/ckhsponge/spongewolf
Git Spongewolf (Sponger is located in the vendor/plugins directory):
git clone git://github.com/ckhsponge/spongewolf
Svn Sponger:
svn export http://sponger.googlecode.com/svn/trunk/plugins/sponger
The Sponger portion of the project is mirrored at google code for script/plugin compatibility and for using their forums.
Add Sponger to an existing rails app
ruby script/plugin install http://sponger.googlecode.com/svn/trunk/plugins/sponger
Add Sponger to a new rails app
Getting a rails app set up to use Sponger for event management is easy! Below are some steps for creating a rails app that displays a web page with a list of events from the site http://remindblast.com.
1. Create the rails app
Make sure you have rails 2.0 or later installed. If you're not sure then run:
gem install rails
To generate your rails app, run the following command:
rails sponger_test
2. Install the plugin
Change directory into sponger_test and run:
ruby script/plugin install http://sponger.googlecode.com/svn/trunk/plugins/sponger
3. Generate a controller for your app
Change directory into sponger_test and run:
ruby script/generate controller sponger
4. Add a method to your controller
Edit the file app/controller/sponger_controller.rb and the following method:
#gets all events from 2008-04-15 that were created from remindblast.com
def events
@events = Sponger::Event.find(:all,:params=>{:calendar_id=>137619,:start_time=>Date.new(2008,04,15)})
end
5. Add a view
Create the file app/views/sponger/events.rhtml and paste the following into it:
<% for event in @events -%>
<%= h event.title %>
<br>
<% end -%>
6. Start your server
ruby script/server start
7. Check the results
Point your browser at http://localhost:3000/sponger/events. You should see a list of events that were created as reminders. Done!
Project Information
- License: GNU GPL v3
- svn-based source control
Labels:
calendar
event
widget
spongecell
website
api
ruby
rails
ActiveResource
plugin