Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

readme update. describe task updated aggregate_by to name

  • Loading branch information...
commit 5da4174cb1fb96ab7b76476e07a320d1f0d5ed90 1 parent 5f951ed
@matthewvermaak authored
Showing with 11 additions and 9 deletions.
  1. +6 −4 README.rdoc
  2. +5 −5 tasks/sanction_tasks.rake
View
10 README.rdoc
@@ -51,6 +51,12 @@ After cloning / downloading, use:
This will stub out the config/initializers/sanction.rb used for configuration and will produce a migration for your roles table.
Be sure to rake db:migrate to produce the roles table.
+=Testing
+To run the Sanction test suite, which was generated with the help of plugin_a_week's plugin_test_helper, step into the
+vendor/plugins/sanction and run rake test.
+
+You can also view the result of the last test build online @ http://runcoderun.com/matthewvermaak
+
=Config
===Example
@@ -299,10 +305,6 @@ So a potential application code example might be:
@magazines = Magazine.for(@person)
@magazines_for_editing = Magazine.for(@person).with(:can_edit)
-=Testing
-To run the Sanction test suite, which was generated with the help of plugin_a_week's plugin_test_helper, step into the
-vendor/plugins/sanction and run rake test.
-
=Quirks
<b>Count</b>
View
10 tasks/sanction_tasks.rake
@@ -7,7 +7,7 @@ namespace :sanction do
namespace :roles do
desc "Describe your currently configured Sanction Roles. Can aggregate by :principal, :permissionable, or :token"
task :describe => :environment do
- aggregate_by_options = [:nothing, :principal, :permissionable, :token]
+ aggregate_by_options = [:nothing, :principal, :permissionable, :name]
aggregate_by = aggregate_by_options.first
if ENV['aggregate_by']
@@ -30,10 +30,10 @@ namespace :sanction do
Sanction::Role::Definition.over(permissionable).map(&:describe).map {|r| puts r}
puts
end
- when :token
- Sanction::Role::Definition.tokens.each do |token|
- puts token.to_s
- Sanction::Role::Definition.with(token).map(&:describe).map {|r| puts r}
+ when :name
+ Sanction::Role::Definition.names.each do |name|
+ puts name.to_s
+ Sanction::Role::Definition.with(name).map(&:describe).map {|r| puts r}
puts
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.