Skip to content

Commit b3d281b

Browse files
committed
Updated sources
1 parent ddcbb72 commit b3d281b

10 files changed

Lines changed: 23 additions & 24 deletions

File tree

Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
PATH
22
remote: .
33
specs:
4-
groupdocs_annotation_cloud (23.4)
5-
addressable (~> 2.5.0, >= 2.5.0)
4+
groupdocs_annotation_cloud (23.12)
5+
addressable (~> 2.8.4, >= 2.8.4)
66
faraday (~> 0.14.0)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
addressable (2.5.2)
12-
public_suffix (>= 2.0.2, < 4.0)
11+
addressable (2.8.6)
12+
public_suffix (>= 2.0.2, < 6.0)
1313
faraday (0.14.0)
1414
multipart-post (>= 1.2, < 3)
1515
minitest (5.15.0)
16-
multipart-post (2.1.1)
17-
public_suffix (3.1.1)
16+
multipart-post (2.3.0)
17+
public_suffix (4.0.7)
1818
rake (13.0.6)
1919

2020
PLATFORMS

README.md

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

1515
```
16-
gem "groupdocs_annotation_cloud", "~> 23.4"
16+
gem "groupdocs_annotation_cloud", "~> 23.12"
1717
```
1818

1919
## Getting Started

groupdocs_annotation_cloud.gemspec

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

1515
s.add_runtime_dependency 'faraday', '~> 0.14.0'
16-
s.add_runtime_dependency 'addressable', '~> 2.5.0', '>= 2.5.0'
16+
s.add_runtime_dependency 'addressable', '~> 2.8.4', '>= 2.8.4'
1717

1818
s.add_development_dependency 'minitest', '~> 5.11', '>= 5.11.3'
1919

lib/groupdocs_annotation_cloud.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
# Common files
2727
require_relative 'groupdocs_annotation_cloud/api_client'
28-
require_relative 'groupdocs_annotation_cloud/api_error'
28+
require_relative 'groupdocs_annotation_cloud/api_client_error'
2929
require_relative 'groupdocs_annotation_cloud/version'
3030
require_relative 'groupdocs_annotation_cloud/configuration'
3131

lib/groupdocs_annotation_cloud/api_client.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@
2828
require 'logger'
2929
require 'tempfile'
3030
require 'faraday'
31-
require 'mimemagic'
3231
require 'addressable'
3332
require_relative 'version'
34-
require_relative 'api_error'
33+
require_relative 'api_client_error'
3534

3635
module GroupDocsAnnotationCloud
3736
#
@@ -69,7 +68,7 @@ def call_api(http_method, path, opts = {})
6968
end
7069

7170
unless response.success?
72-
raise ApiError.new(:code => response.status, :response_body => response.body)
71+
raise ApiClientError.new(:code => response.status, :response_body => response.body)
7372
end
7473

7574
data = deserialize(response, opts[:return_type]) if opts[:return_type]
@@ -281,7 +280,7 @@ def build_request_body(header_params, form_params, body)
281280
form_params.each do |key, value|
282281
case value
283282
when ::File
284-
data[key] = Faraday::UploadIO.new(value.path, MimeMagic.by_magic(value).to_s, key)
283+
data[key] = Faraday::UploadIO.new(value.path, "application/octet-stream", key)
285284
when ::Array, nil
286285
data[key] = value
287286
else

lib/groupdocs_annotation_cloud/api_error.rb renamed to lib/groupdocs_annotation_cloud/api_client_error.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------------
2-
# <copyright company="Aspose Pty Ltd" file="api_error.rb">
2+
# <copyright company="Aspose Pty Ltd" file="api_client_error.rb">
33
# Copyright (c) 2003-2023 Aspose Pty Ltd
44
# </copyright>
55
# <summary>
@@ -25,15 +25,15 @@
2525

2626
module GroupDocsAnnotationCloud
2727
#
28-
# ApiError class for error handling
28+
# ApiClientError class for error handling
2929
#
30-
class ApiError < StandardError
30+
class ApiClientError < StandardError
3131
attr_reader :code
3232
attr_reader :message
3333

3434
# Usage examples:
35-
# ApiError.new
36-
# ApiError.new(:code => 500, :response_body => "")
35+
# ApiClientError.new
36+
# ApiClientError.new(:code => 500, :response_body => "")
3737
def initialize(arg = nil)
3838
if arg.is_a? Hash
3939

lib/groupdocs_annotation_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 GroupDocsAnnotationCloud
28-
VERSION = "23.4".freeze
28+
VERSION = "23.12".freeze
2929
end

test/api/test_auth_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_auth_error_when_app_sid_not_found
4949

5050
info_api = init_info_api(app_sid, app_key)
5151

52-
error = assert_raises ApiError do
52+
error = assert_raises ApiClientError do
5353
info_api.get_supported_file_formats
5454
end
5555

@@ -63,7 +63,7 @@ def test_auth_error_when_app_key_not_found
6363

6464
info_api = init_info_api(app_sid, app_key)
6565

66-
error = assert_raises ApiError do
66+
error = assert_raises ApiClientError do
6767
info_api.get_supported_file_formats
6868
end
6969

test/api/test_info_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_get_info_file_not_found
5656
file_info = FileInfo.new()
5757
file_info.file_path = "some-folder\\NotExist.docx"
5858
request = GetInfoRequest.new(file_info)
59-
error = assert_raises ApiError do
59+
error = assert_raises ApiClientError do
6060
@info_api.get_info(request)
6161
end
6262
assert_equal "Specified file not found", error.message

test/test_file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ def self.test_files_with_annotations
282282
[
283283
self.InputWords,
284284
self.InputCells,
285-
self.InputEmail,
286-
self.InputHtml,
285+
#self.InputEmail,
286+
#self.InputHtml,
287287
self.InputPdf,
288288
self.InputImage,
289289
self.InputPresentation,

0 commit comments

Comments
 (0)