From bdf84255447c49b74bdf848d7f304044ff17f6b8 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Sun, 28 Feb 2016 18:50:06 +0000 Subject: [PATCH 01/33] updated version to 3.1.1 --- lib/wraith/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wraith/version.rb b/lib/wraith/version.rb index 3e585e42..4790c525 100644 --- a/lib/wraith/version.rb +++ b/lib/wraith/version.rb @@ -1,3 +1,3 @@ module Wraith - VERSION = "3.1.0" + VERSION = "3.1.1" end From dd474ad3ce57effd3961f0bbdd42824873144b31 Mon Sep 17 00:00:00 2001 From: Gordeev Sergey Date: Mon, 29 Feb 2016 22:54:03 +0300 Subject: [PATCH 02/33] fix #395 --- lib/wraith/wraith.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wraith/wraith.rb b/lib/wraith/wraith.rb index 746cf98f..16ff49c2 100644 --- a/lib/wraith/wraith.rb +++ b/lib/wraith/wraith.rb @@ -22,7 +22,7 @@ def open_config_file(config_name) possible_filenames.each do |filepath| if File.exist?(filepath) - config = File.open config_name + config = File.open filepath return YAML.load config end end From ad36c28a3c44cbe9eee825e9246a276cde21e253 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Mon, 29 Feb 2016 22:07:43 +0000 Subject: [PATCH 03/33] fix #395 --- lib/wraith/wraith.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wraith/wraith.rb b/lib/wraith/wraith.rb index 746cf98f..d4044d94 100644 --- a/lib/wraith/wraith.rb +++ b/lib/wraith/wraith.rb @@ -22,12 +22,12 @@ def open_config_file(config_name) possible_filenames.each do |filepath| if File.exist?(filepath) - config = File.open config_name + config = File.open filepath return YAML.load config end end rescue - logger.error "unable to find config \"#{config}\"" + logger.error "unable to find config \"#{config_name}\"" end def directory From fb9c67299f3ac569338698b40b9f6e5576473a5f Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Mon, 29 Feb 2016 22:08:39 +0000 Subject: [PATCH 04/33] incremented version --- lib/wraith/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wraith/version.rb b/lib/wraith/version.rb index 4790c525..775ea936 100644 --- a/lib/wraith/version.rb +++ b/lib/wraith/version.rb @@ -1,3 +1,3 @@ module Wraith - VERSION = "3.1.1" + VERSION = "3.1.2" end From cd4cfa648a882731ea358280cd5d9bfb5795b060 Mon Sep 17 00:00:00 2001 From: Kate Kligman Date: Thu, 10 Mar 2016 17:52:27 -0800 Subject: [PATCH 05/33] fix #397 - add version command --- lib/wraith/cli.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/wraith/cli.rb b/lib/wraith/cli.rb index 0133049b..180d9674 100644 --- a/lib/wraith/cli.rb +++ b/lib/wraith/cli.rb @@ -176,4 +176,9 @@ def latest(config) generate_gallery(config) end end + + desc "version", "Show the version of wraith" + def version + puts "Wraith version " + Wraith::VERSION + end end From c6e64e13a96a2342e459ad9340b8c9034bd3ef98 Mon Sep 17 00:00:00 2001 From: Kate Kligman Date: Wed, 16 Mar 2016 17:00:37 -0700 Subject: [PATCH 06/33] Version command adjustments. --- lib/wraith/cli.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/wraith/cli.rb b/lib/wraith/cli.rb index 180d9674..7e529326 100644 --- a/lib/wraith/cli.rb +++ b/lib/wraith/cli.rb @@ -177,8 +177,9 @@ def latest(config) end end - desc "version", "Show the version of wraith" + desc "version", "Show the version of Wraith" + map ["--version", "-version", "-v"] => "version" def version - puts "Wraith version " + Wraith::VERSION + logger.info Wraith::VERSION end end From c3ee92d40016a66a83c1ad772339c8b0b757dadb Mon Sep 17 00:00:00 2001 From: Kate Kligman Date: Tue, 29 Mar 2016 17:48:50 -0700 Subject: [PATCH 07/33] Fix #298 - use the latest version of ImageMagick with Docker --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7c5204b5..46b3d5fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,7 @@ RUN echo "deb http://security.debian.org/ jessie/updates contrib non-free" | tee RUN apt-get update RUN apt-get install -y ttf-freefont ttf-mscorefonts-installer ttf-bitstream-vera ttf-dejavu ttf-liberation +# Make sure a recent (>6.7.7-10) version of ImageMagick is installed. +RUN apt-get install -y imagemagick + ENTRYPOINT [ "wraith" ] From 1c87a639619f872b4befd3bc124a56116052ff70 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Fri, 8 Apr 2016 15:22:34 +0100 Subject: [PATCH 08/33] incremented to 3.1.3 --- lib/wraith/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wraith/version.rb b/lib/wraith/version.rb index 775ea936..5efcd9f0 100644 --- a/lib/wraith/version.rb +++ b/lib/wraith/version.rb @@ -1,3 +1,3 @@ module Wraith - VERSION = "3.1.2" + VERSION = "3.1.3" end From bf5888c1697a36c5f2e7604c9a81dfe4193d2872 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Fri, 8 Apr 2016 15:25:22 +0100 Subject: [PATCH 09/33] fix #415 --- lib/wraith/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wraith/cli.rb b/lib/wraith/cli.rb index 7e529326..3d9333ed 100644 --- a/lib/wraith/cli.rb +++ b/lib/wraith/cli.rb @@ -42,7 +42,7 @@ def copy_old_shots(config_name) end end - desc "validate", "checks your configuration and validates that all required properties exist" + desc "validate [config_name]", "checks your configuration and validates that all required properties exist" def validate(config_name) within_acceptable_limits do logger.info Wraith::Validate.new(config_name).validate From 1b31e4bf6b95b2a08cb4d09b2aaf816eb7ab6833 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Fri, 8 Apr 2016 15:28:06 +0100 Subject: [PATCH 10/33] incremented to v3.1.4 --- lib/wraith/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wraith/version.rb b/lib/wraith/version.rb index 5efcd9f0..bcda1698 100644 --- a/lib/wraith/version.rb +++ b/lib/wraith/version.rb @@ -1,3 +1,3 @@ module Wraith - VERSION = "3.1.3" + VERSION = "3.1.4" end From 6b58c5616ec583c2fde48ecd1fe98851e4cd2af2 Mon Sep 17 00:00:00 2001 From: Mark Fox Date: Sat, 16 Apr 2016 23:58:49 -0700 Subject: [PATCH 11/33] fixes #423 --- lib/wraith/validate.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/wraith/validate.rb b/lib/wraith/validate.rb index bee74906..2aafa89e 100644 --- a/lib/wraith/validate.rb +++ b/lib/wraith/validate.rb @@ -45,6 +45,8 @@ def validate_mode_properties(mode) def validate_capture_mode fail InvalidDomainsError, "`wraith capture` requires exactly two domains. #{docs_prompt}" if wraith.domains.length != 2 + fail MissingRequiredPropertyError, "You must specify a directory for capture! #{docs_prompt}" if wraith.directory.nil? + logger.warn "You have specified a `history_dir` in your config, but this is"\ " used in `history` mode, NOT `capture` mode. #{docs_prompt}" if wraith.history_dir end From 871c29246961de676920e27a9f22973963c9f7dd Mon Sep 17 00:00:00 2001 From: Mark Fox Date: Sun, 17 Apr 2016 00:20:05 -0700 Subject: [PATCH 12/33] update spec --- spec/validate_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/validate_spec.rb b/spec/validate_spec.rb index 9aad5a42..55b6c4d1 100644 --- a/spec/validate_spec.rb +++ b/spec/validate_spec.rb @@ -7,6 +7,8 @@ test: http://www.bbc.com browser: "casperjs" + + directory: some/dir ') end @@ -47,6 +49,15 @@ ') Wraith::Validate.new(config, true).validate("capture") end + + it "should fail if no directory is specified" do + config["domains"] = YAML.load(' + test: http://something.bbc.com + live: http://www.bbc.com + ') + config["directory"] = nil + expect { Wraith::Validate.new(config, true).validate("capture") }.to raise_error MissingRequiredPropertyError + end end describe "validations specific to history mode" do From bde0aadff23b160979adc0a8000ecc58650fc9c8 Mon Sep 17 00:00:00 2001 From: Pete Johns Date: Mon, 18 Apr 2016 15:26:49 +1000 Subject: [PATCH 13/33] Allow newer nokogiris --- wraith.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wraith.gemspec b/wraith.gemspec index e5231c90..28683c89 100644 --- a/wraith.gemspec +++ b/wraith.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'image_size' spec.add_runtime_dependency 'anemone' spec.add_runtime_dependency 'robotex' - spec.add_runtime_dependency 'nokogiri', '1.6.7' + spec.add_runtime_dependency 'nokogiri', '~> 1.6.7' spec.add_runtime_dependency 'log4r' spec.add_runtime_dependency 'thor' spec.add_runtime_dependency 'parallel' From e4dfba03a2900b6193763a6d57c0023eb0e8f5b2 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Fri, 22 Apr 2016 16:01:55 +0100 Subject: [PATCH 14/33] fix #405 --- lib/wraith/helpers/custom_exceptions.rb | 3 +++ lib/wraith/wraith.rb | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/wraith/helpers/custom_exceptions.rb b/lib/wraith/helpers/custom_exceptions.rb index 9431dc10..91dfd86d 100644 --- a/lib/wraith/helpers/custom_exceptions.rb +++ b/lib/wraith/helpers/custom_exceptions.rb @@ -6,3 +6,6 @@ class InvalidDomainsError < CustomError class MissingRequiredPropertyError < CustomError end + +class ConfigFileDoesNotExistError < CustomError +end diff --git a/lib/wraith/wraith.rb b/lib/wraith/wraith.rb index d4044d94..a689dbf3 100644 --- a/lib/wraith/wraith.rb +++ b/lib/wraith/wraith.rb @@ -26,8 +26,7 @@ def open_config_file(config_name) return YAML.load config end end - rescue - logger.error "unable to find config \"#{config_name}\"" + fail ConfigFileDoesNotExistError, "unable to find config \"#{config_name}\"" end def directory From b0995771b89df654d8a7bf952d051df49c97f5b9 Mon Sep 17 00:00:00 2001 From: ChrisBAshton Date: Mon, 25 Apr 2016 18:17:42 +0100 Subject: [PATCH 15/33] fix #419 --- lib/wraith/gallery_template/slideshow_template.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wraith/gallery_template/slideshow_template.erb b/lib/wraith/gallery_template/slideshow_template.erb index baead8e2..5f40c79c 100644 --- a/lib/wraith/gallery_template/slideshow_template.erb +++ b/lib/wraith/gallery_template/slideshow_template.erb @@ -109,7 +109,8 @@