media_types 0.5.3 → 0.5.4
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/formatter.rb +4 -3
- 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: 3f15e657fcca45b625494c2073e435fa4ad17cc4
|
4
|
+
data.tar.gz: 7e9bc019db8851dae9be4c3d24dc219aee8b7772
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebe9b0510ed749de2b481ca57eb0621d200414e1a4223eb4b69499976c2b1651b47d3f0076c57ffca11621df4daec2346be150c4c20924ba29155f504d99b9a3
|
7
|
+
data.tar.gz: af54f6cc7eef76f360e4f158770c2e6ac08a4b4e21cf0d4333eed42f303a51ea34700afb8eac463f486742a9dc844b75eaab14f7dec0aea0cecfe7f49fe64153
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -27,10 +27,11 @@ module MediaTypes
|
|
27
27
|
def rework_template(filtered_arguments)
|
28
28
|
filtered_arguments.reduce(template) do |reworked, (key, value)|
|
29
29
|
next reworked if MediaTypes::Object.new(value).present?
|
30
|
-
start_of_template_variable = "%<#{key}>"
|
31
30
|
|
32
|
-
|
33
|
-
|
31
|
+
reworked.gsub(/[.+](%<[A-z]+>)/) do |match|
|
32
|
+
partial_format = "%<#{key}>"
|
33
|
+
match.include?(partial_format) ? partial_format : match
|
34
|
+
end
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
data/lib/media_types/version.rb
CHANGED