incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [29/58] [partial] Initial setup of new console
Date Tue, 08 Oct 2013 17:59:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/assets/stylesheets/ui.dynatree.css
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/assets/stylesheets/ui.dynatree.css b/contrib/blur-console-old/blur-admin/vendor/assets/stylesheets/ui.dynatree.css
new file mode 100644
index 0000000..57798af
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/assets/stylesheets/ui.dynatree.css
@@ -0,0 +1,443 @@
+/*******************************************************************************
+ * Tree container
+ */
+ul.dynatree-container
+{
+	font-family: tahoma, arial, helvetica;
+	font-size: 10pt; /* font size should not be too big */
+	white-space: nowrap;
+	padding: 3px;
+	margin: 0; /* issue 201 */
+
+	background-color: white;
+	border: 1px dotted gray;
+
+	overflow: auto;
+}
+
+ul.dynatree-container ul
+{
+	padding: 0 0 0 16px;
+	margin: 0;
+}
+
+ul.dynatree-container li
+{
+	list-style-image: none;
+	list-style-position: outside;
+	list-style-type: none;
+	-moz-background-clip:border;
+	-moz-background-inline-policy: continuous;
+	-moz-background-origin: padding;
+	background-attachment: scroll;
+	background-color: transparent;
+	background-repeat: repeat-y;
+	background-image: url("vline.gif");
+	background-position: 0 0;
+	/*
+	background-image: url("icons_96x256.gif");
+	background-position: -80px -64px;
+	*/
+	margin: 0;
+	padding: 1px 0 0 0;
+}
+/* Suppress lines for last child node */
+ul.dynatree-container li.dynatree-lastsib
+{
+	background-image: none;
+}
+/* Suppress lines if level is fixed expanded (option minExpandLevel) */
+ul.dynatree-no-connector > li
+{
+	background-image: none;
+}
+
+/* Style, when control is disabled */
+.ui-dynatree-disabled ul.dynatree-container
+{
+	opacity: 0.5;
+/*	filter: alpha(opacity=50); /* Yields a css warning */
+	background-color: silver;
+}
+
+/*******************************************************************************
+ * Common icon definitions
+ */
+span.dynatree-empty,
+span.dynatree-vline,
+span.dynatree-connector,
+span.dynatree-expander,
+span.dynatree-icon,
+span.dynatree-checkbox,
+span.dynatree-radio,
+span.dynatree-drag-helper-img,
+#dynatree-drop-marker
+{
+	width: 16px;
+	height: 16px;
+	display: -moz-inline-box; /* @ FF 1+2 */
+	display: inline-block; /* Required to make a span sizeable */
+	vertical-align: top;
+	background-repeat: no-repeat;
+	background-position: left;
+	background-image: url("icons.gif");
+	background-position: 0 0;
+}
+
+/** Used by 'icon' node option: */
+ul.dynatree-container img
+{
+	width: 16px;
+	height: 16px;
+	margin-left: 3px;
+	vertical-align: top;
+	border-style: none;
+}
+
+
+/*******************************************************************************
+ * Lines and connectors
+ */
+
+span.dynatree-connector
+{
+	background-position: -16px -64px;
+}
+
+/*******************************************************************************
+ * Expander icon
+ * Note: IE6 doesn't correctly evaluate multiples class names,
+ *		 so we create combined class names that can be used in the CSS.
+ *
+ * Prefix: dynatree-exp-
+ * 1st character: 'e': expanded, 'c': collapsed
+ * 2nd character (optional): 'd': lazy (Delayed)
+ * 3rd character (optional): 'l': Last sibling
+ */
+
+span.dynatree-expander
+{
+	background-position: 0px -80px;
+	cursor: pointer;
+}
+.dynatree-exp-cl span.dynatree-expander /* Collapsed, not delayed, last sibling */
+{
+	background-position: 0px -96px;
+}
+.dynatree-exp-cd span.dynatree-expander /* Collapsed, delayed, not last sibling */
+{
+	background-position: -64px -80px;
+}
+.dynatree-exp-cdl span.dynatree-expander /* Collapsed, delayed, last sibling */
+{
+	background-position: -64px -96px;
+}
+.dynatree-exp-e span.dynatree-expander,  /* Expanded, not delayed, not last sibling */
+.dynatree-exp-ed span.dynatree-expander  /* Expanded, delayed, not last sibling */
+{
+	background-position: -32px -80px;
+}
+.dynatree-exp-el span.dynatree-expander,  /* Expanded, not delayed, last sibling */
+.dynatree-exp-edl span.dynatree-expander  /* Expanded, delayed, last sibling */
+{
+	background-position: -32px -96px;
+}
+.dynatree-loading span.dynatree-expander  /* 'Loading' status overrides all others */
+{
+	background-position: 0 0;
+	background-image: url("loading.gif");
+}
+
+
+/*******************************************************************************
+ * Checkbox icon
+ */
+span.dynatree-checkbox
+{
+	margin-left: 3px;
+	background-position: 0px -32px;
+}
+span.dynatree-checkbox:hover
+{
+	background-position: -16px -32px;
+}
+
+.dynatree-partsel span.dynatree-checkbox
+{
+	background-position: -64px -32px;
+}
+.dynatree-partsel span.dynatree-checkbox:hover
+{
+	background-position: -80px -32px;
+}
+
+.dynatree-selected span.dynatree-checkbox
+{
+	background-position: -32px -32px;
+}
+.dynatree-selected span.dynatree-checkbox:hover
+{
+	background-position: -48px -32px;
+}
+
+/*******************************************************************************
+ * Radiobutton icon
+ * This is a customization, that may be activated by overriding the 'checkbox'
+ * class name as 'dynatree-radio' in the tree options.
+ */
+span.dynatree-radio
+{
+	margin-left: 3px;
+	background-position: 0px -48px;
+}
+span.dynatree-radio:hover
+{
+	background-position: -16px -48px;
+}
+
+.dynatree-partsel span.dynatree-radio
+{
+	background-position: -64px -48px;
+}
+.dynatree-partsel span.dynatree-radio:hover
+{
+	background-position: -80px -48px;
+}
+
+.dynatree-selected span.dynatree-radio
+{
+	background-position: -32px -48px;
+}
+.dynatree-selected span.dynatree-radio:hover
+{
+	background-position: -48px -48px;
+}
+
+/*******************************************************************************
+ * Node type icon
+ * Note: IE6 doesn't correctly evaluate multiples class names,
+ *		 so we create combined class names that can be used in the CSS.
+ *
+ * Prefix: dynatree-ico-
+ * 1st character: 'e': expanded, 'c': collapsed
+ * 2nd character (optional): 'f': folder
+ */
+
+span.dynatree-icon /* Default icon */
+{
+	margin-left: 3px;
+	background-position: 0px 0px;
+}
+
+.dynatree-ico-cf span.dynatree-icon  /* Collapsed Folder */
+{
+	background-position: 0px -16px;
+}
+
+.dynatree-ico-ef span.dynatree-icon  /* Expanded Folder */
+{
+	background-position: -64px -16px;
+}
+
+/* Status node icons */
+
+.dynatree-statusnode-wait span.dynatree-icon
+{
+	background-image: url("loading.gif");
+}
+
+.dynatree-statusnode-error span.dynatree-icon
+{
+	background-position: 0px -112px;
+/*	background-image: url("ltError.gif");*/
+}
+
+/*******************************************************************************
+ * Node titles
+ */
+
+/* @Chrome: otherwise hit area of node titles is broken (issue 133)
+   Removed again for issue 165; (133 couldn't be reproduced) */
+span.dynatree-node
+{
+	display: -moz-inline-box; /* issue 133, 165, 172, 192,  */
+/*  display: inline-block; /* Required to make a span sizeable */
+}
+
+
+/* Remove blue color and underline from title links */
+ul.dynatree-container a
+/*, ul.dynatree-container a:visited*/
+{
+	color: black; /* inherit doesn't work on IE */
+	text-decoration: none;
+	vertical-align: top;
+	margin: 0px;
+	margin-left: 3px;
+/*	outline: 0; /* @ Firefox, prevent dotted border after click */
+}
+
+ul.dynatree-container a:hover
+{
+/*	text-decoration: underline; */
+	background: #F2F7FD; /* light blue */
+	border-color: #B8D6FB; /* darker light blue */
+}
+
+span.dynatree-node a
+{
+	font-size: 10pt; /* required for IE, quirks mode */
+	display: inline-block; /* Better alignment, when title contains <br> */
+/*	vertical-align: top;*/
+	padding-left: 3px;
+	padding-right: 3px; /* Otherwise italic font will be outside bounds */
+	/*	line-height: 16px; /* should be the same as img height, in case 16 px */
+}
+span.dynatree-folder a
+{
+	font-weight: bold;
+}
+
+ul.dynatree-container a:focus,
+span.dynatree-focused a:link  /* @IE */
+{
+	background-color: #EFEBDE; /* gray */
+}
+
+span.dynatree-has-children a
+{
+}
+
+span.dynatree-expanded a
+{
+}
+
+span.dynatree-selected a
+{
+	color: green;
+	font-style: italic;
+}
+
+span.dynatree-active a
+{
+	background-color: #3169C6 !important;
+	color: white !important; /* @ IE6 */
+}
+
+/*******************************************************************************
+ * Drag'n'drop support
+ */
+
+/*** Helper object ************************************************************/
+div.dynatree-drag-helper
+{
+}
+div.dynatree-drag-helper a
+{
+	border: 1px solid gray;
+	background-color: white;
+	padding-left: 5px;
+	padding-right: 5px;
+	opacity: 0.8;
+}
+span.dynatree-drag-helper-img
+{
+	/*
+	position: relative;
+	left: -16px;
+	*/
+}
+div.dynatree-drag-helper /*.dynatree-drop-accept*/
+{
+
+/*    border-color: green;
+	background-color: red;*/
+}
+div.dynatree-drop-accept span.dynatree-drag-helper-img
+{
+	background-position: -32px -112px;
+}
+div.dynatree-drag-helper.dynatree-drop-reject
+{
+	border-color: red;
+}
+div.dynatree-drop-reject span.dynatree-drag-helper-img
+{
+	background-position: -16px -112px;
+}
+
+/*** Drop marker icon *********************************************************/
+
+#dynatree-drop-marker
+{
+	width: 24px;
+	position: absolute;
+	background-position: 0 -128px;
+}
+#dynatree-drop-marker.dynatree-drop-after,
+#dynatree-drop-marker.dynatree-drop-before
+{
+	width:64px;
+	background-position: 0 -144px;
+}
+#dynatree-drop-marker.dynatree-drop-copy
+{
+	background-position: -64px -128px;
+}
+#dynatree-drop-marker.dynatree-drop-move
+{
+	background-position: -64px -128px;
+}
+
+/*** Source node while dragging ***********************************************/
+
+span.dynatree-drag-source
+{
+	/* border: 1px dotted gray; */
+	background-color: #e0e0e0;
+}
+span.dynatree-drag-source a
+{
+	color: gray;
+}
+
+/*** Target node while dragging cursor is over it *****************************/
+
+span.dynatree-drop-target
+{
+	/*border: 1px solid gray;*/
+}
+span.dynatree-drop-target a
+{
+	/*background-repeat: no-repeat;
+	background-position: right;
+	background-image: url("drop_child.gif");*/
+}
+span.dynatree-drop-target.dynatree-drop-accept a
+{
+	/*border: 1px solid green;*/
+	background-color: #3169C6 !important;
+	color: white !important; /* @ IE6 */
+	text-decoration: none;
+}
+span.dynatree-drop-target.dynatree-drop-reject
+{
+	/*border: 1px solid red;*/
+}
+span.dynatree-drop-target.dynatree-drop-after a
+{
+	/*background-repeat: repeat-x;
+	background-position: bottom;
+	background-image: url("drop_append.gif");*/
+}
+
+
+/*******************************************************************************
+ * Custom node classes (sample)
+ */
+
+span.custom1 a
+{
+	background-color: maroon;
+	color: yellow;
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/CHANGELOG.rdoc
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/CHANGELOG.rdoc b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/CHANGELOG.rdoc
new file mode 100755
index 0000000..9496deb
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/CHANGELOG.rdoc
@@ -0,0 +1,381 @@
+1.6.8 (June 25, 2012)
+
+* improved support for namespaced controllers and models
+
+* pass :if and :unless options for load and authorize resource (thanks mauriciozaffari)
+
+* Travis CI badge (thanks plentz)
+
+* adding Ability#merge for combining multiple abilities (thanks rogercampos)
+
+* support for multiple MetaWhere rules (thanks andhapp)
+
+* various fixes for DataMapper, Mongoid, and Inherited Resource integration
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.7...1.6.8]
+
+
+1.6.7 (October 4, 2011)
+
+* fixing nested resource problem caused by namespace addition - issue #482
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.6...1.6.7]
+
+
+1.6.6 (September 28, 2011)
+
+* correct "return cant jump across threads" error when using check_authorization (thanks codeprimate) - issues #463, #469
+
+* fixing tests in development by specifying with_model version  (thanks kirkconnell) - issue #476
+
+* added travis.yml file for TravisCI support (thanks bai) - issue #427
+
+* better support for namespaced models (thanks whilefalse) - issues #424
+
+* adding :id_param option to load_and_authorize_resource (thanks skhisma) - issue #425
+
+* make default unauthorized message translatable text (thanks nhocki) - issue #409
+
+* improving DataMapper behavior (thanks psanford, maxsum-corin) - issue #410, #373
+
+* allow :find_by option to be full find method name - issue #335
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.5...1.6.6]
+
+
+1.6.5 (May 18, 2011)
+
+* pass action and subject through AccessDenied exception when :through isn't found - issue #366
+
+* many Mongoid adapter improvements (thanks rahearn, cardagin) - issues #363, #352, #343
+
+* allow :through option to work with private controller methods - issue #360
+
+* ensure Mongoid::Document is defined before loading Mongoid adapter - issue #359
+
+* many DataMapper adapter improvements (thanks emmanuel) - issue #355
+
+* handle checking nil attributes through associations (thanks thatothermitch) - issue #330
+
+* improve scope merging - issue #328
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.4...1.6.5]
+
+
+1.6.4 (March 29, 2011)
+
+* Fixed mongoid 'or' error - see issue #322
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.3...1.6.4]
+
+
+1.6.3 (March 25, 2011)
+
+* Make sure ActiveRecord::Relation is defined before checking conditions against it so Rails 2 is supported again - see issue #312
+
+* Return subject passed to authorize! - see issue #314
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.2...1.6.3]
+
+
+1.6.2 (March 18, 2011)
+
+* Fixed instance loading when :singleton option is used - see issue #310
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.1...1.6.2]
+
+
+1.6.1 (March 15, 2011)
+
+* Use Item.new instead of build_item for singleton resource so it doesn't effect database - see issue #304
+
+* Made accessible_by action default to :index and parent action default to :show instead of :read - see issue #302
+
+* Reverted Inherited Resources "collection" override since it doesn't seem to be working - see issue #305
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.6.0...1.6.1]
+
+
+1.6.0 (March 11, 2011)
+
+* Added MetaWhere support - see issue #194 and #261
+
+* Allow Active Record scopes in Ability conditions - see issue #257
+
+* Added :if and :unless options to check_authorization - see issue #284
+
+* Several Inherited Resources fixes (thanks aq1018, tanordheim and stefanoverna)
+
+* Pass action name to accessible_by call when loading a collection (thanks amw)
+
+* Added :prepend option to load_and_authorize_resource to load before other filters - see issue #290
+
+* Fixed spacing issue in I18n message for multi-word model names - see issue #292
+
+* Load resource collection for any action which doesn't have an "id" parameter - see issue #296
+
+* Raise an exception when trying to make a Ability condition with both a hash of conditions and a block - see issue #269
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.5.1...1.6.0]
+
+
+1.5.1 (January 20, 2011)
+
+* Fixing deeply nested conditions in Active Record adapter - see issue #246
+
+* Improving Mongoid support for multiple can and cannot definitions (thanks stellard) - see issue #239
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.5.0...1.5.1]
+
+
+1.5.0 (January 11, 2011)
+
+* Added an Ability generator - see issue #170
+
+* Added DataMapper support (thanks natemueller)
+
+* Added Mongoid support (thanks bowsersenior)
+
+* Added skip_load_and_authorize_resource methods to controller class - see issue #164
+
+* Added support for uncountable resources in index action - see issue #193
+
+* Cleaned up README and added spec/README
+
+* Internal: renamed CanDefinition to Rule
+
+* Internal: added a model adapter layer for easily supporting more ORMs
+
+* Internal: added .rvmrc to auto-switch to 1.8.7 with gemset - see issue #231
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.4.1...1.5.0]
+
+
+1.4.1 (November 12, 2010)
+
+* Renaming skip_authorization to skip_authorization_check - see issue #169
+
+* Adding :through_association option to load_resource (thanks hunterae) - see issue #171
+
+* The :shallow option now works with the :singleton option (thanks nandalopes) - see issue #187
+
+* Play nicely with quick_scopes gem (thanks ramontayag) - see issue #183
+
+* Fix odd behavior when "cache_classes = false" (thanks mphalliday) - see issue #174
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.4.0...1.4.1]
+
+
+1.4.0 (October 5, 2010)
+
+* Adding Gemfile; to get specs running just +bundle+ and +rake+ - see issue #163
+
+* Stop at 'cannot' definition when there are no conditions - see issue #161
+
+* The :through option will now call a method with that name if instance variable doesn't exist - see issue #146
+
+* Adding :shallow option to load_resource to bring back old behavior of fetching a child without a parent
+
+* Raise AccessDenied error when loading a child and parent resource isn't found
+
+* Abilities defined on a module will apply to anything that includes that module - see issue #150 and #152
+
+* Abilities can be defined with a string of SQL in addition to a block so accessible_by works with a block - see issue #150
+
+* Adding better support for InheritedResource - see issue #23
+
+* Loading the collection instance variable (for index action) using accessible_by - see issue #137
+
+* Adding action and subject variables to I18n unauthorized message - closes #142
+
+* Adding check_authorization and skip_authorization controller class methods to ensure authorization is performed (thanks justinko) - see issue #135
+
+* Setting initial attributes based on ability conditions in new/create actions - see issue #114
+
+* Check parent attributes for nested association in index action - see issue #121
+
+* Supporting nesting in can? method using hash - see issue #121
+
+* Adding I18n support for Access Denied messages (thanks EppO) - see issue #103
+
+* Passing no arguments to +can+ definition will pass action, class, and object to block - see issue #129
+
+* Don't pass action to block in +can+ definition when using :+manage+ option - see issue #129
+
+* No longer calling block in +can+ definition when checking on class - see issue #116
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.4...1.4.0]
+
+
+1.3.4 (August 31, 2010)
+
+* Don't stop at +cannot+ with hash conditions when checking class (thanks tamoya) - see issue #131
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.3...1.3.4]
+
+
+1.3.3 (August 20, 2010)
+
+* Switching to Rspec namespace to remove deprecation warning in Rspec 2 - see issue #119
+
+* Pluralize nested associations for conditions in accessible_by (thanks mlooney) - see issue #123
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.2...1.3.3]
+
+
+1.3.2 (August 7, 2010)
+
+* Fixing slice error when passing in custom resource name - see issue #112
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.1...1.3.2]
+
+
+1.3.1 (August 6, 2010)
+
+* Fixing protected sanitize_sql error - see issue #111
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.3.0...1.3.1]
+
+
+1.3.0 (August 6, 2010)
+
+* Adding :find_by option to load_resource - see issue #19
+
+* Adding :singleton option to load_resource - see issue #93
+
+* Supporting multiple resources in :through option for polymorphic associations - see issue #73
+
+* Supporting Single Table Inheritance for "can" comparisons - see issue #55
+
+* Adding :instance_name option to load/authorize_resource - see issue #44
+
+* Don't pass nil to "new" to keep MongoMapper happy - see issue #63
+
+* Parent resources are now authorized with :read action.
+
+* Changing :resource option in load/authorize_resource back to :class with ability to pass false
+
+* Removing :nested option in favor of :through option with separate load/authorize call
+
+* Moving internal logic from ResourceAuthorization to ControllerResource class
+
+* Supporting multiple "can" and "cannot" calls with accessible_by (thanks funny-falcon) - see issue #71
+
+* Supporting deeply nested aliases - see issue #98
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.2.0...1.3.0]
+
+
+1.2.0 (July 16, 2010)
+
+* Load nested parent resources on collection actions such as "index" (thanks dohzya)
+
+* Adding :name option to load_and_authorize_resource if it does not match controller - see issue #65
+
+* Fixing issue when using accessible_by with nil can conditions (thanks jrallison) - see issue #66
+
+* Pluralize table name for belongs_to associations in can conditions hash (thanks logandk) - see issue #62
+
+* Support has_many association or arrays in can conditions hash
+
+* Adding joins clause to accessible_by when conditions are across associations
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.1.1...1.2.0]
+
+
+1.1.1 (April 17, 2010)
+
+* Fixing behavior in Rails 3 by properly initializing ResourceAuthorization
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.1...1.1.1]
+
+
+1.1.0 (April 17, 2010)
+
+* Supporting arrays, ranges, and nested hashes in ability conditions
+
+* Removing "unauthorized!" method in favor of "authorize!" in controllers
+
+* Adding action, subject and default_message abilities to AccessDenied exception - see issue #40
+
+* Adding caching to current_ability controller method, if you're overriding this be sure to add caching too.
+
+* Adding "accessible_by" method to Active Record for fetching records matching a specific ability
+
+* Adding conditions behavior to Ability#can and fetch with Ability#conditions - see issue #53
+
+* Renaming :class option to :resource for load_and_authorize_resource which now supports a symbol for non models - see issue #45
+
+* Properly handle Admin::AbilitiesController in params[:controller] - see issue #46
+
+* Adding be_able_to RSpec matcher (thanks dchelimsky), requires Ruby 1.8.7 or higher - see issue #54
+
+* Support additional arguments to can? which get passed to the block - see issue #48
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.0.2...1.1]
+
+
+1.0.2 (Dec 30, 2009)
+
+* Adding clear_aliased_actions to Ability which removes previously defined actions including defaults - see issue #20
+
+* Append aliased actions (don't overwrite them) - see issue #20
+
+* Adding custom message argument to unauthorized! method (thanks tjwallace) - see issue #18
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.0.1...1.0.2]
+
+
+1.0.1 (Dec 14, 2009)
+
+* Adding :class option to load_resource so one can customize which class to use for the model - see issue #17
+
+* Don't fetch parent of nested resource if *_id parameter is missing so it works with shallow nested routes - see issue #14
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/1.0.0...1.0.1]
+
+
+1.0.0 (Dec 13, 2009)
+
+* Don't set resource instance variable if it has been set already - see issue #13
+
+* Allowing :nested option to accept an array for deep nesting
+
+* Adding :nested option to load resource method - see issue #10
+
+* Pass :only and :except options to before filters for load/authorize resource methods.
+
+* Adding :collection and :new options to load_resource method so we can specify behavior of additional actions if needed.
+
+* BACKWARDS INCOMPATIBLE: turning load and authorize resource methods into class methods which set up the before filter so they can accept additional arguments.
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/0.2.1...1.0.0]
+
+
+0.2.1 (Nov 26, 2009)
+
+* many internal refactorings - see issues #11 and #12
+
+* adding "cannot" method to define which abilities cannot be done - see issue #7
+
+* support custom objects (usually symbols) in can definition - see issue #8
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/0.2.0...0.2.1]
+
+
+0.2.0 (Nov 17, 2009)
+
+* fix behavior of load_and_authorize_resource for namespaced controllers - see issue #3
+
+* support arrays being passed to "can" to specify multiple actions or classes - see issue #2
+
+* adding "cannot?" method to ability, controller, and view which is inverse of "can?" - see issue #1
+
+* BACKWARDS INCOMPATIBLE: use Ability#initialize instead of 'prepare' to set up abilities - see issue #4
+
+* {see the full list of changes}[https://github.com/ryanb/cancan/compare/0.1.0...0.2.0]
+
+
+0.1.0 (Nov 16, 2009)
+
+* initial release

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Gemfile
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Gemfile b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Gemfile
new file mode 100755
index 0000000..c80ee36
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Gemfile
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+
+gemspec

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/LICENSE
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/LICENSE b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/LICENSE
new file mode 100755
index 0000000..485ab61
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2011 Ryan Bates
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/README.rdoc
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/README.rdoc b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/README.rdoc
new file mode 100755
index 0000000..1a9c803
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/README.rdoc
@@ -0,0 +1,108 @@
+= CanCan {<img src="https://secure.travis-ci.org/ryanb/cancan.png" />}[http://travis-ci.org/ryanb/cancan]
+
+This is the branch for CanCan 2.0 which is in very early development. For a stable release please check out the {master branch}[https://github.com/ryanb/cancan]
+
+Here are some instructions for setting up CanCan 2.0. Try this out and provide feedback in the {issue tracker}[https://github.com/ryanb/cancan/issues].
+
+
+== Setup
+
+CanCan expects your controllers to have a +current_user+ method. Add some authentication for this (such as Devise[https://github.com/plataformatec/devise], Authlogic[https://github.com/binarylogic/authlogic] or {nifty:authentication}[https://github.com/ryanb/nifty-generators]). See {Changing Defaults}[https://github.com/ryanb/cancan/wiki/Changing-Defaults] to customize this behavior.
+
+To install CanCan, add it to your Gemfile and run the `bundle` command.
+
+  gem "cancan", :git => "git://github.com/ryanb/cancan.git", :branch => "2.0"
+
+Next generate an Ability class, this is where your permissions will be defined.
+
+  rails g cancan:ability
+
+Add authorization by calling {enable_authorization}[https://github.com/ryanb/cancan/wiki/enable_authorization] in your ApplicationController.
+
+  class ApplicationController < ActionController::Base
+    enable_authorization
+  end
+
+This will add an authorization check locking down every controller action. If you try visiting a page, a <tt>CanCan::Unauthorized</tt> exception will be raised since you have not granted the user ability to access it.
+
+
+== Defining Abilities
+
+You grant access to controller actions through the +Ability+ class which was generated above. The +current_user+ is passed in allowing you to define permissions based on user attributes. For example:
+
+  if user
+    can :access, :all
+  else
+    can :access, :home
+    can :create, [:users, :sessions]
+  end
+
+Here if there is a user he will be able to perform any action on any controller. If someone is not logged in he can only access the home, users, and sessions controllers.
+
+The first argument to +can+ is the action the user can perform. The second argument is the controller name they can perform that action on. You can pass <tt>:access</tt> and <tt>:all</tt> to represent any action and controller respectively.
+
+As shown above, pass an array to either of these will grant permission on each item in the array. It isn't necessary to pass the +new+ action here because CanCan includes some default aliases. See the {Aliases}[https://github.com/ryanb/cancan/wiki/Aliases] page for details.
+
+You can check permissions in any controller or view using the <tt>can?</tt> method.
+
+  <% if can? :create, :comments %>
+    <%= link_to "New Comment", new_comment_path %>
+  <% end %>
+
+Here the link will only show up the user can create comments.
+
+
+== Resource Conditions
+
+What if you need to change authorization based on a model's attributes? You can do so by passing a hash of conditions as the last argument to +can+. For example, if you want to only allow one to access projects which he owns you can set the <tt>:user_id</tt>.
+
+  can :access, :projects, :user_id => user.id
+
+A block can also be used for complex condition checks just like in CanCan 1, but here it is not necessary.
+
+If you try visiting any of the project pages at this point you will see a <tt>CanCan::InsufficientAuthorizationCheck</tt> exception is raised. This is because the default authorization has no way to check permissions on the <tt>@project</tt> instance. You can check permissions on an object manually using the <tt>authorize!</tt> method.
+
+  def edit
+    @project = Project.find(params[:id])
+    authorize! :edit, @project
+  end
+
+However this can get tedious. Instead CanCan provides a +load_and_authorize_resource+ method to load the <tt>@project</tt> instance in every controller action and authorize it.
+
+  class ProjectsController < ApplicationController
+    load_and_authorize_resource
+    def edit
+      # @project already loaded here and authorized
+    end
+  end
+
+The +index+ (and other collection actions) will load the <tt>@projects</tt> instance which automatically limits the projects the user is allowed to access. This is a scope so you can make further calls to +where+ to limit what is returned from the database.
+
+  def index
+    @projects = @projects.where(:hidden => false)
+  end
+
+You can check permissions on instances using the <tt>can?</tt> method.
+
+  <%= link_to "Edit Project", edit_project_path if can? :update, @project %>
+
+Here it will only show the edit link if the +user_id+ matches.
+
+
+== Resource Attributes
+
+In CanCan 2.0 it is possible to define permissions on specific resource attributes. For example, if you want to allow a user to only update the name and priority of a project, pass that as the third argument to +can+.
+
+  can :update, :projects, [:name, :priority]
+
+If you use this in combination with +load_and_authorize_resource+ it will ensure that only those two attributes exist in <tt>params[:project]</tt> when updating the project. If you do this everywhere it will not be necessary to use +attr_accessible+ in your models.
+
+You can combine this with a hash of conditions. For example, here the user can update all attributes except the price when the product is discontinued.
+
+  can :update, :products
+  cannot :update, :products, :price, :discontinued => true
+
+You can check permissions on specific attributes to determine what to show in the form.
+
+  <%= f.text_field :name if can? :update, @project, :name %>
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Rakefile
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Rakefile b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Rakefile
new file mode 100755
index 0000000..dda0c3f
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/Rakefile
@@ -0,0 +1,18 @@
+require 'rubygems'
+require 'rake'
+require 'rspec/core/rake_task'
+
+desc "Run RSpec"
+RSpec::Core::RakeTask.new do |t|
+  t.verbose = false
+end
+
+desc "Run specs for all adapters"
+task :spec_all do
+  %w[active_record data_mapper mongoid].each do |model_adapter|
+    puts "MODEL_ADAPTER = #{model_adapter}"
+    system "rake spec MODEL_ADAPTER=#{model_adapter}"
+  end
+end
+
+task :default => :spec

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/cancan.gemspec
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/cancan.gemspec b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/cancan.gemspec
new file mode 100755
index 0000000..542fa3e
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/cancan.gemspec
@@ -0,0 +1,26 @@
+Gem::Specification.new do |s|
+  s.name        = "cancan"
+  s.version     = "2.0.0.alpha"
+  s.author      = "Ryan Bates"
+  s.email       = "ryan@railscasts.com"
+  s.homepage    = "http://github.com/ryanb/cancan"
+  s.summary     = "Simple authorization solution for Rails."
+  s.description = "Simple authorization solution for Rails which is decoupled from user roles. All permissions are stored in a single location."
+
+  s.files        = Dir["{lib,spec}/**/*", "[A-Z]*", "init.rb"] - ["Gemfile.lock"]
+  s.require_path = "lib"
+
+  s.add_development_dependency "rspec", "~> 2.9.0"
+  s.add_development_dependency "rails", "~> 3.2.6"
+  s.add_development_dependency "sqlite3", "~> 1.3.5"
+
+  s.add_development_dependency "dm-core", "~> 1.2.0"
+  s.add_development_dependency "dm-sqlite-adapter", "~> 1.2.0"
+  s.add_development_dependency "dm-migrations", "~> 1.2.0"
+
+  s.add_development_dependency "mongoid", "~> 2.4.8"
+  s.add_development_dependency "bson_ext", "~> 1.6.2"
+
+  s.rubyforge_project = s.name
+  s.required_rubygems_version = ">= 1.3.4"
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/init.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/init.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/init.rb
new file mode 100755
index 0000000..db9a953
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/init.rb
@@ -0,0 +1 @@
+require 'cancan'

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan.rb
new file mode 100755
index 0000000..e292895
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan.rb
@@ -0,0 +1,13 @@
+require 'cancan/ability'
+require 'cancan/rule'
+require 'cancan/controller_resource'
+require 'cancan/controller_additions'
+require 'cancan/model_additions'
+require 'cancan/exceptions'
+require 'cancan/inherited_resource'
+
+require 'cancan/model_adapters/abstract_adapter'
+require 'cancan/model_adapters/default_adapter'
+require 'cancan/model_adapters/active_record_adapter' if defined? ActiveRecord
+require 'cancan/model_adapters/data_mapper_adapter' if defined? DataMapper
+require 'cancan/model_adapters/mongoid_adapter' if defined?(Mongoid) && defined?(Mongoid::Document)

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/ability.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/ability.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/ability.rb
new file mode 100755
index 0000000..c2b9a9f
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/ability.rb
@@ -0,0 +1,348 @@
+module CanCan
+
+  # This module is designed to be included into an Ability class. This will
+  # provide the "can" methods for defining and checking abilities.
+  #
+  #   class Ability
+  #     include CanCan::Ability
+  #
+  #     def initialize(user)
+  #       if user.admin?
+  #         can :access, :all
+  #       else
+  #         can :read, :all
+  #       end
+  #     end
+  #   end
+  #
+  module Ability
+    # Check if the user has permission to perform a given action on an object.
+    #
+    #   can? :destroy, @project
+    #
+    # You can also pass the class instead of an instance (if you don't have one handy).
+    #
+    #   can? :create, :projects
+    #
+    # Nested resources can be passed through a hash, this way conditions which are
+    # dependent upon the association will work when using a class.
+    #
+    #   can? :create, @category => :projects
+    #
+    # Not only can you use the can? method in the controller and view (see ControllerAdditions),
+    # but you can also call it directly on an ability instance.
+    #
+    #   ability.can? :destroy, @project
+    #
+    # This makes testing a user's abilities very easy.
+    #
+    #   def test "user can only destroy projects which he owns"
+    #     user = User.new
+    #     ability = Ability.new(user)
+    #     assert ability.can?(:destroy, Project.new(:user => user))
+    #     assert ability.cannot?(:destroy, Project.new)
+    #   end
+    #
+    # Also see the RSpec Matchers to aid in testing.
+    def can?(action, subject, attribute = nil)
+      match = relevant_rules_for_match(action, subject, attribute).detect do |rule|
+        rule.matches_conditions?(action, subject, attribute)
+      end
+      match ? match.base_behavior : false
+    end
+
+    # Convenience method which works the same as "can?" but returns the opposite value.
+    #
+    #   cannot? :destroy, @project
+    #
+    def cannot?(*args)
+      !can?(*args)
+    end
+
+    # Defines which abilities are allowed using two arguments. The first one is the action
+    # you're setting the permission for, the second one is the class of object you're setting it on.
+    #
+    #   can :update, :articles
+    #
+    # You can pass an array for either of these parameters to match any one.
+    # Here the user has the ability to update or destroy both articles and comments.
+    #
+    #   can [:update, :destroy], [:articles, :comments]
+    #
+    # You can pass :all to match any object and :access to match any action. Here are some examples.
+    #
+    #   can :access, :all
+    #   can :update, :all
+    #   can :access, :projects
+    #
+    # You can pass a hash of conditions as the third argument. Here the user can only see active projects which he owns.
+    #
+    #   can :read, :projects, :active => true, :user_id => user.id
+    #
+    # See ActiveRecordAdditions#accessible_by for how to use this in database queries. These conditions
+    # are also used for initial attributes when building a record in ControllerAdditions#load_resource.
+    #
+    # If the conditions hash does not give you enough control over defining abilities, you can use a block
+    # along with any Ruby code you want.
+    #
+    #   can :update, :projects do |project|
+    #     project.groups.include?(user.group)
+    #   end
+    #
+    # If the block returns true then the user has that :update ability for that project, otherwise he
+    # will be denied access. The downside to using a block is that it cannot be used to generate
+    # conditions for database queries.
+    #
+    # IMPORTANT: Neither a hash of conditions or a block will be used when checking permission on a symbol.
+    #
+    #   can :update, :projects, :priority => 3
+    #   can? :update, :projects # => true
+    #
+    # If you pass no arguments to +can+, the action, class, and object will be passed to the block and the
+    # block will always be executed. This allows you to override the full behavior if the permissions are
+    # defined in an external source such as the database.
+    #
+    #   can do |action, subject, object|
+    #     # check the database and return true/false
+    #   end
+    #
+    def can(*args, &block)
+      rules << Rule.new(true, *args, &block)
+    end
+
+    # Defines an ability which cannot be done. Accepts the same arguments as "can".
+    #
+    #   can :read, :all
+    #   cannot :read, Comment
+    #
+    # A block can be passed just like "can", however if the logic is complex it is recommended
+    # to use the "can" method.
+    #
+    #   cannot :read, :projects do |product|
+    #     product.invisible?
+    #   end
+    #
+    def cannot(*args, &block)
+      rules << Rule.new(false, *args, &block)
+    end
+
+    # Alias one or more actions into another one.
+    #
+    #   alias_action :update, :destroy, :to => :modify
+    #   can :modify, :comments
+    #
+    # Then :modify permission will apply to both :update and :destroy requests.
+    #
+    #   can? :update, :comments # => true
+    #   can? :destroy, :comments # => true
+    #
+    # This only works in one direction. Passing the aliased action into the "can?" call
+    # will not work because aliases are meant to generate more generic actions.
+    #
+    #   alias_action :update, :destroy, :to => :modify
+    #   can :update, :comments
+    #   can? :modify, :comments # => false
+    #
+    # The following aliases are added by default for conveniently mapping common controller actions.
+    #
+    #   alias_action :index, :show, :to => :read
+    #   alias_action :new, :to => :create
+    #   alias_action :edit, :to => :update
+    #
+    # This way one can use params[:action] in the controller to determine the permission.
+    def alias_action(*args)
+      target = args.pop[:to]
+      aliases[:actions][target] ||= []
+      aliases[:actions][target] += args
+    end
+
+    # Alias one or more subjects into another one.
+    #
+    #   alias_subject :admins, :moderators, :to => :users
+    #   can :update, :users
+    #
+    # Then :modify permission will apply to both :update and :destroy requests.
+    #
+    #   can? :update, :admins # => true
+    #   can? :update, :moderators # => true
+    #
+    # This only works in one direction. Passing the aliased subject into the "can?" call
+    # will not work because aliases are meant to generate more generic subjects.
+    #
+    #   alias_subject :admins, :moderators, :to => :users
+    #   can :update, :admins
+    #   can? :update, :users # => false
+    #
+    def alias_subject(*args)
+      target = args.pop[:to]
+      aliases[:subjects][target] ||= []
+      aliases[:subjects][target] += args
+    end
+
+    # Returns a hash of action and subject aliases.
+    def aliases
+      @aliases ||= default_aliases
+    end
+
+    # Removes previously aliased actions or subjects including the defaults.
+    def clear_aliases
+      aliases[:actions] = {}
+      aliases[:subjects] = {}
+    end
+
+    def model_adapter(model_class, action)
+      adapter_class = ModelAdapters::AbstractAdapter.adapter_class(model_class)
+      adapter_class.new(model_class, relevant_rules_for_query(action, model_class.to_s.underscore.pluralize.to_sym))
+    end
+
+    # See ControllerAdditions#authorize! for documentation.
+    def authorize!(action, subject, *args)
+      message = nil
+      if args.last.kind_of?(Hash)
+        message = args.pop[:message]
+      end
+      attribute = args.first
+      if cannot?(action, subject, *args)
+        message ||= unauthorized_message(action, subject)
+        raise Unauthorized.new(message, action, subject)
+      elsif sufficient_attribute_check?(action, subject, attribute) && sufficient_condition_check?(action, subject)
+        fully_authorized!(action, subject)
+      end
+      subject
+    end
+
+    def unauthorized_message(action, subject)
+      keys = unauthorized_message_keys(action, subject)
+      variables = {:action => action.to_s}
+      variables[:subject] = (subject.kind_of?(Symbol) ? subject.to_s : subject.class.to_s.underscore.humanize.downcase.pluralize)
+      message = I18n.translate(nil, variables.merge(:scope => :unauthorized, :default => keys + [""]))
+      message.blank? ? nil : message
+    end
+
+    def attributes_for(action, subject)
+      attributes = {}
+      relevant_rules(action, subject).map do |rule|
+        attributes.merge!(rule.attributes_from_conditions) if rule.base_behavior
+      end
+      attributes
+    end
+
+    def has_block?(action, subject)
+      relevant_rules(action, subject).any?(&:only_block?)
+    end
+
+    def has_raw_sql?(action, subject)
+      relevant_rules(action, subject).any?(&:only_raw_sql?)
+    end
+
+    def has_instance_conditions?(action, subject)
+      relevant_rules(action, subject).any?(&:instance_conditions?)
+    end
+
+    def has_attributes?(action, subject)
+      relevant_rules(action, subject).any?(&:attributes?)
+    end
+
+    def fully_authorized?(action, subject)
+      @fully_authorized ||= []
+      @fully_authorized.include? [action.to_sym, subject.to_sym]
+    end
+
+    def fully_authorized!(action, subject)
+      subject = subject.class.to_s.underscore.pluralize.to_sym unless subject.kind_of?(Symbol) || subject.kind_of?(String)
+      @fully_authorized ||= []
+      @fully_authorized << [action.to_sym, subject.to_sym]
+    end
+
+    def merge(ability)
+      ability.send(:rules).each do |rule|
+        rules << rule.dup
+      end
+      self
+    end
+
+    private
+
+    def unauthorized_message_keys(action, subject)
+      subject = (subject.kind_of?(Symbol) ? subject.to_s : subject.class.to_s.underscore.pluralize)
+      [aliases_for(:subjects, subject.to_sym), :all].flatten.map do |try_subject|
+        [aliases_for(:actions, action.to_sym), :access].flatten.map do |try_action|
+          :"#{try_action}.#{try_subject}"
+        end
+      end.flatten
+    end
+
+    def sufficient_attribute_check?(action, subject, attribute)
+      !(%w[create update].include?(action.to_s) && attribute.nil? && has_attributes?(action, subject))
+    end
+
+    def sufficient_condition_check?(action, subject)
+      !((subject.kind_of?(Symbol) || subject.kind_of?(String)) && has_instance_conditions?(action, subject))
+    end
+
+    # Accepts an array of actions and returns an array of actions which match.
+    # This should be called before "matches?" and other checking methods since they
+    # rely on the actions to be expanded.
+    def expand_aliases(type, items)
+      items.map do |item|
+        aliases[type][item] ? [item, *expand_aliases(type, aliases[type][item])] : item
+      end.flatten
+    end
+
+    # Given an action, it will try to find all of the actions which are aliased to it.
+    # This does the opposite kind of lookup as expand_aliases.
+    def aliases_for(type, action)
+      results = [action]
+      aliases[type].each do |aliased_action, actions|
+        results += aliases_for(type, aliased_action) if actions.include? action
+      end
+      results
+    end
+
+    def rules
+      @rules ||= []
+    end
+
+    # Returns an array of Rule instances which match the action and subject
+    # This does not take into consideration any hash conditions or block statements
+    def relevant_rules(action, subject, attribute = nil)
+      specificity = 0
+      rules.reverse.each_with_object([]) do |rule, relevant_rules|
+        rule.expanded_actions = expand_aliases(:actions, rule.actions)
+        rule.expanded_subjects = expand_aliases(:subjects, rule.subjects)
+        if rule.relevant?(action, subject, attribute) && rule.specificity >= specificity
+          specificity = rule.specificity if rule.base_behavior
+          relevant_rules << rule
+        end
+      end
+    end
+
+    def relevant_rules_for_match(action, subject, attribute)
+      relevant_rules(action, subject, attribute).each do |rule|
+        if rule.only_raw_sql?
+          raise Error, "The can? and cannot? call cannot be used with a raw sql 'can' definition. The checking code cannot be determined for #{action.inspect} #{subject.inspect}"
+        end
+      end
+    end
+
+    def relevant_rules_for_query(action, subject)
+      relevant_rules(action, subject, nil).each do |rule|
+        if rule.only_block?
+          raise Error, "The accessible_by call cannot be used with a block 'can' definition. The SQL cannot be determined for #{action.inspect} #{subject.inspect}"
+        end
+      end
+    end
+
+    def default_aliases
+      {
+        :subjects => {},
+        :actions => {
+          :read => [:index, :show],
+          :create => [:new],
+          :update => [:edit],
+          :destroy => [:delete],
+        }
+      }
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_additions.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_additions.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_additions.rb
new file mode 100755
index 0000000..9dcf3a1
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_additions.rb
@@ -0,0 +1,392 @@
+module CanCan
+
+  # This module is automatically included into all controllers.
+  # It also makes the "can?" and "cannot?" methods available to all views.
+  module ControllerAdditions
+    module ClassMethods
+      # Sets up a before filter which loads and authorizes the current resource. This performs both
+      # load_resource and authorize_resource and accepts the same arguments. See those methods for details.
+      #
+      #   class BooksController < ApplicationController
+      #     load_and_authorize_resource
+      #   end
+      #
+      def load_and_authorize_resource(*args)
+        cancan_resource_class.add_before_filter(self, {:load => true, :authorize => true}, *args)
+      end
+
+      # Sets up a before filter which loads the model resource into an instance variable.
+      # For example, given an ArticlesController it will load the current article into the @article
+      # instance variable. It does this by either calling Article.find(params[:id]) or
+      # Article.new(params[:article]) depending upon the action. The index action will
+      # automatically set @articles to Article.accessible_by(current_ability).
+      #
+      # If a conditions hash is used in the Ability, the +new+ and +create+ actions will set
+      # the initial attributes based on these conditions. This way these actions will satisfy
+      # the ability restrictions.
+      #
+      # Call this method directly on the controller class.
+      #
+      #   class BooksController < ApplicationController
+      #     load_resource
+      #   end
+      #
+      # A resource is not loaded if the instance variable is already set. This makes it easy to override
+      # the behavior through a before_filter on certain actions.
+      #
+      #   class BooksController < ApplicationController
+      #     before_filter :find_book_by_permalink, :only => :show
+      #     load_resource
+      #
+      #     private
+      #
+      #     def find_book_by_permalink
+      #       @book = Book.find_by_permalink!(params[:id)
+      #     end
+      #   end
+      #
+      # If a name is provided which does not match the controller it assumes it is a parent resource. Child
+      # resources can then be loaded through it.
+      #
+      #   class BooksController < ApplicationController
+      #     load_resource :author
+      #     load_resource :book, :through => :author
+      #   end
+      #
+      # Here the author resource will be loaded before each action using params[:author_id]. The book resource
+      # will then be loaded through the @author instance variable.
+      #
+      # That first argument is optional and will default to the singular name of the controller.
+      # A hash of options (see below) can also be passed to this method to further customize it.
+      #
+      # See load_and_authorize_resource to automatically authorize the resource too.
+      #
+      # Options:
+      # [:+only+]
+      #   Only applies before filter to given actions.
+      #
+      # [:+except+]
+      #   Does not apply before filter to given actions.
+      #
+      # [:+through+]
+      #   Load this resource through another one. This should match the name of the parent instance variable or method.
+      #
+      # [:+through_association+]
+      #   The name of the association to fetch the child records through the parent resource. This is normally not needed
+      #   because it defaults to the pluralized resource name.
+      #
+      # [:+shallow+]
+      #   Pass +true+ to allow this resource to be loaded directly when parent is +nil+. Defaults to +false+.
+      #
+      # [:+singleton+]
+      #   Pass +true+ if this is a singleton resource through a +has_one+ association.
+      #
+      # [:+parent+]
+      #   True or false depending on if the resource is considered a parent resource. This defaults to +true+ if a resource
+      #   name is given which does not match the controller.
+      #
+      # [:+class+]
+      #   The class to use for the model (string or constant).
+      #
+      # [:+instance_name+]
+      #   The name of the instance variable to load the resource into.
+      #
+      # [:+find_by+]
+      #   Find using a different attribute other than id. For example.
+      #
+      #     load_resource :find_by => :permalink # will use find_by_permalink!(params[:id])
+      #
+      # [:+collection+]
+      #   Specify which actions are resource collection actions in addition to :+index+. This
+      #   is usually not necessary because it will try to guess depending on if the id param is present.
+      #
+      #     load_resource :collection => [:sort, :list]
+      #
+      # [:+new+]
+      #   Specify which actions are new resource actions in addition to :+new+ and :+create+.
+      #   Pass an action name into here if you would like to build a new resource instead of
+      #   fetch one.
+      #
+      #     load_resource :new => :build
+      #
+      # [:+prepend+]
+      #   Passing +true+ will use prepend_before_filter instead of a normal before_filter.
+      #
+      def load_resource(*args)
+        raise ImplementationRemoved, "The load_resource method has been removed, use load_and_authorize_resource instead."
+        cancan_resource_class.add_before_filter(self, {:load => true}, *args)
+      end
+
+      # Sets up a before filter which authorizes the resource using the instance variable.
+      # For example, if you have an ArticlesController it will check the @article instance variable
+      # and ensure the user can perform the current action on it. Under the hood it is doing
+      # something like the following.
+      #
+      #   authorize!(params[:action].to_sym, @article || Article)
+      #
+      # Call this method directly on the controller class.
+      #
+      #   class BooksController < ApplicationController
+      #     authorize_resource
+      #   end
+      #
+      # If you pass in the name of a resource which does not match the controller it will assume
+      # it is a parent resource.
+      #
+      #   class BooksController < ApplicationController
+      #     authorize_resource :author
+      #     authorize_resource :book
+      #   end
+      #
+      # Here it will authorize :+show+, @+author+ on every action before authorizing the book.
+      #
+      # That first argument is optional and will default to the singular name of the controller.
+      # A hash of options (see below) can also be passed to this method to further customize it.
+      #
+      # See load_and_authorize_resource to automatically load the resource too.
+      #
+      # Options:
+      # [:+only+]
+      #   Only applies before filter to given actions.
+      #
+      # [:+except+]
+      #   Does not apply before filter to given actions.
+      #
+      # [:+singleton+]
+      #   Pass +true+ if this is a singleton resource through a +has_one+ association.
+      #
+      # [:+parent+]
+      #   True or false depending on if the resource is considered a parent resource. This defaults to +true+ if a resource
+      #   name is given which does not match the controller.
+      #
+      # [:+class+]
+      #   The class to use for the model (string or constant). This passed in when the instance variable is not set.
+      #   Pass +false+ if there is no associated class for this resource and it will use a symbol of the resource name.
+      #
+      # [:+instance_name+]
+      #   The name of the instance variable for this resource.
+      #
+      # [:+through+]
+      #   Authorize conditions on this parent resource when instance isn't available.
+      #
+      # [:+prepend+]
+      #   Passing +true+ will use prepend_before_filter instead of a normal before_filter.
+      #
+      def authorize_resource(*args)
+        raise ImplementationRemoved, "The authorize_resource method has been removed, use load_and_authorize_resource instead."
+        cancan_resource_class.add_before_filter(self, {:authorize => true}, *args)
+      end
+
+      # Skip both the loading and authorization behavior of CanCan for this given controller. This is primarily
+      # useful to skip the behavior of a superclass. You can pass :only and :except options to specify which actions
+      # to skip the effects on. It will apply to all actions by default.
+      #
+      #   class ProjectsController < SomeOtherController
+      #     skip_load_and_authorize_resource :only => :index
+      #   end
+      #
+      # You can also pass the resource name as the first argument to skip that resource.
+      def skip_load_and_authorize_resource(*args)
+        skip_load_resource(*args)
+        skip_authorize_resource(*args)
+      end
+
+      # Skip the loading behavior of CanCan. This is useful when using +load_and_authorize_resource+ but want to
+      # only do authorization on certain actions. You can pass :only and :except options to specify which actions to
+      # skip the effects on. It will apply to all actions by default.
+      #
+      #   class ProjectsController < ApplicationController
+      #     load_and_authorize_resource
+      #     skip_load_resource :only => :index
+      #   end
+      #
+      # You can also pass the resource name as the first argument to skip that resource.
+      def skip_load_resource(*args)
+        raise ImplementationRemoved, "The skip_load_resource method has been removed, use skip_load_and_authorize_resource instead."
+        options = args.extract_options!
+        name = args.first
+        cancan_skipper[:load][name] = options
+      end
+
+      # Skip the authorization behavior of CanCan. This is useful when using +load_and_authorize_resource+ but want to
+      # only do loading on certain actions. You can pass :only and :except options to specify which actions to
+      # skip the effects on. It will apply to all actions by default.
+      #
+      #   class ProjectsController < ApplicationController
+      #     load_and_authorize_resource
+      #     skip_authorize_resource :only => :index
+      #   end
+      #
+      # You can also pass the resource name as the first argument to skip that resource.
+      def skip_authorize_resource(*args)
+        raise ImplementationRemoved, "The skip_authorize_resource method has been removed, use skip_load_and_authorize_resource instead."
+        options = args.extract_options!
+        name = args.first
+        cancan_skipper[:authorize][name] = options
+      end
+
+      # Add this to a controller to automatically perform authorization on every action.
+      #
+      #   class ApplicationController < ActionController::Base
+      #     enable_authorization
+      #   end
+      #
+      # Internally it does this in a before_filter for every action.
+      #
+      #   authorize! params[:action], params[:controller]
+      #
+      # If you need to "skip" authorization in a given controller, it is best to enable :+access+ to it in the +Ability+.
+      #
+      # Options:
+      # [:+only+]
+      #   Only applies to given actions.
+      #
+      # [:+except+]
+      #   Does not apply to given actions.
+      #
+      # [:+if+]
+      #   Supply the name of a controller method to be called. The authorization only takes place if this returns true.
+      #
+      #     enable_authorization :if => :admin_controller?
+      #
+      # [:+unless+]
+      #   Supply the name of a controller method to be called. The authorization only takes place if this returns false.
+      #
+      #     enable_authorization :unless => :devise_controller?
+      #
+      def enable_authorization(options = {}, &block)
+        before_filter(options.slice(:only, :except)) do |controller|
+          break if options[:if] && !controller.send(options[:if])
+          break if options[:unless] && controller.send(options[:unless])
+          controller.authorize! controller.params[:action], controller.params[:controller]
+        end
+        after_filter(options.slice(:only, :except)) do |controller|
+          break if options[:if] && !controller.send(options[:if])
+          break if options[:unless] && controller.send(options[:unless])
+          unless controller.current_ability.fully_authorized? controller.params[:action], controller.params[:controller]
+            raise CanCan::InsufficientAuthorizationCheck, "Authorization check is not sufficient for this action. This is probably because you have conditions or attributes defined in Ability and are not checking for them in the action. One way to solve this is adding load_and_authorize_resource to this controller."
+          end
+        end
+        rescue_from(CanCan::Unauthorized, &block) if block
+      end
+
+      def cancan_resource_class
+        if ancestors.map(&:to_s).include? "InheritedResources::Actions"
+          InheritedResource
+        else
+          ControllerResource
+        end
+      end
+
+      def check_authorization(options = {})
+        raise ImplementationRemoved, "The check_authorization method has been removed, use enable_authorization instead."
+      end
+
+      def skip_authorization_check(*args)
+        raise ImplementationRemoved, "The skip_authorization_check method has been removed, instead authorize access to controller in Ability to 'skip'."
+      end
+
+      def cancan_skipper
+        raise ImplementationRemoved, "The skip_authorization_check method has been removed, instead authorize access to controller in Ability to 'skip'."
+      end
+    end
+
+    def self.included(base)
+      base.extend ClassMethods
+      base.helper_method :can?, :cannot?, :current_ability
+    end
+
+    # Raises a CanCan::Unauthorized exception if the current_ability cannot
+    # perform the given action. This is usually called in a controller action or
+    # before filter to perform the authorization.
+    #
+    #   def show
+    #     @article = Article.find(params[:id])
+    #     authorize! :read, @article
+    #   end
+    #
+    # A :message option can be passed to specify a different message.
+    #
+    #   authorize! :read, @article, :message => "Not authorized to read #{@article.name}"
+    #
+    # You can also use I18n to customize the message. Action aliases defined in Ability work here.
+    #
+    #   en:
+    #     unauthorized:
+    #       manage:
+    #         all: "Not authorized to %{action} %{subject}."
+    #         user: "Not allowed to manage other user accounts."
+    #       update:
+    #         project: "Not allowed to update this project."
+    #
+    # You can rescue from the exception in the controller to customize how unauthorized
+    # access is displayed to the user.
+    #
+    #   class ApplicationController < ActionController::Base
+    #     rescue_from CanCan::Unauthorized do |exception|
+    #       redirect_to root_url, :alert => exception.message
+    #     end
+    #   end
+    #
+    # See the CanCan::Unauthorized exception for more details on working with the exception.
+    #
+    # See the load_and_authorize_resource method to automatically add the authorize! behavior
+    # to the default RESTful actions.
+    def authorize!(*args)
+      @_authorized = true
+      current_ability.authorize!(*args)
+    end
+
+    # Creates and returns the current user's ability and caches it. If you
+    # want to override how the Ability is defined then this is the place.
+    # Just define the method in the controller to change behavior.
+    #
+    #   def current_ability
+    #     # instead of Ability.new(current_user)
+    #     @current_ability ||= UserAbility.new(current_account)
+    #   end
+    #
+    # Notice it is important to cache the ability object so it is not
+    # recreated every time.
+    def current_ability
+      @current_ability ||= ::Ability.new(current_user)
+    end
+
+    # Use in the controller or view to check the user's permission for a given action
+    # and object.
+    #
+    #   can? :destroy, @project
+    #
+    # You can also pass the class instead of an instance (if you don't have one handy).
+    #
+    #   <% if can? :create, Project %>
+    #     <%= link_to "New Project", new_project_path %>
+    #   <% end %>
+    #
+    # If it's a nested resource, you can pass the parent instance in a hash. This way it will
+    # check conditions which reach through that association.
+    #
+    #   <% if can? :create, @category => Project %>
+    #     <%= link_to "New Project", new_project_path %>
+    #   <% end %>
+    #
+    # This simply calls "can?" on the current_ability. See Ability#can?.
+    def can?(*args)
+      current_ability.can?(*args)
+    end
+
+    # Convenience method which works the same as "can?" but returns the opposite value.
+    #
+    #   cannot? :destroy, @project
+    #
+    def cannot?(*args)
+      current_ability.cannot?(*args)
+    end
+  end
+end
+
+if defined? ActionController::Base
+  ActionController::Base.class_eval do
+    include CanCan::ControllerAdditions
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_resource.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_resource.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_resource.rb
new file mode 100755
index 0000000..65a2240
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/controller_resource.rb
@@ -0,0 +1,265 @@
+module CanCan
+  # Handle the load and authorization controller logic so we don't clutter up all controllers with non-interface methods.
+  # This class is used internally, so you do not need to call methods directly on it.
+  class ControllerResource # :nodoc:
+    def self.add_before_filter(controller_class, behavior, *args)
+      options = args.extract_options!.merge(behavior)
+      resource_name = args.first
+      before_filter_method = options.delete(:prepend) ? :prepend_before_filter : :before_filter
+      controller_class.send(before_filter_method, options.slice(:only, :except, :if, :unless)) do |controller|
+        controller.class.cancan_resource_class.new(controller, resource_name, options.except(:only, :except, :if, :unless)).process
+      end
+    end
+
+    def initialize(controller, *args)
+      @controller = controller
+      @params = controller.params
+      @options = args.extract_options!
+      @name = args.first
+    end
+
+    def process
+      if @options[:load]
+        if load_instance?
+          self.resource_instance ||= load_resource_instance
+        elsif load_collection?
+          self.collection_instance ||= load_collection
+          current_ability.fully_authorized! @params[:action], @params[:controller]
+        end
+      end
+      if @options[:authorize]
+        if resource_instance
+          if resource_params && (authorization_action == :create || authorization_action == :update)
+            resource_params.each do |key, value|
+              @controller.authorize!(authorization_action, resource_instance, key.to_sym)
+            end
+          else
+            @controller.authorize!(authorization_action, resource_instance)
+          end
+        end
+      end
+    end
+
+    def parent?
+      @options.has_key?(:parent) ? @options[:parent] : @name && @name != name_from_controller.to_sym
+    end
+
+    # def skip?(behavior) # This could probably use some refactoring
+    #   options = @controller.class.cancan_skipper[behavior][@name]
+    #   if options.nil?
+    #     false
+    #   elsif options == {}
+    #     true
+    #   elsif options[:except] && ![options[:except]].flatten.include?(@params[:action].to_sym)
+    #     true
+    #   elsif [options[:only]].flatten.include?(@params[:action].to_sym)
+    #     true
+    #   end
+    # end
+
+    protected
+
+    def load_resource_instance
+      if !parent? && new_actions.include?(@params[:action].to_sym)
+        build_resource
+      elsif id_param || @options[:singleton]
+        find_and_update_resource
+      end
+    end
+
+    def load_instance?
+      parent? || member_action?
+    end
+
+    def load_collection?
+      resource_base.respond_to?(:accessible_by) && !current_ability.has_block?(authorization_action, subject_name)
+    end
+
+    def load_collection
+      resource_base.accessible_by(current_ability, authorization_action)
+    end
+
+    def build_resource
+      resource = resource_base.new(resource_params || {})
+      assign_attributes(resource)
+    end
+
+    def assign_attributes(resource)
+      resource.send("#{parent_name}=", parent_resource) if @options[:singleton] && parent_resource
+      initial_attributes.each do |attr_name, value|
+        resource.send("#{attr_name}=", value)
+      end
+      resource
+    end
+
+    def initial_attributes
+      current_ability.attributes_for(@params[:action].to_sym, subject_name).delete_if do |key, value|
+        resource_params && resource_params.include?(key)
+      end
+    end
+
+    def find_and_update_resource
+      resource = find_resource
+      if resource_params
+        @controller.authorize!(authorization_action, resource) if @options[:authorize]
+        resource.attributes = resource_params
+      end
+      resource
+    end
+
+    def find_resource
+      if @options[:singleton] && parent_resource.respond_to?(name)
+        parent_resource.send(name)
+      else
+        if @options[:find_by]
+          if resource_base.respond_to? "find_by_#{@options[:find_by]}!"
+            resource_base.send("find_by_#{@options[:find_by]}!", id_param)
+          else
+            resource_base.send(@options[:find_by], id_param)
+          end
+        else
+          adapter.find(resource_base, id_param)
+        end
+      end
+    end
+
+    def adapter
+      ModelAdapters::AbstractAdapter.adapter_class(resource_class)
+    end
+
+    def authorization_action
+      parent? ? :show : @params[:action].to_sym
+    end
+
+    def id_param
+      if @options[:id_param]
+        @params[@options[:id_param]]
+      else
+        @params[parent? ? :"#{name}_id" : :id]
+      end
+    end
+
+    def member_action?
+      new_actions.include?(@params[:action].to_sym) || @options[:singleton] || ( (@params[:id] || @params[@options[:id_param]]) && !collection_actions.include?(@params[:action].to_sym))
+    end
+
+    # Returns the class used for this resource. This can be overriden by the :class option.
+    # If +false+ is passed in it will use the resource name as a symbol in which case it should
+    # only be used for authorization, not loading since there's no class to load through.
+    def resource_class
+      case @options[:class]
+      when false  then name.to_sym
+      when nil    then namespaced_name.to_s.camelize.constantize
+      when String then @options[:class].constantize
+      else @options[:class]
+      end
+    end
+
+    def subject_name
+      resource_class.to_s.underscore.pluralize.to_sym
+    end
+
+    def subject_name_with_parent
+      parent_resource ? {parent_resource => subject_name} : subject_name
+    end
+
+    def resource_instance=(instance)
+      @controller.instance_variable_set("@#{instance_name}", instance)
+    end
+
+    def resource_instance
+      if load_instance?
+        if @controller.instance_variable_defined? "@#{instance_name}"
+          @controller.instance_variable_get("@#{instance_name}")
+        elsif @controller.respond_to?(instance_name, true)
+          @controller.send(instance_name)
+        end
+      end
+    end
+
+    def collection_instance=(instance)
+      @controller.instance_variable_set("@#{instance_name.to_s.pluralize}", instance)
+    end
+
+    def collection_instance
+      @controller.instance_variable_get("@#{instance_name.to_s.pluralize}")
+    end
+
+    # The object that methods (such as "find", "new" or "build") are called on.
+    # If the :through option is passed it will go through an association on that instance.
+    # If the :shallow option is passed it will use the resource_class if there's no parent
+    # If the :singleton option is passed it won't use the association because it needs to be handled later.
+    def resource_base
+      if @options[:through]
+        if parent_resource
+          @options[:singleton] ? resource_class : parent_resource.send(@options[:through_association] || name.to_s.pluralize)
+        elsif @options[:shallow]
+          resource_class
+        else
+          raise Unauthorized.new(nil, authorization_action, @params[:controller].to_sym) # maybe this should be a record not found error instead?
+        end
+      else
+        resource_class
+      end
+    end
+
+    def parent_name
+      @options[:through] && [@options[:through]].flatten.detect { |i| fetch_parent(i) }
+    end
+
+    # The object to load this resource through.
+    def parent_resource
+      parent_name && fetch_parent(parent_name)
+    end
+
+    def fetch_parent(name)
+      if @controller.instance_variable_defined? "@#{name}"
+        @controller.instance_variable_get("@#{name}")
+      elsif @controller.respond_to?(name, true)
+        @controller.send(name)
+      end
+    end
+
+    def current_ability
+      @controller.send(:current_ability)
+    end
+
+    def name
+      @name || name_from_controller
+    end
+
+    def resource_params
+      if @options[:class]
+        @params[@options[:class].to_s.underscore.gsub('/', '_')]
+      else
+        @params[namespaced_name.to_s.underscore.gsub("/", "_")]
+      end
+    end
+
+    def namespace
+      @params[:controller].split(/::|\//)[0..-2]
+    end
+
+    def namespaced_name
+      [namespace, name.camelize].join('::').singularize.camelize.constantize
+    rescue NameError
+      name
+    end
+
+    def name_from_controller
+      @params[:controller].sub("Controller", "").underscore.split('/').last.singularize
+    end
+
+    def instance_name
+      @options[:instance_name] || name
+    end
+
+    def collection_actions
+      [:index] + [@options[:collection]].flatten
+    end
+
+    def new_actions
+      [:new, :create] + [@options[:new]].flatten
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/exceptions.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/exceptions.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/exceptions.rb
new file mode 100755
index 0000000..ed73c34
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/exceptions.rb
@@ -0,0 +1,53 @@
+module CanCan
+  # A general CanCan exception
+  class Error < StandardError; end
+
+  # Raised when behavior is not implemented, usually used in an abstract class.
+  class NotImplemented < Error; end
+
+  # Raised when removed code is called, an alternative solution is provided in message.
+  class ImplementationRemoved < Error; end
+
+  # Raised when using check_authorization without calling authorized!
+  class AuthorizationNotPerformed < Error; end
+
+  # Raised when enable_authorization is used and not fully authorized by the end of the action
+  class InsufficientAuthorizationCheck < Error; end
+
+  # This error is raised when a user isn't allowed to access a given controller action.
+  # This usually happens within a call to ControllerAdditions#authorize! but can be
+  # raised manually.
+  #
+  #   raise CanCan::Unauthorized.new("Not authorized!", :read, Article)
+  #
+  # The passed message, action, and subject are optional and can later be retrieved when
+  # rescuing from the exception.
+  #
+  #   exception.message # => "Not authorized!"
+  #   exception.action # => :read
+  #   exception.subject # => Article
+  #
+  # If the message is not specified (or is nil) it will default to "You are not authorized
+  # to access this page." This default can be overridden by setting default_message.
+  #
+  #   exception.default_message = "Default error message"
+  #   exception.message # => "Default error message"
+  #
+  # See ControllerAdditions#authorize! for more information on rescuing from this exception
+  # and customizing the message using I18n.
+  class Unauthorized < Error
+    attr_reader :action, :subject
+    attr_writer :default_message
+
+    def initialize(message = nil, action = nil, subject = nil)
+      @message = message
+      @action = action
+      @subject = subject
+      @default_message = I18n.t(:"unauthorized.default", :default => "You are not authorized to access this page.")
+    end
+
+    def to_s
+      @message || @default_message
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/inherited_resource.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/inherited_resource.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/inherited_resource.rb
new file mode 100755
index 0000000..61bd333
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/inherited_resource.rb
@@ -0,0 +1,20 @@
+module CanCan
+  # For use with Inherited Resources
+  class InheritedResource < ControllerResource # :nodoc:
+    def load_resource_instance
+      if parent?
+        @controller.send :association_chain
+        @controller.instance_variable_get("@#{instance_name}")
+      elsif new_actions.include? @params[:action].to_sym
+        resource = @controller.send :build_resource
+        assign_attributes(resource)
+      else
+        @controller.send :resource
+      end
+    end
+
+    def resource_base
+      @controller.send :end_of_association_chain
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/matchers.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/matchers.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/matchers.rb
new file mode 100755
index 0000000..4a4fb94
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/matchers.rb
@@ -0,0 +1,14 @@
+rspec_module = defined?(RSpec::Core) ? 'RSpec' : 'Spec'  # for RSpec 1 compatability
+Kernel.const_get(rspec_module)::Matchers.define :be_able_to do |*args|
+  match do |ability|
+    ability.can?(*args)
+  end
+
+  failure_message_for_should do |ability|
+    "expected to be able to #{args.map(&:inspect).join(" ")}"
+  end
+
+  failure_message_for_should_not do |ability|
+    "expected not to be able to #{args.map(&:inspect).join(" ")}"
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/model_adapters/abstract_adapter.rb
----------------------------------------------------------------------
diff --git a/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/model_adapters/abstract_adapter.rb b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/model_adapters/abstract_adapter.rb
new file mode 100755
index 0000000..e644713
--- /dev/null
+++ b/contrib/blur-console-old/blur-admin/vendor/gems/cancan/lib/cancan/model_adapters/abstract_adapter.rb
@@ -0,0 +1,56 @@
+module CanCan
+  module ModelAdapters
+    class AbstractAdapter
+      def self.inherited(subclass)
+        @subclasses ||= []
+        @subclasses << subclass
+      end
+
+      def self.adapter_class(model_class)
+        @subclasses.detect { |subclass| subclass.for_class?(model_class) } || DefaultAdapter
+      end
+
+      # Used to determine if the given adapter should be used for the passed in class.
+      def self.for_class?(member_class)
+        false # override in subclass
+      end
+
+      # Override if you need custom find behavior
+      def self.find(model_class, id)
+        model_class.find(id)
+      end
+
+      # Used to determine if this model adapter will override the matching behavior for a hash of conditions.
+      # If this returns true then matches_conditions_hash? will be called. See Rule#matches_conditions_hash
+      def self.override_conditions_hash_matching?(subject, conditions)
+        false
+      end
+
+      # Override if override_conditions_hash_matching? returns true
+      def self.matches_conditions_hash?(subject, conditions)
+        raise NotImplemented, "This model adapter does not support matching on a conditions hash."
+      end
+
+      # Used to determine if this model adapter will override the matching behavior for a specific condition.
+      # If this returns true then matches_condition? will be called. See Rule#matches_conditions_hash
+      def self.override_condition_matching?(subject, name, value)
+        false
+      end
+
+      # Override if override_condition_matching? returns true
+      def self.matches_condition?(subject, name, value)
+        raise NotImplemented, "This model adapter does not support matching on a specific condition."
+      end
+
+      def initialize(model_class, rules)
+        @model_class = model_class
+        @rules = rules
+      end
+
+      def database_records
+        # This should be overridden in a subclass to return records which match @rules
+        raise NotImplemented, "This model adapter does not support fetching records from the database."
+      end
+    end
+  end
+end


Mime
View raw message