hanami-router 2.3.0 → 3.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bc038728052f6719d7a3c7ecfbfbb02a5b5d730ab95bafdb1a8415602faa861
4
- data.tar.gz: 961ad5a29c273a42526261c5305d41dc21530c16baf20ed01c106ab7c8b635ff
3
+ metadata.gz: de8e82b648b6f8ca9d9962074d411fb23f01455d119fb703742999d8e11c72b4
4
+ data.tar.gz: '0081e3779fa653bfcf58bd5ef06bb91b472c163082bacbdc81db08ee62d94d1c'
5
5
  SHA512:
6
- metadata.gz: 723502c7e0e4dd4beba5de8a1c3e77dd8e912103f833dc709f7c8f001702a54b93128222768721b4391ce4ee3e1a7d951046bdcb67132b406d6582159394bdd6
7
- data.tar.gz: 646f78f7b642bffc4ff8be39e6c7fff011ade92ee8154651d66aafe1b803de0e4901151a01a962af6832c3ace23d4f27167186cdac26de1a29cc3453f02b2ca2
6
+ metadata.gz: 0fe1979c1f87763136879f17db77b9c5ca6bfc42af9916818ec70e292b2d7a86ae10c2d2c42f5e82f16406a4adf926bff9751c224a419831af0a1582c1e98c46
7
+ data.tar.gz: d604701c43c8446939c4e7be8322d9384b197d1142b61fc7d01a3c96080ebd2d5c5538570d2f1af702ef7b323d5b3e2af55dabeee645f30e14d3f8cb4b0808e7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,65 @@
1
1
  # Hanami::Router
2
2
 
