Skip to content

Commit

Permalink
Updated PATTERN examples in CLI help output
Browse files Browse the repository at this point in the history
[Closes #625]
  • Loading branch information
Zapotek committed Oct 19, 2015
1 parent c0b6f1f commit 9a9f874
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 4 additions & 4 deletions ui/cli/framework/option_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ] =
Expand Down Expand Up @@ -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\/(?<input1>\w+)\/input2\/(?<input2>\w+)/',
' input1/(?<input1>\w+)/input2/(?<input2>\w+)',
'(Can be used multiple times.)'
) do |pattern|
# We merge this way to enforce validation from the options group.
Expand Down

0 comments on commit 9a9f874

Please sign in to comment.