Skip to content

Commit 2bd106d

Browse files
authored
Merge pull request #10 from Invoca/TECH-18358_fix_prune_bug
Tech 18358 fix prune bug
2 parents 2b080c9 + b6c04da commit 2bd106d

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/pkg/
77
/spec/reports/
88
/tmp/
9+
.idea
910

1011
# rspec failure tracking
1112
.rspec_status

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

55
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.2.5] - 2025-05-08
8+
### Fixed
9+
- Updated `rexml` dependency to avoid security issues
10+
11+
## [0.2.4] - 2025-05-08
12+
### Fixed
13+
- Fixed `--prune` to properly remove files in the rendered directory
14+
715
## [0.2.3] - 2025-03-25
816
### Fixed
917
- Fixed `--variable-override` to accept multiple arguments to override multiple variables

Gemfile.lock

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
kubernetes_template_rendering (0.2.3)
4+
kubernetes_template_rendering (0.2.5)
55
activesupport (< 8)
66
invoca-utils
77
jsonnet
@@ -51,8 +51,7 @@ GEM
5151
rainbow (3.1.1)
5252
rake (13.2.1)
5353
regexp_parser (2.9.0)
54-
rexml (3.3.0)
55-
strscan
54+
rexml (3.4.1)
5655
rspec (3.13.0)
5756
rspec-core (~> 3.13.0)
5857
rspec-expectations (~> 3.13.0)
@@ -86,7 +85,6 @@ GEM
8685
simplecov_json_formatter (~> 0.1)
8786
simplecov-html (0.12.3)
8887
simplecov_json_formatter (0.1.4)
89-
strscan (3.1.0)
9088
tzinfo (2.0.6)
9189
concurrent-ruby (~> 1.0)
9290
unicode-display_width (2.5.0)

lib/kubernetes_template_rendering/resource_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def prune_directory(directory)
178178
The `prune` flag is set to true, #{Color.green('pruning')} directory #{Color.magenta(directory)} before rendering
179179
180180
MESSAGE
181-
FileUtils.rm_rf("#{directory}/*")
181+
FileUtils.rm_rf(directory)
182182
end
183183
end
184184

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module KubernetesTemplateRendering
4-
VERSION = "0.2.3"
4+
VERSION = "0.2.5"
55
end

spec/kubernetes_template_rendering/resource_set_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
it "prunes the directory" do
7676
expect(FileUtils).to_not receive(:mkdir_p)
77-
expect(FileUtils).to receive(:rm_rf).with("#{expanded_output_directory}/*")
77+
expect(FileUtils).to receive(:rm_rf).with(expanded_output_directory)
7878
resource_set.render(args)
7979
end
8080
end

0 commit comments

Comments
 (0)