media_types 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: c410b6e7c2eaa9df298c4fef6306704921b75e1b
4
- data.tar.gz: 9b21dfaf70f6d82c365a0309f5631565b5045ce9
3
+ metadata.gz: ccae096fd19259b025952edea85f433588fbce01
4
+ data.tar.gz: 64fed267722b36d17a324eb9ebb436be04bfc412
5
5
  SHA512:
6
- metadata.gz: da2ad8aa866bc5bc0aacceec506f9c0bd8c460fe5681f5beb80c6bbbfb9fa7795910889a6d4cbe9118122c05c9b5e9ffbec969a1708da10b965419e3093c0ffa
7
- data.tar.gz: 2206345f8cca161de2cec0acde03b359cb5fd28fe1b2fa64fddbb14273c51a9e8bb806c1c6ff16daea9c33664ce82dde255b502c899d7efeead26a03a3b1a3a2
6
+ metadata.gz: 118d4c8c2c67070cd0c5469a5330a95b954993db1773a9da633ff0e58370623732fb0236126d64eadc9869ab1ccd612ddfccef8c39dc4ddc4fa0a64c642903ba
7
+ data.tar.gz: 68cf8356ab79b25ba2edf5c20cb1dcae36bb2c9ccf278529643aee6a90aec7d7a4d1599e608a689a460962a062dce586a7649d8a0240cb1994cc7de0b3e7e034
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.4.1
2
+
3
+ - Use strings for `:_links`, matching the other validation keys
4
+
1
5
  # 0.4.0
2
6
 
3
7
  - Simplify `assert_media_type_format` by dumping views completely
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- media_types (0.4.0)
4
+ media_types (0.4.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -344,9 +344,9 @@ module MediaTypes
344
344
  # # => true
345
345
  #
346
346
  def link(*args, **opts, &block)
347
- validations.fetch(:_links) do
347
+ validations.fetch('_links') do
348
348
  Links.new.tap do |links|
349
- validations[:_links] = links
349
+ validations['_links'] = links
350
350
  end
351
351
  end.link(*args, **opts, &block)
352
352
  end
@@ -12,13 +12,13 @@ module MediaTypes
12
12
  scheme.attribute :href, String, allow_nil: allow_nil
13
13
  scheme.instance_exec(&block) if block_given?
14
14
 
15
- links[key] = scheme
15
+ links[String(key)] = scheme
16
16
  end
17
17
 
18
18
  def validate!(output, options, **_opts)
19
19
  links.all? do |key, value|
20
20
  value.validate!(
21
- output[key],
21
+ output[key] || output[key.to_sym],
22
22
  options.trace(key).exhaustive!
23
23
  )
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MediaTypes
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: media_types
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld