diff --git a/lib/aws-sessionstore-dynamodb.rb b/lib/aws-sessionstore-dynamodb.rb index ed78c83..ce22509 100644 --- a/lib/aws-sessionstore-dynamodb.rb +++ b/lib/aws-sessionstore-dynamodb.rb @@ -12,8 +12,6 @@ module DynamoDB require_relative 'aws/session_store/dynamo_db/configuration' require_relative 'aws/session_store/dynamo_db/errors' require_relative 'aws/session_store/dynamo_db/garbage_collection' -require_relative 'aws/session_store/dynamo_db/locking/base' -require_relative 'aws/session_store/dynamo_db/locking/null' -require_relative 'aws/session_store/dynamo_db/locking/pessimistic' +require_relative 'aws/session_store/dynamo_db/locking' require_relative 'aws/session_store/dynamo_db/rack_middleware' require_relative 'aws/session_store/dynamo_db/table' diff --git a/lib/aws/session_store/dynamo_db/errors/base_handler.rb b/lib/aws/session_store/dynamo_db/errors/base_handler.rb index 7a18ef3..0d4aa29 100644 --- a/lib/aws/session_store/dynamo_db/errors/base_handler.rb +++ b/lib/aws/session_store/dynamo_db/errors/base_handler.rb @@ -6,7 +6,7 @@ module Aws::SessionStore::DynamoDB::Errors # Each error handler must implement a handle_error method. # # @example Sample ErrorHandler class - # class MyErrorHandler < BaseErrorHandler + # class MyErrorHandler < BaseHandler # # Handles error passed in # def handle_error(e, env = {}) # File.open(path_to_file, 'w') {|f| f.write(e.message) } @@ -17,7 +17,7 @@ class BaseHandler # An error and an environment (optionally) will be passed in to # this method and it will determine how to deal # with the error. - # Must return false if you have handled the error but are not reraising the + # Must return false if you have handled the error but are not re-raising the # error up the stack. # You may reraise the error passed. # @@ -25,7 +25,7 @@ class BaseHandler # Aws::SessionStore::DynamoDB::RackMiddleware. # @param [Rack::Request::Environment,nil] env Rack environment # @return [false] If exception was handled and will not reraise exception. - # @raise [Aws::DynamoDB::Errors] If error has be reraised. + # @raise [Aws::DynamoDB::Errors] If error has be re-raised. def handle_error(error, env = {}) raise NotImplementedError end diff --git a/lib/aws/session_store/dynamo_db/locking.rb b/lib/aws/session_store/dynamo_db/locking.rb new file mode 100644 index 0000000..e68beac --- /dev/null +++ b/lib/aws/session_store/dynamo_db/locking.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module Aws::SessionStore::DynamoDB + # @api private + module Locking; end +end + +require_relative 'locking/base' +require_relative 'locking/null' +require_relative 'locking/pessimistic'