pokonski/public_activity — pull request #50 by GuilhermeSimoes (2013-01-02 18:42:09+00:00)
Title: :only and :except options can now take a single symbol as an argument

This is a really small patch so you can use the `only` and `except` options with a symbol like you can in the `routes.rb` file:

resources :users, only: :show

I had some trouble running the tests because of the `001_create_activities.rb` file. I got this huge error:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': C:/.../public_activity/test/migrations/001_create_activities.rb:1: syntax error, unexpected tDOT2 (SyntaxError)
../../lib/generators/public_activity/migration/templates/migration.rb
^
C:/.../public_activity/test/migrations/001_create_activities.rb:1: unknown regexp options - lb
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:537:in `load_migration'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:533:in `migration'
from C:in `migrate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:775:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:775:in `block in ddl_transaction'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/transactions.rb:208:in `transaction'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:775:in `ddl_transaction'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:719:in `block in migrate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:700:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:700:in `migrate'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:570:in `up'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.9/lib/active_record/migration.rb:551:in `migrate'
from C:/.../public_activity/test/test_helper.rb:23:in `'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/.../public_activity/test/test_activist.rb:1:in `'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:15:in `block in

'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:4:in `select'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:4:in `

'
rake aborted!
Command failed with status (1): [ruby -I"lib;test" -I"C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib" "C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/
rake/rake_test_loader.rb" "test/test_activist.rb" "test/test_activity.rb" "test/test_common.rb" "test/test_controller_integration.rb" "test/test_generators.rb"
"test/test_helper.rb" "test/test_tracking.rb" "test/test_view_helpers.rb" ]

I tried to fix it but I just couldn't find a way to do it. So I simply solved the problem by copying the contents of the migration located in `/lib/generators/public_activity/migration/templates/migration.rb` into the `001_create_activities.rb`. The tests then passed so I also added 2 more tests to test this patch.

This is the first time I send a pull request so bear with me. I noticed you have several branches but I didn't know where to send the pull request so I just left it to the default master branch. If there's anything I can do to make this better, please say it.