media_types 2.1.0 → 2.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 +4 -4
- data/.github/workflows/debian.yml +1 -0
- data/.github/workflows/ruby.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/lib/media_types/dsl.rb +2 -0
- data/lib/media_types/validations.rb +20 -6
- data/lib/media_types/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 610b654c6f47fc159c8f104246edd4a0314d2f3439b3f136da1740ae198a7f08
|
4
|
+
data.tar.gz: 325234c6d61a3dd660895d607e92ee8d3849b373b4871d77272a991f5dcad457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 743edfc0e1d4c6d2eb277ea931d180721042b40cf3c2e060bf902a6277dce7cacf8446be6c712806947d2240345fc82abc60a2bee424548dde6c8100f5456136
|
7
|
+
data.tar.gz: 744f67b305bdcd413420c640316531b74a74e09e4ebb045c42666508d20545790359499c6fff1ebcccd7a59740b6edc341356fad56f03f618e35fc138cb2344a
|
@@ -18,6 +18,7 @@ jobs:
|
|
18
18
|
sudo apt-get update
|
19
19
|
DEBIAN_FRONTEND=noninteractive sudo apt-get --yes install gem2deb bundler ruby-{actionpack,awesome-print,http,minitest,minitest-reporters,oj,simplecov}
|
20
20
|
rm Gemfile.lock || true
|
21
|
+
gem install bundler
|
21
22
|
bundle install --local
|
22
23
|
sudo apt-file update
|
23
24
|
- name: Build
|
data/.github/workflows/ruby.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/media_types/dsl.rb
CHANGED
@@ -46,15 +46,29 @@ module MediaTypes
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
def method_missing(method_name, *arguments, **kwargs, &block)
|
50
|
-
if scheme.respond_to?(method_name)
|
51
|
-
media_type.__getobj__.media_type_combinations ||= Set.new
|
52
|
-
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
53
49
|
|
54
|
-
|
50
|
+
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.7.0')
|
51
|
+
def method_missing(method_name, *arguments, **kwargs, &block)
|
52
|
+
if scheme.respond_to?(method_name)
|
53
|
+
media_type.__getobj__.media_type_combinations ||= Set.new
|
54
|
+
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
55
|
+
|
56
|
+
return scheme.send(method_name, *arguments, **kwargs, &block)
|
57
|
+
end
|
58
|
+
|
59
|
+
super
|
55
60
|
end
|
61
|
+
else
|
62
|
+
def method_missing(method_name, *arguments, &block)
|
63
|
+
if scheme.respond_to?(method_name)
|
64
|
+
media_type.__getobj__.media_type_combinations ||= Set.new
|
65
|
+
media_type.__getobj__.media_type_combinations.add(media_type.as_key)
|
56
66
|
|
57
|
-
|
67
|
+
return scheme.send(method_name, *arguments, &block)
|
68
|
+
end
|
69
|
+
|
70
|
+
super
|
71
|
+
end
|
58
72
|
end
|
59
73
|
|
60
74
|
def respond_to_missing?(method_name, include_private = false)
|
data/lib/media_types/version.rb
CHANGED
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: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derk-Jan Karrenbeld
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-08-
|
12
|
+
date: 2021-08-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: awesome_print
|