Class: WayOfWorking::Git::RepoReader
- Inherits:
-
Object
- Object
- WayOfWorking::Git::RepoReader
- Defined in:
- lib/way_of_working/git/repo_reader.rb
Overview
This class holds a summary of a git tag
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
Instance Method Summary collapse
-
#initialize(base) ⇒ RepoReader
constructor
A new instance of RepoReader.
- #likely_upstream_remote_url ⇒ Object
- #summary_tags ⇒ Object
Constructor Details
#initialize(base) ⇒ RepoReader
Returns a new instance of RepoReader.
12 13 14 |
# File 'lib/way_of_working/git/repo_reader.rb', line 12 def initialize(base) @base = base end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
10 11 12 |
# File 'lib/way_of_working/git/repo_reader.rb', line 10 def base @base end |
Instance Method Details
#likely_upstream_remote_url ⇒ Object
27 28 29 |
# File 'lib/way_of_working/git/repo_reader.rb', line 27 def likely_upstream_remote_url likely_upstream_remote&.url&.sub(/\.git\z/, '') end |
#summary_tags ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/way_of_working/git/repo_reader.rb', line 16 def = @base..map do |tag| SummaryTag.new(tag.name, base.gcommit(tag.objectish).date) end.sort ensure_versions_are_valid_and_increasing!() capture_change_types() end |