Closed jstenhouse closed 7 years ago
Ohhh nice 👍
Hmm I guess I'm not sure what the test_files
method in .gemspec is really for then?
Why would someone want to include the test files in their released gem in the first place? 🤔
@mcfiredrill I think it was originally for when gem had a test
command but it was removed way back when -- I think some gem developers like to include them so that an end user could run the test if they unpack
ed the gem but it doesn't make much sense to me since most clients just need the runtime source files and dependencies.
There's been an open issue with rubygems for a while to add an option to exclude test files at gem install time and there's some more discussion there on whether to include test files at all. For what it's worth, Resque doesn't include any tests in their gemspec either.
I tested my app pointing to this branch and resque-web worked fine with a plugin. It looks like a safe change. 👍
@jstenhouse Thanks for digging up those links! I'm 👍 on merging this, maybe @kirillplatonov wants to have a look...
@kirillplatonov just curious , you didn't want to merge this?
@mcfiredrill my bad, I thought it's already in master. Will merge now.
I saw that resque-web is including all of the tests in the released gem - the test directory includes a lot of extra files that I don't think are needed at runtime, especially in the test/dummy directory. The test directory weighs in at 4.1Mb out of a total 4.3Mb gem (~95% of total size).
I'm using resque-web with docker and was looking for ways to slim down my image layers and an extra 4Mb across lots of gems really add up.