Skip to content

Commit 87104d8

Browse files
authored
Merge pull request #83 from aspose-pdf-cloud/develop
update to 25.3
2 parents 707977c + 7d6b027 commit 87104d8

File tree

9 files changed

+986
-969
lines changed

9 files changed

+986
-969
lines changed

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "Ruby",
3+
"image": "mcr.microsoft.com/devcontainers/ruby:3.3",
4+
"containerEnv": {
5+
"RUBYLIB": "./lib"
6+
},
7+
"postCreateCommand": "bundle install",
8+
"workspaceFolder": "/SDKs/Ruby",
9+
"workspaceMount": "source=${localWorkspaceFolder},target=/SDKs/Ruby,type=bind,consistency=cached",
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"rubyLsp.formatter": "rubocop",
14+
"rubyLsp.rubyVersionManager": {
15+
"identifier": "rbenv"
16+
}
17+
}
18+
}
19+
},
20+
"mounts": [
21+
"source=${localWorkspaceFolder}/../../Settings,target=/Settings,type=bind,consistency=cached"
22+
]
23+
}

Gemfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Define the source for gems
2+
source "https://rubygems.org"
3+
4+
# Load dependencies from the .gemspec file
5+
begin
6+
eval_gemspec = eval(File.read("aspose_pdf_cloud.gemspec"))
7+
rescue Errno::ENOENT => e
8+
puts "Error: Could not find aspose_pdf_cloud.gemspec. Ensure the file exists in the current directory."
9+
raise e
10+
rescue StandardError => e
11+
puts "Error: Failed to evaluate aspose_pdf_cloud.gemspec. Check the file for syntax errors."
12+
raise e
13+
end
14+
15+
# Add runtime dependencies
16+
runtime_dependencies = eval_gemspec.dependencies.select { |d| d.type == :runtime }
17+
runtime_dependencies.each do |dep|
18+
gem dep.name, dep.requirement.to_s
19+
end
20+
21+
# Add development dependencies
22+
group :development do
23+
gem 'ci_reporter_minitest'
24+
gem 'minitest', '~> 5.11.3'
25+
gem 'rake'
26+
gem 'rubocop', '~> 1.74.0'
27+
28+
development_dependencies = eval_gemspec.dependencies.select { |d| d.type == :development }
29+
development_dependencies.each do |dep|
30+
gem dep.name, dep.requirement.to_s
31+
end
32+
end

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
2929
## Read PDF Formats
3030
MHT, PCL, PS, XSLFO, MD
3131

32-
## Enhancements in Version 25.2
32+
## Enhancements in Version 25.3
3333
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
34+
3435
## Installation
3536

3637
### Build a gem
@@ -44,15 +45,15 @@ gem build aspose_pdf_cloud.gemspec
4445
Then either install the gem locally:
4546

4647
```shell
47-
gem install ./aspose_pdf_cloud-25.2.0.gem
48+
gem install ./aspose_pdf_cloud-25.3.0.gem
4849
```
49-
(for development, run `gem install --dev ./aspose_pdf_cloud-25.2.0.gem` to install the development dependencies)
50+
(for development, run `gem install --dev ./aspose_pdf_cloud-25.3.0.gem` to install the development dependencies)
5051

5152
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
5253

5354
Finally add this to the Gemfile:
5455

55-
gem 'aspose_pdf_cloud', '~> 25.2.0'
56+
gem 'aspose_pdf_cloud', '~> 25.3.0'
5657

5758
### Install from Git
5859

Rakefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require 'bundler/gem_tasks'
2+
require 'rake/testtask'
3+
require 'ci/reporter/rake/minitest'
4+
ENV['CI_REPORTS'] = 'test/reports'
5+
Rake::TestTask.new do |t|
6+
t.test_files = FileList['test/*.rb']
7+
end
8+
task test: 'ci:setup:minitest'
9+
task default: :test

