Class: Hookers::Changelog::Matchers::PivotalTrackerMatcher

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

Constant Summary collapse

REGEXP =
/(feature|story|fixed|fixes|completed|finished|delivers)((?:\s+#\s*\d+){1,})/i
SUBPATTERN =
/(?:\s+\#\s*(\d+))/

Instance Attribute Summary

Attributes inherited from Matcher

#commit, #number

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



88
89
90
# File 'lib/hookers/changelog/matchers.rb', line 88

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

Instance Method Details

#typeObject



92
93
94
# File 'lib/hookers/changelog/matchers.rb', line 92

def type
  "FEATURE"
end

#uriObject



96
97
98
# File 'lib/hookers/changelog/matchers.rb', line 96

def uri
  "http://pivotaltracker.com/story/show/#{self.number}"
end