Commit 58c405c9 authored by Yorick Peterse's avatar Yorick Peterse

Don't use Git in the mimemagic shim

Git isn't installed in our CNG runtime containers, so when the Gemspec
is loaded an error is produced. Since we don't actually need to use Git,
and only include two files, we can just hardcode the list of files to
include in the Gem.
parent b5a86dd6
...@@ -12,10 +12,7 @@ Gem::Specification.new do |spec| ...@@ -12,10 +12,7 @@ Gem::Specification.new do |spec|
spec.license = "MIT" spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0") spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
# Specify which files should be added to the gem when it is released. spec.files = %w[lib/mimemagic.rb lib/mimemagic/version.rb]
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.require_paths = ["lib"] spec.require_paths = ["lib"]
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment