From 4c25438cdf5144639d22c0d38e5f42c8f88e48d7 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 17 Dec 2018 21:42:11 -0800 Subject: [PATCH 1/3] Only ship the necessary libs in the gem artifact The gem artifact is not the ideal place to ship examples, contributing docs, a rake file and various hidden files. This will greatly reduce the size of the installed gem artifact and speed up installs on systems with malware scanners. This drops the compressed gem size from 221k to 47k. Signed-off-by: Tim Smith --- .travis.yml | 7 ++++--- rbvmomi.gemspec | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5df1926..4f949362 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,10 @@ language: ruby rvm: - 1.8.7 - 1.9.3 - - 2.2.6 - - 2.3.3 - - 2.4.0 + - 2.2.10 + - 2.3.8 + - 2.4.5 + - 2.5.3 - jruby-1.7.26 - jruby-9.1.8.0 before_install: diff --git a/rbvmomi.gemspec b/rbvmomi.gemspec index e15741bc..fd96afc1 100644 --- a/rbvmomi.gemspec +++ b/rbvmomi.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.bindir = 'exe' - spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(/^test\//) } + spec.files = %w{LICENSE README.md} + Dir.glob("{lib,exec}/**/*") spec.executables << 'rbvmomish' spec.add_runtime_dependency('builder', '~> 3.0') From d4e1c3ba9ffc48e8b581958198c5ce732ca4cf43 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 18 Dec 2018 10:15:03 -0800 Subject: [PATCH 2/3] Fix the path to the executables in the gemspec Signed-off-by: Tim Smith --- rbvmomi.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbvmomi.gemspec b/rbvmomi.gemspec index fd96afc1..49bc4bf7 100644 --- a/rbvmomi.gemspec +++ b/rbvmomi.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.bindir = 'exe' - spec.files = %w{LICENSE README.md} + Dir.glob("{lib,exec}/**/*") + spec.files = %w{LICENSE README.md} + Dir.glob("{lib,exe}/**/*") spec.executables << 'rbvmomish' spec.add_runtime_dependency('builder', '~> 3.0') From c720cac71b452eab33786486109050e851ddfd74 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 18 Dec 2018 11:23:39 -0800 Subject: [PATCH 3/3] Add back vmodl.db Signed-off-by: Tim Smith --- rbvmomi.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbvmomi.gemspec b/rbvmomi.gemspec index 49bc4bf7..0f634299 100644 --- a/rbvmomi.gemspec +++ b/rbvmomi.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.bindir = 'exe' - spec.files = %w{LICENSE README.md} + Dir.glob("{lib,exe}/**/*") + spec.files = %w{LICENSE README.md vmodl.db} + Dir.glob("{lib,exe}/**/*") spec.executables << 'rbvmomish' spec.add_runtime_dependency('builder', '~> 3.0')