Class: Codelog::Command::New
- Inherits:
-
Object
- Object
- Codelog::Command::New
- Includes:
- FileUtils
- Defined in:
- lib/codelog/command/new.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(options) ⇒ Object
8 9 10 |
# File 'lib/codelog/command/new.rb', line 8 def self.run() Codelog::Command::New.new.run end |
Instance Method Details
#run(options) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/codelog/command/new.rb', line 12 def run() chdir Dir.pwd do # This script create a change file for the changelog documentation. full_file_name = "changelogs/unreleased/#{Time.now.strftime('%Y%m%d%H%M%S%L')}_change.yml" puts "== Creating #{full_file_name} change file based on example ==" system! "cp changelogs/template.yml #{full_file_name}" system! "#{default_editor} #{full_file_name}" if [:edit] end end |