From 2644a6279804b9102ef1635315338f9759c220f7 Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Thu, 17 Dec 2015 16:45:26 -0200 Subject: [PATCH 1/6] Require Adhearsion 3 --- adhearsion-reporter.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adhearsion-reporter.gemspec b/adhearsion-reporter.gemspec index 2c71385..1e72e21 100644 --- a/adhearsion-reporter.gemspec +++ b/adhearsion-reporter.gemspec @@ -23,7 +23,7 @@ EOF s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_runtime_dependency "adhearsion", ["~> 2.0"] + s.add_runtime_dependency "adhearsion", ["~> 3.0"] s.add_runtime_dependency "toadhopper", [">= 1.3.0"] s.add_runtime_dependency "newrelic_rpm", ["~> 3.6"] s.add_runtime_dependency "pony", ["~> 1.10"] From bf98d2c1df92ae75da1e9aceed10e035815bc43d Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Fri, 18 Dec 2015 13:57:36 -0200 Subject: [PATCH 2/6] Use Adhearsion pre-release --- adhearsion-reporter.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adhearsion-reporter.gemspec b/adhearsion-reporter.gemspec index 1e72e21..8d9ca0d 100644 --- a/adhearsion-reporter.gemspec +++ b/adhearsion-reporter.gemspec @@ -23,7 +23,7 @@ EOF s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_runtime_dependency "adhearsion", ["~> 3.0"] + s.add_runtime_dependency "adhearsion", ["~> 3.0.0.beta"] s.add_runtime_dependency "toadhopper", [">= 1.3.0"] s.add_runtime_dependency "newrelic_rpm", ["~> 3.6"] s.add_runtime_dependency "pony", ["~> 1.10"] From 4969711311a948d6d03064c7cbdc648f8da42fea Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Fri, 18 Dec 2015 14:13:29 -0200 Subject: [PATCH 3/6] Adhearsion 3 minimum Ruby versions --- .travis.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb1b82e..b9af19a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,7 @@ language: ruby rvm: - - 1.9.2 - - 1.9.3 - - 2.0.0 - - 2.1.0 - - jruby-19mode + - 2.2.4 + - jruby-9.0.0.0 - rbx-19mode - ruby-head matrix: From f1a090b2873d3d29955856e02b6aae5957ead841 Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Sat, 19 Dec 2015 10:39:37 -0200 Subject: [PATCH 4/6] Ahn3 config compatibility --- lib/adhearsion/reporter/airbrake_notifier.rb | 4 ++-- lib/adhearsion/reporter/email_notifier.rb | 2 +- spec/reporter_spec.rb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/adhearsion/reporter/airbrake_notifier.rb b/lib/adhearsion/reporter/airbrake_notifier.rb index e35acc2..cc9ff44 100644 --- a/lib/adhearsion/reporter/airbrake_notifier.rb +++ b/lib/adhearsion/reporter/airbrake_notifier.rb @@ -12,10 +12,10 @@ class AirbrakeNotifier def init @notifier = Toadhopper.new Reporter.config.api_key, :notify_host => Reporter.config.url @options = { - framework_env: Adhearsion.config.platform.environment, + framework_env: Adhearsion.environment, notifier_name: 'adhearsion-reporter', notifier_version: Adhearsion::Reporter::VERSION, - project_root: Adhearsion.config.platform[:root], + project_root: Adhearsion.root, environment: { 'HOSTNAME' => Socket.gethostname, 'AHN_VERSION' => Adhearsion::VERSION diff --git a/lib/adhearsion/reporter/email_notifier.rb b/lib/adhearsion/reporter/email_notifier.rb index a4c7743..3cb721a 100644 --- a/lib/adhearsion/reporter/email_notifier.rb +++ b/lib/adhearsion/reporter/email_notifier.rb @@ -38,7 +38,7 @@ def exception_text(exception) end def environment - Adhearsion.config.platform.environment.to_s.upcase + Adhearsion.environment.to_s.upcase end def hostname diff --git a/spec/reporter_spec.rb b/spec/reporter_spec.rb index 4fd3dff..20e0839 100644 --- a/spec/reporter_spec.rb +++ b/spec/reporter_spec.rb @@ -69,7 +69,7 @@ def self.method_missing(m, *args, &block) end context "with an environment set" do - before { Adhearsion.config.platform.environment = :foo } + before { Adhearsion.environment = :foo } it "notifies airbrake with that environment" do expect(mock_notifier).to receive(:post!).at_least(:once).with(event_error, hash_including(framework_env: :foo)).and_return(response) @@ -78,7 +78,7 @@ def self.method_missing(m, *args, &block) context "in excluded environments" do before do - Adhearsion.config.platform.environment = :development + Adhearsion.environment = :development Adhearsion::Plugin.init_plugins end it "should not report errors for excluded environments" do @@ -144,7 +144,7 @@ def self.method_missing(m, *args, &block) event_error.set_backtrace(fake_backtrace) hostname = Socket.gethostname - environment = Adhearsion.config.platform.environment.to_s.upcase + environment = Adhearsion.environment.to_s.upcase Timecop.freeze(time_freeze) do expect(Pony).to receive(:mail).at_least(:once).with({ From 6168f2878dbb445f5be2d426050094acb45aa777 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Fri, 19 Feb 2016 05:07:41 -0500 Subject: [PATCH 5/6] Update copyright date --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 321661b..f356c67 100644 --- a/README.md +++ b/README.md @@ -49,5 +49,5 @@ Adhearsion::Reporter.config.email = { Copyright --------- -Copyright (C) 2012 Adhearsion Foundation Inc. +Copyright (C) 2012-2015 Adhearsion Foundation Inc. Released under the MIT License - Check [License file](https://github.com/adhearsion/adhearsion-reporter/blob/master/LICENSE) From c93a08e47b9e592bae6316e318c2df4359206dee Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Fri, 19 Feb 2016 05:07:46 -0500 Subject: [PATCH 6/6] Ignore vim swapfiles --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3ae805d..86dcd15 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.gem *.rbc +.sw* +.*.sw* .bundle .config .yardoc