rack-idempotency_key 0.1.0 → 0.1.1

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: 9358732d434938ba1444636f644cb3d8a161e95aa913e2c60e62f77b74cc635c
4
- data.tar.gz: 9862a6bcb70d4bb24bcb85ae6eaf07265116ecdddcdede65ba6b8effcbb2155a
3
+ metadata.gz: 52baa32ae332842d9bcdf5d7ae8a2d3e4f4597c619313dee041213051bbeec43
4
+ data.tar.gz: a83d88e91d0814bcbb4f3808fc1eb8c03a09294e44537f32238c15649c95afb7
5
5
  SHA512:
6
- metadata.gz: 78e77d1c68c3df1f39edd5df9e2a53e169e6dd4057fcc8cb1f01ec659d16e33a7c59c290596828ab98159ee2e90f8168986f9aaf668f99b547bc4bced6bf4949
7
- data.tar.gz: 3c5c345ccd361084b39d86b7ec4458240aaa9b02f399e53bad9e4fe06296ed7d4718ddd262c60adb00096f285a8540ecc493606a703a1257332ecccb349067aa
6
+ metadata.gz: 4632d51f766b18bf459a126a3fb8a759cdd7bdad116c0395ef0ed8df8d874076a247f7d01372c55a30f394de2674c866bd5396d583de2694f2dd4b7faee177b6
7
+ data.tar.gz: f2be7f25e92145490bd328dae4d36a1714fa24b74e4ca9affa038fea9b052ddedfe2e3e2867eac70be554dc4a16f490b07ab18c4d4ef51d682388eb685662674
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.1](https://github.com/matteoredz/rack-idempotency_key/compare/v0.1.0...v0.1.1) (2023-03-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * check size of path segments against each configured route ([#3](https://github.com/matteoredz/rack-idempotency_key/issues/3)) ([248d6ca](https://github.com/matteoredz/rack-idempotency_key/commit/248d6cafbcb875781b0a3673db8561d31db464f7))
9
+
3
10
  ## 0.1.0 (2023-01-20)
4
11
 
5
12
 
data/README.md CHANGED
@@ -49,8 +49,9 @@ module MyApp
49
49
  Rack::IdempotencyKey,
50
50
  store: Rack::IdempotencyKey::MemoryStore.new,
51
51
  routes: [
52
- { path: "/posts", method: "POST" },
53
- { path: "/posts/*", method: "PATCH" }
52
+ { path: "/posts", method: "POST" },
53
+ { path: "/posts/*", method: "PATCH" },
54
+ { path: "/posts/*/comments", method: "POST" }
54
55
  ]
55
56
  )
56
57
  end
@@ -120,8 +121,9 @@ Each route entry must be compliant with what follows:
120
121
 
121
122
  ```ruby
122
123
  routes: [
123
- { path: "/posts", method: "POST" },
124
- { path: "/posts/*", method: "PATCH" }
124
+ { path: "/posts", method: "POST" },
125
+ { path: "/posts/*", method: "PATCH" },
126
+ { path: "/posts/*/comments", method: "POST" }
125
127
  ]
126
128
  ```
127
129
 
@@ -52,7 +52,8 @@ module Rack
52
52
  attr_reader :request, :routes
53
53
 
54
54
  def matching_route?(route_path)
55
- same_segments? segments(route_path)
55
+ route_segments = segments route_path
56
+ path_segments.size == route_segments.size && same_segments?(route_segments)
56
57
  end
57
58
 
58
59
  def matching_method?(route_method)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  class IdempotencyKey
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-idempotency_key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Rossi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-20 00:00:00.000000000 Z
11
+ date: 2023-03-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: