Ruby 3.0+ only
This commit is contained in:
parent
2c731a842c
commit
7635ec39e8
|
@ -22,9 +22,8 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
ruby:
|
||||
- "3.1"
|
||||
- "3.0"
|
||||
- "2.7"
|
||||
- "2.6"
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install package dependencies
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
# alphabetically
|
||||
inherit_from:
|
||||
- https://raw.githubusercontent.com/hanami/devtools/main/.rubocop.yml
|
||||
Lint/EmptyBlock:
|
||||
Exclude:
|
||||
- "spec/**/*.rb"
|
||||
Metrics/ParameterLists:
|
||||
Exclude:
|
||||
- "lib/hanami/router.rb"
|
||||
|
|
|
@ -25,7 +25,7 @@ Rack compatible, lightweight and fast HTTP Router for Ruby and [Hanami](http://h
|
|||
|
||||
## Rubies
|
||||
|
||||
__Hanami::Router__ supports Ruby (MRI) 2.6+
|
||||
__Hanami::Router__ supports Ruby (MRI) 3.0+
|
||||
|
||||
|
||||
## Installation
|
||||
|
|
|
@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
|
|||
spec.executables = []
|
||||
spec.test_files = spec.files.grep(%r{^(test)/})
|
||||
spec.require_paths = ["lib"]
|
||||
spec.required_ruby_version = ">= 2.6.0"
|
||||
spec.metadata["rubygems_mfa_required"] = "true"
|
||||
spec.required_ruby_version = ">= 3.0"
|
||||
|
||||
spec.add_dependency "rack", "~> 2.0"
|
||||
spec.add_dependency "mustermann", "~> 1.0"
|
||||
|
@ -29,6 +30,6 @@ Gem::Specification.new do |spec|
|
|||
spec.add_development_dependency "rack-test", "~> 1.0"
|
||||
spec.add_development_dependency "rspec", "~> 3.8"
|
||||
|
||||
spec.add_development_dependency "rubocop", "0.91"
|
||||
spec.add_development_dependency "rubocop-performance", "1.8.1"
|
||||
spec.add_development_dependency "rubocop", "~> 1.0"
|
||||
spec.add_development_dependency "rubocop-performance", "~> 1.0"
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Hanami
|
|||
|
||||
# @since 1.3.0
|
||||
# @api private
|
||||
MEDIA_TYPE_MATCHER = /\s*[;,]\s*/.freeze
|
||||
MEDIA_TYPE_MATCHER = /\s*[;,]\s*/
|
||||
|
||||
# @since 1.3.0
|
||||
# @api private
|
||||
|
|
|
@ -48,11 +48,11 @@ module Hanami
|
|||
|
||||
# @since 2.0.0
|
||||
# @api private
|
||||
DEFAULT_SEPARATOR_REGEXP = /\//.freeze
|
||||
DEFAULT_SEPARATOR_REGEXP = /\//
|
||||
|
||||
# @since 2.0.0
|
||||
# @api private
|
||||
DOUBLE_DEFAULT_SEPARATOR_REGEXP = /\/{2,}/.freeze
|
||||
DOUBLE_DEFAULT_SEPARATOR_REGEXP = /\/{2,}/
|
||||
|
||||
# @since 2.0.0
|
||||
# @api private
|
||||
|
|
|
@ -570,6 +570,7 @@ module Nested
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Avatar
|
||||
class Show
|
||||
def call(_env)
|
||||
|
@ -577,6 +578,7 @@ module Nested
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Posts
|
||||
module Comments
|
||||
class Index
|
||||
|
@ -587,6 +589,7 @@ module Nested
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
module User
|
||||
module Comments
|
||||
class Index
|
||||
|
@ -595,6 +598,7 @@ module Nested
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
module ApiKey
|
||||
class Show
|
||||
def call(_env)
|
||||
|
@ -603,6 +607,7 @@ module Nested
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Products
|
||||
module Variants
|
||||
class Index
|
||||
|
@ -610,6 +615,7 @@ module Nested
|
|||
[200, {}, ["Hello from Nested::Controllers::Products::Variants::Index"]]
|
||||
end
|
||||
end
|
||||
|
||||
class Show
|
||||
def call(_env)
|
||||
[200, {}, ["Hello from Nested::Controllers::Products::Variants::Show"]]
|
||||
|
@ -696,6 +702,7 @@ module User
|
|||
[200, {}, ["User::Post::Destroy"]]
|
||||
end
|
||||
end
|
||||
|
||||
module Comment
|
||||
class New < Action
|
||||
def call(*)
|
||||
|
|
Loading…
Reference in New Issue