Skip to content

Commit

Permalink
Merge branch 'master' into 1.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Apr 5, 2017
2 parents d1c2797 + 7564849 commit 2f8c2c8
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 23 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,8 @@
# 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
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Expand Up @@ -7,11 +7,11 @@ unless ENV['TRAVIS']
end

gem 'minitest', '~> 5.8'
gem 'hanami-utils', '~> 1.0.0.rc1', require: false, github: 'hanami/utils', branch: '1.0.x'
gem 'hanami-router', '~> 1.0.0.rc1', 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.rc1', 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
2 changes: 1 addition & 1 deletion hanami-controller.gemspec
Expand Up @@ -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.rc1'
spec.add_dependency 'hanami-utils', '~> 1.0'

spec.add_development_dependency 'bundler', '~> 1.6'
spec.add_development_dependency 'rack-test', '~> 0.6'
Expand Down
2 changes: 1 addition & 1 deletion lib/hanami/action/base_params.rb
Expand Up @@ -20,7 +20,7 @@ class BaseParams
# 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
Expand Down
4 changes: 2 additions & 2 deletions lib/hanami/action/flash.rb
Expand Up @@ -93,7 +93,7 @@ def empty?

# @return [String]
#
# @since 1.0.0.beta2
# @since 1.0.0
def inspect
"#<#{self.class}:#{'0x%x' % (__id__ << 1)} #{@merged.inspect}>"
end
Expand Down Expand Up @@ -144,7 +144,7 @@ def remove!
@session.delete(SESSION_KEY) if empty?
end

# @since 1.0.0.beta2
# @since 1.0.0
# @api private
#
# @see Hanami::Action::Flash#[]
Expand Down
2 changes: 1 addition & 1 deletion lib/hanami/action/mime.rb
Expand Up @@ -42,7 +42,7 @@ module Mime

# Most commom MIME Types used for responses
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
MIME_TYPES = {
txt: 'text/plain',
Expand Down
16 changes: 8 additions & 8 deletions lib/hanami/action/rack.rb
Expand Up @@ -12,19 +12,19 @@ module Action
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

Expand All @@ -36,7 +36,7 @@ module Rack

# Not Found
#
# @since 1.0.0.beta2
# @since 1.0.0
# @api private
NOT_FOUND = 404

Expand All @@ -62,14 +62,14 @@ module Rack

# 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

Expand Down Expand Up @@ -335,7 +335,7 @@ def send_file(path)
# @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'
Expand Down Expand Up @@ -373,7 +373,7 @@ def request_method
@_env[REQUEST_METHOD]
end

# @since 1.0.0.beta2
# @since 1.0.0
# @api private
def _send_file(response)
headers.merge!(response[RESPONSE_HEADERS])
Expand Down
2 changes: 1 addition & 1 deletion lib/hanami/action/rack/file.rb
Expand Up @@ -12,7 +12,7 @@ module Rack
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

Expand Down
8 changes: 4 additions & 4 deletions lib/hanami/controller/configuration.rb
Expand Up @@ -30,7 +30,7 @@ class Configuration
#
# It serves as base root for file downloads
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
DEFAULT_PUBLIC_DIRECTORY = 'public'.freeze

Expand Down Expand Up @@ -220,7 +220,7 @@ def handled_exception?(exception)
#
# @param exception [Exception] an exception
#
# @since 1.0.0.beta1
# @since 1.0.0
# @api private
#
# @see Hanami::Controller::Configuration#handle_exception
Expand Down Expand Up @@ -439,7 +439,7 @@ def mime_types
#
# @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
Expand Down Expand Up @@ -652,7 +652,7 @@ def mime_type_for(format)
end

# @api private
# @since 1.0.0.beta2
# @since 1.0.0
attr_reader :root_directory

def public_directory(value = nil)
Expand Down
2 changes: 1 addition & 1 deletion lib/hanami/controller/version.rb
Expand Up @@ -3,6 +3,6 @@ module Controller
# Defines the version
#
# @since 0.1.0
VERSION = '1.0.0.rc1'.freeze
VERSION = '1.0.0'.freeze
end
end
2 changes: 1 addition & 1 deletion test/version_test.rb
Expand Up @@ -2,6 +2,6 @@

describe Hanami::Controller::VERSION do
it 'returns the current version' do
Hanami::Controller::VERSION.must_equal '1.0.0.rc1'
Hanami::Controller::VERSION.must_equal '1.0.0'
end
end

0 comments on commit 2f8c2c8

Please sign in to comment.