mangadex 5.7.5.2 → 5.7.5.3

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: 534eb32f3c781613856ba8014c49eed88d4afccf214e6cab713b190a2c66b183
4
- data.tar.gz: 29033cae0bd89f71a0e995cc4d0a1e2b5b1f1e643f1ad225c0612d08bf180b0e
3
+ metadata.gz: 2f7a656b6ffe031b39b55d7667f95dd4ebd3ce7ab2553c67cb3eae0f8ff650a9
4
+ data.tar.gz: 20dc4ed1f691faa7d0574b784921dd5e14e70ce23511d9d7cb4b3065a7a5c009
5
5
  SHA512:
6
- metadata.gz: 487288b4a87320864eb65e3c2104b0b749ca8e3209b0a0b37c6b4e3ca3fee49652d0d27927079a99cc2bc7d926911df7b93286fff6853e2541f18ef0a2d19214
7
- data.tar.gz: f0fa3e6cab36924fa0125560f71565ff22f02a029915a602d8b4ddd37bc6c034e80f8547e279bf638e52aaee944f37c661b9cf1233844badb2e0463006019b4b
6
+ metadata.gz: c54571ff121ccd42d0678af124c50a74c1b0643cfd801d5d8fe62361ef5e7631ef0f0788f4fa376d2410477114f850b8fb57f94757cdcb2b0654b8c3cd3e25d8
7
+ data.tar.gz: 4e374d252d9afedcc1c2692667030ba88a79fa09fa49c2a89c2bd468e0f307ca909bee7f3864d059a98166f353aef0fa95bbcdf2e8d8c2a8dc1e2bc45cafeac3
data/Gemfile.lock CHANGED
@@ -45,10 +45,10 @@ GEM
45
45
  diff-lcs (>= 1.2.0, < 2.0)
46
46
  rspec-support (~> 3.12.0)
47
47
  rspec-support (3.12.0)
48
- sorbet (0.5.10535)
49
- sorbet-static (= 0.5.10535)
48
+ sorbet (0.5.10539)
49
+ sorbet-static (= 0.5.10539)
50
50
  sorbet-runtime (0.5.10539)
51
- sorbet-static (0.5.10535-x86_64-linux)
51
+ sorbet-static (0.5.10539-x86_64-linux)
52
52
  stringio (3.0.2)
53
53
  unf (0.1.4)
54
54
  unf_ext
@@ -37,10 +37,10 @@ module Mangadex
37
37
  Mangadex::Internal::Definition.validate(args, {
38
38
  limit: { accepts: Integer, converts: :to_i },
39
39
  offset: { accepts: Integer, converts: :to_i },
40
- ids: { accepts: [String] },
40
+ ids: { accepts: [String], converts: :to_a },
41
41
  name: { accepts: String },
42
42
  order: { accepts: Hash },
43
- includes: { accepts: [String] },
43
+ includes: { accepts: [String], converts: :to_a },
44
44
  })
45
45
  )
46
46
  end
@@ -73,7 +73,7 @@ module Mangadex
73
73
  Mangadex::Internal::Request.get(
74
74
  format('/author/%{id}', id: id),
75
75
  Mangadex::Internal::Definition.validate(args, {
76
- includes: { accepts: [String] },
76
+ includes: { accepts: [String], converts: :to_a },
77
77
  })
78
78
  )
79
79
  end
@@ -36,7 +36,7 @@ module Mangadex
36
36
  Mangadex::Internal::Request.get(
37
37
  '/chapter/%{id}' % {id: id},
38
38
  Mangadex::Internal::Definition.validate(args, {
39
- includes: { accepts: [String] },
39
+ includes: { accepts: [String], converts: :to_a },
40
40
  }),
41
41
  )
42
42
  end
@@ -52,7 +52,7 @@ module Mangadex
52
52
  volume: { accepts: String },
53
53
  chapter: { accepts: String },
54
54
  translated_language: { accepts: %r{^[a-zA-Z\-]{2,5}$} },
55
- groups: { accepts: [String] },
55
+ groups: { accepts: [String], converts: :to_a },
56
56
  version: { accepts: Integer, required: true },
57
57
  }),
58
58
  )
@@ -19,11 +19,11 @@ module Mangadex
19
19
  Mangadex::Internal::Definition.validate(args, {
20
20
  limit: { accepts: Integer, converts: :to_i },
21
21
  offset: { accepts: Integer, converts: :to_i },
22
- manga: { accepts: [String] },
23
- ids: { accepts: [String] },
24
- uploaders: { accepts: [String] },
22
+ manga: { accepts: [String], converts: :to_a },
23
+ ids: { accepts: [String], converts: :to_a },
24
+ uploaders: { accepts: [String], converts: :to_a },
25
25
  order: { accepts: Hash },
26
- includes: { accepts: [String] },
26
+ includes: { accepts: [String], converts: :to_a },
27
27
  })
28
28
  )
29
29
  end
@@ -53,7 +53,7 @@ module Mangadex
53
53
  Mangadex::Internal::Request.get(
54
54
  '/cover/%{id}' % {id: id},
55
55
  Mangadex::Internal::Definition.validate(args, {
56
- includes: { accepts: [String] },
56
+ includes: { accepts: [String], converts: :to_a },
57
57
  })
58
58
  )
59
59
  end
@@ -47,7 +47,13 @@ module Mangadex
47
47
  def convert_value(value)
48
48
  if converts.is_a?(Symbol)
49
49
  converts_proc = self.class.converts(converts)
50
- return converts_proc.call(value) if converts_proc
50
+ if converts_proc
51
+ begin
52
+ return converts_proc.call(value)
53
+ rescue => exception
54
+ raise ArgumentError.new("Proc parsing error: #{exception}")
55
+ end
56
+ end
51
57
  end
