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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/media_types/scheme.rb +2 -2
- data/lib/media_types/scheme/links.rb +2 -2
- data/lib/media_types/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccae096fd19259b025952edea85f433588fbce01
|
4
|
+
data.tar.gz: 64fed267722b36d17a324eb9ebb436be04bfc412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 118d4c8c2c67070cd0c5469a5330a95b954993db1773a9da633ff0e58370623732fb0236126d64eadc9869ab1ccd612ddfccef8c39dc4ddc4fa0a64c642903ba
|
7
|
+
data.tar.gz: 68cf8356ab79b25ba2edf5c20cb1dcae36bb2c9ccf278529643aee6a90aec7d7a4d1599e608a689a460962a062dce586a7649d8a0240cb1994cc7de0b3e7e034
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/media_types/scheme.rb
CHANGED
@@ -344,9 +344,9 @@ module MediaTypes
|
|
344
344
|
# # => true
|
345
345
|
#
|
346
346
|
def link(*args, **opts, &block)
|
347
|
-
validations.fetch(
|
347
|
+
validations.fetch('_links') do
|
348
348
|
Links.new.tap do |links|
|
349
|
-
validations[
|
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
|
data/lib/media_types/version.rb
CHANGED