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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODZiYTQzNWJjMzkwMDAyZjZhMTNiODlhYzhlMmFjOGIwNTc0ZTVjYw==
4
+ OGNlZDU2MTIxYjg1Y2ViYjZkNThjNDY4MjJhMDQ1ZDlkNTFjMjg5Mg==
5
5
  data.tar.gz: !binary |-
6
- MDk2ODYwYTM1M2UwM2QzMDg4ZGNlNDQxNWIwNjQ0YjVjN2JhZDE3NA==
6
+ ZDYwM2IwZDE2MDVkMjY1ZDE2ZjRjZmVmYTg0MWMxNWM2ZjNlNDMxNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTlmOTFjNzA2ZDU2ZDYwZDQ3MTJjNTk4Y2YxM2U0MTk1NGI4OTE1ZDk2YzM3
10
- MjcyYjlkNjA5NTViZWNlMGM4Njk5YTJkZGFkMDdkZmY2YzBiYzg5ZWE2YjVk
11
- MzZhZDViMmRhZWQyZjQwOWM0YzMwYWFjMTRjYTQ3YWQ2ODZkMmI=
9
+ ZDJkODQ3OTZhY2VlMGE2OWNkMmZiZWJhM2RlZjY3ZDA0MzUwOWEzNGRiNGQy
10
+ MmFjY2ZjNzFiYjQxNzY2Mzc0MzZiMTUyY2UxMDRhZDZjODAxMDZmNWY0ODU2
11
+ ZGNhNTdjZDI0ZjgzMGM1NTdmNGUzNzUzYjlhYjViYTZkZDZjMjk=
12
12
  data.tar.gz: !binary |-
13
- ODRjOTg4MWY2NWIyNDYwMmU3MmU3ZWY2ZmE2MDg1ZDU4YzU1ZDJiMWU1YWVj
14
- YmUxMjYwZTllMWZmNTc0NWI2MzJiN2Q2Nzk2MzcxODQxYjg5M2U3NTgyMzMz
15
- NTllZGUxYTU5ZDQyMzI5NzY4ZGY4ZjY4YmMxMWM5YTY4OWE4YTM=
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
- # mysterious :noise param seems to match how default rails does it, so
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
@@ -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.backtrace.join("\n ")}"
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, *args)
166
- defined?(Rails) && Rails.respond_to?(:backtrace_cleaner) ?
167
- Rails.backtrace_cleaner.clean(exception.backtrace, *args) :
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.
@@ -1,5 +1,5 @@
1
1
  module Umlaut
2
- VERSION = "4.0.0"
2
+ VERSION = "4.0.1"
3
3
 
4
4
  # This is used in Umlaut's .gemspec for generating the gem,
5
5
  # and is also used in the umlaut app generator to make sure
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.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-06 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails