mini_defender 0.6.2 → 0.6.4

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: 8e0ab4aebfd050f5d3a5560099d9567d6c6bf60e741e36e3bfbc55f8ae84e10d
4
- data.tar.gz: fd22d8c11ce0b2dbfdaecf36ac48d15fd4a554bab8ab6733d64af267b07edf6d
3
+ metadata.gz: 6fbf3b803c35e010240900c164e70d6ec251484671528bba2e7d58321c148ec0
4
+ data.tar.gz: 3e65db3a9d3a2b6c91d18bcf7eff25d3c7d4b9f9ef8156e2fcbad69bdd6afe20
5
5
  SHA512:
6
- metadata.gz: 5d7209aae4068a0b26d4f3a3ec3896b4a423aa9c3f201a3534c589359dd4c84de17f764e55f61d2dff5b74387433fbd17a17fef14109127a92ecd6dcebe67dba
7
- data.tar.gz: 72587c709c155934e3c0c0ef7769f48f938eed2a4dab473a90211fefeb3e215732607cc605c733a4f734f54707df0b00297953b53b925c09e614c35b0f3b926d
6
+ metadata.gz: 6aed1ac84487557a85a8374b578e8286baf2510e059d0a393c1da6014d89cfd21f33b2d94153e6e376be36ff8b0b45f6b5c10f1e9da4853e0366787179405b84
7
+ data.tar.gz: f6db95690153ba8ca3f5a2a142ee07349608bb0d2d060944760f1544f5d6d8eb47b7ec36b6eb0b09ebb83baa6a3548b230a0f47c438a9c796738a87e739de94d
@@ -13,7 +13,7 @@ class MiniDefender::Rules::DateEq < MiniDefender::Rule
13
13
  end
14
14
 
15
15
  def self.make(args)
16
- raise ArgumentError, 'Target date is required for date rules.' unless args == 1
16
+ raise ArgumentError, 'Target date is required for date rules.' unless args.length == 1
17
17
 
18
18
  self.new(args[0])
19
19
  end
@@ -17,9 +17,11 @@ class MiniDefender::Rules::MimeTypes < MiniDefender::Rule
17
17
  end
18
18
 
19
19
  def self.make(args)
20
- raise ArgumentError, 'Expected at least one MIME type.' unless args.length > 0
20
+ unless args.length > 0
21
+ raise ArgumentError, 'Expected at least one MIME type.'
22
+ end
21
23
 
22
- new(args.split(',').map(&:downcase).map(&:strip))
24
+ new(args.map(&:downcase).map(&:strip))
23
25
  end
24
26
 
25
27
  def passes?(attribute, value, validator)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MiniDefender
4
- VERSION = "0.6.2"
4
+ VERSION = "0.6.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_defender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Alhoshaiyan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.3.26
222
+ rubygems_version: 3.4.10
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: A small and efficient validation library for Rails and anything that uses