honeybadger 1.13.0 → 1.13.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/josh/code/honeybadger-ruby
3
3
  specs:
4
- honeybadger (1.13.0)
4
+ honeybadger (1.13.1)
5
5
  json
6
6
 
7
7
  GEM
data/honeybadger.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'honeybadger'
7
- s.version = '1.13.0'
8
- s.date = '2014-04-23'
7
+ s.version = '1.13.1'
8
+ s.date = '2014-05-14'
9
9
 
10
10
  s.summary = 'Error reports you can be happy about.'
11
11
  s.description = 'Make managing application errors a more pleasant experience.'
data/lib/honeybadger.rb CHANGED
@@ -17,7 +17,7 @@ require 'honeybadger/railtie' if defined?(Rails::Railtie)
17
17
  require 'honeybadger/integrations/sidekiq'
18
18
 
19
19
  module Honeybadger
20
- VERSION = '1.13.0'
20
+ VERSION = '1.13.1'
21
21
  LOG_PREFIX = "** [Honeybadger] "
22
22
 
23
23
  HEADERS = {
@@ -99,7 +99,16 @@ module Honeybadger
99
99
  def ping(configuration)
100
100
  if configuration.public?
101
101
  if result = sender.ping({ :version => Honeybadger::VERSION, :framework => configuration.framework, :environment => configuration.environment_name, :hostname => configuration.hostname })
102
- configuration.features = result['features'] if result['features']
102
+ if features = result['features']
103
+ configuration.features = features
104
+
105
+ unless features['metrics']
106
+ write_verbose_log("The optional metrics feature is not enabled for your account. Try restarting your app or contacting support@honeybadger.io if your subscription includes this feature.", :error)
107
+ configuration.metrics = false
108
+ end
109
+
110
+ features
111
+ end
103
112
  end
104
113
  end
105
114
  end
@@ -17,7 +17,7 @@ module Honeybadger
17
17
  local_user = ENV['USER'] || ENV['USERNAME']
18
18
  executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'rake')
19
19
  async_notify = fetch(:honeybadger_async_notify, false)
20
- directory = configuration.current_release
20
+ directory = fetch(:honeybadger_deploy_dir, configuration.current_release)
21
21
  notify_options = "cd #{directory};"
22
22
  notify_options << " nohup" if async_notify
23
23
  notify_options << " #{executable} RAILS_ENV=#{rails_env} #{rake_task} TO=#{honeybadger_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}"
@@ -3,12 +3,7 @@ module Honeybadger
3
3
  class Sender < Honeybadger::Sender
4
4
  def send_metrics(data)
5
5
  return unless Honeybadger.configuration.metrics?
6
-
7
- if !Honeybadger.configuration.features['metrics']
8
- log(:info, "The optional metrics feature is not enabled for your account. Try restarting your app or contacting support@honeybadger.io if your subscription includes this feature.")
9
- Honeybadger.configuration.metrics = false
10
- return nil
11
- end
6
+ return unless Honeybadger.configuration.features['metrics']
12
7
 
13
8
  response = rescue_http_errors do
14
9
  http_connection.post('/v1/metrics', data.to_json, http_headers)
@@ -60,6 +60,16 @@ describe 'Honeybadger' do
60
60
  it { should eq result['features'] }
61
61
  specify { expect { subject }.to change(config, :features).to(result['features']) }
62
62
  end
63
+
64
+ context "metrics are disabled by service" do
65
+ let(:result) { {'features' => {'metrics' => false}} }
66
+ specify { expect { invoke_subject }.to change(config, :metrics).to(false) }
67
+
68
+ it "logs that metrics are disabled" do
69
+ Honeybadger.should_receive(:write_verbose_log).with(/metrics feature is not enabled/, :error)
70
+ invoke_subject
71
+ end
72
+ end
63
73
  end
64
74
 
65
75
  context "result is falsey" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-23 00:00:00.000000000 Z
12
+ date: 2014-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -361,7 +361,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
361
361
  version: '0'
362
362
  segments:
363
363
  - 0
364
- hash: -2545053771295497767
364
+ hash: -2870056027279170581
365
365
  required_rubygems_version: !ruby/object:Gem::Requirement
366
366
  none: false
367
367
  requirements: