rack-json_schema 1.2.0 → 1.3.0

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
  SHA1:
3
- metadata.gz: 71a875cdb899f6012d3925ff4eb241c096365e39
4
- data.tar.gz: ecfd5744142dc70b32ea668c2c31ac8050a2d772
3
+ metadata.gz: f1f74c5ddb67e2e9a9dd4da8ace64d3207dbe4cf
4
+ data.tar.gz: 8d0112906bb873488d6b7a793b422cf668066913
5
5
  SHA512:
6
- metadata.gz: 57f39fdc41445c42dc183d8d62ca9876e0c01d0acad3ed247b1122e069d00f7984c5363584c351bb8cbc14d723d5767fdbf85179e003e0c0a20621784c9dfcf8
7
- data.tar.gz: fbbb0eed5084b41c827589d7b80b661d301eb308e6ea0ed57e97180989ef6931bb3d6ccd7be0965bc0bef0ee74596504e3c87682fc8b014cafaa99ad12e45883
6
+ metadata.gz: 1c7864c9a2ce0554b80e78b57d3554bca71833d924762f92f3d6ecfacb81009fff8a79f6cb3ee65749d2b09903e7292ee62f4fc54473835db89ca79df7d722cd
7
+ data.tar.gz: 0cdb0acc5db47f64a95fd2631615d290044c3837747467c4b5231e0f7d51bd0e2ec69f4fb654a4d704e5a04f8b2a0c80eccb0de352f39f73163da7a9e792d2d3
@@ -1,3 +1,6 @@
1
+ ## 1.3.0
2
+ - Support rails-style path format on link detection
3
+
1
4
  ## 1.2.0
2
5
  - Skip content_type check if strict mode is turned off (thx @tomoya55)
3
6
 
@@ -27,7 +27,7 @@ module Rack
27
27
  # schema.has_link_for?(method: "GET", path: "/recipes/{+id}") #=> nil
28
28
  def link_for(method: nil, path: nil)
29
29
  links_indexed_by_method[method].find do |link|
30
- %r<^#{link.href.gsub(/\{(.*?)\}/, "[^/]+")}$> === path
30
+ %r<^#{link.href.gsub(/(?:\{.*?\})|(?::\w+)/, "[^/]+")}$> === path
31
31
  end
32
32
  end
33
33
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module JsonSchema
3
- VERSION = "1.2.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-json_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-16 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubis