tainted_love 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d5eb5ea6986c6fffe63248c5145f9fb26d7bf7b9d6ad410aa0a4964470caf0b
4
- data.tar.gz: 3d0b52d13d15d2c2b05e9ef923b2a058259379ba4d863f81764b577276c01eb3
3
+ metadata.gz: d1fb2f3caa7c9d1c2ad65cd39008d98e7b3d4b90f2fefaa6271651b33a279ba3
4
+ data.tar.gz: 56a20ce9ecde810993e9d62475097c8187f14143ea9e6f7ab8d7e79ecd4b1f90
5
5
  SHA512:
6
- metadata.gz: 74bd34b8c35b692160f2fb63ffaba86d50f7e4dd88e23dedfc7838e65bb116068f79ca026d02534c5b82b8a1dcfa6f8af52b5446416942d4fe5b90bb550d824e
7
- data.tar.gz: 9a28610d1f6c337ea91dd11b45a1f6d089279fbdcdd49feb7fc2c8aa5d78a21cde439dae16fdc9b78f74844834c37acb167780bc79f757e878045a3b37f8b7c1
6
+ metadata.gz: 31b432b1a5745084e7c3bc4efcae14a1d20bfba8ad8ac47ea5412d1895cc6c648717bc00ca3463e2192f53108dadba9feb74701909e09778c33be621046ed938
7
+ data.tar.gz: f6903f74b1d35abda62cb44879bc45b745c7f3bdae96a02eed6bcda7cbf8d0e39a4402328238f7a984c62393ca6a9bbc121cf661f32c488b5b61659d1947e7e6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tainted_love (0.1.4)
4
+ tainted_love (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -4,7 +4,7 @@ module TaintedLove
4
4
  module Reporter
5
5
  # Reporter that outputs warnings in the console
6
6
  class StdoutReporter < Base
7
- attr_reader :stack_trace_size, :app_path
7
+ attr_accessor :stack_trace_size, :app_path
8
8
 
9
9
  def initialize
10
10
  super
@@ -34,10 +34,10 @@ module TaintedLove
34
34
  warning.stack_trace.lines.take(@stack_trace_size).each do |line|
35
35
  puts format_line(line)
36
36
 
37
- next unless line[:file].starts_with?(@app_path)
37
+ next unless line[:file].start_with?(@app_path)
38
38
 
39
- File.read(line[:file]).lines.each_with_index.drop(line[:line_number] - 2).take(3).each do |(code, n)|
40
- puts "| #{n}\t#{code}"
39
+ File.read(line[:file]).lines.each_with_index.drop([0, line[:line_number] - 2].max).take(3).each do |(code, n)|
40
+ puts "| #{n + 1}\t#{code}"
41
41
  end
42
42
  end
43
43
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TaintedLove
4
+ module Validator
5
+ class RackBuilderEval < Base
6
+ def remove?(warning)
7
+ return unless warning.replacer == :ReplaceKernel
8
+
9
+ if warning.stack_trace.lines.first[:file]['rack/builder.rb']
10
+ return true
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TaintedLove
4
+ module Validator
5
+ class RakeTestTask < Base
6
+ def remove?(warning)
7
+ return unless warning.replacer == :ReplaceKernel
8
+
9
+ warning.stack_trace.lines.take(5).each do |line|
10
+ return true if line[:file]['rake/testtask.rb']
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TaintedLove
4
+ module Validator
5
+ class WebpackerYaml < Base
6
+ def remove?(warning)
7
+ return unless warning.replacer == :ReplaceYAML
8
+
9
+ file = warning.stack_trace.lines.first[:file]
10
+ if file['/lib/webpacker/env.rb'] || file['/lib/webpacker/configuration.rb']
11
+ return true
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TaintedLove
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tainted_love
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Cote-Jodoin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -232,9 +232,12 @@ files:
232
232
  - lib/tainted_love/validator/action_view_object_send.rb
233
233
  - lib/tainted_love/validator/base.rb
234
234
  - lib/tainted_love/validator/erb_eval.rb
235
+ - lib/tainted_love/validator/rack_builder_eval.rb
235
236
  - lib/tainted_love/validator/railties_yaml_load.rb
237
+ - lib/tainted_love/validator/rake_testtask.rb
236
238
  - lib/tainted_love/validator/redis_store_serialization.rb
237
239
  - lib/tainted_love/validator/sprokets_marshal.rb
240
+ - lib/tainted_love/validator/webpacker_yaml.rb
238
241
  - lib/tainted_love/version.rb
239
242
  - lib/tainted_love/warning.rb
240
243
  - tainted_love.gemspec