Skip to content

Commit

Permalink
Stop packaging test files with the gem
Browse files Browse the repository at this point in the history
It reduces the size of the gem by half, from 645K to 294K. The default
for new gems (created by bundler) is not to include test files. See
rubygems/bundler#3207
  • Loading branch information
dmeremyanin authored and kenichi committed May 17, 2017
1 parent 84a9b18 commit 8501553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion newrelic_rpm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ EOS
"newrelic.yml"
]

file_list = `git ls-files`.split
file_list = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
build_file_path = 'lib/new_relic/build.rb'
file_list << build_file_path if File.exist?(build_file_path)
s.files = file_list
Expand Down

1 comment on commit 8501553

@swilgosz
Copy link

@swilgosz swilgosz commented on 8501553 Jun 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dimko this causes problem with tests using: NewRelic::Agent.require_test_helper method. As the file required by this method is no longer accessible in gem installed on the machine.

NewRelic::Agent.require_test_helper is public so should be updated first

Please sign in to comment.