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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e400f241e2089e8ee8b3141460ee11584b671f8d418e7580c8c61ac435725b53
4
- data.tar.gz: c93aa0f0c4037b3191cf28b74bdf0aeb5aff8ff827a0465acfc7976b37820a05
3
+ metadata.gz: 5abde6f38f9a3543628e9e6d44f0557b3a846449003ef0f14eb2638bba401487
4
+ data.tar.gz: 772c7cfd1b3c70990d854f5cb7f397806378127a8daff4002923b44725350d40
5
5
  SHA512:
6
- metadata.gz: b0d4b08b17021a74a960ff3c75584c66668308944a6c7cf019599a69bdc06fc8493f9d2fefa7f21373ada19036f594fb038b2a004c8219589ed85a109bf5a6f5
7
- data.tar.gz: 27600e93f884f1f48d8088b0d0421305c027ab78272cc26fe1b57cebf65d7e9a7aba4e66d7508fe0aef112803245a7acd788819e14f30dcb90a05c7cfaef3862
6
+ metadata.gz: c12f08de909626229dabfd798f42419563e813b7dac6dfae2d5222863b12c8940f3fdeb525d211581ed8b24282d203f4927b70de0443c5e873f99a172e03f7bf
7
+ data.tar.gz: fa9fcd2985d1472dd6186aed6d582c4fbe588d2c798887004b216932ab73b1d43f3d46cf0af4b0980b470dd3c7358c92041f62540bf3e6cb793f0c9d01189320
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 1.1.0 (2025-01-23)
6
+ ### New features
7
+
8
+ * [#abaa9e4](https://github.com/ivan05almeida/easy_changelog/commit/abaa9e4): Add custom config paths. ([@ivan05almeida][])
9
+
5
10
  ## 1.0.0 (2025-01-22)
6
11
  ### Breaking Changes
7
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- easy_changelog (1.0.0)
4
+ easy_changelog (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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 environment
8
- Rake.application['environment'].invoke if Rake::Task.task_defined?('environment')
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
- environment
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
- environment
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
- environment
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
- environment
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
- environment
62
+ load_config
63
63
  EasyChangelog.release!
64
64
  cmd = "git commit -a -m 'Update Changelog'"
65
65
  puts cmd
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class EasyChangelog
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
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.0.0
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-22 00:00:00.000000000 Z
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: