Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/)
The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
project adheres to [Semantic Versioning](https://semver.org/)

## Unreleased

### Fixed
* Fix YARD documentation warnings:
- Remove curly braces from `@see` tags (causes rendering issues)
- Use fully-qualified constant names for `ACL#find_by_role` references (`Eaco::ACL#find_by_role`)

## 1.1.1 - 2017-03-08

Expand Down
4 changes: 2 additions & 2 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

##
# Create a whole new world.
# @see {World}
# @see World
# @!method World
World do
Eaco::Cucumber::World.new
end

##
# Recreate the schema before each feature, to start fresh.
# @see {ActiveRecord.define_schema!}
# @see ActiveRecord.define_schema!
# @!method Before
Before do
Eaco::Cucumber::ActiveRecord.define_schema!
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def self.parse_rules!(rules)
end

##
# Evaluates the given authorization rules +source+, orignally found on
# Evaluates the given authorization rules +source+, originally found on
# +path+.
#
# @param source [String] {DSL} source code
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Eaco

# Persistance adapters for ACL objects and authorized collections extractor
# Persistence adapters for ACL objects and authorized collections extractor
# strategies.
#
# @see ActiveRecord
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def self.strategies
end

##
# Checks whether the model's data structure fits the ACL persistance
# Checks whether the model's data structure fits the ACL persistence
# requirements.
#
# @param base [Class] your application's model
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record/compatibility/v40.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module V40
##
#
# Sets up the OID Type Map, reloads it, hacks native database types,
# and makes jsonb mimick itself as a json - for the rest of the AR
# and makes jsonb mimic itself as a json - for the rest of the AR
# machinery to work intact.
#
# @param base [Class] the +ActiveRecord+ model to mangle
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record/compatibility/v51.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Compatibility
#
# @see Scoped
#
# Sanitize has dissapeared in favour of quote.
# Sanitize has disappeared in favour of quote.
#
# @see Sanitized
#
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record/compatibility/v52.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Compatibility
#
# @see Scoped
#
# Sanitize has dissapeared in favour of quote.
# Sanitize has disappeared in favour of quote.
#
# @see Sanitized
#
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record/compatibility/v60.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Compatibility
#
# @see Scoped
#
# Sanitize has dissapeared in favour of quote.
# Sanitize has disappeared in favour of quote.
#
# @see Sanitized
#
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record/compatibility/v61.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Compatibility
#
# @see Scoped
#
# Sanitize has dissapeared in favour of quote.
# Sanitize has disappeared in favour of quote.
#
# @see Sanitized
#
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/adapters/active_record/postgres_jsonb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module ActiveRecord
module PostgresJSONb

##
# Uses the json key existance operator +?|+ to check whether one of the
# Uses the json key existence operator +?|+ to check whether one of the
# +Actor+'s +Designator+ instances exist as keys in the +ACL+ objects.
#
# @param actor [Actor]
Expand Down
8 changes: 4 additions & 4 deletions lib/eaco/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def authorize(*actions)
#
# @return [Symbol] the required permission or nil
#
# @see {Eaco::Resource}
# @see {Eaco::DSL::Resource}
# @see Eaco::Resource
# @see Eaco::DSL::Resource
#
def permission_for(action)
authorization_permissions[action] || authorization_permissions[:all]
Expand All @@ -85,7 +85,7 @@ def permission_for(action)
#
# @return [Hash]
#
# @see {Eaco::DSL::Resource}
# @see Eaco::DSL::Resource
#
def authorization_permissions
@_authorization_permissions ||= {}
Expand Down Expand Up @@ -156,7 +156,7 @@ def authorization_permissions
# /_'O\||
# .-'___/(__)
#
# http://ascii.co.uk/art/guardiana
# https://ascii.co.uk/art/guardiana
#
def confront_eaco
action = params[:action].intern
Expand Down
8 changes: 4 additions & 4 deletions lib/eaco/cucumber/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ def logger
end

##
# Returns an Hash wit the database configuration.
# Returns an Hash with the database configuration.
#
# Caveat:the returned +Hash+ has a custom +.to_s+ method that formats
# the configuration as a +pgsql://+ URL.
#
# @return [Hash] the current database configuration
#
# @see {#config_file}
# @see #config_file
#
def configuration
@_config ||= YAML.load(config_file.read).tap do |conf|
Expand All @@ -84,7 +84,7 @@ def conf.to_s

##
# @return [Pathname] the currently configured configuration file. Override
# using the +EACO_AR_CONFIG' envinronment variable.
# using the +EACO_AR_CONFIG' environment variable.
#
def config_file
Pathname.new(ENV['EACO_AR_CONFIG'] || default_config_file)
Expand Down Expand Up @@ -147,7 +147,7 @@ def define_schema!
#
# @param block [Proc]
# @return [nil]
# @see {Rake::Utils.capture_stdout}
# @see Rake::Utils.capture_stdout
#
def log_stdout(&block)
stdout = Rake::Utils.capture_stdout(&block)
Expand Down
4 changes: 2 additions & 2 deletions lib/eaco/cucumber/world.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module Cucumber
# mmmmmmMMMM"
# ch1x0r
#
# http://ascii.co.uk/art/anime
# https://ascii.co.uk/art/anime
#
# = Scenario
#
Expand Down Expand Up @@ -145,7 +145,7 @@ def initialize
#
# @param name [String] the model name
# @param definition [String] the {DSL} code
# @see {#find_model}
# @see #find_model
#
# @return [void]
#
Expand Down
6 changes: 3 additions & 3 deletions lib/eaco/dsl/acl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module DSL
# * Defines syntactic sugar on the ACL to easily retrieve {Actor}s with a
# specific Role ({#define_role_getters})
#
# * Installs {ACL} objects persistance for the supported ORMs
# * Installs {ACL} objects persistence for the supported ORMs
# ({#install_persistance})
#
# * Installs the authorized collection extraction strategy
Expand Down Expand Up @@ -61,7 +61,7 @@ def define_acl_subclass

##
# Define getter methods on the ACL for each role, syntactic sugar
# for calling {ACL#find_by_role}.
# for calling {Eaco::ACL#find_by_role}.
#
# Example:
#
Expand All @@ -81,7 +81,7 @@ def define_role_getters
end

##
# Sets up the persistance layer for ACLs (+#acl+ and +#acl=+).
# Sets up the persistence layer for ACLs (+#acl+ and +#acl=+).
#
# These APIs can be implemented directly in your Resource model, as long
# as the +acl+ accessor accepts and returns the Resource model's ACL
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/rake/default_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def fancy(msg)
end

##
# @see {Rake::Utils.gemfile}
# @see Rake::Utils.gemfile
# @private
#
def gemfile
Expand Down
2 changes: 1 addition & 1 deletion lib/eaco/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def batch_grant(role, designators)

protected
##
# Changes the ACL, calling the persistance setter if it changes.
# Changes the ACL, calling the persistence setter if it changes.
#
# @yield [ACL] the current ACL or a new one if no ACL is set
#
Expand Down
4 changes: 2 additions & 2 deletions spec/eaco_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
end

context 'when the file does not exist' do
let(:file) { Pathname('/nonexistant') }
let(:file) { Pathname('/nonexistent') }

it { expect { subject }.to raise_error(Eaco::Malformed, /Please create \/nonexistant/) }
it { expect { subject }.to raise_error(Eaco::Malformed, /Please create \/nonexistent/) }
end
end

Expand Down
7 changes: 2 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

require 'eaco'

# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
#
RSpec.configure do |config|

Expand Down Expand Up @@ -36,10 +36,7 @@
config.run_all_when_everything_filtered = true

# Limits the available syntax to the non-monkey patched syntax that is
# recommended. For more details, see:
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
# recommended.
config.disable_monkey_patching!

# This setting enables warnings. It's recommended, but in some cases may
Expand Down