Skip to content

Commit

Permalink
Merge ff27f86 into 4d6adef
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 committed Jul 6, 2016
2 parents 4d6adef + ff27f86 commit 9ef7e27
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 263 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
@@ -1,13 +1,17 @@
language: ruby
rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3.0
- 2.1.9
- 2.2.5
- 2.3.1
install:
- "gem install bundler"
- "bundle install --jobs=3 --retry=3"
gemfile:
- gemfiles/rails4_0.gemfile
- gemfiles/rails4_1.gemfile
- gemfiles/rails4_2.gemfile
- gemfiles/rails5_0.gemfile
matrix:
exclude:
- rvm: 2.1.9
gemfile: gemfiles/rails5_0.gemfile
3 changes: 2 additions & 1 deletion Appraisals
@@ -1,7 +1,8 @@
rails_versions = ['~> 4.0.5', '~> 4.1.1', '~> 4.2.0']
rails_versions = ['~> 4.0.5', '~> 4.1.1', '~> 4.2.0', '~> 5.0.0']

rails_versions.each do |rails_version|
appraise "rails#{rails_version.slice(/\d+\.\d+/).gsub('.', '_')}" do
gem 'rails', rails_version
gem "sqlite3"
end
end
3 changes: 2 additions & 1 deletion CHANGELOG.rdoc
@@ -1,10 +1,11 @@
== 5.0.0
== 4.2.0

* enhancements
* update URL in gemspec (by @ktdreyer)
* Add `hostname` to Slack notifier (by @juanazam)
* Allow `exception_recipients` to be a proc (by @kellyjosephprice)
* Add Mattermost integration (by @Aschen)
* Rails 5 compatible

* bug fixes
* Fix error when showing timestamp on non Rails apps
Expand Down
10 changes: 1 addition & 9 deletions Rakefile
Expand Up @@ -5,19 +5,11 @@ require 'appraisal'

require 'rake/testtask'

task 'setup_dummy_app' do
unless File.exists? "test/dummy/db/test.sqlite3"
Bundler.with_clean_env do
sh "cd test/dummy; bundle; bundle exec rake db:migrate; bundle exec rake db:test:prepare; cd ../../;"
end
end
end
task :default => [:test]

Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end

task :default => [:setup_dummy_app, :test]
9 changes: 5 additions & 4 deletions exception_notification.gemspec
@@ -1,7 +1,8 @@
Gem::Specification.new do |s|
s.name = 'exception_notification'
s.version = '4.1.4'
s.version = '4.2.0'
s.authors = ["Jamis Buck", "Josh Peek"]
s.date = %q{2016-07-02}
s.summary = "Exception notification for Rails apps"
s.homepage = "https://smartinez87.github.io/exception_notification/"
s.email = "smartinez87@gmail.com"
Expand All @@ -15,10 +16,10 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- test`.split("\n")
s.require_path = 'lib'

s.add_dependency("actionmailer", "~> 4.0")
s.add_dependency("activesupport", "~> 4.0")
s.add_dependency("actionmailer", ">= 4.0", "< 6")
s.add_dependency("activesupport", ">= 4.0", "< 6")

s.add_development_dependency "rails", "~> 4.0"
s.add_development_dependency "rails", ">= 4.0", "< 6"
s.add_development_dependency "resque", "~> 1.2.0"
# Sidekiq 3.2.2 does not support Ruby 1.9.
s.add_development_dependency "sidekiq", "~> 3.0.0", "< 3.2.2"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails4_0.gemfile
Expand Up @@ -3,5 +3,6 @@
source "https://rubygems.org"

gem "rails", "~> 4.0.5"
gem "sqlite3"

gemspec :path => "../"
1 change: 1 addition & 0 deletions gemfiles/rails4_1.gemfile
Expand Up @@ -3,5 +3,6 @@
source "https://rubygems.org"

gem "rails", "~> 4.1.1"
gem "sqlite3"

gemspec :path => "../"
1 change: 1 addition & 0 deletions gemfiles/rails4_2.gemfile
Expand Up @@ -3,5 +3,6 @@
source "https://rubygems.org"

gem "rails", "~> 4.2.0"
gem "sqlite3"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/rails5_0.gemfile
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", "~> 5.0.0"
gem "sqlite3"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion lib/exception_notifier.rb
Expand Up @@ -24,7 +24,7 @@ class UndefinedNotifierError < StandardError; end

# Define a set of exceptions to be ignored, ie, dont send notifications when any of them are raised.
mattr_accessor :ignored_exceptions
@@ignored_exceptions = %w{ActiveRecord::RecordNotFound AbstractController::ActionNotFound ActionController::RoutingError ActionController::UnknownFormat}
@@ignored_exceptions = %w{ActiveRecord::RecordNotFound AbstractController::ActionNotFound ActionController::RoutingError ActionController::UnknownFormat ActionController::UrlGenerationError}

mattr_accessor :testing_mode
@@testing_mode = false
Expand Down
1 change: 1 addition & 0 deletions lib/exception_notifier/email_notifier.rb
Expand Up @@ -51,6 +51,7 @@ def background_exception_notification(exception, options={}, default_options={})
@timestamp = Time.current
@sections = @options[:background_sections]
@data = options[:data] || {}
@env = @kontroller = nil

compose_email
end
Expand Down
3 changes: 2 additions & 1 deletion lib/exception_notifier/mattermost_notifier.rb
Expand Up @@ -44,7 +44,8 @@ def call(exception, options = {})
current_user = User.find(request.session["warden.user.user.key"][0][0])
@request_items.merge!({ current_user: { id: current_user.id, email: current_user.email } })
end

else
@controller = @request_items = nil
end

payload = message_text.merge(user_info).merge(channel_info)
Expand Down
34 changes: 0 additions & 34 deletions test/dummy/Gemfile

This file was deleted.

137 changes: 0 additions & 137 deletions test/dummy/Gemfile.lock

This file was deleted.

11 changes: 0 additions & 11 deletions test/dummy/test/fixtures/posts.yml

This file was deleted.

0 comments on commit 9ef7e27

Please sign in to comment.