easy_changelog 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/easy_changelog/configuration.rb +15 -0
- data/lib/easy_changelog/tasks/changelog.rake +7 -7
- data/lib/easy_changelog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5abde6f38f9a3543628e9e6d44f0557b3a846449003ef0f14eb2638bba401487
|
|
4
|
+
data.tar.gz: 772c7cfd1b3c70990d854f5cb7f397806378127a8daff4002923b44725350d40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c12f08de909626229dabfd798f42419563e813b7dac6dfae2d5222863b12c8940f3fdeb525d211581ed8b24282d203f4927b70de0443c5e873f99a172e03f7bf
|
|
7
|
+
data.tar.gz: fa9fcd2985d1472dd6186aed6d582c4fbe588d2c798887004b216932ab73b1d43f3d46cf0af4b0980b470dd3c7358c92041f62540bf3e6cb793f0c9d01189320
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -10,6 +10,12 @@ class EasyChangelog
|
|
|
10
10
|
attr_reader :entries_path, :unreleased_header, :entry_path_format, :user_signature, :type_mapping, :task_id_regex
|
|
11
11
|
attr_writer :repo_url, :release_message_template
|
|
12
12
|
|
|
13
|
+
CONFIG_PATHS = %w(
|
|
14
|
+
./.easy_changelog.rb
|
|
15
|
+
./config/initializers/easy_changelog.rb
|
|
16
|
+
./config/easy_changelog.rb
|
|
17
|
+
)
|
|
18
|
+
|
|
13
19
|
def initialize
|
|
14
20
|
@entries_path = 'changelog/'
|
|
15
21
|
@changelog_filename = 'CHANGELOG.md'
|
|
@@ -111,5 +117,14 @@ class EasyChangelog
|
|
|
111
117
|
def entry_path_template
|
|
112
118
|
File.join(entries_path, @entry_path_format.gsub(/<(\w+)>/) { |_match| "%<#{Regexp.last_match(1)}>s" })
|
|
113
119
|
end
|
|
120
|
+
|
|
121
|
+
def load_config
|
|
122
|
+
paths = CONFIG_PATHS.map { |path| File.expand_path(path) }
|
|
123
|
+
path = paths.select { |path| File.exist?(path) }.first
|
|
124
|
+
|
|
125
|
+
return unless path
|
|
126
|
+
|
|
127
|
+
load(path)
|
|
128
|
+
end
|
|
114
129
|
end
|
|
115
130
|
end
|
|
@@ -4,14 +4,14 @@ require 'easy_changelog'
|
|
|
4
4
|
require 'easy_changelog/task_options_parser'
|
|
5
5
|
|
|
6
6
|
namespace :changelog do
|
|
7
|
-
def
|
|
8
|
-
|
|
7
|
+
def load_config
|
|
8
|
+
EasyChangelog.configuration.load_config
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
EasyChangelog.configuration.changelog_types.each do |type|
|
|
12
12
|
desc "Create a Changelog entry (#{type})"
|
|
13
13
|
task type do
|
|
14
|
-
|
|
14
|
+
load_config
|
|
15
15
|
options = EasyChangelog::TaskOptionsParser.parse(type, ARGV)
|
|
16
16
|
options[:type] = type
|
|
17
17
|
|
|
@@ -25,7 +25,7 @@ namespace :changelog do
|
|
|
25
25
|
|
|
26
26
|
desc 'Create a Changelog entry (default)'
|
|
27
27
|
task :new do
|
|
28
|
-
|
|
28
|
+
load_config
|
|
29
29
|
options = EasyChangelog::TaskOptionsParser.parse(:new, ARGV)
|
|
30
30
|
options[:type] = :new
|
|
31
31
|
|
|
@@ -38,7 +38,7 @@ namespace :changelog do
|
|
|
38
38
|
|
|
39
39
|
desc 'Merge entries and delete them'
|
|
40
40
|
task :merge do
|
|
41
|
-
|
|
41
|
+
load_config
|
|
42
42
|
raise 'No entries!' unless EasyChangelog.pending?
|
|
43
43
|
|
|
44
44
|
EasyChangelog.merge_and_delete!
|
|
@@ -49,7 +49,7 @@ namespace :changelog do
|
|
|
49
49
|
|
|
50
50
|
desc 'Check for no pending changelog entries'
|
|
51
51
|
task :check_clean do
|
|
52
|
-
|
|
52
|
+
load_config
|
|
53
53
|
next unless EasyChangelog.pending?
|
|
54
54
|
|
|
55
55
|
puts '*** Pending changelog entries!'
|
|
@@ -59,7 +59,7 @@ namespace :changelog do
|
|
|
59
59
|
|
|
60
60
|
desc 'Add release entry'
|
|
61
61
|
task :release do
|
|
62
|
-
|
|
62
|
+
load_config
|
|
63
63
|
EasyChangelog.release!
|
|
64
64
|
cmd = "git commit -a -m 'Update Changelog'"
|
|
65
65
|
puts cmd
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy_changelog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan de Paula Almeida Filho
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-01-
|
|
11
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Changelog generator, based on Rubocop contributing section.
|
|
14
14
|
email:
|