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 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: 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) diff --git a/adhearsion-reporter.gemspec b/adhearsion-reporter.gemspec index 2c71385..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", ["~> 2.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"] 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({