easy_changelog 0.3.1 → 0.3.2

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: 7122edc736d5585ba153c6010848ed2a33dd7d31456cc6ff41b14c7fcd2412f5
4
- data.tar.gz: 6dbc04e304cff63cd3a7fd83d183533c0c77256f7b72c589e4809d9125b275f8
3
+ metadata.gz: 67a8b74013e659178c9d4eeab9218d505a786eb6f4255625222afa97e7a82814
4
+ data.tar.gz: 24c7bf302f69a192927817c87011fc9c3a39208f1d20f89376fac8f2c4c3cb5a
5
5
  SHA512:
6
- metadata.gz: ca6974dacf4d2ee3ad00de98b665b2dd859ecb4b3071657c1b4a2c9c44bfdbb46b3d32124955b7f869d36e090ae61c1e35d2843feb6fcd92e1d62238a9479271
7
- data.tar.gz: 1ee1cc13310fb1b9ea15537b2c9e3fba4d8b5e3ef25227121e97235df50bf18eb62ae5d12ba2283b34ddc0bd8a19fe8c130be1fb50b7da51f92ad86491ac1417
6
+ metadata.gz: 58f64b76e0e01b9489968297a9c2f470906009d05820895e76c4263b9ddc68d8b4f27c061db2f20cb5862855073f32337d84ae9b925670c78cff738bd7d48e67
7
+ data.tar.gz: 832266dd39cd8b727e3e500c91c63377fa1b634c083f33a065cb005f6503bd0799d46b66627f374c4b1fecc0264ddf54843067ea0a7997bc0a536c35b0f7190a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.3.2 (2025-01-22)
6
+ ### Bug fixes
7
+
8
+ * [#002a5fc](https://github.com/ivan05almeida/easy_changelog/commit/002a5fc): Fix tasks not loading environment. ([@ivan05almeida][])
9
+ * [#04cd53b](https://github.com/ivan05almeida/easy_changelog/commit/04cd53b): Fix unreleased content when starting a new changelog. ([@ivan05almeida][])
10
+
5
11
  ## 0.3.1 (2025-01-22)
6
12
  ### Bug fixes
7
13
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- easy_changelog (0.3.1)
4
+ easy_changelog (0.3.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,9 +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')
9
+ end
10
+
7
11
  EasyChangelog.configuration.changelog_types.each do |type|
8
12
  desc "Create a Changelog entry (#{type})"
9
13
  task type do
14
+ environment
10
15
  options = EasyChangelog::TaskOptionsParser.parse(type, ARGV)
11
16
  options[:type] = type
12
17
 
@@ -20,6 +25,7 @@ namespace :changelog do
20
25
 
21
26
  desc 'Merge entries and delete them'
22
27
  task :merge do
28
+ environment
23
29
  raise 'No entries!' unless EasyChangelog.pending?
24
30
 
25
31
  EasyChangelog.merge_and_delete!
@@ -30,6 +36,7 @@ namespace :changelog do
30
36
 
31
37
  desc 'Check for no pending changelog entries'
32
38
  task :check_clean do
39
+ environment
33
40
  next unless EasyChangelog.pending?
34
41
 
35
42
  puts '*** Pending changelog entries!'
@@ -39,6 +46,7 @@ namespace :changelog do
39
46
 
40
47
  desc 'Add release entry'
41
48
  task :release do
49
+ environment
42
50
  EasyChangelog.release!
43
51
  cmd = "git commit -a -m 'Update Changelog'"
44
52
  puts cmd
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class EasyChangelog
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
@@ -131,12 +131,12 @@ class EasyChangelog
131
131
  @header = ss.scan_until(EasyChangelog.configuration.unreleased_header)
132
132
  unreleased = ss.scan_until(/\n(?=## )/m)
133
133
 
134
- if unreleased
135
- @unreleased = parse_release(unreleased)
136
- @rest = ss.rest
137
- else
134
+ if unreleased.nil?
138
135
  @unreleased = parse_release(ss.rest)
139
136
  @rest = ''
137
+ else
138
+ @unreleased = parse_release(unreleased)
139
+ @rest = ss.rest
140
140
  end
141
141
  end
142
142
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan de Paula Almeida Filho