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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3da4c0f81e3a99c26ad33877274e7e160a096d9d
4
- data.tar.gz: 0e36a57cd73ec600435f516682293297a2d5eafb
3
+ metadata.gz: fa682d35edf85b2634b920625a58d33bbb06f6cf
4
+ data.tar.gz: 06563d71a50c480d7348e69bcc8cac63ffd7e816
5
5
  SHA512:
6
- metadata.gz: 543c4140553429600008c8f4723a12c4b2fca0f745d9cbb50fd351c735d0cbeae8c2706f4f68c7330df42d302851c7e89c26cbea981faa416794fde684c87ccd
7
- data.tar.gz: 22efffd640d47a48e31663a344da57029586352646d4c14dcf378a41dea64c8d47d97f6480d1358a56610b972c7d2f82117456f570edcb16314a3326981c77cc
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 capture_screenshot(file_name, page_elements)
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]
@@ -1,3 +1,3 @@
1
1
  module Screenshot
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screenshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vikas Yaligar