Skip to content

Commit

Permalink
Fix pattern (?<query>.*) to (?<query>+*)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbpgr committed Dec 9, 2014
1 parent 36adb6b commit 6da633c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Or install it yourself as:

|Command|Pattern|Description|
|:--|:--|:--|
|help|/help *(?&lt;query&gt;.*)\z/|Show all help commands that match &lt;query&gt;.|
|help|/help *(?&lt;query&gt;.+)\z/|Show all help commands that match &lt;query&gt;.|

## Usage
### help
Expand Down
2 changes: 1 addition & 1 deletion lib/ruboty/handlers/help_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Handlers
# HelpQuery
class HelpQuery < Base
on(
/help\s*(?<query>.*)\z/,
/help\s*(?<query>.+)\z/,
name: 'help',
description: 'Show all help commands that match <query>.'
)
Expand Down
2 changes: 1 addition & 1 deletion spec/ruboty/help_query/actions/help_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def reply(message)
case_title: 'exist user case',
query: '.*p.*',
expected: <<-EOS
robot /help\\s*(?<query>.*)\\z/ - Show all help commands that match <query>.
robot /help\\s*(?<query>.+)\\z/ - Show all help commands that match <query>.
robot /help( me)?\\z/i - Show this help message
robot /ping\\z/i - Return PONG to PING
EOS
Expand Down

0 comments on commit 6da633c

Please sign in to comment.