honeybadger 1.11.0.beta1 → 1.11.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +10 -12
- data/Gemfile.lock +15 -13
- data/README.md +1 -1
- data/gemfiles/rack.gemfile.lock +25 -25
- data/gemfiles/rails2.3.gemfile +1 -1
- data/gemfiles/rails2.3.gemfile.lock +24 -24
- data/gemfiles/rails3.0.gemfile +2 -2
- data/gemfiles/rails3.0.gemfile.lock +54 -54
- data/gemfiles/rails3.1.gemfile +1 -1
- data/gemfiles/rails3.1.gemfile.lock +59 -59
- data/gemfiles/rails3.2.gemfile +1 -1
- data/gemfiles/rails3.2.gemfile.lock +58 -59
- data/gemfiles/{rails4.gemfile → rails4.0.gemfile} +1 -1
- data/gemfiles/{rails4.gemfile.lock → rails4.0.gemfile.lock} +28 -28
- data/gemfiles/{rails4_cap3.gemfile → rails4.1.gemfile} +2 -4
- data/gemfiles/{rails4_cap3.gemfile.lock → rails4.1.gemfile.lock} +65 -67
- data/gemfiles/rake.gemfile.lock +25 -25
- data/gemfiles/sinatra.gemfile.lock +25 -25
- data/honeybadger.gemspec +8 -7
- data/lib/honeybadger.rb +1 -1
- data/lib/honeybadger/shared_tasks.rb +1 -1
- data/lib/honeybadger/stats.rb +1 -1
- data/spec/honeybadger/stats_spec.rb +57 -0
- metadata +9 -8
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: /Users/josh/code/honeybadger-ruby
|
3
3
|
specs:
|
4
|
-
honeybadger (1.11.0.
|
4
|
+
honeybadger (1.11.0.beta2)
|
5
5
|
json
|
6
6
|
|
7
7
|
GEM
|
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
appraisal (0.5.2)
|
12
12
|
bundler
|
13
13
|
rake
|
14
|
-
aruba (0.5.
|
14
|
+
aruba (0.5.4)
|
15
15
|
childprocess (>= 0.3.6)
|
16
16
|
cucumber (>= 1.1.1)
|
17
17
|
rspec-expectations (>= 2.7.0)
|
@@ -22,24 +22,24 @@ GEM
|
|
22
22
|
net-sftp (>= 2.0.0)
|
23
23
|
net-ssh (>= 2.0.14)
|
24
24
|
net-ssh-gateway (>= 1.1.0)
|
25
|
-
childprocess (0.
|
25
|
+
childprocess (0.4.0)
|
26
26
|
ffi (~> 1.0, >= 1.0.11)
|
27
27
|
coderay (1.1.0)
|
28
28
|
crack (0.4.1)
|
29
29
|
safe_yaml (~> 0.9.0)
|
30
|
-
cucumber (1.
|
30
|
+
cucumber (1.3.10)
|
31
31
|
builder (>= 2.1.2)
|
32
32
|
diff-lcs (>= 1.1.3)
|
33
|
-
gherkin (~> 2.
|
34
|
-
multi_json (
|
35
|
-
|
33
|
+
gherkin (~> 2.12)
|
34
|
+
multi_json (>= 1.7.5, < 2.0)
|
35
|
+
multi_test (>= 0.0.2)
|
36
|
+
diff-lcs (1.2.5)
|
36
37
|
ffi (1.9.3)
|
37
38
|
formatador (0.2.4)
|
38
|
-
fuubar (1.2
|
39
|
-
rspec (
|
40
|
-
|
41
|
-
|
42
|
-
gherkin (2.11.8)
|
39
|
+
fuubar (1.3.2)
|
40
|
+
rspec (>= 2.14.0, < 3.1.0)
|
41
|
+
ruby-progressbar (~> 1.3)
|
42
|
+
gherkin (2.12.2)
|
43
43
|
multi_json (~> 1.3)
|
44
44
|
growl (1.0.3)
|
45
45
|
guard (1.8.3)
|
@@ -48,7 +48,7 @@ GEM
|
|
48
48
|
lumberjack (>= 1.0.2)
|
49
49
|
pry (>= 0.9.10)
|
50
50
|
thor (>= 0.14.6)
|
51
|
-
guard-rspec (3.0
|
51
|
+
guard-rspec (3.1.0)
|
52
52
|
guard (>= 1.8)
|
53
53
|
rspec (~> 2.13)
|
54
54
|
highline (1.6.20)
|
@@ -59,7 +59,8 @@ GEM
|
|
59
59
|
rb-kqueue (>= 0.2)
|
60
60
|
lumberjack (1.0.4)
|
61
61
|
method_source (0.8.2)
|
62
|
-
multi_json (1.8.
|
62
|
+
multi_json (1.8.4)
|
63
|
+
multi_test (0.0.3)
|
63
64
|
net-scp (1.1.2)
|
64
65
|
net-ssh (>= 2.6.5)
|
65
66
|
net-sftp (2.1.2)
|
@@ -67,16 +68,16 @@ GEM
|
|
67
68
|
net-ssh (2.7.0)
|
68
69
|
net-ssh-gateway (1.2.0)
|
69
70
|
net-ssh (>= 2.6.5)
|
70
|
-
pry (0.9.12.
|
71
|
+
pry (0.9.12.4)
|
71
72
|
coderay (~> 1.0)
|
72
73
|
method_source (~> 0.8)
|
73
74
|
slop (~> 3.4)
|
74
75
|
rack (1.5.2)
|
75
|
-
rack-protection (1.5.
|
76
|
+
rack-protection (1.5.2)
|
76
77
|
rack
|
77
|
-
rake (10.1.
|
78
|
-
rb-fsevent (0.9.
|
79
|
-
rb-inotify (0.9.
|
78
|
+
rake (10.1.1)
|
79
|
+
rb-fsevent (0.9.4)
|
80
|
+
rb-inotify (0.9.3)
|
80
81
|
ffi (>= 0.5.0)
|
81
82
|
rb-kqueue (0.2.0)
|
82
83
|
ffi (>= 0.5.0)
|
@@ -85,11 +86,10 @@ GEM
|
|
85
86
|
rspec-expectations (~> 2.14.0)
|
86
87
|
rspec-mocks (~> 2.14.0)
|
87
88
|
rspec-core (2.14.7)
|
88
|
-
rspec-expectations (2.14.
|
89
|
+
rspec-expectations (2.14.4)
|
89
90
|
diff-lcs (>= 1.1.3, < 2.0)
|
90
|
-
rspec-instafail (0.2.4)
|
91
91
|
rspec-mocks (2.14.4)
|
92
|
-
ruby-progressbar (1.
|
92
|
+
ruby-progressbar (1.4.0)
|
93
93
|
safe_yaml (0.9.7)
|
94
94
|
sham_rack (1.3.6)
|
95
95
|
rack
|
@@ -97,10 +97,10 @@ GEM
|
|
97
97
|
rack (~> 1.4)
|
98
98
|
rack-protection (~> 1.4)
|
99
99
|
tilt (~> 1.3, >= 1.3.4)
|
100
|
-
slop (3.4.
|
100
|
+
slop (3.4.7)
|
101
101
|
thor (0.18.1)
|
102
102
|
tilt (1.4.1)
|
103
|
-
webmock (1.
|
103
|
+
webmock (1.17.1)
|
104
104
|
addressable (>= 2.2.7)
|
105
105
|
crack (>= 0.3.2)
|
106
106
|
|
@@ -111,7 +111,7 @@ DEPENDENCIES
|
|
111
111
|
appraisal
|
112
112
|
aruba
|
113
113
|
capistrano (~> 2.0)
|
114
|
-
cucumber (~> 1.
|
114
|
+
cucumber (~> 1.3.10)
|
115
115
|
fuubar
|
116
116
|
growl
|
117
117
|
guard (~> 1.8.3)
|
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.11.0.
|
8
|
-
s.date = '2014-01-
|
7
|
+
s.version = '1.11.0.beta2'
|
8
|
+
s.date = '2014-01-22'
|
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.'
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.add_dependency('json')
|
23
23
|
|
24
|
-
s.add_development_dependency('cucumber', '~> 1.
|
24
|
+
s.add_development_dependency('cucumber', '~> 1.3.10')
|
25
25
|
s.add_development_dependency('rspec', '~> 2.14.0')
|
26
26
|
s.add_development_dependency('sham_rack', '~> 1.3.0')
|
27
27
|
s.add_development_dependency('capistrano', '~> 2.0')
|
@@ -72,10 +72,10 @@ Gem::Specification.new do |s|
|
|
72
72
|
gemfiles/rails3.1.gemfile.lock
|
73
73
|
gemfiles/rails3.2.gemfile
|
74
74
|
gemfiles/rails3.2.gemfile.lock
|
75
|
-
gemfiles/rails4.gemfile
|
76
|
-
gemfiles/rails4.gemfile.lock
|
77
|
-
gemfiles/
|
78
|
-
gemfiles/
|
75
|
+
gemfiles/rails4.0.gemfile
|
76
|
+
gemfiles/rails4.0.gemfile.lock
|
77
|
+
gemfiles/rails4.1.gemfile
|
78
|
+
gemfiles/rails4.1.gemfile.lock
|
79
79
|
gemfiles/rake.gemfile
|
80
80
|
gemfiles/rake.gemfile.lock
|
81
81
|
gemfiles/sinatra.gemfile
|
@@ -131,6 +131,7 @@ Gem::Specification.new do |s|
|
|
131
131
|
spec/honeybadger/rails/action_controller_spec.rb
|
132
132
|
spec/honeybadger/rails_spec.rb
|
133
133
|
spec/honeybadger/sender_spec.rb
|
134
|
+
spec/honeybadger/stats_spec.rb
|
134
135
|
spec/honeybadger/user_feedback_spec.rb
|
135
136
|
spec/honeybadger/user_informer_spec.rb
|
136
137
|
spec/honeybadger_tasks_spec.rb
|
data/lib/honeybadger.rb
CHANGED
@@ -47,7 +47,7 @@ namespace :honeybadger do
|
|
47
47
|
exit
|
48
48
|
end
|
49
49
|
|
50
|
-
command = %Q(heroku addons:add deployhooks:http --url="https://api.honeybadger.io/v1/deploys?deploy[environment]=#{heroku_rails_env}&api_key=#{heroku_api_key}"#{ENV['APP'] ? " --app #{ENV['APP']}" : ''})
|
50
|
+
command = %Q(heroku addons:add deployhooks:http --url="https://api.honeybadger.io/v1/deploys?deploy[environment]=#{heroku_rails_env}&deploy[local_username]={{user}}&deploy[revision]={{head}}&api_key=#{heroku_api_key}"#{ENV['APP'] ? " --app #{ENV['APP']}" : ''})
|
51
51
|
|
52
52
|
puts "\nRunning:\n#{command}\n"
|
53
53
|
puts `#{command}`
|
data/lib/honeybadger/stats.rb
CHANGED
@@ -12,7 +12,7 @@ module Honeybadger
|
|
12
12
|
def memory
|
13
13
|
out = {}
|
14
14
|
if HAS_MEM
|
15
|
-
out[:total], out[:free], out[:buffers], out[:cached] = IO.readlines("/proc/meminfo")[0..4].map { |l| l =~ /^.*?\: +(.*?) kB$/; $1.to_i / 1024.0 }
|
15
|
+
out[:total], out[:free], out[:buffers], out[:cached] = IO.readlines("/proc/meminfo")[0..4].map { |l| l =~ /^.*?\: +(.*?) kB$/; ($1.to_i / 1024.0).to_f }
|
16
16
|
out[:free_total] = out[:free] + out[:buffers] + out[:cached]
|
17
17
|
end
|
18
18
|
out
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Honeybadger::Stats do
|
4
|
+
describe '.memory' do
|
5
|
+
subject { Honeybadger::Stats.memory }
|
6
|
+
|
7
|
+
before do
|
8
|
+
stub_const('Honeybadger::Stats::HAS_MEM', true)
|
9
|
+
IO.stub(:readlines).with('/proc/meminfo').and_return(["MemTotal: 35125476 kB\n", "MemFree: 1671436 kB\n", "Buffers: 2242812 kB\n", "Cached: 11791596 kB\n", "SwapCached: 164256 kB\n", "Active: 15891800 kB\n", "Inactive: 13593872 kB\n"])
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '.keys' do
|
13
|
+
subject { Honeybadger::Stats.memory.keys }
|
14
|
+
its(:length) { should eq 5 }
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'converts KB to MB' do
|
18
|
+
expect(Honeybadger::Stats.memory[:total]).to eq 34302.22265625
|
19
|
+
expect(Honeybadger::Stats.memory[:free]).to eq 1632.26171875
|
20
|
+
expect(Honeybadger::Stats.memory[:buffers]).to eq 2190.24609375
|
21
|
+
expect(Honeybadger::Stats.memory[:cached]).to eq 11515.23046875
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'sums non-totals for free_total' do
|
25
|
+
expect(Honeybadger::Stats.memory[:free_total]).to eq 15337.73828125
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'when mathn is required' do
|
29
|
+
before(:all) { require 'mathn' }
|
30
|
+
|
31
|
+
it 'converts Rational to Float' do
|
32
|
+
expect(Honeybadger::Stats.memory[:total]).to be_a Float
|
33
|
+
expect(Honeybadger::Stats.memory[:free]).to be_a Float
|
34
|
+
expect(Honeybadger::Stats.memory[:buffers]).to be_a Float
|
35
|
+
expect(Honeybadger::Stats.memory[:cached]).to be_a Float
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '.load' do
|
41
|
+
subject { Honeybadger::Stats.load }
|
42
|
+
|
43
|
+
before do
|
44
|
+
stub_const('Honeybadger::Stats::HAS_LOAD', true)
|
45
|
+
IO.stub(:read).with('/proc/loadavg').and_return('22.58 19.66 15.96 20/2019 2')
|
46
|
+
end
|
47
|
+
|
48
|
+
describe '.keys' do
|
49
|
+
subject { Honeybadger::Stats.load.keys }
|
50
|
+
its(:length) { should eq 3 }
|
51
|
+
end
|
52
|
+
|
53
|
+
specify { expect(subject[:one]).to eq 22.58 }
|
54
|
+
specify { expect(subject[:five]).to eq 19.66 }
|
55
|
+
specify { expect(subject[:fifteen]).to eq 15.96 }
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.0.
|
4
|
+
version: 1.11.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Wood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.3.10
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.3.10
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,10 +246,10 @@ files:
|
|
246
246
|
- gemfiles/rails3.1.gemfile.lock
|
247
247
|
- gemfiles/rails3.2.gemfile
|
248
248
|
- gemfiles/rails3.2.gemfile.lock
|
249
|
-
- gemfiles/rails4.gemfile
|
250
|
-
- gemfiles/rails4.gemfile.lock
|
251
|
-
- gemfiles/
|
252
|
-
- gemfiles/
|
249
|
+
- gemfiles/rails4.0.gemfile
|
250
|
+
- gemfiles/rails4.0.gemfile.lock
|
251
|
+
- gemfiles/rails4.1.gemfile
|
252
|
+
- gemfiles/rails4.1.gemfile.lock
|
253
253
|
- gemfiles/rake.gemfile
|
254
254
|
- gemfiles/rake.gemfile.lock
|
255
255
|
- gemfiles/sinatra.gemfile
|
@@ -305,6 +305,7 @@ files:
|
|
305
305
|
- spec/honeybadger/rails/action_controller_spec.rb
|
306
306
|
- spec/honeybadger/rails_spec.rb
|
307
307
|
- spec/honeybadger/sender_spec.rb
|
308
|
+
- spec/honeybadger/stats_spec.rb
|
308
309
|
- spec/honeybadger/user_feedback_spec.rb
|
309
310
|
- spec/honeybadger/user_informer_spec.rb
|
310
311
|
- spec/honeybadger_tasks_spec.rb
|