snapcrawl 0.4.3 → 0.4.4

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: bce8153d8387fd4b9487b5b807921a7b4e257fae4c1e8ac715d0188e6383211a
4
- data.tar.gz: '0397a7325d6f9b47acf8c5774d31d6045440e725a3f798a1a40bb945168f1e8f'
3
+ metadata.gz: 99d66eca6d9f9ef3b952591ab2ca355094cd0dcea07669ae76474693d5b4caf4
4
+ data.tar.gz: 04b4d1a41d8e3b550519f87c9f837ef5ad0ff5b9af7528e317a1dd0943326e12
5
5
  SHA512:
6
- metadata.gz: a626ca6aa678dcbda8b88df754dba68366b53e38daa1ffb23f6bebbe33d272cf653bbfdbe02c4134e1a2780b0e9e06c784b50dc8ac7db973b48170792d30fa6a
7
- data.tar.gz: 02ceff3026e12416e056fa7ad417b2f134c75f534829a83f045651247f57f298bf054549df7b11c5767801b45a491f6cfd76a204df6eef1743adeb8d3a1ce5d5
6
+ metadata.gz: 07bb6174d3681559d18cb73ca3c7b18f37c60a13f483ccab530b31845db7019f2413680e4e61907cadf8aeccdf6343bee484bafd444c321978de279ca3bbcda6
7
+ data.tar.gz: 70bbb5cf8508417b5a98c3af830efb8251cc7216c73ef66b1c31495d573e8289d1b1662779305ff42a6aaafedb7f621ba7942b6b469f17c6513617e98dbe8432
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  Snapcrawl - crawl a website and take screenshots
2
2
  ==================================================
3
3
 
4
- [![Build Status](https://travis-ci.com/DannyBen/snapcrawl.svg?branch=master)](https://travis-ci.com/DannyBen/snapcrawl)
5
4
  [![Gem Version](https://badge.fury.io/rb/snapcrawl.svg)](http://badge.fury.io/rb/snapcrawl)
5
+ [![Build Status](https://github.com/DannyBen/snapcrawl/workflows/Test/badge.svg)](https://github.com/DannyBen/snapcrawl/actions?query=workflow%3ATest)
6
6
  [![Code Climate](https://codeclimate.com/github/DannyBen/snapcrawl/badges/gpa.svg)](https://codeclimate.com/github/DannyBen/snapcrawl)
7
7
 
8
8
  ---
@@ -99,6 +99,18 @@ module Snapcrawl
99
99
  fetch_opts[:full] = false
100
100
  end
101
101
 
102
+ webshot_capture url, image_path, fetch_opts
103
+ say "done"
104
+ end
105
+
106
+ def webshot_capture(url, image_path, fetch_opts)
107
+ webshot_capture! url, image_path, fetch_opts
108
+ rescue => e
109
+ say "!txtred!FAILED"
110
+ say "!txtred! ! #{e.class}: #{e.message.strip}"
111
+ end
112
+
113
+ def webshot_capture!(url, image_path, fetch_opts)
102
114
  hide_output do
103
115
  webshot.capture url, image_path, fetch_opts do |magick|
104
116
  magick.combine_options do |c|
@@ -108,9 +120,7 @@ module Snapcrawl
108
120
  c.extent @opts.height > 0 ? "#{@opts.width}x#{@opts.height}" : "#{@opts.width}x"
109
121
  end
110
122
  end
111
- end
112
-
113
- say "done"
123
+ end
114
124
  end
115
125
 
116
126
  def extract_urls_from(url)
@@ -1,3 +1,3 @@
1
1
  module Snapcrawl
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapcrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-09 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole