integrity/integrity — pull request #129 by richmeyers (2011-10-18 03:02:02+00:00)
Title: Do not delete config keys in notifiers.

When config is passed in as a hash variable, deleting keys affects said varaible in the caller. If multiple notifiers are instantiated with the same config, deleting keys has the effect of subsequent notifiers receiving only parts of the configuration (if any at all) and failing to operate.

Practically speaking this created the following errors:

4) Error:
test_Sending_the_notification_via_SMTP(EmailNotificationTest):
ArgumentError: :to is required
/usr/local/lib/ruby/vendor_ruby/1.8/pony.rb:125:in `mail'
lib/integrity/notifier/email.rb:24:in `deliver!'
./lib/integrity/notifier/base.rb:6:in `notify'
./lib/integrity/notifier/base.rb:71:in `log_and_notify_with_timeout'
/usr/local/lib/ruby/1.8/timeout.rb:62:in `timeout'
./lib/integrity/notifier/base.rb:71:in `log_and_notify_with_timeout'
./lib/integrity/notifier/base.rb:6:in `notify'
./lib/integrity/notifier.rb:23:in `notify'
./lib/integrity/build.rb:37:in `notify'
/usr/local/lib/ruby/vendor_ruby/1.8/dm-core/collection.rb:511:in `each'
/usr/local/lib/ruby/vendor_ruby/1.8/dm-core/support/lazy_array.rb:413:in `each'
/usr/local/lib/ruby/vendor_ruby/1.8/dm-core/support/lazy_array.rb:413:in `each'
/usr/local/lib/ruby/vendor_ruby/1.8/dm-core/collection.rb:508:in `each'
./lib/integrity/build.rb:37:in `notify'
./lib/integrity/builder.rb:42:in `notify'
./lib/integrity/builder.rb:17:in `build'
./lib/integrity/builder.rb:4:in `build'
./lib/integrity/build.rb:33:in `run!'
./test/helper/acceptance.rb:75:in `enqueue'
./lib/integrity/build.rb:29:in `run'
./lib/integrity/project.rb:44:in `build'
./lib/integrity/project.rb:34:in `build_head'
./lib/integrity/app.rb:117:in `POST /:project/builds'
...
./test/acceptance/email_notification_test.rb:42:in `test_Sending_the_notification_via_SMTP'

That error also was showing in actual use.

In my estimation the breakage possibly started sometime around when "start build" notifications were added, as they iterated over all notifiers in one place: 69d882554b35e931b352d821d9ad3cd1311d5c1a