From 8e0ffab3967862cdffda3f2088db92deda695b32 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Fri, 10 Feb 2017 14:08:18 +0100 Subject: [PATCH] Travis: lint, fix build, newer Rubies Obvious fix. Signed-off-by: Olle Jonsson --- .travis.yml | 7 ++++--- features/steps/log.rb | 4 ++-- lib/mixlib/log/formatter.rb | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 406c407..4dc0d1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,14 @@ language: ruby cache: bundler sudo: false rvm: - - 2.2.5 - - 2.3.1 + - 2.2.6 + - 2.3.3 + - 2.4.0 branches: only: - master before_install: - bundle --version - - gem --version + - gem update --system script: - bundle exec rake diff --git a/features/steps/log.rb b/features/steps/log.rb index e16c2d3..615cd94 100644 --- a/features/steps/log.rb +++ b/features/steps/log.rb @@ -39,9 +39,9 @@ Then /^the regex '(.+)' should be logged$/ do |regex_string| regex = Regexp.new(regex_string, Regexp::MULTILINE) - regex.match(@output).should_not == nil + expect(regex.match(@output)).not_to be_nil end Then /^nothing should be logged$/ do - @output.should == "" + expect(@output).to eq "" end diff --git a/lib/mixlib/log/formatter.rb b/lib/mixlib/log/formatter.rb index c1eda6d..c8f1efa 100644 --- a/lib/mixlib/log/formatter.rb +++ b/lib/mixlib/log/formatter.rb @@ -45,7 +45,7 @@ def msg2str(msg) when ::String msg when ::Exception - "#{ msg.message } (#{ msg.class })\n" << + "#{msg.message} (#{msg.class})\n" << (msg.backtrace || []).join("\n") else msg.inspect