thoughtbot-quietbacktrace 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.markdown +2 -2
  2. data/Rakefile +1 -1
  3. data/lib/quietbacktrace.rb +10 -4
  4. metadata +4 -4
@@ -16,13 +16,13 @@ Silencers remove lines from the backtrace. Create your own:
16
16
 
17
17
  # Will reject all lines that include the word "mongrel",
18
18
  # like "/gems/mongrel/server.rb" or "/app/my_mongrel_server/rb"
19
- backtrace_cleaner = QuietBacktrace.BacktraceCleaner.new
19
+ backtrace_cleaner = QuietBacktrace::BacktraceCleaner.new
20
20
  backtrace_cleaner.add_silencer { |line| line =~ /mongrel/ }
21
21
 
22
22
  Filters modify the output of backtrace lines. Create your own:
23
23
 
24
24
  # Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb"
25
- backtrace_cleaner = QuietBacktrace.BacktraceCleaner.new
25
+ backtrace_cleaner = QuietBacktrace::BacktraceCleaner.new
26
26
  backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') }
27
27
 
28
28
  Requirements
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ end
15
15
 
16
16
  gem_spec = Gem::Specification.new do |gem_spec|
17
17
  gem_spec.name = "quietbacktrace"
18
- gem_spec.version = "1.1.6"
18
+ gem_spec.version = "1.1.7"
19
19
  gem_spec.summary = "Suppresses the noise in your Test::Unit backtraces."
20
20
  gem_spec.email = "support@thoughtbot.com"
21
21
  gem_spec.homepage = "http://github.com/thoughtbot/quietbacktrace"
@@ -11,12 +11,18 @@ module QuietBacktrace
11
11
  def filter_backtrace_with_cleaning(backtrace)
12
12
  backtrace = filter_backtrace_without_cleaning(backtrace)
13
13
  backtrace = backtrace.first.split("\n") if backtrace.size == 1
14
- cleaner = QuietBacktrace::BacktraceCleaner.new
14
+ cleaner = QuietBacktrace::BacktraceCleaner.new
15
15
  cleaner.clean(backtrace)
16
16
  end
17
17
  end
18
18
  end
19
19
 
20
- Test::Unit::Util::BacktraceFilter.module_eval do
21
- include QuietBacktrace::CleanerForTestUnit
22
- end
20
+ Test::Unit::Util::BacktraceFilter.module_eval do
21
+ include QuietBacktrace::CleanerForTestUnit
22
+ end if defined?(Test::Unit::Util)
23
+
24
+ module MiniTest
25
+ def self.filter_backtrace(backtrace)
26
+ QuietBacktrace::BacktraceCleaner.new.clean(backtrace)
27
+ end
28
+ end if defined?(MiniTest)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thoughtbot-quietbacktrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot, inc.
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2009-02-28 21:00:00 -08:00
17
+ date: 2009-06-25 21:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -32,7 +32,7 @@ files:
32
32
  - README.markdown
33
33
  - lib/backtrace_cleaner.rb
34
34
  - lib/quietbacktrace.rb
35
- has_rdoc: false
35
+ has_rdoc: true
36
36
  homepage: http://github.com/thoughtbot/quietbacktrace
37
37
  post_install_message:
38
38
  rdoc_options: []
@@ -56,7 +56,7 @@ requirements: []
56
56
  rubyforge_project:
57
57
  rubygems_version: 1.2.0
58
58
  signing_key:
59
- specification_version: 2
59
+ specification_version: 3
60
60
  summary: Suppresses the noise in your Test::Unit backtraces.
61
61
  test_files: []
62
62