summaryrefslogtreecommitdiff
path: root/omnibus/config
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-14 17:09:25 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-14 17:09:25 -0700
commit04b1a54b657d5f5320f0ed41e9be707aa653b153 (patch)
treeb7ec6a783db600c20d3185ba58d4253c264f4745 /omnibus/config
parent9851800cb4bcc481a00c949da2a86e15a94652f6 (diff)
downloadchef-04b1a54b657d5f5320f0ed41e9be707aa653b153.tar.gz
Delete deprecated Fauxhai definitionsslim_fauxhai
We're not bundling Fauxhai for cookbook testing by end users. We're bundling it to test our own chef-utils logic. We can remove all the deprecated definitions that we're not using anyways. This shaves 2 megs off our install in 22 files. Long term I'd like to just ship fauxhai w/o the definitions as fauxhai-lite, but this will get us what we need until that time. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'omnibus/config')
-rw-r--r--omnibus/config/software/more-ruby-cleanup.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/omnibus/config/software/more-ruby-cleanup.rb b/omnibus/config/software/more-ruby-cleanup.rb
index 2f1db9caea..e2d24df540 100644
--- a/omnibus/config/software/more-ruby-cleanup.rb
+++ b/omnibus/config/software/more-ruby-cleanup.rb
@@ -124,4 +124,14 @@ build do
end
end
end
+
+ block "Remove deprecated fauxhai dumps we don't need for running chef-utils specs" do
+ require "json"
+ Dir.glob("#{install_dir}/embedded/lib/ruby/gems/*/gems/fauxhai*/lib/fauxhai/platforms/**/*.json") do |file_path|
+ if JSON.parse(File.read(file_path))["deprecated"]
+ puts "Deleted deprecated Fauxhai definition at #{file_path}"
+ FileUtils.rm_f(file_path)
+ end
+ end
+ end
end