detectify 1.0.4 → 1.0.5

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
  SHA1:
3
- metadata.gz: ee24aedba33f12a4281638b51dd4ba413fec2860
4
- data.tar.gz: 110f8f81d190fb8559794abe5122b748684a71e0
3
+ metadata.gz: 2ec3bcae88270c65a1cad3e2ef7363f4f350165a
4
+ data.tar.gz: 1b92ea3e2d4bbf00a784ffffd2ff4db9756d1f17
5
5
  SHA512:
6
- metadata.gz: c124520872ef5b179e9189cb2545e797ec68c56c34f8c703022ca2894447f3f938be1937c80a7cb3e78ae21b2a0b37d6089e9966d41252d7e38b84940f29a51e
7
- data.tar.gz: 6bcc81ecfeebbeefb9a0a5463ab14c25bf334c0a65fb00ab7300b750115475c7d5a20154be5ca514415cda039bc9afbc8159772aa988306c0de115b8ca6824aa
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
@@ -1,3 +1,3 @@
1
1
  module Detectify
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.5'.freeze
3
3
  end
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
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-07-19 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack