honeybadger 1.10.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e0f85bcb71a37c3f43c8926267d0451df2ce4eb8
4
+ data.tar.gz: e3ae25a5a9e56ce88518b3422776196c9e09ac3b
5
+ SHA512:
6
+ metadata.gz: fa4789fdccd66511ca94abd6593ba1adc23da050f455663e4f7b8a0126b8771d4299247b59e56b92b0633b193ceab5751ae08ceb5352cbe19c6f9cf867d6fda4
7
+ data.tar.gz: fc9dc62c29c7b3bf8289bdd4276f3a48cc510c0cd55cfbe55e22b6495bf0cc7691cc897ae22b91e4fdee1d162f993c6aa984e0149d6ad3290fede9cffa2e95db
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- honeybadger (1.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1)
4
+ honeybadger (1.10.2)
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.10.1'
8
- s.date = '2013-12-14'
7
+ s.version = '1.10.2'
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.'
@@ -127,6 +127,7 @@ Gem::Specification.new do |s|
127
127
  spec/honeybadger/rails/action_controller_spec.rb
128
128
  spec/honeybadger/rails_spec.rb
129
129
  spec/honeybadger/sender_spec.rb
130
+ spec/honeybadger/stats_spec.rb
130
131
  spec/honeybadger/user_feedback_spec.rb
131
132
  spec/honeybadger/user_informer_spec.rb
132
133
  spec/honeybadger_tasks_spec.rb
data/lib/honeybadger.rb CHANGED
@@ -16,7 +16,7 @@ require 'honeybadger/user_feedback'
16
16
  require 'honeybadger/railtie' if defined?(Rails::Railtie)
17
17
 
18
18
  module Honeybadger
19
- VERSION = '1.10.1'
19
+ VERSION = '1.10.2'
20
20
  LOG_PREFIX = "** [Honeybadger] "
21
21
 
22
22
  HEADERS = {
@@ -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,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
5
- prerelease:
4
+ version: 1.10.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joshua Wood
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-12-14 00:00:00.000000000 Z
11
+ date: 2014-01-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: cucumber
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sham_rack
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: capistrano
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: guard
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,129 +97,113 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: guard-rspec
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: rake
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: sinatra
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - '>='
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - '>='
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: aruba
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ! '>='
143
+ - - '>='
164
144
  - !ruby/object:Gem::Version
165
145
  version: '0'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ! '>='
150
+ - - '>='
172
151
  - !ruby/object:Gem::Version
173
152
  version: '0'
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: appraisal
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
- - - ! '>='
157
+ - - '>='
180
158
  - !ruby/object:Gem::Version
181
159
  version: '0'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
- - - ! '>='
164
+ - - '>='
188
165
  - !ruby/object:Gem::Version
189
166
  version: '0'
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: fuubar
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
- - - ! '>='
171
+ - - '>='
196
172
  - !ruby/object:Gem::Version
197
173
  version: '0'
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
- - - ! '>='
178
+ - - '>='
204
179
  - !ruby/object:Gem::Version
205
180
  version: '0'
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: growl
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
- - - ! '>='
185
+ - - '>='
212
186
  - !ruby/object:Gem::Version
213
187
  version: '0'
214
188
  type: :development
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
- - - ! '>='
192
+ - - '>='
220
193
  - !ruby/object:Gem::Version
221
194
  version: '0'
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: webmock
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
- - - ! '>='
199
+ - - '>='
228
200
  - !ruby/object:Gem::Version
229
201
  version: '0'
230
202
  type: :development
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
- - - ! '>='
206
+ - - '>='
236
207
  - !ruby/object:Gem::Version
237
208
  version: '0'
238
209
  description: Make managing application errors a more pleasant experience.
@@ -330,6 +301,7 @@ files:
330
301
  - spec/honeybadger/rails/action_controller_spec.rb
331
302
  - spec/honeybadger/rails_spec.rb
332
303
  - spec/honeybadger/sender_spec.rb
304
+ - spec/honeybadger/stats_spec.rb
333
305
  - spec/honeybadger/user_feedback_spec.rb
334
306
  - spec/honeybadger/user_informer_spec.rb
335
307
  - spec/honeybadger_tasks_spec.rb
@@ -341,6 +313,7 @@ files:
341
313
  - spec/support/helpers.rb
342
314
  homepage: http://www.honeybadger.io
343
315
  licenses: []
316
+ metadata: {}
344
317
  post_install_message:
345
318
  rdoc_options:
346
319
  - --charset=UTF-8
@@ -348,23 +321,18 @@ rdoc_options:
348
321
  require_paths:
349
322
  - lib
350
323
  required_ruby_version: !ruby/object:Gem::Requirement
351
- none: false
352
324
  requirements:
353
- - - ! '>='
325
+ - - '>='
354
326
  - !ruby/object:Gem::Version
355
327
  version: '0'
356
- segments:
357
- - 0
358
- hash: 3468913748212132657
359
328
  required_rubygems_version: !ruby/object:Gem::Requirement
360
- none: false
361
329
  requirements:
362
- - - ! '>='
330
+ - - '>='
363
331
  - !ruby/object:Gem::Version
364
332
  version: '0'
365
333
  requirements: []
366
334
  rubyforge_project:
367
- rubygems_version: 1.8.23
335
+ rubygems_version: 2.1.5
368
336
  signing_key:
369
337
  specification_version: 2
370
338
  summary: Error reports you can be happy about.