Class: StructuredChangelog
- Inherits:
-
Object
- Object
- StructuredChangelog
- Defined in:
- lib/structured_changelog.rb,
lib/structured_changelog/release.rb,
lib/structured_changelog/roadmap.rb,
lib/structured_changelog/version.rb,
lib/structured_changelog/core_ext/gem.rb,
lib/structured_changelog/core_ext/string.rb,
lib/structured_changelog/release_filters.rb,
lib/structured_changelog/release_preview.rb,
lib/structured_changelog/version_pattern.rb,
lib/structured_changelog/release_filters/base.rb,
lib/structured_changelog/release_filters/matches_all_versions.rb,
lib/structured_changelog/release_filters/matches_single_version.rb,
lib/structured_changelog/release_filters/matches_current_version.rb,
lib/structured_changelog/release_filters/matches_versions_between.rb,
lib/structured_changelog/release_filters/matches_versions_less_than_or_equal_to.rb,
lib/structured_changelog/release_filters/matches_versions_greater_than_or_equal_to.rb
Defined Under Namespace
Modules: ReleaseFilters, StringInstanceMethods, VersionInstanceMethods Classes: IllegalQuery, Release, ReleasePreview, Roadmap
Constant Summary collapse
- VERSION =
"0.11.2"
- VersionPattern =
/(?<version>\d+\.\d+\.\d+[^\s\"\']*)/
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#releases ⇒ Object
readonly
Returns the value of attribute releases.
-
#roadmaps ⇒ Object
readonly
Returns the value of attribute roadmaps.
Instance Method Summary collapse
- #find_releases(query) ⇒ Object
-
#initialize(path) ⇒ StructuredChangelog
constructor
A new instance of StructuredChangelog.
- #validate ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(path) ⇒ StructuredChangelog
Returns a new instance of StructuredChangelog.
10 11 12 13 14 15 16 17 |
# File 'lib/structured_changelog.rb', line 10 def initialize(path) @path = Pathname.new(path) @releases = Set.new([]) @roadmaps = Set.new([]) parse end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/structured_changelog.rb', line 8 def path @path end |
#releases ⇒ Object (readonly)
Returns the value of attribute releases.
8 9 10 |
# File 'lib/structured_changelog.rb', line 8 def releases @releases end |
#roadmaps ⇒ Object (readonly)
Returns the value of attribute roadmaps.
8 9 10 |
# File 'lib/structured_changelog.rb', line 8 def roadmaps @roadmaps end |
Instance Method Details
#find_releases(query) ⇒ Object
37 38 39 40 41 |
# File 'lib/structured_changelog.rb', line 37 def find_releases(query) ReleaseFilters .filter_for(query) .filter_releases(releases) end |
#validate ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/structured_changelog.rb', line 23 def validate notifications = [] if latest_release.nil? notifications << "No RELEASE blocks" else notifications += latest_release.validate end notifications.each(&method(:puts)) notifications.empty? end |
#version ⇒ Object
19 20 21 |
# File 'lib/structured_changelog.rb', line 19 def version latest_release.version end |