umlaut 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/umlaut/error_handling.rb +1 -3
- data/app/models/service_wave.rb +9 -5
- data/app/service_adaptors/isbn_db.rb +3 -0
- data/lib/umlaut/version.rb +1 -1
- data/lib/umlaut.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGNlZDU2MTIxYjg1Y2ViYjZkNThjNDY4MjJhMDQ1ZDlkNTFjMjg5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDYwM2IwZDE2MDVkMjY1ZDE2ZjRjZmVmYTg0MWMxNWM2ZjNlNDMxNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDJkODQ3OTZhY2VlMGE2OWNkMmZiZWJhM2RlZjY3ZDA0MzUwOWEzNGRiNGQy
|
10
|
+
MmFjY2ZjNzFiYjQxNzY2Mzc0MzZiMTUyY2UxMDRhZDZjODAxMDZmNWY0ODU2
|
11
|
+
ZGNhNTdjZDI0ZjgzMGM1NTdmNGUzNzUzYjlhYjViYTZkZDZjMjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzlhZmI2YmE3ZjFiOWM3MDhhNmM0MTdhZmM5N2U5NmYzYWVjOGYwMDg2Y2Vk
|
14
|
+
NjVjNjQ2ZTc1MTlkYzViZmY4ZmE3MjE1Njc3ZTZlYTFmMjgwN2JhMWU1MDAz
|
15
|
+
Y2YwNGM5Zjg4MjUwNGFhYjhmMzQ2YmQ0YmEyYzJjNTVlZGQwZDU=
|
@@ -42,9 +42,7 @@ module Umlaut::ErrorHandling
|
|
42
42
|
message << " User-Agent: #{request.user_agent}\n"
|
43
43
|
message << " Client IP: #{request.remote_addr}\n\n"
|
44
44
|
message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
|
45
|
-
|
46
|
-
# we actually get a backtrace.
|
47
|
-
message << " " << Rails.backtrace_cleaner.clean(exception.backtrace, :noise).join("\n ")
|
45
|
+
message << " " << Rails.backtrace_cleaner.clean(exception.backtrace).join("\n ")
|
48
46
|
logger.send(severity, "#{message}\n\n")
|
49
47
|
end
|
50
48
|
protected :log_error_with_context
|
data/app/models/service_wave.rb
CHANGED
@@ -101,7 +101,7 @@ class ServiceWave
|
|
101
101
|
|
102
102
|
# Log it too, although experience shows it may never make it to the
|
103
103
|
# log for mysterious reasons.
|
104
|
-
log_msg = TermColor.color("Umlaut: Threaded service raised exception.", :red, true) + " Service: #{service.service_id}, #{e.class} #{e.message}. Backtrace:\n #{e.
|
104
|
+
log_msg = TermColor.color("Umlaut: Threaded service raised exception.", :red, true) + " Service: #{service.service_id}, #{e.class} #{e.message}. Backtrace:\n #{clean_backtrace(e).join("\n ")}"
|
105
105
|
Rails.logger.error(log_msg)
|
106
106
|
|
107
107
|
# And stick it in a thread variable too
|
@@ -162,10 +162,14 @@ class ServiceWave
|
|
162
162
|
end
|
163
163
|
|
164
164
|
protected
|
165
|
-
def clean_backtrace(exception
|
166
|
-
defined?(Rails) && Rails.respond_to?(:backtrace_cleaner)
|
167
|
-
Rails.backtrace_cleaner.clean(exception.backtrace
|
168
|
-
exception.backtrace
|
165
|
+
def clean_backtrace(exception)
|
166
|
+
if defined?(Rails) && Rails.respond_to?(:backtrace_cleaner)
|
167
|
+
trace = Rails.backtrace_cleaner.clean(exception.backtrace)
|
168
|
+
trace = Rails.backtrace_cleaner.clean(exception.backtrace, :all) if trace.empty?
|
169
|
+
return trace
|
170
|
+
else
|
171
|
+
return exception.backtrace
|
172
|
+
end
|
169
173
|
end
|
170
174
|
|
171
175
|
|
@@ -1,3 +1,6 @@
|
|
1
|
+
# NOT recommended anymore, jrochkind has found IsbnDb to be pretty flaky, and
|
2
|
+
# hard to deal with. See book_finder.rb or all_books_dot_com.rb as alternatives.
|
3
|
+
#
|
1
4
|
# Talks to the ISBNDb (isbndb.com) to get pricing info and links to pricing
|
2
5
|
# info for online sellers. There are potentially other services we could
|
3
6
|
# make use of there in the future too.
|
data/lib/umlaut/version.rb
CHANGED
data/lib/umlaut.rb
CHANGED
@@ -46,6 +46,9 @@ module Umlaut
|
|
46
46
|
line.sub(/^#{engine_root_regex}/, "#{engine_name} ")
|
47
47
|
end
|
48
48
|
|
49
|
+
# This actually seemed not to be neccesary, and wasn't behaving right? Let's
|
50
|
+
# try without it...
|
51
|
+
#
|
49
52
|
# Keep Umlaut's own stacktrace in the backtrace -- we have to remove Rails
|
50
53
|
# silencers and re-add them how we want.
|
51
54
|
Rails.backtrace_cleaner.remove_silencers!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: umlaut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind, et al
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|