snapcrawl 0.5.0 → 0.5.1

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
  SHA256:
3
- metadata.gz: b30cb829ebe341a727a3d1b5e9f26144a1063cef6fd241b953c17f53710deca7
4
- data.tar.gz: 483678c0d5bce6c9ef63cf635619bd91c2a4d1c9441450e55390a9dc3293b496
3
+ metadata.gz: 83077ce26e7825a14948d6048ff92ee5cc15a17e3eeaae5687d891b68d83cd92
4
+ data.tar.gz: 15f264f683c08f9c0a2d379fa76e3dad1698a30808fb3694ccf334b45450c8ff
5
5
  SHA512:
6
- metadata.gz: 0f75cad05799ddeea7ac2926c021b40b46b10f53725a2a58d41a3cbb80da17110033f18ef5c9060e94bc3c0e0235ff279a665d38204695cfeba709c0364aa99a
7
- data.tar.gz: 6977cda01914e9864d20eec2b8ad6e6d51a0b088123ada31c9ad8a5b725c1c2301fa1f8073e625bd20d7db1be2ecc857351584819b1c5fa41be4263ab818fa62
6
+ metadata.gz: 67d1a62d2c24dbf675c7e83449782ed88e7de62122082033239bc9ce436566dea5f1bad5b442784f1a476d05d75f20a52ec17c3a0fd6bd3a3a4ef7dcf7f76d07
7
+ data.tar.gz: ab17a294bad674814dd1e47407f9da58ae9c81dd1becee0db9d57d944c41ea6727cad6123b03797bd238b061b3138d9c4c42b32bd7f384a04716aeb4d93ee670
data/README.md CHANGED
@@ -27,7 +27,7 @@ You can run Snapcrawl by using this docker image (which contains all the
27
27
  necessary prerequisites):
28
28
 
29
29
  ```shell
30
- $ alias snapcrawl="docker run --rm -it --volume $PWD:/app dannyben/snapcrawl"
30
+ $ alias snapcrawl='docker run --rm -it --volume $PWD:/app dannyben/snapcrawl'
31
31
  ```
32
32
 
33
33
  For more information on the Docker image, refer to the [docker-snapcrawl][3] repository.
@@ -67,12 +67,18 @@ module Snapcrawl
67
67
  $logger.info "screenshot for #{page.path} already exists"
68
68
  else
69
69
  $logger.info "%{bold}capturing screenshot for #{page.path}%{reset}"
70
- page.save_screenshot outfile
70
+ save_screenshot page, outfile
71
71
  end
72
72
 
73
73
  true
74
74
  end
75
75
 
76
+ def save_screenshot(page, outfile)
77
+ page.save_screenshot outfile
78
+ rescue => e
79
+ $logger.error "screenshot error on %{purple}%{underlined}#{page.path}%{reset} - %{red}#{e.class}%{reset}: #{e.message}"
80
+ end
81
+
76
82
  def file_fresh?(file)
77
83
  Config.cache_life > 0 and File.exist?(file) and file_age(file) < Config.cache_life
78
84
  end
@@ -1,3 +1,3 @@
1
1
  module Snapcrawl
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapcrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit