Don't include setup script in global executables
All of the files in `bin/` were included in the list of executables in the gemspec. This is Very Bad and means that `setup` was getting installed as a global executable when a user installed the gem on their computer. To fix this, I've done an audit and removed all extraneous files from the installed gem. It should now only include: * `docs` * `lib` * `MIT-LICENSE` * `README.md` * `shoulda-matchers.gemspec`
This commit is contained in:
parent
33ad91d093
commit
525772fd7a
|
@ -20,9 +20,10 @@ Gem::Specification.new do |s|
|
||||||
'source_code_uri' => 'https://github.com/thoughtbot/shoulda-matchers'
|
'source_code_uri' => 'https://github.com/thoughtbot/shoulda-matchers'
|
||||||
}
|
}
|
||||||
|
|
||||||
s.files = `git ls-files`.split("\n")
|
s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
||||||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
`git ls-files -z -- {docs,lib,README.md,MIT-LICENSE,shoulda-matchers.gemspec}`.
|
||||||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
split("\x0")
|
||||||
|
end
|
||||||
s.require_paths = ["lib"]
|
s.require_paths = ["lib"]
|
||||||
|
|
||||||
s.required_ruby_version = '>= 2.2.0'
|
s.required_ruby_version = '>= 2.2.0'
|
||||||
|
|
Loading…
Reference in New Issue