Class: QAT::Devel::GitLab::ReleaseNote
- Inherits:
-
Object
- Object
- QAT::Devel::GitLab::ReleaseNote
- Defined in:
- lib/qat/devel/lib/gitlab/release_note.rb
Overview
Creates a new release note
Defined Under Namespace
Classes: InvalidTagsError
Constant Summary collapse
- TAGS =
['Story', 'Bug', 'Task', 'Deploy', 'Release']
Instance Attribute Summary collapse
- #text ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(project, version, issue_list) ⇒ ReleaseNote
constructor
A new instance of ReleaseNote.
Constructor Details
#initialize(project, version, issue_list) ⇒ ReleaseNote
Returns a new instance of ReleaseNote.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/qat/devel/lib/gitlab/release_note.rb', line 18 def initialize(project, version, issue_list) @project = project @version = version @issues = parse_issues(issue_list) template = File.join(File.dirname(__FILE__), 'release_note', 'template.md.erb') content = ERB.new(File.read(template), nil, '-').result(binding) FileUtils.mkdir_p(File.join(Dir.pwd, 'public')) File.write(File.join(Dir.pwd, 'public', "release_note_#{@version}.md"), content) @text = content end |
Instance Attribute Details
#text ⇒ Object (readonly)
10 11 12 |
# File 'lib/qat/devel/lib/gitlab/release_note.rb', line 10 def text @text end |