mini_defender 0.5.4 → 0.5.6

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: 73ce456e0b23735581871619b744d40814619b39012ebb8b1cd50367ee0e7af4
4
- data.tar.gz: d5e71ffdebfb17149e631ad9464482209685a17b97b04b16a498a8fd0933d656
3
+ metadata.gz: 24ccaa0028ceac26860f7127c5562632d0378fd1ef1fba466dc418d5d3ac6fa0
4
+ data.tar.gz: b20729f6d6a1f8d8c329f5baf4d7794cb63d2143b85addce1c9ee73b5a73d89f
5
5
  SHA512:
6
- metadata.gz: ae9ec903aa13fbc773146154ce692e2fb6d66c5ea6cd8a4c00597479d1811142d25c802015d7da738a79c41fd3550754e92b77ae6dd1dc85103f0ae0a8e6b9d3
7
- data.tar.gz: 55638c4ad883417564d6f1596eb3670b01ce7b8fe85f9462f7d54b4579ed9195c0d0b787c0efeae9e81ce764df66346fbd64e7fbd6318d609044a57c0818b799
6
+ metadata.gz: ecc49528f6bc97c562a6faf9ecc9811c18b015fd7425c8a2fa1ad32b8257e880e135c0f53314a5a47cf9862b5eeac271396c81b18444e82772f0830f34a77998
7
+ data.tar.gz: d4562ce1868a32bd10c47b1a1dedbefa1262c429270ee9431fd8fcca84ced3f6f6c26dacc379632699852de6b2457f916cb2c662cfed47a5618c8ad820fc14fc
@@ -9,6 +9,10 @@ class MiniDefender::Rules::String < MiniDefender::Rule
9
9
  'string'
10
10
  end
11
11
 
12
+ def self.make(args)
13
+ new(args[0] || 'strict')
14
+ end
15
+
12
16
  def coerce(value)
13
17
  value.to_s
14
18
  end
@@ -66,7 +66,7 @@ module MiniDefender
66
66
  coerced = rule.coerce(coerced)
67
67
  force_coerce = rule.force_coerce?
68
68
  else
69
- @errors[k] << rule.error_message(k, value, self)
69
+ @errors[k] << rule.error_message(k, coerced, self)
70
70
  end
71
71
  end
72
72
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MiniDefender
4
- VERSION = "0.5.4"
4
+ VERSION = "0.5.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_defender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Alhoshaiyan