default_where 2.2.0 → 2.2.1

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: 2b85a4951acd26f1a6797d490d439eee08d8c67e3ffb85b448b575e397944198
4
- data.tar.gz: 4170d4c7ef435d25c74ba47baf650d55b2bf452552be983a853df4be470a7034
3
+ metadata.gz: 415c588b05d60281fb9ce000d231a468ff9bf924f08a91a0d5ab062f4b8c03db
4
+ data.tar.gz: 2663281cf4596d7a59eda6dd0866d589580d38f2a2c3bd547a815800041b8560
5
5
  SHA512:
6
- metadata.gz: fdd9c0a69cb31188ce01230ace81e618e4c14ad92f88f9e6622d2857c253ca6363c34d17bd5c1269cf8a7c7f7338e4a4d463cfde03950616e274ad6dd6129de3
7
- data.tar.gz: eb48499fae1cbe71cb4adb659982b31145a1f29a3d22ce950e25735ac4a2df6e3614641b9b419da35e677a75b84c22358a166a0da2abaaa77857f18613c70a40
6
+ metadata.gz: 8a7456d42265499ebef6ab5df439539e0d6f4c2baae493fdfda5232112a09a1ba67a56c60a0103b44f1643741f576b11510f94e07c34c8f62a83b1c57657b86f
7
+ data.tar.gz: 00f9cee62150cefeedc252988d49cd81cd5aea77507e531e6c7c88930d1a95d27d0ce6283ec46c84884c4d4afaa3f10fdf96677c645ec684670456fec0198775
data/lib/default_where.rb CHANGED
@@ -9,7 +9,7 @@ module DefaultWhere
9
9
  include DefaultWhere::Order
10
10
  include DefaultWhere::Like
11
11
 
12
- REJECT = ['', ' ', nil]
12
+ REJECT = ['', nil]
13
13
  STRIP = true
14
14
 
15
15
  def default_where(params = {}, options = {})
@@ -32,9 +32,9 @@ module DefaultWhere
32
32
  end
33
33
 
34
34
  def params_with_table(params = {}, options = {})
35
- if options[:reject]
35
+ if options.has_key?(:reject)
36
36
  default_reject = [options[:reject]].flatten
37
- elsif options[:allow]
37
+ elsif options.has_key?(:allow)
38
38
  default_reject = REJECT - [options[:allow]].flatten
39
39
  else
40
40
  default_reject = REJECT
@@ -1,3 +1,3 @@
1
1
  module DefaultWhere
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
3
3
  end
metadata CHANGED
@@ -1,55 +1,61 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: default_where
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - qinmingyuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-02 00:00:00.000000000 Z
11
+ date: 2018-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
- version: 4.0.0
22
+ version: '4.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '5.0'
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
- version: 4.0.0
32
+ version: '4.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rdoc
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - ">="
37
+ - - "~>"
32
38
  - !ruby/object:Gem::Version
33
39
  version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - ">="
44
+ - - "~>"
39
45
  - !ruby/object:Gem::Version
40
46
  version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - ">="
51
+ - - "~>"
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - ">="
58
+ - - "~>"
53
59
  - !ruby/object:Gem::Version
54
60
  version: '0'
55
61
  description: Description of QueryScope.