detectify 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/detectify/query_builder/base.rb +2 -2
- data/lib/detectify/query_builder/sql.rb +2 -2
- data/lib/detectify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ec3bcae88270c65a1cad3e2ef7363f4f350165a
|
|
4
|
+
data.tar.gz: 1b92ea3e2d4bbf00a784ffffd2ff4db9756d1f17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa669d705edfc49d87675a1ca83fe28535b776785f62aa8188937a92eccb99f64bdebe5eafd048d49f30a1de5136af873b1c70207f57043b27a4b880691585ee
|
|
7
|
+
data.tar.gz: 6e2b06903766a6bf04953a79d6609fa6615096b69587f4a44e004198d8e68dac06bfa51d741bc735d79ca36b1c043531a91cb251341f4af5e68036dd13b03878
|
|
@@ -4,8 +4,8 @@ module Detectify
|
|
|
4
4
|
attr_reader :domain, :subdomain
|
|
5
5
|
|
|
6
6
|
def initialize(domain, subdomain)
|
|
7
|
-
@domain = domain
|
|
8
|
-
@subdomain = subdomain
|
|
7
|
+
@domain = domain.downcase if domain.is_a?(String)
|
|
8
|
+
@subdomain = subdomain.downcase if subdomain.is_a?(String)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def build
|
|
@@ -13,11 +13,11 @@ module Detectify
|
|
|
13
13
|
private
|
|
14
14
|
|
|
15
15
|
def domain_clause
|
|
16
|
-
"#{Detectify.config.domain_column} = ?" if need_domain_clause?
|
|
16
|
+
"LOWER(#{Detectify.config.domain_column}) = ?" if need_domain_clause?
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def subdomain_clause
|
|
20
|
-
"#{Detectify.config.subdomain_column} = ?" if need_subdomain_clause?
|
|
20
|
+
"LOWER(#{Detectify.config.subdomain_column}) = ?" if need_subdomain_clause?
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def or_operator
|
data/lib/detectify/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: detectify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lukyanov Fedor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|