Class: Hookers::Changelog::Matchers::BugzillaMatcher

Inherits:
Matcher
  • Object
show all
Defined in:
lib/hookers/changelog/matchers.rb

Constant Summary collapse

REGEXP =
/(bug)((?:\s+#\s*\d+){1,})/i
SUBPATTERN =
/(?:\s+\#\s*(\d+))/

Instance Attribute Summary

Attributes inherited from Matcher

#commit, #number, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Matcher

blocks_of, #identifier, #initialize, #to_affected

Constructor Details

This class inherits a constructor from Hookers::Changelog::Matchers::Matcher

Class Method Details

.scan(commit) ⇒ Object



75
76
77
# File 'lib/hookers/changelog/matchers.rb', line 75

def self.scan(commit)
  blocks_of(commit, REGEXP, SUBPATTERN).map { |e| new(commit, *e) }
end

Instance Method Details

#uriObject



79
80
81
# File 'lib/hookers/changelog/matchers.rb', line 79

def uri
  "http://bugzilla-qa.linux.locaweb.com.br/show_bug.cgi?id=#{number}"
end