From c80cf4ad10895e947efa77df0f59f46b626fce2a Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Tue, 4 Feb 2014 13:44:17 -0500 Subject: [PATCH 1/2] Clean up packaged gem by removing unneeded files. --- linux_admin.gemspec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux_admin.gemspec b/linux_admin.gemspec index 097a046..c3e7936 100644 --- a/linux_admin.gemspec +++ b/linux_admin.gemspec @@ -21,9 +21,10 @@ registration, updates, etc. spec.homepage = "http://github.com/ManageIQ/linux_admin" spec.license = "MIT" - spec.files = `git ls-files`.split($/) - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.files = `git ls-files -- lib/*`.split("\n") + spec.files += %w[README.md LICENSE.txt] + spec.executables = `git ls-files -- bin/*`.split("\n") + spec.test_files = `git ls-files -- spec/*`.split("\n") spec.require_paths = ["lib"] spec.add_development_dependency "bundler", "~> 1.3" From 9ac08590f81352fb5b9b51df33bc48f28aaf2dca Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Tue, 4 Feb 2014 13:48:28 -0500 Subject: [PATCH 2/2] Relax coveralls dependency. Allow specs to pass if coveralls is removed manually. --- spec/spec_helper.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 544a52d..9a90db5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,3 @@ -require 'coveralls' -Coveralls.wear! - -require 'linux_admin' # This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper"` to ensure that it is only @@ -28,6 +24,15 @@ end end +begin + require 'coveralls' + Coveralls.wear! +rescue LoadError +end + +require 'linux_admin' + + def data_file_path(to) File.expand_path(to, File.join(File.dirname(__FILE__), "data")) end