Class: Avm::Git::Issue::Complete
- Inherits:
-
Object
- Object
- Avm::Git::Issue::Complete
show all
- Defined in:
- lib/avm/git/issue/complete.rb,
lib/avm/git/issue/complete/push.rb,
lib/avm/git/issue/complete/test.rb,
lib/avm/git/issue/complete/remote.rb,
lib/avm/git/issue/complete/commits.rb,
lib/avm/git/issue/complete/tracker.rb,
lib/avm/git/issue/complete/local_tag.rb,
lib/avm/git/issue/complete/validation.rb,
lib/avm/git/issue/complete/validations.rb,
lib/avm/git/issue/complete/git_subrepos.rb,
lib/avm/git/issue/complete/local_branch.rb,
lib/avm/git/issue/complete/working_tree.rb
Defined Under Namespace
Modules: Commits, GitSubrepos, LocalBranch, LocalTag, Push, Remote, Test, Tracker, Validations, WorkingTree
Classes: Validation
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(scm, options) ⇒ Complete
Returns a new instance of Complete.
16
17
18
19
20
21
22
|
# File 'lib/avm/git/issue/complete.rb', line 16
def initialize(scm, options)
@scm = scm
consumer = ::EacRubyUtils::OptionsConsumer.new(options)
@skip_validations = consumer.consume(:skip_validations)
validate_skip_validations
consumer.validate
end
|
Instance Attribute Details
#scm ⇒ Object
Returns the value of attribute scm.
14
15
16
|
# File 'lib/avm/git/issue/complete.rb', line 14
def scm
@scm
end
|
#skip_validations ⇒ Object
Returns the value of attribute skip_validations.
14
15
16
|
# File 'lib/avm/git/issue/complete.rb', line 14
def skip_validations
@skip_validations
end
|
Instance Method Details
#dir ⇒ String
25
26
27
|
# File 'lib/avm/git/issue/complete.rb', line 25
def dir
scm.path.to_path
end
|
#issue_id ⇒ Object
42
43
44
|
# File 'lib/avm/git/issue/complete.rb', line 42
def issue_id
branch ? issue_id_parser.parse(branch_name) : nil
end
|
#issue_id_parser ⇒ EacRubyUtils::RegexpParser
47
48
49
|
# File 'lib/avm/git/issue/complete.rb', line 47
def issue_id_parser
/\A#{Regexp.quote('issue_')}(\d+)\z/.to_parser { |m| m[1].to_i }
end
|
#run ⇒ Object
33
34
35
36
37
38
39
40
|
# File 'lib/avm/git/issue/complete.rb', line 33
def run
return false unless valid?
assert_tag
push
remove_local_branch
true
end
|
#start_banner ⇒ Object
29
30
31
|
# File 'lib/avm/git/issue/complete.rb', line 29
def start_banner
validations_banner
end
|