Merge branch 'master' into develop

This commit is contained in:
Luca Guidi 2017-05-25 15:53:45 +02:00
commit 0f44b8525e
11 changed files with 29 additions and 25 deletions

View File

@ -1,6 +1,10 @@
# Hanami::Controller
Complete, fast and testable actions for Rack
## v1.0.0 - 2017-04-06
## v1.0.0.rc1 - 2017-03-31
## v1.0.0.beta3 - 2017-03-17
### Changed
- [Luca Guidi] `Action#flash` is now public API

View File

@ -7,11 +7,11 @@ unless ENV['TRAVIS']
end
gem 'minitest', '~> 5.8'
gem 'hanami-utils', '~> 1.0.0.beta1', require: false, github: 'hanami/utils', branch: '1.0.x'
gem 'hanami-router', '~> 1.0.0.beta1', require: false, github: 'hanami/router', branch: '1.0.x'
gem 'hanami-utils', '~> 1.0', require: false, git: 'https://github.com/hanami/utils.git', branch: '1.0.x'
gem 'hanami-router', '~> 1.0', require: false, git: 'https://github.com/hanami/router.git', branch: '1.0.x'
group :validations do
gem 'hanami-validations', '~> 1.0.0.beta1', require: false, github: 'hanami/validations', branch: '1.0.x'
gem 'hanami-validations', '~> 1.0', require: false, git: 'https://github.com/hanami/validations.git', branch: '1.0.x'
end
gem 'coveralls', require: false

View File

@ -6,8 +6,8 @@ require 'hanami/controller/version'
Gem::Specification.new do |spec|
spec.name = 'hanami-controller'
spec.version = Hanami::Controller::VERSION
spec.authors = ['Luca Guidi', 'Trung Lê', 'Alfonso Uceda']
spec.email = ['me@lucaguidi.com', 'trung.le@ruby-journal.com', 'uceda73@gmail.com']
spec.authors = ['Luca Guidi']
spec.email = ['me@lucaguidi.com']
spec.description = %q{Complete, fast and testable actions for Rack}
spec.summary = %q{Complete, fast and testable actions for Rack and Hanami}
spec.homepage = 'http://hanamirb.org'
@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.3.0'
spec.add_dependency 'rack', '~> 2.0'
spec.add_dependency 'hanami-utils', '~> 1.0.0.beta1'
spec.add_dependency 'hanami-utils', '~> 1.0'
spec.add_development_dependency 'bundler', '~> 1.6'
spec.add_development_dependency 'rack-test', '~> 0.6'

View File

@ -20,7 +20,7 @@ module Hanami
# The key that returns Rack session params from the Rack env
# Please note that this is used only when an action is unit tested.
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
#
# @example

View File

@ -93,7 +93,7 @@ module Hanami
# @return [String]
#
# @since 1.0.0.beta2
# @since 1.0.0
def inspect
"#<#{self.class}:#{'0x%x' % (__id__ << 1)} #{@merged.inspect}>"
end
@ -144,7 +144,7 @@ module Hanami
@session.delete(SESSION_KEY) if empty?
end
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
#
# @see Hanami::Action::Flash#[]

View File

@ -42,7 +42,7 @@ module Hanami
# Most commom MIME Types used for responses
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
MIME_TYPES = {
txt: 'text/plain',

View File

@ -12,19 +12,19 @@ module Hanami
module Rack
# Rack SPEC response code
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
RESPONSE_CODE = 0
# Rack SPEC response headers
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
RESPONSE_HEADERS = 1
# Rack SPEC response body
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
RESPONSE_BODY = 2
@ -36,7 +36,7 @@ module Hanami
# Not Found
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
NOT_FOUND = 404
@ -62,14 +62,14 @@ module Hanami
# The Content-Length HTTP header
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
CONTENT_LENGTH = 'Content-Length'.freeze
# The non-standard HTTP header to pass the control over when a resource
# cannot be found by the current endpoint
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
X_CASCADE = 'X-Cascade'.freeze
@ -335,7 +335,7 @@ module Hanami
# @param path [String, Pathname] path to the file to be sent
# @return [void]
#
# @since 1.0.0.beta2
# @since 1.0.0
#
# @example
# require 'hanami/controller'
@ -373,7 +373,7 @@ module Hanami
@_env[REQUEST_METHOD]
end
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
def _send_file(response)
headers.merge!(response[RESPONSE_HEADERS])

View File

@ -12,7 +12,7 @@ module Hanami
class File
# The key that returns path info from the Rack env
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
PATH_INFO = "PATH_INFO".freeze

View File

@ -30,7 +30,7 @@ module Hanami
#
# It serves as base root for file downloads
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
DEFAULT_PUBLIC_DIRECTORY = 'public'.freeze
@ -220,7 +220,7 @@ module Hanami
#
# @param exception [Exception] an exception
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
#
# @see Hanami::Controller::Configuration#handle_exception
@ -439,7 +439,7 @@ module Hanami
#
# @param mime_types [Array] the set of MIME types
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
#
# @see Hanami::Action::Mime::ClassMethods#accept
@ -652,7 +652,7 @@ module Hanami
end
# @api private
# @since 1.0.0.beta2
# @since 1.0.0
attr_reader :root_directory
def public_directory(value = nil)

View File

@ -3,6 +3,6 @@ module Hanami
# Defines the version
#
# @since 0.1.0
VERSION = '1.0.0.beta3'.freeze
VERSION = '1.0.0'.freeze
end
end

View File

@ -2,6 +2,6 @@ require 'test_helper'
describe Hanami::Controller::VERSION do
it 'returns the current version' do
Hanami::Controller::VERSION.must_equal '1.0.0.beta3'
Hanami::Controller::VERSION.must_equal '1.0.0'
end
end