aspose_pdf_cloud.gemspec

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,24 @@ SOFTWARE.
2121
--------------------------------------------------------------------------------------------------------------------
2222
=end
2323

24-
$:.push File.expand_path("./lib", __FILE__)
25-
require "aspose_pdf_cloud/version"
26-
27-
files = `git ls-files`.split("\n")
28-
files.delete('.gitignore')
29-
files.delete('.swagger-codegen-ignore')
24+
require './lib/aspose_pdf_cloud/version'
3025

3126
Gem::Specification.new do |s|
32-
s.name = "aspose_pdf_cloud"
27+
s.name = 'aspose_pdf_cloud'
3328
s.version = AsposePdfCloud::VERSION
3429
s.platform = Gem::Platform::RUBY
35-
s.authors = ["Aspose PDF Cloud"]
36-
s.email = [""]
37-
s.homepage = "https://products.aspose.cloud/pdf/cloud"
30+
s.authors = ['Aspose PDF Cloud']
31+
s.email = ['']
32+
s.homepage = 'https://products.aspose.cloud/pdf/cloud'
3833
s.summary = %q{Aspose.PDF Cloud}
39-
s.description = "Aspose.PDF Cloud is a REST API for creating and editing PDF files. Most popular features proposed by Aspose.PDF Cloud: PDF to Word, Convert PDF to Image, Merge PDF, Split PDF, Add Images to PDF, Rotate PDF. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. Aspose.PDF Cloud gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others. Aspose.PDF Cloud helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images."
40-
s.license = "MIT"
34+
s.description = %q{Aspose.PDF Cloud is a REST API for creating and editing PDF files. Most popular features proposed by Aspose.PDF Cloud: PDF to Word, Convert PDF to Image, Merge PDF, Split PDF, Add Images to PDF, Rotate PDF. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. Aspose.PDF Cloud gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others. Aspose.PDF Cloud helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images.}
35+
s.license = 'MIT'
4136

42-
s.required_ruby_version = ">= 1.9"
37+
s.required_ruby_version = '>= 2.6'
4338

44-
s.add_runtime_dependency 'json', '>= 2.3.0'
45-
s.add_runtime_dependency 'faraday', '~> 0.14.0'
46-
47-
s.add_development_dependency 'minitest', '~> 5.8'
48-
s.add_development_dependency 'minitest-reporters', '~> 1.5'
39+
s.add_runtime_dependency 'faraday', '>= 1.9.3'
40+
s.add_runtime_dependency 'faraday-multipart'
4941

50-
s.files = files
51-
s.test_files = `git ls-files -- test/*`.split("\n")
52-
s.executables = []
53-
s.require_paths = ["lib"]
42+
s.files = Dir['lib/**/*.rb']
43+
s.require_paths = ['lib']
5444
end

lib/aspose_pdf_cloud/api_client.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
require 'tempfile'
2626
require 'uri'
2727
require 'faraday'
28+
require 'faraday/multipart'
2829
require_relative 'version'
2930
require_relative 'api_error'
3031

@@ -289,7 +290,7 @@ def sanitize_filename(filename)
289290
def build_request_url(path)
290291
# Add leading and trailing slashes to path
291292
path = "/#{path}".gsub(/\/+/, '/')
292-
URI.encode(@config.base_url + path)
293+
URI::Parser.new.escape(@config.base_url + path).to_s
293294
end
294295

295296
# Builds the HTTP request body

lib/aspose_pdf_cloud/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def base_url
163163
else
164164
url = "#{scheme}://#{[host, '/v3.0'].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
165165
end
166-
URI.encode(url)
166+
URI::Parser.new.escape(url)
167167
end
168168

169169
# Returns Auth Settings hash for api client.

lib/aspose_pdf_cloud/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
=end
2121

2222
module AsposePdfCloud
23-
VERSION = "25.2.0"
23+
VERSION = "25.3.0"
2424
end

0 commit comments

Comments
 (0)