convert_api187 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -11,10 +11,10 @@ module ConvertApi
|
|
11
11
|
|
12
12
|
def initialize
|
13
13
|
@base_uri = URI('https://v2.convertapi.com/')
|
14
|
-
@connect_timeout =
|
15
|
-
@read_timeout =
|
14
|
+
@connect_timeout = 15
|
15
|
+
@read_timeout = 120
|
16
16
|
@conversion_timeout = 180
|
17
|
-
@conversion_timeout_delta =
|
17
|
+
@conversion_timeout_delta = 20
|
18
18
|
@upload_timeout = 600
|
19
19
|
@download_timeout = 600
|
20
20
|
end
|
@@ -31,9 +31,7 @@ module ConvertApi
|
|
31
31
|
http
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
35
|
-
path = File.join(path, filename) if File.directory?(path)
|
36
|
-
|
34
|
+
def contents
|
37
35
|
request = Net::HTTP::Get.new(url, Client::DEFAULT_HEADERS)
|
38
36
|
|
39
37
|
response = http({}).request(request)
|
@@ -50,8 +48,14 @@ module ConvertApi
|
|
50
48
|
:headers => headers
|
51
49
|
)
|
52
50
|
end
|
51
|
+
response.body
|
52
|
+
end
|
53
|
+
|
54
|
+
def save(path)
|
55
|
+
path = File.join(path, filename) if File.directory?(path)
|
56
|
+
|
53
57
|
File.open(path, 'w') do |f|
|
54
|
-
f.write
|
58
|
+
f.write contents
|
55
59
|
end
|
56
60
|
|
57
61
|
path
|
data/lib/convert_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: convert_api187
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 2
|
10
|
+
version: 1.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tomas Rutkauskas
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: exe
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2018-10-
|
19
|
+
date: 2018-10-12 00:00:00 +11:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- Rakefile
|
101
101
|
- convert_api.gemspec
|
102
102
|
- lib/convert_api.rb
|
103
|
+
- lib/convert_api/array_to_h.rb
|
103
104
|
- lib/convert_api/client.rb
|
104
105
|
- lib/convert_api/configuration.rb
|
105
106
|
- lib/convert_api/errors.rb
|