From 3aee02abe94e6ba0087ad96bd7972f62f5d09b3b Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Wed, 24 Feb 2016 16:18:33 +0100 Subject: [PATCH 1/3] prevent nil in flags --- default/inspec/sysctl_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default/inspec/sysctl_spec.rb b/default/inspec/sysctl_spec.rb index cbb29ba..cc48cee 100644 --- a/default/inspec/sysctl_spec.rb +++ b/default/inspec/sysctl_spec.rb @@ -337,7 +337,7 @@ control '33' do impact 1.0 title 'CPU No execution Flag or Kernel ExecShield' desc 'Kernel features and CPU flags provide a protection against buffer overflows. The CPU NX Flag and the kernel parameter exec-shield prevents code execution on a per memory page basis. If the CPU supports the NX-Flag then this should be used instead of the kernel parameter exec-shield.' - flags = parse_config_file('/proc/cpuinfo', assignment_re: /^([^:]*?)\s+:\s+(.*?)$/).flags.split(' ') + flags = parse_config_file('/proc/cpuinfo', assignment_re: /^([^:]*?)\s+:\s+(.*?)$/).flags.to_s.split(' ') describe '/proc/cpuinfo' do it 'Flags should include NX' do expect(flags).to include('nx') From 5cf96334ba79656bc6c23779a545812391261496 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Wed, 24 Feb 2016 16:23:56 +0100 Subject: [PATCH 2/3] update travis to new infrastructure --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7a86561..f26478d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ +sudo: false +cache: bundler + rvm: - 1.9.3 - 2.0.0 + - 2.2.0 language: ruby From 93cb67d5388257d5a8a5b2948c87c3ce26e4fea1 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Wed, 24 Feb 2016 16:33:40 +0100 Subject: [PATCH 3/3] keep ssh < 3 for ruby 1.9.3 --- Gemfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 100bdf8..3bd6f5f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,10 @@ source 'https://rubygems.org' +if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('1.9.3') + gem 'net-ssh', '~> 2.9' +end + gem 'rake' gem 'inspec', '~> 0.9' gem 'rubocop', '~> 0.23'