3
- Rack compatible HTTP router for Ruby
3
+ Rack compatible HTTP router for Ruby.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+
9
+ ### Changed
10
+
11
+ ### Deprecated
12
+
13
+ ### Removed
14
+
15
+ ### Fixed
16
+
17
+ ### Security
18
+
19
+ [Unreleased]: http://github.com/hanami/hanami-router/compare/v3.0.0.rc1...HEAD
20
+
21
+ ## [3.0.0.rc1] - 2026-06-16
22
+
23
+ ### Added
24
+
25
+ - Add `#permanent_redirect` and `#temporary_redirect` helpers for 301 and 302 responses. (@cllns in #302)
26
+
27
+ ### Changed
28
+
29
+ - **BREAKING:** `#redirect` now requires an explicit `code:` argument. Use `#permanent_redirect` or `#temporary_redirect` for the common cases, and pass `code:` to `#redirect` for less common codes (e.g. `303`, `307`, `308`). (@cllns in #302)
30
+ - Upgrade mustermann to 3.1 and remove mustermann-contrib dependency. (@rkh in #300)
31
+ - Require Ruby 3.3 or newer.
32
+
33
+ ### Fixed
34
+
35
+ - Allow URL generation (via `#path`) to work with array variables. (@inouire in #304)
36
+
37
+ [3.0.0.rc1]: http://github.com/hanami/hanami-router/compare/v2.3.1...v3.0.0.rc1
38
+
39
+ ## [2.3.1] - 2025-12-17
40
+
41
+ ### Changed
42
+
43
+ - Require Rack version 2.2.16 or higher, which is the earliest version of Rack 2.x that will run on Ruby 4.0 as well as our currently supported Ruby versions (3.2, 3.3, 3.4). (@cllns in 2b15582)
44
+
45
+ ### Fixed
46
+
47
+ - Set correct Rack `"SCRIPT_NAME"` value for mounts under dynamic prefixes. (@timriley in #294).
48
+
49
+ For example, given a mount under `scope '/stations/:station_id'`, the "SCRIPT_NAME" will be e.g. `"/stations/42"` rather than `"/stations/:station_id"`.
50
+ - For a mount with a prefix, allow the Rack `"PATH_INFO"` value to remain an empty string when a request is made for that exact prefix only. (@timriley in #295)
51
+
52
+ Given the following:
53
+
54
+ ```ruby
55
+ mount ->(env) { [200, {}, [env["PATH_INFO"]] }, at: "/settings"
56
+ ```
57
+
58
+ When a request is made to `"/settings"`, the `"SCRIPT_NAME"` will be `"/settings"` and `"PATH_INFO"` will be `""`. This ensures that the Rack environment can be used to reconstruct the same path as used for the original request.
59
+
60
+ To ensure a mounted router instance can still route to its root, treat `""` the same as `"/"` for the purposes of matching routes.
61
+
62
+ [2.3.1]: http://github.com/hanami/hanami-router/compare/v2.3.0...v2.3.1
4
63
 
5
64
  ## v2.3.0 - 2025-11-12
6
65
 
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2026 Hanakai team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,20 +1,14 @@
1
- # Hanami::Router
1
+ <!--- This file is synced from hanakai-rb/repo-sync -->
2
2
 
3
- Rack compatible, lightweight, and fast HTTP Router for Ruby and [Hanami](http://hanamirb.org).
3
+ [actions]: https://github.com/hanami/hanami-router/actions
4
+ [chat]: https://discord.gg/naQApPAsZB
5
+ [forum]: https://discourse.hanamirb.org
6
+ [rubygem]: https://rubygems.org/gems/hanami-router
4
7
 
5
- ## Status
6
-
7
- [![Gem Version](https://badge.fury.io/rb/hanami-router.svg)](https://badge.fury.io/rb/hanami-router)
8
- [![CI](https://github.com/hanami/router/actions/workflows/ci.yml/badge.svg)](https://github.com/hanami/router/actions?query=workflow%3Aci+branch%3Amain)
9
-
10
- ## Contact
11
-
12
- * Home page: http://hanamirb.org
13
- * Mailing List: http://hanamirb.org/mailing-list
14
- * API Doc: http://rubydoc.info/gems/hanami-router
15
- * Bugs/Issues: https://github.com/hanami/router/issues
16
- * Chat: http://chat.hanamirb.org
8
+ # Hanami Router [![Gem Version](https://badge.fury.io/rb/hanami-router.svg)][rubygem] [![CI Status](https://github.com/hanami/hanami-router/workflows/CI/badge.svg)][actions]
17
9
 
10
+ [![Forum](https://img.shields.io/badge/Forum-dc360f?logo=discourse&logoColor=white)][forum]
11
+ [![Chat](https://img.shields.io/badge/Chat-717cf8?logo=discord&logoColor=white)][chat]
18
12
 
19
13
  ## Installation
20
14
 
@@ -73,7 +67,7 @@ Hanami::Router.new do
73
67
  get "/dashboard", to: Dashboard::Index
74
68
  get "/rack-app", to: RackApp.new
75
69
 
76
- redirect "/legacy", to: "/"
70
+ permanent_redirect "/legacy", to: "/"
77
71
 
78
72
  mount Api::App, at: "/api"
79
73
 
@@ -152,9 +146,13 @@ end
152
146
  ```ruby
153
147
  Hanami::Router.new do
154
148
  get "/redirect_destination", to: ->(env) { [200, {}, ["Redirect destination!"]] }
155
- redirect "/legacy", to: "/redirect_destination"
156
- redirect "/learn-more", to: "https://hanamirb.org/"
157
- redirect "/chat", to: URI("xmpp://myapp.net/")
149
+ permanent_redirect "/legacy", to: "/redirect_destination"
150
+ temporary_redirect "/today", to: "/redirect_destination"
151
+ permanent_redirect "/learn-more", to: "https://hanamirb.org/"
152
+ permanent_redirect "/chat", to: URI("xmpp://myapp.net/")
153
+
154
+ # For less common codes (303, 307, 308), use redirect with an explicit code:
155
+ redirect "/submit", to: "/result", code: 303
158
156
  end
159
157
  ```
160
158
 
@@ -341,10 +339,6 @@ route.verb # "POST"
341
339
  route.routable? # => false
342
340
  ```
343
341
 
344
- ## Versioning
345
-
346
- __Hanami::Router__ uses [Semantic Versioning 2.0.0](http://semver.org)
347
-
348
342
  ## Contributing
349
343
 
350
344
  1. Fork this repo to your account and clone it locally (`git clone git@github.com:your-pseudo/your-cloned-repo.git`)
@@ -356,8 +350,15 @@ __Hanami::Router__ uses [Semantic Versioning 2.0.0](http://semver.org)
356
350
  7. Push to the branch (`git push origin my-new-feature`)
357
351
  8. Create new Pull Request on Github with some context on what you're trying to fix or to improve with this contribution
358
352
 
359
- Thank you for contributing!
353
+ Thank you for contributing!
354
+
355
+ ## Links
356
+
357
+ - [User documentation](https://hanamirb.org)
358
+ - [API documentation](http://rubydoc.info/gems/hanami-router)
359
+
360
+
361
+ ## License
360
362
 
361
- ## Copyright
363
+ See `LICENSE` file.
362
364
 
363
- Copyright © 2014–2025 Hanami Team – Released under MIT License
@@ -1,35 +1,37 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path("../lib", __FILE__)
3
+ # This file is synced from hanakai-rb/repo-sync. To update it, edit repo-sync.yml.
4
+
5
+ lib = File.expand_path("lib", __dir__)
4
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
7
  require "hanami/router/version"
6
8
 
7
9
  Gem::Specification.new do |spec|
8
10
  spec.name = "hanami-router"
9
- spec.version = Hanami::Router::VERSION
10
11
  spec.authors = ["Hanakai team"]
11
12
  spec.email = ["info@hanakai.org"]
12
- spec.description = "Rack compatible HTTP router for Ruby"
13
- spec.summary = "Rack compatible HTTP router for Ruby and Hanami"
14
- spec.homepage = "http://hanamirb.org"
15
13
  spec.license = "MIT"
14
+ spec.version = Hanami::Router::VERSION.dup
16
15
 
17
- spec.files = `git ls-files -- lib/* CHANGELOG.md LICENSE.md README.md hanami-router.gemspec`.split($/)
18
- spec.executables = []
16
+ spec.summary = "Rack compatible HTTP router for Ruby and Hanami"
17
+ spec.description = spec.summary
18
+ spec.homepage = "https://hanamirb.org"
19
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "hanami-router.gemspec", "lib/**/*"]
20
+ spec.bindir = "exe"
21
+ spec.executables = Dir["exe/*"].map { |f| File.basename(f) }
19
22
  spec.require_paths = ["lib"]
20
- spec.metadata["rubygems_mfa_required"] = "true"
21
- spec.required_ruby_version = ">= 3.2"
22
23
 
23
- spec.add_dependency "rack", ">= 2.0"
24
- spec.add_dependency "mustermann", "~> 3.0"
25
- spec.add_dependency "mustermann-contrib", "~> 3.0"
26
- spec.add_dependency "csv", "~> 3.3"
24
+ spec.extra_rdoc_files = ["README.md", "CHANGELOG.md", "LICENSE"]
27
25
 
28
- spec.add_development_dependency "bundler", ">= 1.6", "< 3"
29
- spec.add_development_dependency "rake", "~> 13"
30
- spec.add_development_dependency "rack-test", "~> 2.0"
31
- spec.add_development_dependency "rspec", "~> 3.8"
26
+ spec.metadata["changelog_uri"] = "https://github.com/hanami/hanami-router/blob/main/CHANGELOG.md"
27
+ spec.metadata["source_code_uri"] = "https://github.com/hanami/hanami-router"
28
+ spec.metadata["bug_tracker_uri"] = "https://github.com/hanami/hanami-router/issues"
29
+ spec.metadata["funding_uri"] = "https://github.com/sponsors/hanami"
32
30
 
33
- spec.add_development_dependency "rubocop", "~> 1.0"
34
- spec.add_development_dependency "rubocop-performance", "~> 1.0"
31
+ spec.required_ruby_version = ">= 3.3"
32
+
33
+ spec.add_runtime_dependency "rack", ">= 2.2.16"
34
+ spec.add_runtime_dependency "mustermann", "~> 3.1"
35
+ spec.add_runtime_dependency "csv", "~> 3.3"
35
36
  end
37
+
@@ -60,7 +60,7 @@ module Hanami
60
60
  parsers.each_with_object(registry) do |spec, memo|
61
61
  if spec.is_a?(Hash) && spec.size > 1
62
62
  spec.each do |key, value|
63
- build_parsers([key => [value]], memo)
63
+ build_parsers([{key => [value]}], memo)
64
64
  end
65
65
  else
66
66
  name, *media_types = Array(*spec).flatten(0)
@@ -59,7 +59,7 @@ module Hanami
59
59
  # raise Hanami::Middleware::BodyParser::BodyParsingError.new(exception.message)
60
60
  # end
61
61
  # end
62
- def parse(body, env = {}) # rubocop:disable Lint/UnusedMethodArgument
62
+ def parse(body, env = {})
63
63
  raise NoMethodError
64
64
  end
65
65
  end
@@ -14,9 +14,12 @@ module Hanami
14
14
  if @prefix.to_s == "/"
15
15
  env[::Rack::SCRIPT_NAME] = EMPTY_STRING
16
16
  else
17
- env[::Rack::SCRIPT_NAME] = env[::Rack::SCRIPT_NAME].to_s + @prefix.to_s
18
- env[::Rack::PATH_INFO] = env[::Rack::PATH_INFO].sub(@prefix.to_s, EMPTY_STRING)
19
- env[::Rack::PATH_INFO] = DEFAULT_PREFIX if env[::Rack::PATH_INFO] == EMPTY_STRING
17
+ # To set SCRIPT_NAME, use the actual matched portion of the path, not the prefix string
18
+ # itself. This is important for prefixes with dynamic segments like "/stations/:id". In
19
+ # this case, we want e.g. "/stations/42" as SCRIPT_NAME, not "/stations/:id".
20
+ matched_path = match.to_s
21
+ env[::Rack::SCRIPT_NAME] = env[::Rack::SCRIPT_NAME].to_s + matched_path
22
+ env[::Rack::PATH_INFO] = env[::Rack::PATH_INFO].sub(matched_path, EMPTY_STRING)
20
23
  end
21
24
 
22
25
  [@app, match.named_captures]
@@ -63,7 +63,7 @@ module Hanami
63
63
 
64
64
  # @api private
65
65
  # @since 2.0.0
66
- def initialize(http_method:, path:, to:, as: nil, constraints: {}, blk: nil) # rubocop:disable Metrics/ParameterLists
66
+ def initialize(http_method:, path:, to:, as: nil, constraints: {}, blk: nil)
67
67
  @http_method = http_method
68
68
  @path = path
69
69
  @to = to
@@ -6,7 +6,6 @@ require_relative "prefix"
6
6
 
7
7
  module Hanami
8
8
  class Router
9
- # @since 2.0.0
10
9
  # @api private
11
10
  class UrlHelpers
12
11
  # @since 2.0.0
@@ -19,27 +18,40 @@ module Hanami
19
18
  @prefix = Prefix.new(prefix)
20
19
  end
21
20
 
22
- # @since 2.0.0
23
21
  # @api private
24
22
  def add(name, segment)
25
23
  @named[name] = segment
26
24
  end
27
25
 
28
- # @since 2.0.0
29
26
  # @api private
30
27
  def path(name, variables = {})
31
- @named.fetch(name.to_sym) do
32
- raise MissingRouteError.new(name)
33
- end.expand(:append, variables)
28
+ scalar_vars = variables.reject { |_, value| value.is_a?(Array) }
29
+ array_vars = array_query_vars(variables)
30
+
31
+ expanded_path = @named
32
+ .fetch(name.to_sym) { raise MissingRouteError.new(name) }
33
+ .expand(:append, scalar_vars)
34
+
35
+ return expanded_path if array_vars.empty?
36
+
37
+ join_char = expanded_path.include?("?") ? "&" : "?"
38
+ "#{expanded_path}#{join_char}#{Rack::Utils.build_query(array_vars)}"
34
39
  rescue Mustermann::ExpandError => exception
35
40
  raise InvalidRouteExpansionError.new(name, exception.message)
36
41
  end
37
42
 
38
- # @since 2.0.0
39
43
  # @api private
40
44
  def url(name, variables = {})
41
45
  @base_url + @prefix.join(path(name, variables)).to_s
42
46
  end
47
+
48
+ private
49
+
50
+ def array_query_vars(variables = {})
51
+ variables
52
+ .select { |_, value| value.is_a?(Array) }
53
+ .to_h { |key, value| ["#{key}[]", value] }
54
+ end
43
55
  end
44
56
  end
45
57
  end
@@ -6,8 +6,7 @@ module Hanami
6
6
  #
7
7
  # @return [String]
8
8
  #
9
- # @since 0.1.0
10
9
  # @api public
11
- VERSION = "2.3.0"
10
+ VERSION = "3.0.0.rc1"
12
11
  end
13
12
  end
data/lib/hanami/router.rb CHANGED
@@ -380,22 +380,70 @@ module Hanami
380
380
 
381
381
  # Defines a route that redirects the incoming request to another path.
382
382
  #
383
+ # `code:` is required. For the common cases, prefer {#permanent_redirect} (301)
384
+ # or {#temporary_redirect} (302). Use this method when you need a less common
385
+ # redirect code such as 303 See Other, 307 Temporary Redirect, or 308 Permanent Redirect.
386
+ #
383
387
  # @param path [String] the relative URL to be matched
384
388
  # @param to [#call] the Rack endpoint
385
389
  # @param as [Symbol, Array<Symbol>] a unique name for the route, or a ["prefix", "name"] array,
386
390
  # to add a prefix to the name when nested within scopes.
387
- # @param code [Integer] a HTTP status code to use for the redirect
391
+ # @param code [Integer] the HTTP status code to use for the redirect (e.g. 303, 307, 308)
388
392
  #
389
393
  # @raise [Hanami::Router::UnknownHTTPStatusCodeError] when an unknown redirect code is given
390
394
  #
391
395
  # @since 0.1.0
392
396
  #
393
- # @see #get
394
- # @see #initialize
395
- def redirect(path, to: nil, as: nil, code: DEFAULT_REDIRECT_CODE)
397
+ # @see #redirect_permanent
398
+ # @see #redirect_temporary
399
+ def redirect(path, code:, to: nil, as: nil)
396
400
  get(path, to: _redirect(to, code), as: as)
397
401
  end
398
402
 
403
+ # Defines a route that permanently redirects the incoming request to another path.
404
+ #
405
+ # Issues a 301 Moved Permanently response, indicating that the resource has moved to
406
+ # a new location and all future requests should use the new URL.
407
+ #
408
+ # NOTE: Browsers cache permanent redirects aggressively. Once a client has followed
409
+ # a 301, it may not re-request the original URL, making the redirect hard to undo
410
+ # without clearing the browser cache. Prefer {#redirect_temporary} when in doubt.
411
+ #
412
+ # @param path [String] the relative URL to be matched
413
+ # @param to [#call] the Rack endpoint
414
+ # @param as [Symbol, Array<Symbol>] a unique name for the route, or a ["prefix", "name"] array,
415
+ # to add a prefix to the name when nested within scopes.
416
+ #
417
+ # @raise [Hanami::Router::UnknownHTTPStatusCodeError] when an unknown redirect code is given
418
+ #
419
+ # @since 3.0.0
420
+ #
421
+ # @see #redirect
422
+ # @see #redirect_temporary
423
+ def redirect_permanent(path, to: nil, as: nil)
424
+ get(path, to: _redirect(to, PERMANENT_REDIRECT_CODE), as: as)
425
+ end
426
+
427
+ # Defines a route that temporarily redirects the incoming request to another path.
428
+ #
429
+ # Issues a 302 Found response, indicating that the resource is temporarily available
430
+ # at a different URL and future requests should continue to use the original URL.
431
+ #
432
+ # @param path [String] the relative URL to be matched
433
+ # @param to [#call] the Rack endpoint
434
+ # @param as [Symbol, Array<Symbol>] a unique name for the route, or a ["prefix", "name"] array,
435
+ # to add a prefix to the name when nested within scopes.
436
+ #
437
+ # @raise [Hanami::Router::UnknownHTTPStatusCodeError] when an unknown redirect code is given
438
+ #
439
+ # @since 3.0.0
440
+ #
441
+ # @see #redirect
442
+ # @see #redirect_permanent
443
+ def redirect_temporary(path, to: nil, as: nil)
444
+ get(path, to: _redirect(to, TEMPORARY_REDIRECT_CODE), as: as)
445
+ end
446
+
399
447
  # Defines a routing scope. Routes defined in the context of a scope,
400
448
  # inherit the given path as path prefix and as a named routes prefix.
401
449
  #
@@ -642,7 +690,12 @@ module Hanami
642
690
  # @since 2.0.0
643
691
  # @api private
644
692
  def fixed(env)
645
- @fixed.dig(env[::Rack::REQUEST_METHOD], env[::Rack::PATH_INFO])
693
+ path_info = env[::Rack::PATH_INFO]
694
+ # Treat empty PATH_INFO as "/" for route matching. This allows root routes (defined as "/") to
695
+ # match the empty PATH_INFO that is set for requests to a mount without a trailing slash.
696
+ path_info = DEFAULT_PREFIX if path_info == EMPTY_STRING
697
+
698
+ @fixed.dig(env[::Rack::REQUEST_METHOD], path_info)
646
699
  end
647
700
 
648
701
  # @since 2.0.0
@@ -740,9 +793,13 @@ module Hanami
740
793
  # @api private
741
794
  DEFAULT_RESOLVER = ->(_, to) { to }
742
795
 
743
- # @since 2.0.0
796
+ # @since 3.0.0
797
+ # @api private
798
+ PERMANENT_REDIRECT_CODE = 301
799
+
800
+ # @since 3.0.0
744
801
  # @api private
745
- DEFAULT_REDIRECT_CODE = 301
802
+ TEMPORARY_REDIRECT_CODE = 302
746
803
 
747
804
  # @since 2.0.0
748
805
  # @api private
@@ -957,7 +1014,7 @@ module Hanami
957
1014
  inspector: @inspector
958
1015
  }
959
1016
 
960
- self.class.new(**options.merge(new_options), &(blk || @blk))
1017
+ self.class.new(**options.merge(new_options), &blk || @blk)
961
1018
  end
962
1019
 
963
1020
  # @since 2.0.0
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 3.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hanakai team
8
- bindir: bin
8
+ bindir: exe
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
@@ -15,42 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '2.0'
18
+ version: 2.2.16
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '2.0'
25
+ version: 2.2.16
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: mustermann
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '3.0'
32
+ version: '3.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '3.0'
40
- - !ruby/object:Gem::Dependency
41
- name: mustermann-contrib
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '3.0'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '3.0'
39
+ version: '3.1'
54
40
  - !ruby/object:Gem::Dependency
55
41
  name: csv
56
42
  requirement: !ruby/object:Gem::Requirement
@@ -65,105 +51,18 @@ dependencies:
65
51
  - - "~>"
66
52
  - !ruby/object:Gem::Version
67
53
  version: '3.3'
68
- - !ruby/object:Gem::Dependency
69
- name: bundler
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: '1.6'
75
- - - "<"
76
- - !ruby/object:Gem::Version
77
- version: '3'
78
- type: :development
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: '1.6'
85
- - - "<"
86
- - !ruby/object:Gem::Version
87
- version: '3'
88
- - !ruby/object:Gem::Dependency
89
- name: rake
90
- requirement: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - "~>"
93
- - !ruby/object:Gem::Version
94
- version: '13'
95
- type: :development
96
- prerelease: false
97
- version_requirements: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - "~>"
100
- - !ruby/object:Gem::Version
101
- version: '13'
102
- - !ruby/object:Gem::Dependency
103
- name: rack-test
104
- requirement: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - "~>"
107
- - !ruby/object:Gem::Version
108
- version: '2.0'
109
- type: :development
110
- prerelease: false
111
- version_requirements: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - "~>"
114
- - !ruby/object:Gem::Version
115
- version: '2.0'
116
- - !ruby/object:Gem::Dependency
117
- name: rspec
118
- requirement: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - "~>"
121
- - !ruby/object:Gem::Version
122
- version: '3.8'
123
- type: :development
124
- prerelease: false
125
- version_requirements: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - "~>"
128
- - !ruby/object:Gem::Version
129
- version: '3.8'
130
- - !ruby/object:Gem::Dependency
131
- name: rubocop
132
- requirement: !ruby/object:Gem::Requirement
133
- requirements:
134
- - - "~>"
135
- - !ruby/object:Gem::Version
136
- version: '1.0'
137
- type: :development
138
- prerelease: false
139
- version_requirements: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: '1.0'
144
- - !ruby/object:Gem::Dependency
145
- name: rubocop-performance
146
- requirement: !ruby/object:Gem::Requirement
147
- requirements:
148
- - - "~>"
149
- - !ruby/object:Gem::Version
150
- version: '1.0'
151
- type: :development
152
- prerelease: false
153
- version_requirements: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - "~>"
156
- - !ruby/object:Gem::Version
157
- version: '1.0'
158
- description: Rack compatible HTTP router for Ruby
54
+ description: Rack compatible HTTP router for Ruby and Hanami
159
55
  email:
160
56
  - info@hanakai.org
161
57
  executables: []
162
58
  extensions: []
163
- extra_rdoc_files: []
59
+ extra_rdoc_files:
60
+ - CHANGELOG.md
61
+ - LICENSE
62
+ - README.md
164
63
  files:
165
64
  - CHANGELOG.md
166
- - LICENSE.md
65
+ - LICENSE
167
66
  - README.md
168
67
  - hanami-router.gemspec
169
68
  - lib/hanami/middleware/app.rb
@@ -197,11 +96,14 @@ files:
197
96
  - lib/hanami/router/trie.rb
198
97
  - lib/hanami/router/url_helpers.rb
199
98
  - lib/hanami/router/version.rb
200
- homepage: http://hanamirb.org
99
+ homepage: https://hanamirb.org
201
100
  licenses:
202
101
  - MIT
203
102
  metadata:
204
- rubygems_mfa_required: 'true'
103
+ changelog_uri: https://github.com/hanami/hanami-router/blob/main/CHANGELOG.md
104
+ source_code_uri: https://github.com/hanami/hanami-router
105
+ bug_tracker_uri: https://github.com/hanami/hanami-router/issues
106
+ funding_uri: https://github.com/sponsors/hanami
205
107
  rdoc_options: []
206
108
  require_paths:
207
109
  - lib
@@ -209,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
209
111
  requirements:
210
112
  - - ">="
211
113
  - !ruby/object:Gem::Version
212
- version: '3.2'
114
+ version: '3.3'
213
115
  required_rubygems_version: !ruby/object:Gem::Requirement
214
116
  requirements:
215
117
  - - ">="
data/LICENSE.md DELETED
@@ -1,22 +0,0 @@
1
- Copyright © 2014 Hanami Team
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.