blouson 1.1.1 → 1.1.2

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: 1a088372f568649175af63be6d52577a3847dd532664ea5a2370ccdf40a4f3db
4
- data.tar.gz: c13bc3482ec0a909d85cddb8b4a404ce6f072360b1f5d91fd49e959d70ba1785
3
+ metadata.gz: 78a44cf04cd15a16cdfb9eb997fbce7d96afb7c5e78c2a27a0bfa41064eccdcd
4
+ data.tar.gz: 5647cc9aac63b8e4b94690949b3b171cb814b4319f2f673bf959bd03a265cafd
5
5
  SHA512:
6
- metadata.gz: 6213fbb353b32e31154ea5e986103ec1b6568e82c1cea386062259f4ed99fb2a4a734d4d3c7fec7d2aa184ba65dd671030861125108e47830f6685a3369510e2
7
- data.tar.gz: 6fa70f5b597dca1c95929c51c08c5ef4284ee3fe0daf15d7a44a17f9f4c2abf3e9ce2c5b933cc8b750e25b795804ec3a690cbc74841e2d4f82ef252b93229c91
6
+ metadata.gz: 8c5f39468c0f5de0f9b542d6ff239ddf41bdd6672ec969ec852ca2ff9d6ac67dfe7aa34955737a13ac6b60459d675f707032386941f651abe5e4f3f5d0a175f7
7
+ data.tar.gz: 740cfacbb6268c9466372e6c6775d7eae6f6b28528f2f255c8b07b57df570b9f38f6c7e45092c9f206b7c8073e9cdc3b296ae8dd479d24583602ca965cd19429
@@ -7,11 +7,18 @@ gemfile:
7
7
  - gemfiles/rails_5.0.gemfile
8
8
  - gemfiles/rails_5.1.gemfile
9
9
  - gemfiles/rails_5.2.gemfile
10
+ - gemfiles/rails_6.0.gemfile
10
11
  rvm:
11
12
  - 2.3.8
12
13
  - 2.4.6
13
14
  - 2.5.5
14
15
  - 2.6.3
16
+ matrix:
17
+ exclude:
18
+ - rvm: 2.3.8
19
+ gemfile: gemfiles/rails_6.0.gemfile
20
+ - rvm: 2.4.6
21
+ gemfile: gemfiles/rails_6.0.gemfile
15
22
  before_install:
16
23
  - "[[ $BUNDLE_GEMFILE =~ rails_4\\.2 ]] && gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true"
17
24
  - "[[ $BUNDLE_GEMFILE =~ rails_4\\.2 ]] && gem install bundler -v '< 2' || true"
data/Appraisals CHANGED
@@ -14,4 +14,8 @@ appraise 'rails-5.2' do
14
14
  gem 'rails', '~> 5.2.0'
15
15
  end
16
16
 
17
+ appraise 'rails-6.0' do
18
+ gem 'rails', '~> 6.0.0'
19
+ end
20
+
17
21
  # vim: set ft=ruby:
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.0.0"
6
+
7
+ gemspec path: "../"
@@ -14,7 +14,13 @@ module Blouson
14
14
  end
15
15
 
16
16
  def initialize(client = nil)
17
- @parameter_filter = ActionDispatch::Http::ParameterFilter.new(self.class.filters)
17
+ # ActionDispatch::Http::ParameterFilter is deprecated and will be removed from Rails 6.1.
18
+ parameter_filter_klass = if defined?(ActiveSupport::ParameterFilter)
19
+ ActiveSupport::ParameterFilter
20
+ else
21
+ ActionDispatch::Http::ParameterFilter
22
+ end
23
+ @parameter_filter = parameter_filter_klass.new(self.class.filters)
18
24
  end
19
25
 
20
26
  def process(value)
@@ -15,9 +15,10 @@ module Blouson
15
15
  end
16
16
 
17
17
  module StatementInvalidErrorFilter
18
- def initialize(message = nil, original_exception = nil)
19
- if SensitiveQueryFilter.contain_sensitive_query?(message)
20
- message = SensitiveQueryFilter.filter_sensitive_words(message)
18
+ def initialize(message = nil, original_exception = nil, sql: nil, binds: nil)
19
+ if SensitiveQueryFilter.contain_sensitive_query?(message) || (SensitiveQueryFilter.contain_sensitive_query?(sql))
20
+ message = SensitiveQueryFilter.filter_sensitive_words(message) if message
21
+ sql = SensitiveQueryFilter.filter_sensitive_words(sql) if sql
21
22
  if defined?(Mysql2::Error)
22
23
  if original_exception.is_a?(Mysql2::Error)
23
24
  original_exception.extend(Mysql2Filter)
@@ -30,6 +31,11 @@ module Blouson
30
31
  if original_exception
31
32
  # Rails < 5.0
32
33
  super(message, original_exception)
34
+ elsif sql
35
+ # Rails >= 6.0
36
+ #
37
+ # - https://github.com/rails/rails/pull/34468
38
+ super(message, sql: sql, binds: binds)
33
39
  else
34
40
  # Rails >= 5.0
35
41
  #
@@ -1,3 +1,3 @@
1
1
  module Blouson
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blouson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cookpad Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2019-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -159,6 +159,7 @@ files:
159
159
  - gemfiles/rails_5.0.gemfile
160
160
  - gemfiles/rails_5.1.gemfile
161
161
  - gemfiles/rails_5.2.gemfile
162
+ - gemfiles/rails_6.0.gemfile
162
163
  - lib/blouson.rb
163
164
  - lib/blouson/engine.rb
164
165
  - lib/blouson/raven_parameter_filter_processor.rb