trailer_vote-api 3.0.0 → 3.0.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: 853e8bb52632f7ea2fbff3ff17d02f0ed025d67e220b49ccc033e1cab8780516
4
- data.tar.gz: 848bcf93e922207180ffe0951391cba1f546e97fb30d1171b999e7f9c50f4e87
3
+ metadata.gz: 85c1b864ab21c5966aa20513bdbaa45fb419cf18e2957505c52dc660aff46211
4
+ data.tar.gz: 821a9ff7476ba875e3aaa3bcded9905d39d19db9e0d00311e7d62c48de949505
5
5
  SHA512:
6
- metadata.gz: b9f8921f0eb556ca4385e4824cd53c0fb7845fb1f245907f7f5282c073f451b92b7f2c8d87cee65ee47b034ed7941ffccb39b1860bbe084f27cf4344b308846e
7
- data.tar.gz: 671aae511c604f4622ead78207082358cac23adbae6bfcd0b95901608430912cd0a20a05ff4aa687a2056a3ae4caa89200249801dbb015c8262d7df27a4ba043
6
+ metadata.gz: 5b5923459febfdd02af85360e73f6e8563d36d398d43ec67d76cbc1489806929e9a9f32ad7d7238c3af6aee76ee247f155c93da56e0897701f9cbcb4a6930fd5
7
+ data.tar.gz: 03f1d274a8106ce3e5a1760659ed2fdd2c1d36f66e9cb72ec8537f16e7042d72bbce997611fff7b1ae696b12b098eafc5d52090ce08bf5733ae6f78a00c3a73f
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trailer_vote-api (2.2.0)
4
+ trailer_vote-api (3.0.0)
5
5
  http (>= 3.3.0, <= 4.1.1)
6
6
  oj (>= 3.6, < 4.x)
7
- trailer_vote-media_types (~> 2.0)
7
+ trailer_vote-media_types (~> 3.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -29,7 +29,7 @@ GEM
29
29
  domain_name (~> 0.5)
30
30
  http-form_data (2.3.0)
31
31
  http_parser.rb (0.6.0)
32
- media_types (0.6.2)
32
+ media_types (2.0.1)
33
33
  minitest (5.14.0)
34
34
  minitest-ci (3.4.0)
35
35
  minitest (>= 5.0.6)
@@ -38,7 +38,7 @@ GEM
38
38
  builder
39
39
  minitest (>= 5.0)
40
40
  ruby-progressbar
41
- oj (3.10.5)
41
+ oj (3.10.6)
42
42
  public_suffix (4.0.3)
43
43
  rake (13.0.1)
44
44
  ruby-progressbar (1.10.1)
@@ -47,11 +47,12 @@ GEM
47
47
  docile (~> 1.1)
48
48
  simplecov-html (~> 0.11)
49
49
  simplecov-html (0.12.2)
50
- trailer_vote-media_types (2.4.0)
51
- media_types (>= 0.6.0, < 1)
50
+ trailer_vote-media_types (3.0.1)
51
+ media_types (>= 2.0.0, < 3)
52
52
  unf (0.1.4)
53
53
  unf_ext
54
- unf_ext (0.0.7.6)
54
+ unf_ext (0.0.7.7)
55
+ unf_ext (0.0.7.7-x64-mingw32)
55
56
  webmock (3.8.3)
56
57
  addressable (>= 2.3.6)
57
58
  crack (>= 0.3.2)
@@ -34,10 +34,10 @@ module TrailerVote
34
34
  def register(registerable)
35
35
  mime_type = registerable.to_s
36
36
 
37
- self[mime_type] = AdapterFor(registerable.media_type)
38
- shortcut(mime_type, registerable.to_sym)
37
+ self[mime_type] = AdapterFor(registerable)
38
+ shortcut(mime_type, registerable.to_s)
39
39
 
40
- registerable.aliases.each do |alias_mime_type|
40
+ registerable.available_validations.each do |alias_mime_type|
41
41
  shortcut(mime_type, alias_mime_type)
42
42
  end
43
43
  end
@@ -47,7 +47,7 @@ module TrailerVote
47
47
 
48
48
  # noinspection RubyClassMethodNamingConvention
49
49
  def AdapterFor(media_type) # rubocop:disable Naming/MethodName
50
- adapter_name = generate_adapter_name(media_type)
50
+ adapter_name = generate_adapter_name(media_type.identifier)
51
51
 
52
52
  if const_defined?(adapter_name)
53
53
  return const_get(adapter_name)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module Api
5
- VERSION = '3.0.0'
5
+ VERSION = '3.0.1'
6
6
  end
7
7
  end
@@ -42,5 +42,18 @@ module TrailerVote
42
42
  IF_MATCH = 'If-Match'
43
43
  USER_AGENT = 'User-Agent'
44
44
  end
45
+
46
+ TypeRegistry.register(MediaTypes::Configuration)
47
+ TypeRegistry.register(MediaTypes::Errors)
48
+ TypeRegistry.register(MediaTypes::Issue)
49
+ TypeRegistry.register(MediaTypes::Place)
50
+ TypeRegistry.register(MediaTypes::Product)
51
+ TypeRegistry.register(MediaTypes::ProductImage)
52
+ TypeRegistry.register(MediaTypes::ProductLookup)
53
+ TypeRegistry.register(MediaTypes::ProductPlaceLink)
54
+ TypeRegistry.register(MediaTypes::ProductVideo)
55
+ TypeRegistry.register(MediaTypes::PushRecipeAndroid)
56
+ TypeRegistry.register(MediaTypes::PushRecipeIos)
57
+ TypeRegistry.register(MediaTypes::VistaConfig)
45
58
  end
46
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailer_vote-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-07 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http