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 +4 -4
- data/Gemfile.lock +8 -7
- data/lib/trailer_vote/api/type_registry.rb +4 -4
- data/lib/trailer_vote/api/version.rb +1 -1
- data/lib/trailer_vote/api.rb +13 -0
- 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: 85c1b864ab21c5966aa20513bdbaa45fb419cf18e2957505c52dc660aff46211
|
4
|
+
data.tar.gz: 821a9ff7476ba875e3aaa3bcded9905d39d19db9e0d00311e7d62c48de949505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 (
|
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 (~>
|
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.
|
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.
|
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 (
|
51
|
-
media_types (>= 0.
|
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.
|
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
|
38
|
-
shortcut(mime_type, registerable.
|
37
|
+
self[mime_type] = AdapterFor(registerable)
|
38
|
+
shortcut(mime_type, registerable.to_s)
|
39
39
|
|
40
|
-
registerable.
|
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)
|
data/lib/trailer_vote/api.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|