screenshot 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/screenshot.rb +2 -2
- data/lib/screenshot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa682d35edf85b2634b920625a58d33bbb06f6cf
|
4
|
+
data.tar.gz: 06563d71a50c480d7348e69bcc8cac63ffd7e816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 873af4c6fa7f1348fae952c6e50d9d6a372b495fd9e314a24dc3e2e13247f5242aa8fa599ee14d9156a7ded4771c836f776a99a954afe4721ffd4e7d5b6458ba
|
7
|
+
data.tar.gz: 3b890cbeca92ccad1aa1c3604b312225c883419b7fe8c886478e802862948f1e4f673033792d88f75af7cd886ee93d625d297e4648b61594217eb0f508b508db
|
data/lib/screenshot.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "screenshot/version"
|
2
2
|
|
3
3
|
module Screenshot
|
4
|
-
def
|
4
|
+
def self.capture(file_name, page_elements)
|
5
5
|
screenshot_directory = ENV['LANGUAGE_SCREENSHOT_PATH'] || 'screenshots'
|
6
6
|
FileUtils.mkdir_p screenshot_directory
|
7
7
|
screenshot_path = "#{screenshot_directory}/#{file_name}"
|
@@ -10,7 +10,7 @@ module Screenshot
|
|
10
10
|
crop_image screenshot_path, page_elements, nil
|
11
11
|
end
|
12
12
|
|
13
|
-
def zoom_browser(rate)
|
13
|
+
def self.zoom_browser(rate)
|
14
14
|
rate.abs.times do
|
15
15
|
direction = rate > 0 ? :add : :subtract
|
16
16
|
@browser.send_keys [:control, direction]
|
data/lib/screenshot/version.rb
CHANGED