Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example config spider.yaml not working in 2.8.1 #325

Closed
ghost opened this issue Nov 27, 2015 · 2 comments
Closed

Example config spider.yaml not working in 2.8.1 #325

ghost opened this issue Nov 27, 2015 · 2 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Nov 27, 2015

$ wraith capture configs/spider.yaml
unable to find config at configs/spider.yaml

Only works if removing the whole spider config block. Not able yet to figure out what exactly seems to make YAML parsing crash. Removing single lines shows no hint.

@luke-holloway
Copy link

@mpietsch: After running it through http://codebeautify.org/yaml-validator, it turns out that it is apparently a formatting problem. This worked for me:

# Add as many domains as necessary. Key will act as a label
domains:
  my_site:  "http://www.example.com"
  my_other_site: "http://www.test.example.com"

# Notice the absence of a `paths` property. When no paths are provided, Wraith defaults to
# spidering mode to check your entire website.
# A list of URLs to skip when spidering.
# Ruby regular expressions can be used, if prefixed with `!ruby/regexp` as defined in the YAML Cookbook.
# See http://www.yaml.org/YAML_for_ruby.html#regexps
spider_skips:
  - /foo/bar.html           # Matches /foo/bar.html explicitly
  - !ruby/regexp /^\/baz\// # Matches any URLs that start with /baz

# the filename of the spider file to use. Default: spider.txt
spider_file: example_com_spider.txt

# the number of days to keep the site spider file
spider_days: 10

# amount of fuzz ImageMagick will use when comparing images. A higher fuzz makes the comparison less strict.
fuzz: '20%'

# the maximum acceptable level of difference (in %) between two images.
# Wraith considers it a failure if an image diff goes above this threshold.
threshold: 5

# screen widths (and optional height) to resize the browser to before taking the screenshot
screen_widths:
  - 320
  - 600x768
  - 768
  - 1024
  - 1280

# the engine to run Wraith with.
browser:
  #phantomjs: "casperjs"   # variant of PhantomJS that allows screenshots by element selector
  phantomjs: "phantomjs" # PhantomJS, built on top of Webkit and JavascriptCore (like Safari)
  #slimerjs: "slimerjs"   # SlimerJS, built on top of Gecko and SpiderMonkey (like Firefox)

# the file in charge of taking the screenshot
snap_file: "javascript/phantom.js"

# the directory that your latest screenshots will be stored in
directory: 'shots_nojs'

# choose how results are displayed in the gallery (default is `alphanumeric` if omitted)
# Different screen widths are always grouped together.
# Options:
#   alphanumeric - all paths (with or without a difference) are shown, sorted by path
#   diffs_first - all paths (with or without a difference) are shown, sorted by difference size (largest first)
#   diffs_only - only paths with a difference are shown, sorted by difference size (largest first)
mode: diffs_first

Hope that fixes it for you! If not just let me know

@ChrisBAshton
Copy link
Contributor

How strange! Thanks for finding this. You're right, there appear to be some hidden characters messing up the formatting.

screen shot 2015-11-30 at 08 19 15

I'll fix this in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants