Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed inadvertantly included svn metadata

  • Loading branch information...
commit 2a1a86dd2466a2065cb022c34871e05753f3b696 1 parent 1eeac57
Simon Parsons authored Simon Parsons committed
17 lib/.svn/all-wcprops
View
@@ -1,17 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 62
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/lib
-END
-role.rb
-K 25
-svn:wc:ra_dav:version-url
-V 70
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/lib/role.rb
-END
-rank_fu.rb
-K 25
-svn:wc:ra_dav:version-url
-V 73
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/lib/rank_fu.rb
-END
40 lib/.svn/entries
View
@@ -1,40 +0,0 @@
-8
-
-dir
-5
-http://intridea.unfuddle.com/svn/intridea_asee/trunk/vendor/plugins/rank_fu/lib
-http://intridea.unfuddle.com/svn/intridea_asee
-
-
-
-2008-06-24T19:57:39.583715Z
-5
-simon
-
-
-svn:special svn:externals svn:needs-lock
-
-role.rb
-file
-
-
-
-
-2008-06-24T17:04:14.000000Z
-52e43698040de00820579c5035394a97
-2008-06-24T19:57:39.583715Z
-5
-simon
-
-rank_fu.rb
-file
-
-
-
-
-2008-06-24T17:04:14.000000Z
-0c6e76fbce9ee83b4b32292dd4fb74ea
-2008-06-24T19:57:39.583715Z
-5
-simon
-
1  lib/.svn/format
View
@@ -1 +0,0 @@
-8
112 lib/.svn/text-base/rank_fu.rb.svn-base
View
@@ -1,112 +0,0 @@
-module RankFu
- def self.included(base)
- base.extend(ClassMethods)
- end
-
- module ClassMethods
- def knows_rank_fu
- instance_eval do
- include InstanceMethods
- end
-
- Role.find(:all).map(&:key).each do |role|
- class_eval do
- define_method "find_#{role.pluralize}" do; Role.find(:all) end
- end
- instance_eval do
- define_method "#{role}?" do; self.has_role?(role) end
- define_method "#{role}_exactly?" do; self.has_role_without_set?(role) end
- define_method "make_#{role}?" do; self.has_role?(role) end
- define_method "remove_#{role}?" do; self.does_not_have_role?(role) end
- end
- end
-
- if Role.find_by_key(:disabled)
- instance_eval do
- define_method 'disable_user' do; has_role(:disabled) end
- define_method 'enable_user' do; does_not_have_role(:disabled) end
- define_method 'enabled?' do; !has_role?(:disabled) end
- end
- end
-
- end
- end
-
- module InstanceMethods
- def has_role?(role)
- role = ensure_role(role)
- if role.set?
- has_role_with_set?(role)
- else
- has_role_without_set?(role)
- end
- end
-
- def has_role(role)
- role = ensure_role(role)
- role.set_mates.each{|set_mate| self.does_not_have_role set_mate} if role.set?
- self.update_attribute(:role, self.role | role.value);self
- end
-
- def ensure_role(role_key_or_name)
- role_key_or_name.class == Role ? role_key_or_name : Role.find_by_key_or_name(role_key_or_name) end
-
- def does_not_have_role(role)
- self.update_attribute(:role, self.role ^ (self.role & ensure_role(role).value)); self end
-
- def roles
- Role.find(:all).select{|role| self.role & role.value > 0}.map(&:key) end
-
- def modifiers
- Role.find(:all, :conditions => {:is_modifier => true}).select{|role| (self.role & role.value) > 0}.sort end
-
- def major_roles
- major_roles = Role.find(:all, :conditions => ["is_modifier is not true"]).select{|role| (self.role & role.value) > 0}.sort
- major_roles = major_roles - Role.default_roles if (major_roles - Role.default_roles).any?
- major_roles
- end
-
- def rank
- (modifiers.map{|role|role.name}.join(" ") + " " + major_roles.map{|role|role.name}.join(" / ")).strip; end
-
- def has_role_without_set?(role)
- self_role = (self.role ? self.role : Role.type(:member))
- self_role & ensure_role(role).value > 0
- end
-
- def has_role_with_set?(role)
- self_role = (self.role ? self.role : Role.type(:member))
- role = ensure_role(role)
- self_role & role.set_mates.map{|r|r.value if r.value >= role.value}.compact.sum > 0
- end
- end
-
-end
-
-
-
-# if method.to_s.match(/^(.*)\?$/) && Role.role_exists?($1)
-# self.has_role?($1.to_sym)
-# elsif method.to_s.match(/^(.*)_exactly\?$/) && Role.role_exists?($1)
-# self.has_role_without_set?($1.to_sym)
-# elsif method.to_s.match(/^make_(.*)$/) && Role.role_exists?($1)
-# self.has_role($1.to_sym)
-# elsif method.to_s.match(/^remove_(.*)$/) && Role.role_exists?($1)
-# self.does_not_have_role($1.to_sym)
-# else
-# method_missing_without_roles(method,*args)
-# end
-
-# def disable_user
-# has_role(:disabled) end
-#
-# def enable_user
-# does_not_have_role(:disabled) end
-# alias :make_enabled :enable_user
-#
-# def disabled?
-# has_role?(:disabled) end
-#
-# def enabled?
-# !has_role?(:disabled) end
-
61 lib/.svn/text-base/role.rb.svn-base
View
@@ -1,61 +0,0 @@
-class Role < ActiveRecord::Base
- validates_presence_of :name, :value
-
- def self.types(this_key=nil)
- return self.type(this_key) if this_key
- return_hash = {}
- self.find(:all, :order => "value desc").map {|x| return_hash[x.key.to_sym] = x.value }
- return_hash
- end
-
- def self.type(this_key)
- s = self.find_by_key_or_name(this_key); s ? s.value : nil end
-
- def set_mates
- Role.roles_in_set(self.set) end
-
- def self.find_by_key_or_name(key_or_name)
- if key_or_name.class == Symbol or key_or_name =~ /^[_a-z]*$/
- self.find_by_key(key_or_name.to_s)
- else
- self.find_by_name(key_or_name)
- end
- end
- class << self
- alias_method :[], :type
- end
-
- def self.roles_in_set(set)
- Role.find_all_by_set(set) end
-
- def self.role_exists?(key_or_name)
- find_by_key_or_name(key_or_name) != nil end
-
- def self.default_roles
- find_all_by_is_default(true) end
-
- def self.user_count_for(this_key)
- Role.find_by_key(this_key).user_count end
-
- def self.controllers(this_key)
- Role.find_by_key(this_key).controllers end
-
- def self.controller_count(this_key)
- Role.find_by_key(this_key).controller_count end
-
- def controllers
- ControllerPermission.find(:all, :conditions => ["minimum_permitted_role_value >= ?", self.value]) end
-
- def controller_count
- ControllerPermission.count(:all, :conditions => ["minimum_permitted_role_value >= ?", self.value]) end
-
- def user_count
- User.count(:all, :conditions => ["role & ?", self.value]) end
-
- def <=> (other)
- self.value >= other.value ? self : other end
-
- [:>=, :<= , :<, :>, :==].each do |operator|
- delegate operator, :to => :value
- end
-end
11 tasks/.svn/all-wcprops
View
@@ -1,11 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 64
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/tasks
-END
-rank_fu_tasks.rake
-K 25
-svn:wc:ra_dav:version-url
-V 83
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/tasks/rank_fu_tasks.rake
-END
28 tasks/.svn/entries
View
@@ -1,28 +0,0 @@
-8
-
-dir
-5
-http://intridea.unfuddle.com/svn/intridea_asee/trunk/vendor/plugins/rank_fu/tasks
-http://intridea.unfuddle.com/svn/intridea_asee
-
-
-
-2008-06-24T19:57:39.583715Z
-5
-simon
-
-
-svn:special svn:externals svn:needs-lock
-
-rank_fu_tasks.rake
-file
-
-
-
-
-2008-06-24T17:04:14.000000Z
-9358d79b732c3681963bda3e4f90811c
-2008-06-24T19:57:39.583715Z
-5
-simon
-
1  tasks/.svn/format
View
@@ -1 +0,0 @@
-8
4 tasks/.svn/text-base/rank_fu_tasks.rake.svn-base
View
@@ -1,4 +0,0 @@
-# desc "Explaining what the task does"
-# task :rank_fu do
-# # Task goes here
-# end
11 test/.svn/all-wcprops
View
@@ -1,11 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 63
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/test
-END
-rank_fu_test.rb
-K 25
-svn:wc:ra_dav:version-url
-V 79
-/svn/intridea_asee/!svn/ver/5/trunk/vendor/plugins/rank_fu/test/rank_fu_test.rb
-END
28 test/.svn/entries
View
@@ -1,28 +0,0 @@
-8
-
-dir
-5
-http://intridea.unfuddle.com/svn/intridea_asee/trunk/vendor/plugins/rank_fu/test
-http://intridea.unfuddle.com/svn/intridea_asee
-
-
-
-2008-06-24T19:57:39.583715Z
-5
-simon
-
-
-svn:special svn:externals svn:needs-lock
-
-rank_fu_test.rb
-file
-
-
-
-
-2008-06-24T17:04:14.000000Z
-091ba2abbaa6dd7bf1f0c40e225d8373
-2008-06-24T19:57:39.583715Z
-5
-simon
-
1  test/.svn/format
View
@@ -1 +0,0 @@
-8
8 test/.svn/text-base/rank_fu_test.rb.svn-base
View
@@ -1,8 +0,0 @@
-require 'test/unit'
-
-class RankFuTest < Test::Unit::TestCase
- # Replace this with your real tests.
- def test_this_plugin
- flunk
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.