bug_hunter 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.1.0
data/bug_hunter.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bug_hunter}
8
- s.version = "0.0.6"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David A. Cuadrado"]
12
- s.date = %q{2011-05-29}
12
+ s.date = %q{2011-05-30}
13
13
  s.default_executable = %q{bug_hunter}
14
14
  s.description = %q{sinatra app to manage web app exceptions}
15
15
  s.email = %q{krawek@gmail.com}
@@ -149,7 +149,7 @@ module BugHunter
149
149
  doc[:params] = params
150
150
 
151
151
  exception.backtrace.each do |line|
152
- if line !~ /\/usr/ && line =~ /^(.+):(\d+):in `(.+)'/ # I need better way to detect this
152
+ if self.highlight_line?(line) && line =~ /^(.+):(\d+):in `(.+)'/
153
153
  doc[:file] = $1
154
154
  doc[:line] = $2.to_i
155
155
  doc[:method] = $3
@@ -167,6 +167,10 @@ module BugHunter
167
167
  BugHunter::Project.collection.update({:_id => BugHunter::Project.instance.id},
168
168
  {:$inc => {:errors_count => 1}})
169
169
  end
170
+
171
+ def self.highlight_line?(line)
172
+ line !~ /\/(usr|vendor|bundle)\//
173
+ end
170
174
  end # Error
171
175
 
172
176
 
@@ -86,10 +86,10 @@
86
86
  %b
87
87
  Created At:
88
88
  %td
89
- &=@error.created_at
89
+ &=@error.created_at.strftime("%b %d %Y at %I:%M%p (%Z)")
90
90
  %tr
91
91
  %td
92
92
  %b
93
93
  Updated At:
94
94
  %td
95
- &=@error.updated_at
95
+ &=@error.updated_at.strftime("%b %d %Y at %I:%M%p (%Z)")
@@ -7,7 +7,7 @@
7
7
  %h3
8
8
  Backtrace
9
9
  -@error.backtrace.each do |line|
10
- -if line !~ /\/usr/
10
+ -if BugHunter::Error.highlight_line?(line)
11
11
  %span.fk_key
12
12
  &=line
13
13
  -else
@@ -51,11 +51,11 @@
51
51
  %div(data-role="collapsible" data-collapsed=true)
52
52
  %h3
53
53
  Comments
54
- ==("#{@error.comments_count}")
54
+ ==(#{@error.comments_count.to_i})
55
55
  -(@error.comments||[]).each do |comment|
56
56
  %div(data-role="collapsible" data-collapsed=false data-theme="b")
57
57
  %h3
58
- &= "#{comment["from"]}[#{comment["ip"]}] said on #{comment["created_at"]}"
58
+ &= "#{comment["from"]}[#{comment["ip"]}] said on #{comment["created_at"].strftime("%b %d %Y at %I:%M%p (%Z)")}"
59
59
  &= comment["message"]
60
60
 
61
61
  %hr
@@ -6,7 +6,7 @@
6
6
  %link(rel="stylesheet" href="/stylesheets/jquery.mobile-1.0b1pre.min.css")
7
7
  %link(rel="stylesheet" href="/stylesheets/highlight.css")
8
8
 
9
- %script(src="http://code.jquery.com/jquery-1.5.2.min.js")
9
+ %script(src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js")
10
10
  %script(src="/javascripts/jquery.mobile-1.0b1pre.min.js")
11
11
 
12
12
  %script(src="/javascripts/bug_hunter.js")
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 6
9
- version: 0.0.6
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - David A. Cuadrado
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-05-29 00:00:00 -05:00
17
+ date: 2011-05-30 00:00:00 -05:00
18
18
  default_executable: bug_hunter
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
231
  requirements:
232
232
  - - ">="
233
233
  - !ruby/object:Gem::Version
234
- hash: -1435399183817290328
234
+ hash: 1815196173598934913
235
235
  segments:
236
236
  - 0
237
237
  version: "0"