Skip to content

Tech 18358 fix prune bug #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/pkg/
/spec/reports/
/tmp/
.idea

# rspec failure tracking
.rspec_status
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

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

## [0.2.5] - 2025-05-08
### Fixed
- Updated `rexml` dependency to avoid security issues

## [0.2.4] - 2025-05-08
### Fixed
- Fixed `--prune` to properly remove files in the rendered directory

## [0.2.3] - 2025-03-25
### Fixed
- Fixed `--variable-override` to accept multiple arguments to override multiple variables
Expand Down
6 changes: 2 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
kubernetes_template_rendering (0.2.3)
kubernetes_template_rendering (0.2.5)
activesupport (< 8)
invoca-utils
jsonnet
Expand Down Expand Up @@ -51,8 +51,7 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.0)
rexml (3.3.0)
strscan
rexml (3.4.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand Down Expand Up @@ -86,7 +85,6 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes_template_rendering/resource_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def prune_directory(directory)
The `prune` flag is set to true, #{Color.green('pruning')} directory #{Color.magenta(directory)} before rendering

MESSAGE
FileUtils.rm_rf("#{directory}/*")
FileUtils.rm_rf(directory)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/kubernetes_template_rendering/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module KubernetesTemplateRendering
VERSION = "0.2.3"
VERSION = "0.2.5"
end
2 changes: 1 addition & 1 deletion spec/kubernetes_template_rendering/resource_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

it "prunes the directory" do
expect(FileUtils).to_not receive(:mkdir_p)
expect(FileUtils).to receive(:rm_rf).with("#{expanded_output_directory}/*")
expect(FileUtils).to receive(:rm_rf).with(expanded_output_directory)
resource_set.render(args)
end
end
Expand Down
Loading