Permalink
Browse files

Ensure dashes can be part of a username

  • Loading branch information...
1 parent f9deb79 commit 0abc1cd986fc0b2c6d47b4f1e8a3fbaac908211c @rymai rymai committed Jun 3, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/pimpmychangelog/parser.rb
  2. +2 −2 spec/parser_spec.rb
@@ -21,7 +21,7 @@ def issues
# @return [Array] ordered array of contributors found in the changelog
# Example: ['gregbell', 'pcreux', 'samvincent']
def contributors
- changelog.scan(/@(\w+)/).flatten.uniq.sort
+ changelog.scan(/@([\w-]+)/).flatten.uniq.sort
end
end
end
View
@@ -49,8 +49,8 @@
describe "#contributors" do
it "should return a sorted list of unique contributors" do
- Parser.new("@samvincent @pcreux @gregbell @pcreux").contributors.
- should == ['gregbell', 'pcreux', 'samvincent']
+ Parser.new("@samvincent @pcreux @gregbell @pcreux @dash-and_underscore").contributors.
+ should == ['dash-and_underscore', 'gregbell', 'pcreux', 'samvincent']
end
end
end

0 comments on commit 0abc1cd

Please sign in to comment.