diff --git a/CHANGELOG b/CHANGELOG
index 18b4288..2bc1ec4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -187,7 +187,7 @@
# runs the one statement 10 times
script/benchmarker 10 'Person.expensive_method(10)'
-
+
# pits the two statements against each other with 50 runs each
script/benchmarker 50 'Person.expensive_method(10)' 'Person.cheap_method(10)'
@@ -227,18 +227,18 @@
* Changed .htaccess to allow dispatch.* to be called from a sub-directory as part of the push with Action Pack to make Rails work on non-vhost setups #826 [Nicholas Seckar/Tobias Luetke]
* Added script/runner which can be used to run code inside the environment by eval'ing the first parameter. Examples:
-
+
./script/runner 'ReminderService.deliver'
./script/runner 'Mailer.receive(STDIN.read)'
-
+
This makes it easier to do CRON and postfix scripts without actually making a script just to trigger 1 line of code.
* Fixed webrick_server cookie handling to allow multiple cookes to be set at once #800, #813 [dave@cherryville.org]
* Fixed the Rakefile's interaction with postgresql to:
- 1. Use PGPASSWORD and PGHOST in the environment to fix prompting for
- passwords when connecting to a remote db and local socket connections.
+ 1. Use PGPASSWORD and PGHOST in the environment to fix prompting for
+ passwords when connecting to a remote db and local socket connections.
2. Add a '-x' flag to pg_dump which stops it dumping privileges #807 [rasputnik]
3. Quote the user name and use template0 when dumping so the functions doesn't get dumped too #855 [pburleson]
4. Use the port if available #875 [madrobby]
@@ -301,10 +301,10 @@
Controller: components/list/items_controller.rb
(holds a List::ItemsController class with uses_component_template_root called)
-
+
Model : components/list/item.rb
(namespace is still shared, so an Item model in app/models will take precedence)
-
+
Views : components/list/items/show.rhtml
@@ -397,11 +397,11 @@
* Fixed dependency management to happen in a unified fashion for Active Record and Action Pack using the new Dependencies module. This means that
the environment options needs to change from:
-
+
Before in development.rb:
ActionController::Base.reload_dependencies = true
ActiveRecord::Base.reload_associations = true
-
+
Now in development.rb:
Dependencies.mechanism = :load
@@ -455,41 +455,41 @@
* Added breakpoint support through the script/breakpointer client. This means that you can break out of execution at any point in
the code, investigate and change the model, AND then resume execution! Example:
-
+
class WeblogController < ActionController::Base
def index
@posts = Post.find_all
breakpoint "Breaking out from the list"
end
end
-
- So the controller will accept the action, run the first line, then present you with a IRB prompt in the breakpointer window.
+
+ So the controller will accept the action, run the first line, then present you with a IRB prompt in the breakpointer window.
Here you can do things like:
-
+
Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint'
>> @posts.inspect
- => "[#nil, \"body\"=>nil, \"id\"=>\"1\"}>,
+ => "[#nil, \"body\"=>nil, \"id\"=>\"1\"}>,
#\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
>> @posts.first.title = "hello from a breakpoint"
=> "hello from a breakpoint"
...and even better is that you can examine how your runtime objects actually work:
- >> f = @posts.first
+ >> f = @posts.first
=> #nil, "body"=>nil, "id"=>"1"}>
>> f.
Display all 152 possibilities? (y or n)
-
+
Finally, when you're ready to resume execution, you press CTRL-D
* Changed environments to be configurable through an environment variable. By default, the environment is "development", but you
can change that and set your own by configuring the Apache vhost with a string like (mod_env must be available on the server):
-
+
SetEnv RAILS_ENV production
-
+
...if you're using WEBrick, you can pick the environment to use with the command-line parameters -e/--environment, like this:
-
+
ruby public/dispatcher.servlet -e production
* Added a new default environment called "development", which leaves the production environment to be tuned exclusively for that.
@@ -504,11 +504,11 @@
app/controllers/account_controller.rb # URL: /account/
app/controllers/admin/account_controller.rb # URL: /admin/account/
-
+
NOTE: You need to update your public/.htaccess with the new rules to pick it up
-* Added reloading for associations and dependencies under cached environments like FastCGI and mod_ruby. This makes it possible to use
- those environments for development. This is turned on by default, but can be turned off with
+* Added reloading for associations and dependencies under cached environments like FastCGI and mod_ruby. This makes it possible to use
+ those environments for development. This is turned on by default, but can be turned off with
ActiveRecord::Base.reload_associations = false and ActionController::Base.reload_dependencies = false in production environments.
* Added support for sub-directories in app/models. So now you can have something like Basecamp with:
@@ -517,7 +517,7 @@
app/models/project
app/models/participants
app/models/settings
-
+
It's poor man's namespacing, but only for file-system organization. You still require files just like before.
Nothing changes inside the files themselves.
@@ -537,7 +537,7 @@
@david.projects << @new_project
breakpoint "Let's have a closer look at @david"
end
-
+
You need to install dev-utils yourself for this to work ("gem install dev-util").
* Added shared generator behavior so future upgrades should be possible without manually copying over files [Jeremy Kemper]
@@ -596,7 +596,7 @@
*0.7.0*
-* Added an optional second argument to the new_model script that allows the programmer to specify the table name,
+* Added an optional second argument to the new_model script that allows the programmer to specify the table name,
which will used to generate a custom table_name method in the model and will also be used in the creation of fixtures.
[Kevin Radloff]
@@ -610,8 +610,8 @@
* create_fixtures in both the functional and unit test helper now turns off the log during fixture generation
and can generate more than one fixture at a time. Which makes it possible for assignments like:
-
- @people, @projects, @project_access, @companies, @accounts =
+
+ @people, @projects, @project_access, @companies, @accounts =
create_fixtures "people", "projects", "project_access", "companies", "accounts"
* Upgraded to Action Pack 0.8.5 (locally-scoped variables, partials, advanced send_file)
@@ -623,7 +623,7 @@
* No longer specifies a template for rdoc, so it'll use whatever is default (you can change it in the rakefile)
-* The new_model generator will now use the same rules for plural wordings as Active Record
+* The new_model generator will now use the same rules for plural wordings as Active Record
(so Category will give categories, not categorys) [Kevin Radloff]
* dispatch.fcgi now sets FCGI_PURE_RUBY to true to ensure that it's the Ruby version that's loaded [danp]
@@ -649,13 +649,13 @@
* Added environments that can be included from any script to get the full Active Record and Action Controller
context running. This can be used by maintenance scripts or to interact with the model through IRB. Example:
-
+
require 'config/environments/production'
-
+
for account in Account.find_all
account.recalculate_interests
end
-
+
A short migration script for an account model that had it's interest calculation strategy changed.
* Accessing the index of a controller with "/weblog" will now redirect to "/weblog/" (only on Apache, not WEBrick)
@@ -678,7 +678,7 @@
* Added lib in root as a place to store app specific libraries
-* Added lib and vendor to load_path, so anything store within can be loaded directly.
+* Added lib and vendor to load_path, so anything store within can be loaded directly.
Hence lib/redcloth.rb can be loaded with require "redcloth"
* Upgraded to Action Pack 0.7.8 (lots of fixes)
@@ -692,7 +692,7 @@
* Updated the generated template stubs to valid XHTML files
-* Ensure that controllers generated are capitalized, so "new_controller TodoLists"
+* Ensure that controllers generated are capitalized, so "new_controller TodoLists"
gives the same as "new_controller Todolists" and "new_controller todolists".
diff --git a/README b/README
index 934d835..2a02bf0 100644
--- a/README
+++ b/README
@@ -1,18 +1,18 @@
Cat Herder (source code to pdxruby.org)
-This application was written way back in late 2005 at a group hackfest hosted
+This application was written way back in late 2005 at a group hackfest hosted
by the Portland Ruby Brigade. We wanted a way to propose and RSVP for events
-without requiring any particular person or group to manage a calendar for
-everyone else.
+without requiring any particular person or group to manage a calendar for
+everyone else.
-Anyone can register for an account, propose an event, and sign up to attend
+Anyone can register for an account, propose an event, and sign up to attend
other people's events. There is also some basic support for aggregation of
members' RSS feeds, and feedback from event participants, but the primary use
of the system is still as a simple event calendar.
-The file doc/TODO contains a few miscellaneous items we've thought about
+The file doc/TODO contains a few miscellaneous items we've thought about
changing over the years, but overall this whole codebase is probably of more
interest as a historical oddity than as a useful application for other people
to use. It uses a mish-mash of APIs, coding styles, and tests contributed by
-about a dozen different maintainers over the last three years, and certainly
+about a dozen different maintainers over the last three years, and certainly
shows its age when compared to a shiny new legacy-free Rails 2 application.
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index 04823c8..5a48f8f 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -19,7 +19,7 @@ def authenticate
def authenticated?
session[:member] && Member.find(session[:member].id)
end
-
+
# check to see if the currently authenticated member is
# the member with the given id
def member_is_this_member?(id)
diff --git a/app/models/event.rb b/app/models/event.rb
index 2f69432..9f384ac 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -20,60 +20,60 @@ class Event < ActiveRecord::Base
validates_each :status do |rec,attr|
rec.errors.add attr, 'that status is not one I know about' unless EVENT_STATUS.has_value? rec.send(attr)
end
-
+
# make sure the start time is in the future (unless it is already past)
validates_each :starts_at do |rec, attr|
unless rec.ends_at.nil? || rec.ends_at < Time.now
rec.errors.add attr, 'must be later than now' if rec.starts_at && rec.starts_at < Time.now
end
end
-
+
# make sure the end time is later than the start time (i.e. interval is positive)
validates_each :ends_at do |rec, attr|
rec.errors.add attr, 'must be later than start time' if rec.starts_at && rec.ends_at && rec.ends_at < rec.starts_at
end
-
+
def cancelled?
self.status == EVENT_STATUS[:canceled]
end
-
+
def cancel!
self.status = EVENT_STATUS[:canceled]
end
-
+
def active?
self.status == EVENT_STATUS[:active]
end
-
+
def active!
self.status = EVENT_STATUS[:active]
end
-
+
def has_participant(member)
self.participants.map {|p| p.member }.member?(member)
end
-
+
def started?
self.starts_at < Time.now
end
-
+
def ended?
self.ends_at < Time.now
end
-
+
def feedbacks
self.participants.map {|p| p.feedbacks }.flatten
end
-
+
def unclaimed?
nil == self.member
end
-
+
def Event.find_upcoming(limit=10)
- find(:all, :limit => limit, :order => 'starts_at desc',
+ find(:all, :limit => limit, :order => 'starts_at desc',
:conditions => ['starts_at > ? and status = ?', Time.now, EVENT_STATUS[:active]])
end
-
+
def Event.find_recent(limit=10)
find(:all, :limit => limit, :order => 'ends_at desc')
find(:all, :limit => limit, :order => 'ends_at desc',
diff --git a/app/models/mail_bot.rb b/app/models/mail_bot.rb
index 90c0fde..fe91ece 100644
--- a/app/models/mail_bot.rb
+++ b/app/models/mail_bot.rb
@@ -1,9 +1,9 @@
class MailBot < ActionMailer::Base
SITE_FROM_ADDRESS = 'noreply@pdxruby.org'
SUBJECT_PREFIX = '[pdxruby] '
-
+
helper ActionView::Helpers::UrlHelper
-
+
# New user signup message
def signup_message(ctrl, member)
self.site_headers(member, "Account signup")
@@ -21,43 +21,43 @@ def feedback_message(ctrl, event)
self.site_headers(event.member, "Feedback added for event #{event.name}")
@body = { :controller => ctrl, :event => event }
end
-
+
# Notify all event participants of changes to event details
def change_message(ctrl, event)
rcpt = event.participants.map {|p| p.member}
self.site_headers(rcpt, "Event #{event.name} details changed")
@body = { :controller => ctrl, :event => event }
end
-
+
# Notify all event participants of event cancellation
def cancel_message(ctrl, event)
rcpt = event.participants.map {|p| p.member}
self.site_headers(rcpt, "Event #{event.name} has been cancelled")
@body = { :controller => ctrl, :event => event }
end
-
+
# Notify event owner of RSVP for their event
def rsvp_message(ctrl, participant)
event = participant.event
self.site_headers(event.member, "New participant signup for event #{event.name}")
@body = { :controller => ctrl, :participant => participant }
end
-
+
# Notify event owner of new feedback
def feedback_message(ctrl, feedback)
event = feedback.participant.event
self.site_headers(event.member, "New feedback for event #{event.name}")
@body = { :controller => ctrl, :feedback => feedback }
end
-
- # the deliver_new_event_message method should be called seperately for
+
+ # the deliver_new_event_message method should be called seperately for
# each site member (i.e., within a Member.find(:all) { ... } block) to
# avoid exposing all member email addresses
def new_event_message(ctrl, member, event)
self.site_headers(member, "New event created")
@body = { :controller => ctrl, :event => event, :member => member }
end
-
+
def site_headers(rcpt, subj)
@recipients = rcpt.respond_to?(:map) ? rcpt.map {|m| m.email } : rcpt.email
@from = SITE_FROM_ADDRESS
diff --git a/app/models/member.rb b/app/models/member.rb
index adf8018..3abca2e 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -1,11 +1,11 @@
class Member < ActiveRecord::Base
attr_accessor :image_file
-
+
has_many :events
has_many :participants
-
+
before_save :encrypt_password
-
+
validates_presence_of :name
validates_presence_of :email
validates_presence_of :password, :on => :create
@@ -18,26 +18,26 @@ class Member < ActiveRecord::Base
validates_length_of :email, :maximum => 128
validates_length_of :feed_url, :maximum => 256, :allow_nil => true
validates_length_of :irc_nick, :maximum => 128, :allow_nil => true
-
- validates_confirmation_of :password,
+
+ validates_confirmation_of :password,
:message => "should match confirmation", :on => :create
-
+
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
- validates_format_of :feed_url,
- :with => Regexp.new(RE::URL),
+ validates_format_of :feed_url,
+ :with => Regexp.new(RE::URL),
:allow_nil => true,
:if => Proc.new {|member| !member.feed_url.empty?}
-
+
# Encrypts some data with the salt.
def encrypt(password)
Digest::SHA1.hexdigest(password)
end
-
+
def compare_password(supplied_password)
encrypted_password = encrypt(supplied_password)
return (self.password == encrypt_password)
end
-
+
def reset_password
srand
chars = (0..9).to_a + ('A'..'Z').to_a + ('a'..'z').to_a
@@ -45,9 +45,9 @@ def reset_password
self.password = tmp_pass
return tmp_pass
end
-
+
private
-
+
def encrypt_password
self.password = encrypt(password)
end
diff --git a/app/views/events/_feedback.rhtml b/app/views/events/_feedback.rhtml
index 2423b2b..79280ba 100644
--- a/app/views/events/_feedback.rhtml
+++ b/app/views/events/_feedback.rhtml
@@ -1,6 +1,6 @@
pdx.rb is a gathering of Ruby programmers in the Portland, Oregon, area.
-
-
+
+
Join us! We don't bite!
-
-
We meet the first Tuesday (think Ruby Tuesday!) of every month from 7–10pm at
+
+
We meet the first Tuesday (think Ruby Tuesday!) of every month from 7–10pm at
CubeSpace (622 SE Grand Ave., Portland OR [map]).
Our next monthly meeting is on <%= Date.today + (0..34).find{ |i| d = Date.today + i and d.cwday == 2 and d.day <= 7 } %>.
-
+
This website is a small Ruby on Rails application that we have developed to keep track of events. You might start by creating an account. We have an online calendar you can subscribe to (here’s an alternative http: link if you need it). If you want to add an event, log in and add one.
-
You can join the
+
You can join the
Google Group.
You can also see the gmane archives of our old, now-inactive mailing list here.
-
+
Robby Russell and Planet Argon for kindly serving up this site.
diff --git a/app/views/mail_bot/cancel_message.rhtml b/app/views/mail_bot/cancel_message.rhtml
index c29e86b..f391ef8 100644
--- a/app/views/mail_bot/cancel_message.rhtml
+++ b/app/views/mail_bot/cancel_message.rhtml
@@ -9,5 +9,5 @@ You can create a new event at the following location:
:action => 'new',
:only_path => false %>
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
\ No newline at end of file
diff --git a/app/views/mail_bot/change_message.rhtml b/app/views/mail_bot/change_message.rhtml
index 9975787..edfd561 100644
--- a/app/views/mail_bot/change_message.rhtml
+++ b/app/views/mail_bot/change_message.rhtml
@@ -4,10 +4,10 @@ You signed up to participate in <%= @event.name %>. That event's organizer,
You should double-check the new details, and update your participation status
if necessary:
-<%= url_for :controller => 'events',
- :action => 'show',
- :id => @event.id,
+<%= url_for :controller => 'events',
+ :action => 'show',
+ :id => @event.id,
:only_path => false %>
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
\ No newline at end of file
diff --git a/app/views/mail_bot/feedback_message.rhtml b/app/views/mail_bot/feedback_message.rhtml
index 64845a8..e3e42df 100644
--- a/app/views/mail_bot/feedback_message.rhtml
+++ b/app/views/mail_bot/feedback_message.rhtml
@@ -1,17 +1,17 @@
-<%
+<%
member = @feedback.participant.member
-event = @feedback.participant.event
+event = @feedback.participant.event
%><%= member.email %> has left the following feedback for your event <%= event.name %>:
<%= @feedback.feedback %>
-You can view other feedback for your event, as well as other details, at the
+You can view other feedback for your event, as well as other details, at the
following location:
-<%= url_for :controller => 'events',
- :action => 'show',
- :id => event.id,
+<%= url_for :controller => 'events',
+ :action => 'show',
+ :id => event.id,
:only_path => false %>
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
\ No newline at end of file
diff --git a/app/views/mail_bot/new_event_message.rhtml b/app/views/mail_bot/new_event_message.rhtml
index 5043579..a863831 100644
--- a/app/views/mail_bot/new_event_message.rhtml
+++ b/app/views/mail_bot/new_event_message.rhtml
@@ -1,11 +1,11 @@
There's a new event being organized on pdxruby.org:
-<%= url_for :controller => 'events',
- :action => 'show',
- :id => event.id,
+<%= url_for :controller => 'events',
+ :action => 'show',
+ :id => event.id,
:only_path => false %>
Check it out, and sign up if you're interested.
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
\ No newline at end of file
diff --git a/app/views/mail_bot/reset_password.rhtml b/app/views/mail_bot/reset_password.rhtml
index cc0d54a..d835205 100644
--- a/app/views/mail_bot/reset_password.rhtml
+++ b/app/views/mail_bot/reset_password.rhtml
@@ -13,5 +13,5 @@ temporary security hole.
Happy hacking,
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
diff --git a/app/views/mail_bot/rsvp_message.rhtml b/app/views/mail_bot/rsvp_message.rhtml
index 98c1ebd..9fac193 100644
--- a/app/views/mail_bot/rsvp_message.rhtml
+++ b/app/views/mail_bot/rsvp_message.rhtml
@@ -1,17 +1,17 @@
-<%
+<%
member = @participant.member
-event = @participant.event
+event = @participant.event
%><%= member.email %> has signed up to attend your event <%= event.name %>:
<%= @participant.comments %>
-You can view other participants for your event, as well as other details, at the
+You can view other participants for your event, as well as other details, at the
following location:
-<%= url_for :controller => 'events',
- :action => 'show',
- :id => event.id,
+<%= url_for :controller => 'events',
+ :action => 'show',
+ :id => event.id,
:only_path => false %>
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
\ No newline at end of file
diff --git a/app/views/mail_bot/signup_message.rhtml b/app/views/mail_bot/signup_message.rhtml
index a834691..a02373a 100644
--- a/app/views/mail_bot/signup_message.rhtml
+++ b/app/views/mail_bot/signup_message.rhtml
@@ -11,5 +11,5 @@ You can edit your profile at the following location:
Happy hacking,
-The PDX.rb Crew
+The PDX.rb Crew
http://www.pdxruby.org/
diff --git a/app/views/members/list.rhtml b/app/views/members/list.rhtml
index 76fa27c..5aa1669 100644
--- a/app/views/members/list.rhtml
+++ b/app/views/members/list.rhtml
@@ -6,7 +6,7 @@
Email
-
+
<% for member in @members %>
<%= member.name %>
diff --git a/app/views/members/login.rhtml b/app/views/members/login.rhtml
index 8aa856c..0cfaa9a 100644
--- a/app/views/members/login.rhtml
+++ b/app/views/members/login.rhtml
@@ -7,5 +7,5 @@
<% end %>
<% form_for :member, @member, :url => "/reset" do |f| %>
-
+
<% end %>
\ No newline at end of file
diff --git a/app/views/members/show.rhtml b/app/views/members/show.rhtml
index 9eb172c..368aef4 100644
--- a/app/views/members/show.rhtml
+++ b/app/views/members/show.rhtml
@@ -33,11 +33,11 @@
else
@participations.each do |participation|
%>
- <%= link_to participation.event.name, :controller => "events", :action => "show",
+ <%= link_to participation.event.name, :controller => "events", :action => "show",
:id => participation.event.id %> at <%= participation.event.starts_at %>
(<%= participation.attending %>)
<%= if @member.id == session[:member].id
- link_to '[change]', :controller => "participants", :action => "edit", :id => participation.id
+ link_to '[change]', :controller => "participants", :action => "edit", :id => participation.id
end
%>
diff --git a/app/views/members/update.rhtml b/app/views/members/update.rhtml
index e920a9c..f74a0ea 100644
--- a/app/views/members/update.rhtml
+++ b/app/views/members/update.rhtml
@@ -1,4 +1,4 @@
-<% form_for :member, @member,
+<% form_for :member, @member,
:html => { :multipart => true } do |f| %>
<% f.fieldset :legend => 'Profile' do |s| %>
<%= error_messages_for 'member' %>
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index 09158b8..5261cd1 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.
-# Add new inflection rules using the following format
+# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
diff --git a/config/routes.rb b/config/routes.rb
index 3c8d91c..72f0360 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,13 +1,13 @@
ActionController::Routing::Routes.draw do |map|
# Add your own custom routes here.
# The priority is based upon order of creation: first created -> highest priority.
-
+
map.home '/', :controller => "index", :action => "index"
-
+
map.login '/login', :controller => "members", :action => "login"
map.logout '/logout', :controller => "members", :action => "logout"
map.reset '/reset', :controller => "members", :action => "reset"
-
+
map.connect '', :controller => "index", :action => "index"
# Allow downloading Web Service WSDL as a file with an extension
diff --git a/db/schema.rb b/db/schema.rb
index 92bdee8..0b21fff 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1,4 +1,4 @@
-# This file is auto-generated from the current state of the database. Instead of editing this file,
+# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
#
diff --git a/doc/IDEAS b/doc/IDEAS
index 08c098c..441814f 100644
--- a/doc/IDEAS
+++ b/doc/IDEAS
@@ -13,7 +13,7 @@ _Community Stuff_
- del.icio.us/simpy aggregator. Let members share their del username
and fetch certain tags
-
+
- provide an rss feed of our aggregated/combined feed data
- provide an rss feed of events, and maybe an rss feed for
@@ -29,7 +29,7 @@ _Community Stuff_
- It would be nice if the feeds could be moderated by people. If one
person posts a bunch of off-topic entries, then the last 5 isn't very
- Ruby-based. Currently, a user can delete his or her own articles,
+ Ruby-based. Currently, a user can delete his or her own articles,
which is probably good-enough for a little while.
- Perhaps a field should be added to the articles relation
that contains the number of 'nay' votes. When some threshold
diff --git a/doc/POSTGRESQL b/doc/POSTGRESQL
index cac81e5..57e3808 100644
--- a/doc/POSTGRESQL
+++ b/doc/POSTGRESQL
@@ -58,15 +58,15 @@ Then your database.yml would be roughly:
host: /tmp/pdxruby_socket
user: yourusername
password: itdoesntmatter
-
+
development:
database: pdxruby_dev
<<: *login
-
+
test:
database: pdxruby_test
<<: *login
-
+
production:
database: pdxruby_production
<<: *login
diff --git a/doc/TODO b/doc/TODO
index 6bebead..ef74274 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -2,13 +2,13 @@
Notes:
-1) If you complete one of these, please remove it from the list.
+1) If you complete one of these, please remove it from the list.
-2) If you want to "claim" a task (i.e. you plan on doing it shortly),
+2) If you want to "claim" a task (i.e. you plan on doing it shortly),
put your name in [square brackets] at the end of the event.
_Spamming_
-
+
- All members are notified of new events
- Event organizer isn't notified when they sign up for the event
@@ -33,11 +33,11 @@ _Cosmetic_
- Upcoming events should be ordered ASC (i.e. more soon things on top)
- - Make timestamps prettier (this and following 2 items
+ - Make timestamps prettier (this and following 2 items
suggested by bleything on dev-list)
- Article list enhancements (sort by author, etc.)
_Testing_
-
+
- write functional tests for application.rb
diff --git a/lib/authenticated_test_helper.rb b/lib/authenticated_test_helper.rb
index 446af91..ad3e4db 100644
--- a/lib/authenticated_test_helper.rb
+++ b/lib/authenticated_test_helper.rb
@@ -17,7 +17,7 @@ def assert_requires_login(member = nil, &block)
end
# Assert the block accepts the login
- #
+ #
# assert_accepts_login(:bob) { get :edit, :id => 1 }
#
# Accepts anonymous logins:
diff --git a/lib/tasks/agiledox.rake b/lib/tasks/agiledox.rake
index 2298d80..07e61d0 100644
--- a/lib/tasks/agiledox.rake
+++ b/lib/tasks/agiledox.rake
@@ -3,12 +3,12 @@ task :agiledox do
tests = FileList['test/**/*_test.rb']
tests.each do |file|
m = %r".*/([^/].*)_test.rb".match(file)
- puts m[1]+" should:\n"
+ puts m[1]+" should:\n"
test_definitions = File::readlines(file).select {|line| line =~ /.*def test.*/}
test_definitions.each do |definition|
m = %r"test_(should_)?(.*)".match(definition)
puts " - "+m[2].gsub(/_/," ")
end
- puts "\n"
+ puts "\n"
end
end
\ No newline at end of file
diff --git a/public/.htaccess b/public/.htaccess
index d9d211c..1d37bd9 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -5,14 +5,14 @@ Options +FollowSymLinks +ExecCGI
# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
-#
+#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]
# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
-#
+#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
@@ -33,7 +33,7 @@ RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
-#
+#
# Example:
# ErrorDocument 500 /500.html
diff --git a/public/javascripts/controls.js b/public/javascripts/controls.js
index fbc4418..88f74a9 100644
--- a/public/javascripts/controls.js
+++ b/public/javascripts/controls.js
@@ -5,18 +5,18 @@
// Richard Livsey
// Rahul Bhargava
// Rob Wills
-//
+//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
-// Autocompleter.Base handles all the autocompletion functionality
+// Autocompleter.Base handles all the autocompletion functionality
// that's independent of the data source for autocompletion. This
// includes drawing the autocompletion menu, observing keyboard
// and mouse events, and similar.
//
-// Specific autocompleters need to provide, at the very least,
+// Specific autocompleters need to provide, at the very least,
// a getUpdatedChoices function that will be invoked every time
-// the text inside the monitored textbox changes. This method
+// the text inside the monitored textbox changes. This method
// should get the text for which to provide autocompletion by
// invoking this.getToken(), NOT by directly accessing
// this.element.value. This is to allow incremental tokenized
@@ -30,8 +30,8 @@
// will incrementally autocomplete with a comma as the token.
// Additionally, ',' in the above example can be replaced with
// a token array, e.g. { tokens: [',', '\n'] } which
-// enables autocompletion on multiple tokens. This is most
-// useful when one of the tokens is \n (a newline), as it
+// enables autocompletion on multiple tokens. This is most
+// useful when one of the tokens is \n (a newline), as it
// allows smart autocompletion after linebreaks.
if(typeof Effect == 'undefined')
@@ -41,12 +41,12 @@ var Autocompleter = { }
Autocompleter.Base = Class.create({
baseInitialize: function(element, update, options) {
element = $(element)
- this.element = element;
- this.update = $(update);
- this.hasFocus = false;
- this.changed = false;
- this.active = false;
- this.index = 0;
+ this.element = element;
+ this.update = $(update);
+ this.hasFocus = false;
+ this.changed = false;
+ this.active = false;
+ this.index = 0;
this.entryCount = 0;
this.oldElementValue = this.element.value;
@@ -59,28 +59,28 @@ Autocompleter.Base = Class.create({
this.options.tokens = this.options.tokens || [];
this.options.frequency = this.options.frequency || 0.4;
this.options.minChars = this.options.minChars || 1;
- this.options.onShow = this.options.onShow ||
- function(element, update){
+ this.options.onShow = this.options.onShow ||
+ function(element, update){
if(!update.style.position || update.style.position=='absolute') {
update.style.position = 'absolute';
Position.clone(element, update, {
- setHeight: false,
+ setHeight: false,
offsetTop: element.offsetHeight
});
}
Effect.Appear(update,{duration:0.15});
};
- this.options.onHide = this.options.onHide ||
+ this.options.onHide = this.options.onHide ||
function(element, update){ new Effect.Fade(update,{duration:0.15}) };
- if(typeof(this.options.tokens) == 'string')
+ if(typeof(this.options.tokens) == 'string')
this.options.tokens = new Array(this.options.tokens);
// Force carriage returns as token delimiters anyway
if (!this.options.tokens.include('\n'))
this.options.tokens.push('\n');
this.observer = null;
-
+
this.element.setAttribute('autocomplete','off');
Element.hide(this.update);
@@ -91,10 +91,10 @@ Autocompleter.Base = Class.create({
show: function() {
if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
- if(!this.iefix &&
+ if(!this.iefix &&
(Prototype.Browser.IE) &&
(Element.getStyle(this.update, 'position')=='absolute')) {
- new Insertion.After(this.update,
+ new Insertion.After(this.update,
'');
@@ -102,7 +102,7 @@ Autocompleter.Base = Class.create({
}
if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
},
-
+
fixIEOverlapping: function() {
Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
this.iefix.style.zIndex = 1;
@@ -150,15 +150,15 @@ Autocompleter.Base = Class.create({
Event.stop(event);
return;
}
- else
- if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
+ else
+ if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
(Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
this.changed = true;
this.hasFocus = true;
if(this.observer) clearTimeout(this.observer);
- this.observer =
+ this.observer =
setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
},
@@ -170,35 +170,35 @@ Autocompleter.Base = Class.create({
onHover: function(event) {
var element = Event.findElement(event, 'LI');
- if(this.index != element.autocompleteIndex)
+ if(this.index != element.autocompleteIndex)
{
this.index = element.autocompleteIndex;
this.render();
}
Event.stop(event);
},
-
+
onClick: function(event) {
var element = Event.findElement(event, 'LI');
this.index = element.autocompleteIndex;
this.selectEntry();
this.hide();
},
-
+
onBlur: function(event) {
// needed to make click events working
setTimeout(this.hide.bind(this), 250);
this.hasFocus = false;
- this.active = false;
- },
-
+ this.active = false;
+ },
+
render: function() {
if(this.entryCount > 0) {
for (var i = 0; i < this.entryCount; i++)
- this.index==i ?
- Element.addClassName(this.getEntry(i),"selected") :
+ this.index==i ?
+ Element.addClassName(this.getEntry(i),"selected") :
Element.removeClassName(this.getEntry(i),"selected");
- if(this.hasFocus) {
+ if(this.hasFocus) {
this.show();
this.active = true;
}
@@ -207,27 +207,27 @@ Autocompleter.Base = Class.create({
this.hide();
}
},
-
+
markPrevious: function() {
if(this.index > 0) this.index--
else this.index = this.entryCount-1;
this.getEntry(this.index).scrollIntoView(true);
},
-
+
markNext: function() {
if(this.index < this.entryCount-1) this.index++
else this.index = 0;
this.getEntry(this.index).scrollIntoView(false);
},
-
+
getEntry: function(index) {
return this.update.firstChild.childNodes[index];
},
-
+
getCurrentEntry: function() {
return this.getEntry(this.index);
},
-
+
selectEntry: function() {
this.active = false;
this.updateElement(this.getCurrentEntry());
@@ -244,7 +244,7 @@ Autocompleter.Base = Class.create({
if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
} else
value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
-
+
var bounds = this.getTokenBounds();
if (bounds[0] != -1) {
var newValue = this.element.value.substr(0, bounds[0]);
@@ -257,7 +257,7 @@ Autocompleter.Base = Class.create({
}
this.oldElementValue = this.element.value;
this.element.focus();
-
+
if (this.options.afterUpdateElement)
this.options.afterUpdateElement(this.element, selectedElement);
},
@@ -269,20 +269,20 @@ Autocompleter.Base = Class.create({
Element.cleanWhitespace(this.update.down());
if(this.update.firstChild && this.update.down().childNodes) {
- this.entryCount =
+ this.entryCount =
this.update.down().childNodes.length;
for (var i = 0; i < this.entryCount; i++) {
var entry = this.getEntry(i);
entry.autocompleteIndex = i;
this.addObservers(entry);
}
- } else {
+ } else {
this.entryCount = 0;
}
this.stopIndicator();
this.index = 0;
-
+
if(this.entryCount==1 && this.options.autoSelect) {
this.selectEntry();
this.hide();
@@ -298,7 +298,7 @@ Autocompleter.Base = Class.create({
},
onObserverEvent: function() {
- this.changed = false;
+ this.changed = false;
this.tokenBounds = null;
if(this.getToken().length>=this.options.minChars) {
this.getUpdatedChoices();
@@ -351,16 +351,16 @@ Ajax.Autocompleter = Class.create(Autocompleter.Base, {
getUpdatedChoices: function() {
this.startIndicator();
-
- var entry = encodeURIComponent(this.options.paramName) + '=' +
+
+ var entry = encodeURIComponent(this.options.paramName) + '=' +
encodeURIComponent(this.getToken());
this.options.parameters = this.options.callback ?
this.options.callback(this.element, entry) : entry;
- if(this.options.defaultParams)
+ if(this.options.defaultParams)
this.options.parameters += '&' + this.options.defaultParams;
-
+
new Ajax.Request(this.url, this.options);
},
@@ -382,7 +382,7 @@ Ajax.Autocompleter = Class.create(Autocompleter.Base, {
// - choices - How many autocompletion choices to offer
//
// - partialSearch - If false, the autocompleter will match entered
-// text only at the beginning of strings in the
+// text only at the beginning of strings in the
// autocomplete array. Defaults to true, which will
// match text at the beginning of any *word* in the
// strings in the autocomplete array. If you want to
@@ -399,7 +399,7 @@ Ajax.Autocompleter = Class.create(Autocompleter.Base, {
// - ignoreCase - Whether to ignore case when autocompleting.
// Defaults to true.
//
-// It's possible to pass in a custom function as the 'selector'
+// It's possible to pass in a custom function as the 'selector'
// option, if you prefer to write your own autocompletion logic.
// In that case, the other options above will not apply unless
// you support them.
@@ -427,20 +427,20 @@ Autocompleter.Local = Class.create(Autocompleter.Base, {
var entry = instance.getToken();
var count = 0;
- for (var i = 0; i < instance.options.array.length &&
- ret.length < instance.options.choices ; i++) {
+ for (var i = 0; i < instance.options.array.length &&
+ ret.length < instance.options.choices ; i++) {
var elem = instance.options.array[i];
- var foundPos = instance.options.ignoreCase ?
- elem.toLowerCase().indexOf(entry.toLowerCase()) :
+ var foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase()) :
elem.indexOf(entry);
while (foundPos != -1) {
- if (foundPos == 0 && elem.length != entry.length) {
- ret.push("