onlyoffice_webdriver_wrapper 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7dd9754453bdfc98d527929ed558a8a8d7246b25e1ddd836b0af4a57ffc4d55
|
4
|
+
data.tar.gz: 49ca15eea9259e832423665aa0c7a86cc5d2afc17068c65fc6990c272a88091e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7dbe1f1368fb5a3f0b027ede5abc619e97dca747709066fe3fd0d3d7c5c2d89d01a7e45a0eb034652fe238fbb89959fe86deb7dd307ad28b24627381842eba5
|
7
|
+
data.tar.gz: aa67c58fe56ac730be39894b7aa316dc6e134938c89d13f0c46000d18008244f3d90d631ad0d50ae88a25e77c2808870dc470d7d61b582581376f65335c49a3b
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class Headless
|
2
|
+
def take_screenshot(file_path, options={})
|
3
|
+
using = options.fetch(:using, :imagemagick)
|
4
|
+
case using
|
5
|
+
when :imagemagick
|
6
|
+
CliUtil.ensure_application_exists!('import', "imagemagick is not found on your system. Please install it using sudo apt-get install imagemagick")
|
7
|
+
system "#{CliUtil.path_to('import')} -display :#{display} -window root #{file_path}"
|
8
|
+
when :xwd
|
9
|
+
CliUtil.ensure_application_exists!('xwd', "xwd is not found on your system. Please install it using sudo apt-get install X11-apps")
|
10
|
+
system "#{CliUtil.path_to('xwd')} -display localhost:#{display} -silent -root -out #{file_path}"
|
11
|
+
when :graphicsmagick, :gm
|
12
|
+
CliUtil.ensure_application_exists!('gm', "graphicsmagick is not found on your system. Please install it.")
|
13
|
+
system "#{CliUtil.path_to('gm')} import -display localhost:#{display} -window root #{file_path}"
|
14
|
+
else
|
15
|
+
raise Headless::Exception.new('Unknown :using option value')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_webdriver_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -11,22 +11,22 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-
|
14
|
+
date: 2020-06-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: headless
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 2.3.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 2.3.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: onlyoffice_file_helper
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- lib/onlyoffice_webdriver_wrapper/helpers/firefox_helper.rb
|
142
142
|
- lib/onlyoffice_webdriver_wrapper/helpers/firefox_helper/save_to_disk_files.list
|
143
143
|
- lib/onlyoffice_webdriver_wrapper/helpers/headless_helper.rb
|
144
|
+
- lib/onlyoffice_webdriver_wrapper/helpers/headless_helper/headless_screenshot_patch.rb
|
144
145
|
- lib/onlyoffice_webdriver_wrapper/helpers/headless_helper/real_display_tools.rb
|
145
146
|
- lib/onlyoffice_webdriver_wrapper/helpers/headless_helper/ruby_helper.rb
|
146
147
|
- lib/onlyoffice_webdriver_wrapper/helpers/os_helper.rb
|