Navigation Menu

Skip to content

Commit

Permalink
Prepare for v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Jan 7, 2015
1 parent cdb0061 commit 6d5487b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,10 @@
# Lotus::Controller
Complete, fast and testable actions for Rack

## v0.3.1 - 2015-01-07
### Added
- [Lasse Skindstad Ebert] Introduced `Action#request` which returns an instance a `Rack::Request` compliant object: `Lotus::Action::Request`.

## v0.3.0 - 2014-12-23
### Added
- [Luca Guidi] Introduced `Action#request_id` as unique identifier for an incoming HTTP request
Expand Down
8 changes: 4 additions & 4 deletions lib/lotus/action/params.rb
Expand Up @@ -134,13 +134,13 @@ def to_h
private
# Compatibility with Lotus::Validations
#
# @since x.x.x
# @since 0.3.1
# @api private
def read_attributes
to_h
end

# @since x.x.x
# @since 0.3.1
# @api private
def _compute_params
@attributes = if self.class.whitelisting?
Expand All @@ -152,7 +152,7 @@ def _compute_params
@attributes = Utils::Attributes.new(@attributes)
end

# @since x.x.x
# @since 0.3.1
# @api private
def _params
{}.tap do |result|
Expand All @@ -165,7 +165,7 @@ def _params
end
end

# @since x.x.x
# @since 0.3.1
# @api private
def _whitelisted_params
{}.tap do |result|
Expand Down
2 changes: 1 addition & 1 deletion lib/lotus/action/rack.rb
Expand Up @@ -147,7 +147,7 @@ def request_id
#
# @return [Lotus::Action::Request] The request
#
# @since x.x.x
# @since 0.3.1
#
# @example
# require 'lotus/controller'
Expand Down
20 changes: 10 additions & 10 deletions lib/lotus/action/request.rb
Expand Up @@ -5,78 +5,78 @@ module Action
# An HTTP request based on top of Rack::Request.
# This guarantees backwards compatibility with with Rack.
#
# @since x.x.x
# @since 0.3.1
#
# @see http://www.rubydoc.info/gems/rack/Rack/Request
class Request < ::Rack::Request

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def content_type
raise NotImplementedError, 'Please use Action#content_type'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def session
raise NotImplementedError, 'Please include Action::Session and use Action#session'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def cookies
raise NotImplementedError, 'Please include Action::Cookies and use Action#cookies'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def params
raise NotImplementedError, 'Please use params passed to Action#call'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def update_param(*)
raise NotImplementedError, 'Please use params passed to Action#call'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def delete_param(*)
raise NotImplementedError, 'Please use params passed to Action#call'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def [](*)
raise NotImplementedError, 'Please use params passed to Action#call'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def []=(*)
raise NotImplementedError, 'Please use params passed to Action#call'
end

# @raise [NotImplementedError]
#
# @since x.x.x
# @since 0.3.1
# @api private
def values_at(*)
raise NotImplementedError, 'Please use params passed to Action#call'
Expand Down
2 changes: 1 addition & 1 deletion lib/lotus/controller/version.rb
Expand Up @@ -3,6 +3,6 @@ module Controller
# Defines the version
#
# @since 0.1.0
VERSION = '0.3.0'.freeze
VERSION = '0.3.1'.freeze
end
end
4 changes: 2 additions & 2 deletions lotus-controller.gemspec
Expand Up @@ -6,8 +6,8 @@ require 'lotus/controller/version'
Gem::Specification.new do |spec|
spec.name = 'lotus-controller'
spec.version = Lotus::Controller::VERSION
spec.authors = ['Luca Guidi']
spec.email = ['me@lucaguidi.com']
spec.authors = ['Luca Guidi', 'Trung Lê']
spec.email = ['me@lucaguidi.com', 'trung.le@ruby-journal.com']
spec.description = %q{Complete, fast and testable actions for Rack}
spec.summary = %q{Complete, fast and testable actions for Rack and Lotus}
spec.homepage = 'http://lotusrb.org'
Expand Down
2 changes: 1 addition & 1 deletion test/version_test.rb
Expand Up @@ -2,6 +2,6 @@

describe Lotus::Controller::VERSION do
it 'returns the current version' do
Lotus::Controller::VERSION.must_equal '0.3.0'
Lotus::Controller::VERSION.must_equal '0.3.1'
end
end

0 comments on commit 6d5487b

Please sign in to comment.