renogen 1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/renogen/cli.rb +21 -4
- data/lib/renogen/cli/param_parser.rb +7 -3
- data/lib/renogen/config.rb +3 -2
- data/lib/renogen/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441ccac5869c9d78abc7c3d163a851c4341d29b2
|
4
|
+
data.tar.gz: 78e083dde9bba0f04c01c9ce4fe37ac6a3c862b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5851785f48aed5505e8b1506c9f5752b6c49c24dca5488110f9a28fdc0d02b33b90c399c3db571beb65d77d908892fdb30f6e8f335bd8b701ec9744f3eb7979
|
7
|
+
data.tar.gz: 96f6024f0e7decc226d44ce9b55d9f746aa3e2a272a0033b82d219558f1396e65207daae4330f40001b23484bc72a0182cdc48b77b237d92595798e8e9a03d25
|
data/README.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
Renogen or Re(lease) No(tes) Gen(erator) is a development tool to separate feature notes from product versions.
|
4
4
|
|
5
|
+
|
6
|
+
This renogen can not do and will have to be reviewed manually
|
7
|
+
- Order the notes in the orrect order (e.g. if a task has to be run before/after something else)
|
8
|
+
- Remove Duplicate notes that might be added (e.g. 2 tickets might want to run the same task)
|
9
|
+
|
10
|
+
|
5
11
|
### Installation
|
6
12
|
|
7
13
|
To install Renogen, use the following command:
|
@@ -13,7 +19,8 @@ or add the following to your Gemfile
|
|
13
19
|
`gem 'renogen', :require => false, :group => :development`
|
14
20
|
|
15
21
|
`$ renogen init # optional Creates directory for notes`
|
16
|
-
|
22
|
+
|
23
|
+
`$ renogen --help # List available options`
|
17
24
|
|
18
25
|
### Usage
|
19
26
|
|
@@ -72,6 +79,9 @@ TODO
|
|
72
79
|
* How to set configuration with `.renogen` file
|
73
80
|
* How to change formatted single line
|
74
81
|
|
82
|
+
### Why does renogen not use renogen?
|
83
|
+
The amount of activity and contributes for this project is small and so it is more practical to use a text file.
|
84
|
+
|
75
85
|
### License
|
76
86
|
|
77
87
|
Renogen is a programming tool to generate a log of source code changes
|
data/lib/renogen/cli.rb
CHANGED
@@ -10,13 +10,16 @@ module Renogen
|
|
10
10
|
# @param args [Array]
|
11
11
|
def self.run(args)
|
12
12
|
return init if args.first == 'init'
|
13
|
+
return new_ticket(args[1]) if args.first == 'new'
|
14
|
+
|
13
15
|
param_parser = ParamParser.new(args)
|
14
16
|
version, options = param_parser.parse
|
17
|
+
config_instance = Config.instance
|
15
18
|
|
16
|
-
format = options['format'] ||
|
17
|
-
source = options['source'] ||
|
18
|
-
options['changelog_path'] ||=
|
19
|
-
options['old_version'] ||=
|
19
|
+
format = options['format'] || config_instance.output_format
|
20
|
+
source = options['source'] || config_instance.input_source
|
21
|
+
options['changelog_path'] ||= config_instance.changelog_path
|
22
|
+
options['old_version'] ||= config_instance.changelog_path
|
20
23
|
|
21
24
|
begin
|
22
25
|
generator = Renogen::Generator.new(version, source, format, options)
|
@@ -29,6 +32,7 @@ module Renogen
|
|
29
32
|
|
30
33
|
# Initialize the current working directory with an example change
|
31
34
|
def self.init
|
35
|
+
# TODO Refactor to use Config.instance.changelog_path
|
32
36
|
Dir.mkdir('./change_log')
|
33
37
|
puts "Created './change_log/'"
|
34
38
|
|
@@ -57,5 +61,18 @@ module Renogen
|
|
57
61
|
end
|
58
62
|
puts "Created '.renogen'"
|
59
63
|
end
|
64
|
+
|
65
|
+
# Creates a new template file
|
66
|
+
#
|
67
|
+
# @param ticket_name [String]
|
68
|
+
def self.new_ticket(ticket_name)
|
69
|
+
file_path = File.join(Config.instance.changelog_path, 'next', "#{ticket_name}.yml")
|
70
|
+
File.open(file_path, 'w') do |f|
|
71
|
+
Config.instance.default_headings.each do |h|
|
72
|
+
f.write("#{h}:\n")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
puts "Created '#{file_path}'"
|
76
|
+
end
|
60
77
|
end
|
61
78
|
end
|
@@ -17,10 +17,14 @@ module Renogen
|
|
17
17
|
args = Hash.new
|
18
18
|
|
19
19
|
opt_parser = OptionParser.new do |opts|
|
20
|
-
opts.banner =
|
20
|
+
opts.banner = "Usage:"
|
21
|
+
opts.separator " renogen [options] VERSION"
|
22
|
+
opts.separator " renogen new TICKET_NAME"
|
23
|
+
opts.separator " renogen init"
|
21
24
|
opts.separator ""
|
22
25
|
opts.separator "Required:"
|
23
|
-
opts.separator " VERSION
|
26
|
+
opts.separator " VERSION this is the version that is currently being required:"
|
27
|
+
opts.separator " TICKET_NAME this is the name of the new ticket to be created:"
|
24
28
|
opts.separator ""
|
25
29
|
opts.separator "Options:"
|
26
30
|
|
@@ -55,7 +59,7 @@ module Renogen
|
|
55
59
|
|
56
60
|
new_version = options.shift
|
57
61
|
if new_version.nil?
|
58
|
-
puts "Error: Missing argument
|
62
|
+
puts "Error: Missing argument"
|
59
63
|
puts
|
60
64
|
puts opt_parser
|
61
65
|
exit 1
|
data/lib/renogen/config.rb
CHANGED
@@ -5,7 +5,7 @@ module Renogen
|
|
5
5
|
# Stores configuratin values to be used by the libary
|
6
6
|
class Config
|
7
7
|
include Singleton
|
8
|
-
attr_accessor :single_line_format, :input_source, :output_format, :supported_keys, :changelog_path
|
8
|
+
attr_accessor :single_line_format, :input_source, :output_format, :supported_keys, :changelog_path, :default_headings
|
9
9
|
|
10
10
|
def initialize
|
11
11
|
config_file = load_yaml_config
|
@@ -13,7 +13,8 @@ module Renogen
|
|
13
13
|
self.supported_keys = config_file['supported_keys'] || ['identifier', 'link', 'summary'].freeze
|
14
14
|
self.input_source = config_file['input_source'] || 'yaml'.freeze
|
15
15
|
self.output_format = config_file['output_format'] || 'markdown'.freeze
|
16
|
-
self.changelog_path = config_file['changelog_path']
|
16
|
+
self.changelog_path = config_file['changelog_path'] || './change_log'.freeze
|
17
|
+
self.default_headings = config_file['default_headings'] || %w(Summary Detailed Tasks).freeze
|
17
18
|
end
|
18
19
|
|
19
20
|
|
data/lib/renogen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renogen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Elliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -80,7 +80,7 @@ files:
|
|
80
80
|
- spec/spec_helper.rb
|
81
81
|
homepage: https://github.com/DDAZZA/renogen
|
82
82
|
licenses:
|
83
|
-
- GPL-3
|
83
|
+
- GPL-3.0
|
84
84
|
metadata: {}
|
85
85
|
post_install_message:
|
86
86
|
rdoc_options: []
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
|
-
rubygems_version: 2.
|
101
|
+
rubygems_version: 2.6.2
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: Release Notes/changelog Generator
|