Skip to content

Commit 9691f52

Browse files
committed
Updated sources
1 parent 5528626 commit 9691f52

6 files changed

Lines changed: 28 additions & 10 deletions

File tree

Gemfile.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
PATH
22
remote: .
33
specs:
4-
groupdocs_conversion_cloud (21.4)
4+
groupdocs_conversion_cloud (21.4.1)
55
addressable (~> 2.5.0, >= 2.5.0)
66
faraday (~> 0.14.0)
7-
mimemagic (~> 0.3.2)
87

98
GEM
109
remote: https://rubygems.org/
@@ -13,7 +12,6 @@ GEM
1312
public_suffix (>= 2.0.2, < 4.0)
1413
faraday (0.14.0)
1514
multipart-post (>= 1.2, < 3)
16-
mimemagic (0.3.6)
1715
minitest (5.11.3)
1816
multipart-post (2.1.1)
1917
public_suffix (3.1.1)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ gem install groupdocs_conversion_cloud
1212
To add dependency to your app copy following into your Gemfile and run `bundle install`:
1313

1414
```
15-
gem "groupdocs_conversion_cloud", "~> 21.4"
15+
gem "groupdocs_conversion_cloud", "~> 21.4.1"
1616
```
1717

1818
## Getting Started

groupdocs_conversion_cloud.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Gem::Specification.new do |s|
1313
s.metadata = { 'source_code_uri' => 'https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-ruby' }
1414

1515
s.add_runtime_dependency 'faraday', '~> 0.14.0'
16-
s.add_runtime_dependency 'mimemagic', '~> 0.3.2'
1716
s.add_runtime_dependency 'addressable', '~> 2.5.0', '>= 2.5.0'
1817

1918
s.add_development_dependency 'minitest', '~> 5.11', '>= 5.11.3'

lib/groupdocs_conversion_cloud/api_error.rb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,23 @@ def initialize(arg = nil)
3939

4040
if arg.key?(:response_body) then
4141
data = JSON.parse(arg[:response_body], :symbolize_names => true)
42-
if !data.nil? && !data[:error].nil? then
43-
@message = data[:error]
44-
elsif !data.nil? && !data[:Error].nil? && !data[:Error][:Message].nil? then
45-
@message = data[:Error][:Message]
42+
if !data.nil? then
43+
if !data[:error].nil? then
44+
error = data[:error]
45+
if error.kind_of?(String) then
46+
@message = error
47+
else
48+
@message = error[:message]
49+
end
50+
else
51+
message = data[:message]
52+
if !message.nil? && message.kind_of?(String) then
53+
@message = message
54+
@code = data[:code]
55+
else
56+
@message = data
57+
end
58+
end
4659
end
4760
end
4861

lib/groupdocs_conversion_cloud/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
# --------------------------------------------------------------------------------------------------------------------
2626
#
2727
module GroupDocsConversionCloud
28-
VERSION = "21.4".freeze
28+
VERSION = "21.4.1".freeze
2929
end

test/api/test_info_api.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,13 @@ def test_get_document_metadata
5353
assert_equal 4, response.page_count
5454
end
5555

56+
def test_GetInfoReturnsFileNotFound
57+
request = GetDocumentMetadataRequest.new(TestFile.not_exist.path)
58+
error = assert_raises ApiError do
59+
@info_api.get_document_metadata(request)
60+
end
61+
assert_equal true, error.message.include?("AmazonS3 Storage exception: The specified key does not exist.")
62+
end
63+
5664
end
5765
end

0 commit comments

Comments
 (0)