Skip to content

Commit

Permalink
Merge pull request #2 from rymai/master
Browse files Browse the repository at this point in the history
Ensure dashes can be part of a username
  • Loading branch information
pcreux committed Jun 4, 2012
2 parents f9deb79 + 0abc1cd commit 45c98d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/pimpmychangelog/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions spec/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 45c98d2

Please sign in to comment.