silkscreen 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. data/bin/silkscreen +14 -12
  2. data/lib/silkscreen/version.rb +1 -1
  3. metadata +1 -1
data/bin/silkscreen CHANGED
@@ -17,21 +17,23 @@ module Silkscreen
17
17
  method_option :full, aliases: '-f', type: :boolean, default: false, desc: 'Capture full page or just the visible area'
18
18
  method_option :output, aliases: '-o', type: :string, desc: 'Save the captured screenshot as a file at this path'
19
19
  def capture(url)
20
- headless = Headless.new
21
- headless.start
20
+ # headless = Headless.new
21
+ # headless.start
22
+ Headless.ly do
23
+ driver = Selenium::WebDriver.for :chrome
22
24
 
23
- driver = Selenium::WebDriver.for :chrome
25
+ img = Silkscreen.get_screenshot url, options, driver
26
+
27
+ driver.quit
28
+
24
29
 
25
- img = Silkscreen.get_screenshot url, options, driver
26
-
27
- driver.quit
28
- headless.destroy
29
-
30
- if options[:output]
31
- create_file options[:output], img
32
- else
33
- print img
30
+ if options[:output]
31
+ create_file options[:output], img
32
+ else
33
+ print img
34
+ end
34
35
  end
36
+ #headless.destroy
35
37
  end
36
38
  end
37
39
  end
@@ -1,3 +1,3 @@
1
1
  module Silkscreen
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silkscreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: