Hi Glenn,
Thanks much for the feedback.
Is being Rails specific really that much of an issue? The name of the
repo does say it's a Rails plugin. And with Merb merging with Rails,
that covers the vast majority of production uses, really about
everything but Sinatra, unless I'm missing a dark horse. And Rails 3
will definitely require plugin rework across the whole ecosystem.
I agree with you on the JS case; my earlier message to Donald just
states my pragmatic viewpoint on it. I'd like to see it all
configurable ideally.
Regarding OAuth or another authorization solution -- doesn't this
imply that they wouldn't be using this plugin? Unless I'm missing
some key configuration, this plugin checks authorization no matter
what format is requested, but just always returns a redirect. If they
wanted to mix and match OAuth or something else with this plugin -- at
least, this plugin's declaritive controller filters -- they would need
two separate controllers. If they didn't use the controller filter
versions of "permit" (or if they did but separated formats via
routes), then they'd control where they tested for permissions with
the plugin, and their application would already handle the separate
cases.
I agree with you a test suite would be great. I try to follow TDD
almost to the letter, and teach all of my developers to, too. But the
test suite craps out on me pretty quick, which is an impediment for
any third party developers trying to improve the core. With Rails 2.3
it craps out on the application controller filename naturally, and
with 2.0.2 on my system it fails with the below error (after creating
and migrating the SQLite3 database without event). Could be my
environment, I'm not sure; I haven't tried to debug.
Anyway, thanks again for the feedback. I do hope at least the monkey
patch helps keep this plugin useful for more applications than just
plain HTML sites.
Cheers,
Ian
[16:52][ian@ian-terrells-macbook-pro:~/src/authorization/rails-
authorization-plugin-test(master)]$ rake test RAILS_GEM_VERSION=2.0.2
(in /Users/ian/src/authorization/rails-authorization-plugin-test)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -
I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb" "test/unit/group_test.rb" "test/unit/
meeting_test.rb" "test/unit/role_test.rb" "test/unit/user_test.rb"
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/
core_ext/hash/keys.rb:49:in `assert_valid_keys': Unknown key(s):
readonly (ArgumentError)
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/
active_record/associations.rb:1170:in `create_has_many_reflection'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/
active_record/associations.rb:667:in `has_many'
from /Users/ian/src/authorization/rails-authorization-plugin-test/
vendor/plugins/authorization/lib/publishare/object_roles_table.rb:
130:in `acts_as_authorizable'
from /Users/ian/src/authorization/rails-authorization-plugin-test/
app/models/user.rb:5
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
... 9 levels...
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5:in `load'
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5:in `each'
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -
I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb" "test/functional/account_controller_test.rb"
"test/functional/object_roles_controler_test.rb" "test/functional/
really_secure_controller_test.rb" "test/functional/
rest_controller_test.rb" "test/functional/secure_controller_test.rb"
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/
core_ext/hash/keys.rb:49:in `assert_valid_keys': Unknown key(s):
readonly (ArgumentError)
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/
active_record/associations.rb:1170:in `create_has_many_reflection'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/
active_record/associations.rb:667:in `has_many'
from /Users/ian/src/authorization/rails-authorization-plugin-test/
vendor/plugins/authorization/lib/publishare/object_roles_table.rb:
130:in `acts_as_authorizable'
from /Users/ian/src/authorization/rails-authorization-plugin-test/
app/models/user.rb:5
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
... 12 levels...
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:489:in `load'
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5:in `each'
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -
I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb" "test/integration/stories_test.rb"
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/
core_ext/hash/keys.rb:49:in `assert_valid_keys': Unknown key(s):
readonly (ArgumentError)
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/
active_record/associations.rb:1170:in `create_has_many_reflection'
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/
active_record/associations.rb:667:in `has_many'
from /Users/ian/src/authorization/rails-authorization-plugin-test/
vendor/plugins/authorization/lib/publishare/object_roles_table.rb:
130:in `acts_as_authorizable'
from /Users/ian/src/authorization/rails-authorization-plugin-test/
app/models/user.rb:5
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
... 9 levels...
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5:in `load'
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5:in `each'
from /Library/Ruby/Gems/1.8/gems/rake-0.8.5/lib/rake/
rake_test_loader.rb:5
Errors running test:units, test:functionals, and test:integration!