backframe 0.0.34 → 0.0.35

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: dd30a69f4ad3280be12ca8390ccb69ff46b2df45
4
- data.tar.gz: 54bbc817050e0b6e80e45116b16fd7404767df8c
3
+ metadata.gz: 76ad813263368a934f83c57b2148506385542150
4
+ data.tar.gz: 036b8c08c5fe57f6cdd426c4de2c08b13e076d4b
5
5
  SHA512:
6
- metadata.gz: ad9a0e0374ea0bdeffd0c2379a3e4da5a12f1635bc3c6a87d3eb2032e037b4e8646eef1bf6b20806d6829ed8a46a4807c7056dfc78686f8ea114f3657b6fa3ec
7
- data.tar.gz: 01476f8f0be8a5d18e21539df7b32ee0bc2e4b20d2e94de8ee6e7b37a7fb163db7871442cfa36d5c9587ca6b0eef3db2f677d15956dc757a0de805918ae2da98
6
+ metadata.gz: 1531c98115b1fd7ffcc32f04bfb4803fdad9f577a7bd239165039cf9dcde9cc8a77a88faec9ede2b4db43b9ab4f0abdd64c781fc824617c30f939ed75b39eaf7
7
+ data.tar.gz: cebf6520d46729d06d95739532df70585bc5bdbc05510686e2a1b20d7c576394f979cc797ac4f0a32b57ed12541aef41418aa6bb76eed83f41f37aadce152ae6
@@ -26,7 +26,7 @@ module Backframe
26
26
  private
27
27
 
28
28
  def uncast_phone_#{entity}
29
- self.#{entity} = Phony.format(self.#{entity}, :format => '%{ndc}-%{local}')
29
+ self.#{entity} = self.#{entity}[0]+'-'+self.#{entity}[1,3]+'-'+self.#{entity}[4,3]+'-'+self.#{entity}[7,4]
30
30
  end
31
31
 
32
32
  def cast_phone_#{entity}
@@ -41,8 +41,7 @@ module Backframe
41
41
  end
42
42
 
43
43
  def #{entity}_to_international(value)
44
- regex = Regexp.new('[\\s\\\.\\\-\\\(\\\)]')
45
- newvalue = value.gsub(regex, '')
44
+ newvalue = value.gsub('(', '').gsub(')', '').gsub('.', '').gsub('-', '').gsub(' ', '')
46
45
  newvalue = (newvalue.length == 10) ? '1'+value : value
47
46
  Phony.normalize(newvalue)
48
47
  end
@@ -10,7 +10,8 @@ module Backframe
10
10
  conditions = []
11
11
  params = []
12
12
  fields.each do |field|
13
- conditions << "LOWER(\"#{self.table_name}\".\"#{field}\"::VARCHAR) LIKE ?"
13
+ column = (field.match(/.*\..*/)) ? field : "LOWER(\"#{self.table_name}\".\"#{field}\""
14
+ conditions << "#{column}::VARCHAR) LIKE ?"
14
15
  params << '%'+filters[:q].downcase+'%'
15
16
  end
16
17
  args = params.unshift(conditions.join(' OR '))
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Backframe
4
- VERSION = '0.0.34'
4
+ VERSION = '0.0.35'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backframe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kops
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-26 00:00:00.000000000 Z
12
+ date: 2016-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: write_xlsx