effective_qb_online 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/qb_api.rb +5 -3
- data/lib/effective_qb_online/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2ddde7401c7aaaa2461796d66a640bf9ec38ab749ec858f8ef5e5a403885fb6
|
4
|
+
data.tar.gz: bf8a3d9c0ca0ea906d32e841aede9b8e05fd9b04675f54fb84e7472fa2a1b533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceeb4d37581de7b426ef5fde3f43ef4d2efcb50e75b2b715cfd9ddf91aa827d07fcf75a1f693c5fb9f89c92c7be03364596d0ac56918d13fff2618f38e723e4e
|
7
|
+
data.tar.gz: b161ebde1d8c67e80e95d45a689c7327594920ac4e4b75ccb9e1b581c01abec425609363dc4b1f55d96a5435976812e596a84dab6c58a7c9035c6ae790c1020e
|
@@ -110,7 +110,7 @@ module Effective
|
|
110
110
|
|
111
111
|
# Find by given name and family name
|
112
112
|
customer ||= if user.respond_to?(:first_name) && user.respond_to?(:last_name)
|
113
|
-
service.query("SELECT * FROM Customer WHERE GivenName LIKE '#{scrub(user.first_name)}' AND FamilyName LIKE '#{scrub(user.last_name)}'")&.first
|
113
|
+
service.query("SELECT * FROM Customer WHERE GivenName LIKE '#{scrub(user.first_name, sql: true)}' AND FamilyName LIKE '#{scrub(user.last_name, sql: true)}'")&.first
|
114
114
|
end
|
115
115
|
|
116
116
|
# Find by display name
|
@@ -217,9 +217,11 @@ module Effective
|
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
220
|
-
def scrub(value)
|
220
|
+
def scrub(value, sql: false)
|
221
221
|
return nil unless value.present?
|
222
|
-
value.gsub(':', '')
|
222
|
+
value = value.gsub(':', '')
|
223
|
+
value = value.gsub("'", "\\'") if sql
|
224
|
+
value
|
223
225
|
end
|
224
226
|
|
225
227
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_qb_online
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|