rutter 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4df69773cb0979c061fae5c421243b6d0b9892e244a0eb14442b894c8657e094
4
- data.tar.gz: 0dc82eefc22f4f82c79b6e85dab56605ee9eab02c99ccea063c51d9734eb66d4
3
+ metadata.gz: aaf97ec12f6052df590a9a37d2979397122d416baffd31e60e18d12f932c6fff
4
+ data.tar.gz: 01ce145fe6f40151da57c92d4d7cf8acabb55e17c6b49ff82fdde2469f7838d2
5
5
  SHA512:
6
- metadata.gz: 29296019b52750432a1386e465ec29611d3bd47261b80e7a50992ecb973ccd787775e4eec42fbe98a9bf0efd8b75e25644f3a750f315f6c5694106972b79cfdc
7
- data.tar.gz: 0f808af9d007dfd92be6eac06cb9be4a794efbf5c9b9b9e4a18f69c9fee7705bd4864cdaba5f55933011d2118886ea2cfdafb4237a8f51f96d75d44c95d9a1c7
6
+ metadata.gz: db521004f7e73d85d4c2f83482248a596dc3d4627bd1155c384c6d463c249547c1608053af0fdd8e9902c3ca168d822f33d9f84645f47ce349e049f24336d26c
7
+ data.tar.gz: a405208deab4e117809969d66d3e370d00fef1a505f8e53708d66f2f5ebb1d388d43cf46ed5a17bf03756f8cfe2965ec6070b1d39995c13132e850b4b48eae0e
data/lib/rutter/route.rb CHANGED
@@ -71,7 +71,7 @@ module Rutter
71
71
  #
72
72
  # @return [Hash]
73
73
  def params(path)
74
- @pattern.params(path)
74
+ @pattern.params(path) || {}
75
75
  end
76
76
 
77
77
  # Calls the endpoint.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Rutter
4
4
  # Current version number.
5
- VERSION = "0.3.2"
5
+ VERSION = "0.3.3"
6
6
  end
data/rutter.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = spec.files.grep(%r{^(spec)/})
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_runtime_dependency "mustermann", "~> 1.0"
23
+ spec.add_runtime_dependency "mustermann", "~> 1.1"
24
24
  spec.add_runtime_dependency "rack", "~> 2.0"
25
25
 
26
26
  spec.add_development_dependency "bundler"
@@ -59,6 +59,13 @@ module Rutter
59
59
  expect(route.params("/pages/54"))
60
60
  .to eq("id" => "54", "title" => nil)
61
61
  end
62
+
63
+ it "returns always return a hash" do
64
+ route = Route.new("/pages", endpoint)
65
+
66
+ expect(route.params("/pages"))
67
+ .to eq({})
68
+ end
62
69
  end
63
70
  end
64
71
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rutter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Sandelius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-21 00:00:00.000000000 Z
11
+ date: 2021-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mustermann
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: 2.5.0
149
149
  requirements: []
150
- rubygems_version: 3.1.2
150
+ rubygems_version: 3.0.3
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: HTTP router for Rack.