media_types 2.1.0 → 2.1.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
  SHA256:
3
- metadata.gz: d034c7e7a7fd3a142dd997efab0d1c3e61f2cbe3170078544f4f456c485ad4ec
4
- data.tar.gz: 20dbb0fbdf7e9f93c79575239de5e9a4e2220dbd7d3a0fe1d41145c1b2a97b54
3
+ metadata.gz: 610b654c6f47fc159c8f104246edd4a0314d2f3439b3f136da1740ae198a7f08
4
+ data.tar.gz: 325234c6d61a3dd660895d607e92ee8d3849b373b4871d77272a991f5dcad457
5
5
  SHA512:
6
- metadata.gz: b589dbf3292df73632d3d8c98b6b73ed2dec08099b64406b4a1ca2c2cbe19b5cf7161efefc2b05c3bff634b03b6056c6a8f4770ac038e559710415bbad663e10
7
- data.tar.gz: 2ce0c0747e94f01de399e28cd262b921912097c9bfea2d205abcb11937f116d078366ebcee8a8f0999c12cada9a7b1ce1093ad51d80d397cfc73d5cd145424f8
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
@@ -18,5 +18,6 @@ jobs:
18
18
  sudo apt-get update
19
19
  DEBIAN_FRONTEND=noninteractive sudo apt-get install --yes bundler
20
20
  rm Gemfile.lock || true
21
+ gem install bundler
21
22
  bundle install --jobs 4 --retry 3
22
23
  bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.1
4
+
5
+ - Fix Ruby 2.6 to 2.7 incompatible change
6
+
3
7
  ## 2.1.0
4
8
 
5
9
  - Add `override_suffix` to force a specific suffix
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- media_types (2.1.0)
4
+ media_types (2.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -40,4 +40,4 @@ DEPENDENCIES
40
40
  simplecov
41
41
 
42
42
  BUNDLED WITH
43
- 2.2.7
43
+ 2.2.17
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'set'
4
+
3
5
  require 'media_types/constructable'
4
6
  require 'media_types/validations'
5
7
 
@@ -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
- return scheme.send(method_name, *arguments, **kwargs, &block)
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
- super
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MediaTypes
4
- VERSION = '2.1.0'
4
+ VERSION = '2.1.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: 2.1.0
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 00:00:00.000000000 Z
12
+ date: 2021-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print