52
58
  if converts.is_a?(Proc)
53
59
  converts.call(value)
@@ -119,15 +125,15 @@ module Mangadex
119
125
  {
120
126
  limit: { accepts: Integer, converts: :to_i },
121
127
  offset: { accepts: Integer, converts: :to_i },
122
- ids: { accepts: [String] },
128
+ ids: { accepts: [String], converts: :to_a },
123
129
  title: { accepts: String },
124
130
  manga: { accepts: String },
125
- groups: { accepts: [String] },
131
+ groups: { accepts: [String], converts: :to_a },
126
132
  uploader: { accepts: [String], converts: :to_a },
127
133
  chapter: { accepts: [String], converts: :to_a },
128
134
  translated_language: { accepts: [String], converts: :to_a },
129
- original_language: { accepts: [String] },
130
- excluded_original_language: { accepts: [String] },
135
+ original_language: { accepts: [String], converts: :to_a },
136
+ excluded_original_language: { accepts: [String], converts: :to_a },
131
137
  content_rating: Definitions::ContentRating,
132
138
  include_future_updates: { accepts: %w(0 1) },
133
139
  created_at_since: { accepts: %r{^\d{4}-[0-1]\d-([0-2]\d|3[0-1])T([0-1]\d|2[0-3]):[0-5]\d:[0-5]\d$} },
@@ -34,17 +34,17 @@ module Mangadex
34
34
  offset: { accepts: Integer, converts: :to_i },
35
35
  title: { accepts: String },
36
36
  author_or_artist: { accepts: String },
37
- authors: { accepts: [String] },
38
- artists: { accepts: [String] },
37
+ authors: { accepts: [String], converts: :to_a },
38
+ artists: { accepts: [String], converts: :to_a },
39
39
  year: { accepts: Integer },
40
- included_tags: { accepts: [String] },
40
+ included_tags: { accepts: [String], converts: :to_a },
41
41
  included_tags_mode: { accepts: %w(OR AND) },
42
- excluded_tags: { accepts: [String] },
42
+ excluded_tags: { accepts: [String], converts: :to_a },
43
43
  excluded_tags_mode: { accepts: %w(OR AND) },
44
44
  status: { accepts: %w(ongoing completed hiatus cancelled), converts: :to_a },
45
- original_language: { accepts: [String] },
46
- excluded_original_language: { accepts: [String] },
47
- available_translated_language: { accepts: [String] },
45
+ original_language: { accepts: [String], converts: :to_a },
46
+ excluded_original_language: { accepts: [String], converts: :to_a },
47
+ available_translated_language: { accepts: [String], converts: :to_a },
48
48
  publication_demographic: { accepts: %w(shounen shoujo josei seinen none), converts: :to_a },
49
49
  ids: { accepts: Array },
50
50
  content_rating: { accepts: %w(safe suggestive erotica pornographic), converts: :to_a },
@@ -118,9 +118,9 @@ module Mangadex
118
118
  Mangadex::Internal::Definition.validate(args, {
119
119
  includes: { accepts: Array },
120
120
  content_rating: { accepts: %w(safe suggestive erotica pornographic), converts: :to_a },
121
- included_tags: { accepts: [String] },
121
+ included_tags: { accepts: [String], converts: :to_a },
122
122
  included_tags_mode: { accepts: %w(OR AND) },
123
- excluded_tags: { accepts: [String] },
123
+ excluded_tags: { accepts: [String], converts: :to_a },
124
124
  excluded_tags_mode: { accepts: %w(OR AND) },
125
125
  })
126
126
  )
@@ -29,9 +29,9 @@ module Mangadex
29
29
  Mangadex::Internal::Definition.validate(args, {
30
30
  limit: { accepts: Integer, converts: :to_i },
31
31
  offset: { accepts: Integer, converts: :to_i },
32
- ids: { accepts: [String] },
32
+ ids: { accepts: [String], converts: :to_a },
33
33
  name: { accepts: String },
34
- includes: { accepts: [String] },
34
+ includes: { accepts: [String], converts: :to_a },
35
35
  }),
36
36
  )
37
37
  end
@@ -57,7 +57,7 @@ module Mangadex
57
57
  Mangadex::Internal::Request.get(
58
58
  '/group/%{id}' % {id: id},
59
59
  Mangadex::Internal::Definition.validate(args, {
60
- includes: { accepts: [String] },
60
+ includes: { accepts: [String], converts: :to_a },
61
61
  }),
62
62
  )
63
63
  end
@@ -54,7 +54,7 @@ module Mangadex
54
54
  '/upload/%{upload_session_id}/commit' % {upload_session_id: upload_session_id},
55
55
  payload: Mangadex::Internal::Definition.validate(args, {
56
56
  chapter_draft: { accepts: Hash }, # todo enforce chapter_draft content?
57
- page_order: { accepts: [String] },
57
+ page_order: { accepts: [String], converts: :to_a },
58
58
  }),
59
59
  )
60
60
  end
@@ -4,7 +4,7 @@ module Mangadex
4
4
  MAJOR = "5"
5
5
  MINOR = "7"
6
6
  TINY = "5"
7
- PATCH = "2"
7
+ PATCH = "3"
8
8
 
9
9
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
10
10
  FULL = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangadex
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.7.5.2
4
+ version: 5.7.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinyele Cafe-Febrissy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-07 00:00:00.000000000 Z
11
+ date: 2022-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: psych
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  requirements: []
249
- rubygems_version: 3.3.7
249
+ rubygems_version: 3.2.15
250
250
  signing_key:
251
251
  specification_version: 4
252
252
  summary: Your next favourite Ruby gem for interacting with Mangadex.org