warning_filter 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/warning_filter.rb +7 -1
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5b15f46430308233b406ba380bb3f02ae696756
4
- data.tar.gz: 07fb11932f276747fc02bf52a25fc35b4d2555dc
3
+ metadata.gz: 16a33d3b03dc0b0e0be1194de6a170f32096b404
4
+ data.tar.gz: 2d2cddcfca793590dd7405d2f3464b9deef7e024
5
5
  SHA512:
6
- metadata.gz: 5ebce3693d031f22d9b1fbbcce04d2733329b1e4c83bb60ae14483f07b0081debf9711ddf4b7df0598617f10be65e3435b1cfd83757a333d0f60a0259924c69c
7
- data.tar.gz: c9a6110b5036b31d311eabb86be5c3058af7e0096c7d29a59cacf2197d9783992f150a1f1faece160c3117cd418c16491423ad4b676bf4d775583a7b156ea80f
6
+ metadata.gz: a407234ea1b2aa4074a6c0dedf556e6fd4e4cebe433dc1ebf5bc53f05d38044c1c068bc7fecb5273e7be90adc92b424cb451def43227fda099a9e84e598cf58f
7
+ data.tar.gz: ae28094908c78b1ece84317d27ac13cb28635556a05b2e14dc289b41c20e3766d488dfaee5469c43d387a826a11f650e07c13492e1624611309b5a662179d6af
@@ -3,7 +3,13 @@ require 'delegate'
3
3
  module Support
4
4
  class WarningFilter < DelegateClass(IO)
5
5
  def write(line)
6
- super if line !~ /^\S+gems\/ruby\-\S+:\d+: warning:/
6
+ super unless from_third_party?(line)
7
+ end
8
+
9
+ def from_third_party?(line)
10
+ Gem.path.each do |gem_path|
11
+ return true if line.include?(gem_path)
12
+ end
7
13
  end
8
14
  end
9
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warning_filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grayson Wright
@@ -10,7 +10,8 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-10-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Only see the warnings you need to.
13
+ description: Filter out warnings from third-party gems so you can focus on your own
14
+ problems.
14
15
  email: wright.grayson@gmail.com
15
16
  executables: []
16
17
  extensions: []
@@ -40,6 +41,6 @@ rubyforge_project:
40
41
  rubygems_version: 2.4.1
41
42
  signing_key:
42
43
  specification_version: 4
43
- summary: Filter out errors from third-party gems so you can hear yourself think.
44
+ summary: Only see the warnings you need to.
44
45
  test_files: []
45
46
  has_rdoc: