From 9a9f874a6152a0796e610c19aa0a113247b43cee Mon Sep 17 00:00:00 2001 From: Tasos Laskos Date: Mon, 19 Oct 2015 08:32:18 +0300 Subject: [PATCH] Updated PATTERN examples in CLI help output [Closes #625] --- CHANGELOG.md | 5 +++++ ui/cli/framework/option_parser.rb | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8ab62db60..aae5fc01db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## 1.3.2 _(October 19, 2015)_ +- `UI` + - `CLI` + - Help output + - Simplified `PATTERN` examples. + - Replaced `test.com` with `example.com`. - Browser - Configure PhantomJS to accept any SSL version to allow for easier interception. - `HTTP` diff --git a/ui/cli/framework/option_parser.rb b/ui/cli/framework/option_parser.rb index 4804133010..e41dc02120 100644 --- a/ui/cli/framework/option_parser.rb +++ b/ui/cli/framework/option_parser.rb @@ -138,8 +138,8 @@ def scope on( '--scope-url-rewrite PATTERN:SUBSTITUTION', 'Rewrite URLs based on the given PATTERN and SUBSTITUTION.', - 'To convert: http://test.com/articles/some-stuff/23 to http://test.com/articles.php?id=23', - 'Use: /articles\/[\w-]+\/(\d+)/:articles.php?id=\1' + 'To convert: http://example.com/articles/some-stuff/23 to http://example.com/articles.php?id=23', + 'Use: articles/[\w-]+/(\d+):articles.php?id=\1' ) do |rule| pattern, substitution = rule.split( ':', 2 ) options.scope.url_rewrites[ Regexp.new( pattern ) ] = @@ -191,9 +191,9 @@ def audit on( '--audit-link-template TEMPLATE', Regexp, 'Regular expression with named captures to use to extract input information from generic paths.', "To extract the 'input1' and 'input2' inputs from:", - ' http://test.com/input1/value1/input2/value2', + ' http://example.com/input1/value1/input2/value2', 'Use:', - ' /input1\/(?\w+)\/input2\/(?\w+)/', + ' input1/(?\w+)/input2/(?\w+)', '(Can be used multiple times.)' ) do |pattern| # We merge this way to enforce validation from the options group.