cloudconvert 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cloudconvert.gemspec +3 -2
- data/lib/cloudconvert/client.rb +2 -2
- data/lib/cloudconvert/file.rb +1 -1
- data/lib/cloudconvert/version.rb +1 -1
- data/lib/cloudconvert/webhook/processor.rb +1 -1
- data/lib/cloudconvert.rb +2 -2
- metadata +25 -12
- data/lib/cloudconvert/middleware.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c673e3ee8e95029ba169554f076d54a63ccafeb2935708da8882babddba6f2dd
|
4
|
+
data.tar.gz: cae666dc7dda6a117cf0f81ba40086e35c135b63e478972aa082eabd631ae6c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d571515f826da72d7334981057c0d4cf987d5c34abf05353ad5479a3e10a3554f3ff76ea040f6841bda769400b076be9a1aed07435197d516e26aa0a0b226508
|
7
|
+
data.tar.gz: fb6262513b578d91d6c65a1ba8bbe40e149b051ba684458fb025e81e07fcdcea127cbe361aca89d8d78a80e344d5b40b55b8a92cb1342e3f5b50603255545b0b
|
data/cloudconvert.gemspec
CHANGED
@@ -20,8 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_dependency "activesupport", ">= 4.0"
|
21
21
|
spec.add_dependency "down", "~> 5.0"
|
22
22
|
spec.add_dependency "equalizer"
|
23
|
-
spec.add_dependency "faraday", "
|
24
|
-
spec.add_dependency "
|
23
|
+
spec.add_dependency "faraday", ">= 2.0.1"
|
24
|
+
spec.add_dependency "faraday-multipart"
|
25
|
+
spec.add_dependency "faraday-follow_redirects"
|
25
26
|
spec.add_dependency "forwardable"
|
26
27
|
spec.add_dependency "json"
|
27
28
|
spec.add_dependency "memoizable", "~> 0.4"
|
data/lib/cloudconvert/client.rb
CHANGED
@@ -93,8 +93,8 @@ module CloudConvert
|
|
93
93
|
f.adapter Faraday.default_adapter
|
94
94
|
f.request :json
|
95
95
|
f.request :multipart
|
96
|
-
f.
|
97
|
-
f.
|
96
|
+
f.response :json, content_type: /\bjson$/, parser_options: { object_class: OpenStruct }
|
97
|
+
f.response :follow_redirects, callback: lambda { |response, redirect|
|
98
98
|
redirect.request_headers.delete("Content-Length")
|
99
99
|
redirect.request_headers.delete("Content-Type")
|
100
100
|
}
|
data/lib/cloudconvert/file.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module CloudConvert
|
2
|
-
class File < Faraday::FilePart
|
2
|
+
class File < Faraday::Multipart::FilePart
|
3
3
|
def initialize(file, content_type = nil, *parts)
|
4
4
|
content_type ||= "text/plain" if file.is_a? StringIO
|
5
5
|
content_type ||= Marcel::Magic.by_magic(file) || Marcel::Magic.by_path(file)
|
data/lib/cloudconvert/version.rb
CHANGED
@@ -11,7 +11,7 @@ module CloudConvert::Webhook::Processor
|
|
11
11
|
|
12
12
|
def create
|
13
13
|
method = event.name.gsub(".", "_")
|
14
|
-
raise NoMethodError.new("#{name}##{method} not implemented") unless respond_to?(method, true)
|
14
|
+
raise NoMethodError.new("#{self.class.name}##{method} not implemented") unless respond_to?(method, true)
|
15
15
|
send(method, event)
|
16
16
|
head(:ok)
|
17
17
|
end
|
data/lib/cloudconvert.rb
CHANGED
@@ -3,7 +3,8 @@ require "active_support/core_ext/hash/reverse_merge"
|
|
3
3
|
require "down"
|
4
4
|
require "equalizer"
|
5
5
|
require "faraday"
|
6
|
-
require "
|
6
|
+
require "faraday/follow_redirects"
|
7
|
+
require "faraday/multipart"
|
7
8
|
require "forwardable"
|
8
9
|
require "json"
|
9
10
|
require "memoizable"
|
@@ -20,7 +21,6 @@ require "cloudconvert/error"
|
|
20
21
|
require "cloudconvert/event"
|
21
22
|
require "cloudconvert/file"
|
22
23
|
require "cloudconvert/job"
|
23
|
-
require "cloudconvert/middleware"
|
24
24
|
require "cloudconvert/resource"
|
25
25
|
require "cloudconvert/resources/jobs"
|
26
26
|
require "cloudconvert/resources/tasks"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudconvert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josias Montag
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -57,30 +57,44 @@ dependencies:
|
|
57
57
|
name: faraday
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
62
|
+
version: 2.0.1
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 2.0.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: faraday-multipart
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - "
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - "
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: faraday-follow_redirects
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: forwardable
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -353,7 +367,6 @@ files:
|
|
353
367
|
- lib/cloudconvert/event.rb
|
354
368
|
- lib/cloudconvert/file.rb
|
355
369
|
- lib/cloudconvert/job.rb
|
356
|
-
- lib/cloudconvert/middleware.rb
|
357
370
|
- lib/cloudconvert/resource.rb
|
358
371
|
- lib/cloudconvert/resources/jobs.rb
|
359
372
|
- lib/cloudconvert/resources/tasks.rb
|