diff --git a/.ruby-version b/.ruby-version index 7d2ed7c..5859406 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.4 +2.2.3 diff --git a/.travis.yml b/.travis.yml index e08d03c..37da8ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,16 @@ language: ruby +sudo: false +cache: bundler +bundler_args: --without guard +script: "bundle exec rspec" rvm: - 1.9.3 - - 2.0.0 - - 2.1.4 - + - 2.0 + - 2.1 + - 2.2 + - ruby-head env: + - "RAILS_VERSION=4.2" + - "RAILS_VERSION=4.1" - "RAILS_VERSION=4.0" - "RAILS_VERSION=3.2" - - "RAILS_VERSION=3.1" - - "RAILS_VERSION=3.0" - -script: bundle exec rspec diff --git a/Gemfile b/Gemfile index 2ca61bf..646b09b 100644 --- a/Gemfile +++ b/Gemfile @@ -4,12 +4,15 @@ source "https://rubygems.org" gemspec group :test do - gem 'growl' - gem 'guard' - gem 'guard-rspec' gem 'rails', "~> #{ENV["RAILS_VERSION"] || "3.2.0"}" gem 'rb-fsevent', '~> 0.9' gem 'rcov', :platforms => :mri_18 gem 'redis', :require => false gem 'simplecov', :platforms => :mri_19, :require => false end + +group :guard do + gem 'growl' + gem 'guard' + gem 'guard-rspec' +end diff --git a/spec/lib/logstasher/active_support/mailer_log_subscriber_spec.rb b/spec/lib/logstasher/active_support/mailer_log_subscriber_spec.rb index cdbad9e..1695376 100644 --- a/spec/lib/logstasher/active_support/mailer_log_subscriber_spec.rb +++ b/spec/lib/logstasher/active_support/mailer_log_subscriber_spec.rb @@ -18,7 +18,7 @@ def log_output.json LogStasher::ActiveSupport::MailerLogSubscriber.attach_to(:action_mailer) end - before do + before :each do LogStasher.logger = logger expect(LogStasher.request_context).to receive(:merge).at_most(2).times.and_call_original end @@ -52,16 +52,6 @@ def log_output.json it 'deliver an outgoing e-mail' do email = SampleMailer.welcome - - if version = ENV['RAILS_VERSION'] and version >= '4.1' - log_output.json.tap do |json| - expect(json['source']).to eq(LogStasher.source) - expect(json['tags']).to eq(['mailer', 'process']) - expect(json['mailer']).to eq('SampleMailer') - expect(json['action']).to eq('welcome') - end - end - email.deliver log_output.json.tap do |json| expect(json['source']).to eq(LogStasher.source) diff --git a/spec/lib/logstasher/device/redis_spec.rb b/spec/lib/logstasher/device/redis_spec.rb index 05f0ae3..769145d 100644 --- a/spec/lib/logstasher/device/redis_spec.rb +++ b/spec/lib/logstasher/device/redis_spec.rb @@ -40,7 +40,7 @@ it 'does not allow unsupported data types' do expect { device = LogStasher::Device::Redis.new(data_type: 'blargh') - }.to raise_error() + }.to raise_error(RuntimeError) end it 'quits the redis connection on #close' do