Class: NiceCommits::MessageValidator
- Inherits:
-
Object
- Object
- NiceCommits::MessageValidator
- Defined in:
- lib/nice_commits/message_validator.rb
Constant Summary collapse
- FORMAT =
Example:
refactor(subscriptions): fix feature envy in sender
Long commit description with list of changed files
-
lib/sender.rb
-
lib/strategy/mail.rb
-
/\A ([a-z]+) # type of commit \(([^)\n:]+)\) # scope of changes :[[:blank:]]+ ([^\n]{5,}) # subject (?:\n\n([^\n]+(?:.*\n)+))? # body not necessary \Z/x- MERGE =
/\AMerge (?:branch|pull request)/
Instance Method Summary collapse
-
#initialize(message) ⇒ MessageValidator
constructor
A new instance of MessageValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(message) ⇒ MessageValidator
Returns a new instance of MessageValidator.
21 22 23 |
# File 'lib/nice_commits/message_validator.rb', line 21 def initialize() @message = end |
Instance Method Details
#valid? ⇒ Boolean
25 26 27 |
# File 'lib/nice_commits/message_validator.rb', line 25 def valid? merge? || well_formed? end |