codelog 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 74a5159f6ac17e60fc9102f1f851ec05fb76a48525e8fdca72a200fafeadd156
4
- data.tar.gz: acf5a0b643bbd3990c9a0fac49b5844719cd8c3f428bc11f5abf11c9705ea0f1
2
+ SHA1:
3
+ metadata.gz: 0f1e5ce48ce1d8a919fc4c121090b8f5efdb908e
4
+ data.tar.gz: efb600d1427eb7b60773cd1c186035fd972dbf3d
5
5
  SHA512:
6
- metadata.gz: ca21b2e1fe5a4ae444d2665cf12f7f05e15d36acd2812b88bb949df9e670a605b4eefde25717ce0defb28cd66b43c4d06d22ada213e1b0430455b44a12644ee8
7
- data.tar.gz: 9d91d7f46a018616e37226f18fc08561038b303555f30c7cd238db281fdb03574c1db05ff5ac0c924bb072e75325613d01df1efbe3cfaa6ca60e6a3e3d5c2d2f
6
+ metadata.gz: 86a05331db80325f448a3a09c59a8d43a15c9d83bed1d8026038ae26e901b3687738141fd419a6066a903f1e8fd4c09b9a1e526794375d1d493f74706343f543
7
+ data.tar.gz: fb3404f11c69905bb8e5639d8c9c80bef154ca01ddff8eeea0a768f0bf9886f9ff1575a6dd081aa4bd5ce233440b9ddb6ce39e3e954e6c21e39907aa3b1a986a
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
3
3
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
4
4
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## 0.5.0
7
+ ### Added
8
+ - Ability to edit the created changefile by running `codelog new <-e|--edit>`
9
+
10
+ ---
6
11
  ## 0.4.0
7
12
  ### Fixed
8
13
  - Nested YML entries were print as hashes. Now codelog generates a nested Markdown
@@ -10,7 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
15
  ---
11
16
  ## 0.3.1
12
17
  ### Fixed
13
- - Non-default input date fomat
18
+ - Non-default input date format
14
19
 
15
20
  ---
16
21
  ## 0.3.0
@@ -10,8 +10,10 @@ module Codelog
10
10
  end
11
11
 
12
12
  desc 'new', 'Generate a file from the template for the unreleased changes'
13
+ method_option :edit, desc: 'Opens the default system editor after creating a changefile',
14
+ aliases: '-e', type: :boolean
13
15
  def new
14
- Codelog::Command::New.run
16
+ Codelog::Command::New.run options
15
17
  end
16
18
 
17
19
  desc 'release [VERSION] <RELEASE_DATE>', 'Generate new release updating changelog'
@@ -5,11 +5,11 @@ module Codelog
5
5
  class New
6
6
  include FileUtils
7
7
 
8
- def self.run
9
- Codelog::Command::New.new.run
8
+ def self.run(options)
9
+ Codelog::Command::New.new.run options
10
10
  end
11
11
 
12
- def run
12
+ def run(options)
13
13
  chdir Dir.pwd do
14
14
  # This script create a change file for the changelog documentation.
15
15
 
@@ -17,11 +17,19 @@ module Codelog
17
17
 
18
18
  puts "== Creating #{full_file_name} change file based on example =="
19
19
  system! "cp changelogs/template.yml #{full_file_name}"
20
+ system! "#{default_editor} #{full_file_name}" if options[:edit]
20
21
  end
21
22
  end
22
23
 
23
24
  private
24
25
 
26
+ def default_editor
27
+ # Looks for the default editor in VISUAL and EDITOR system variables
28
+ # if no variable is set it defaults to nano
29
+
30
+ '${VISUAL:-${EDITOR:-nano}}'
31
+ end
32
+
25
33
  def system!(*args)
26
34
  system(*args) || abort("\n== Command #{args} failed ==")
27
35
  end
@@ -1,3 +1,3 @@
1
1
  module Codelog
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luís Bevilacqua
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2018-02-08 00:00:00.000000000 Z
15
+ date: 2018-02-16 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: thor
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 2.7.3
153
+ rubygems_version: 2.6.8
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: A gem to help with changelog management