form_stalker 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/form_stalker/data/check_logic.rb +7 -1
- data/lib/form_stalker/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: f9b53d8d01b3c038a6691ea9d99be24f0053b575
|
4
|
+
data.tar.gz: 5bce75bc933758fd2f8b807e019f5f66432ed246
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 681f0a9d056a3b80bfecce553e2b356005a7a6f945c3fd8291b381e0f9c989f84e2e22653546d18b414d669aaccaa02c4b09ef58ee3ac06c274b6eb8d9e6ead4
|
7
|
+
data.tar.gz: 43813697816d2fd2ec4ac68d3473d3855613cd6af788070ad6b9e3b27d6f20910497d5c6a9e480efe8f786daa34d8f3326e7e7b421c4f497fd408d26b7c51c32
|
@@ -24,13 +24,19 @@ module FormStalker
|
|
24
24
|
protected ####################### PROTECTED ##############################
|
25
25
|
|
26
26
|
def js_to_json(js_object)
|
27
|
-
|
27
|
+
split(js_object).map(&:strip).map do |js_string|
|
28
28
|
escape_js_to_json(js_string)
|
29
29
|
end.join(', ')
|
30
30
|
end
|
31
31
|
|
32
32
|
private ######################### PRIVATE ################################
|
33
33
|
|
34
|
+
def split(js_object)
|
35
|
+
js_object
|
36
|
+
.split(/(,)(?=(?:[^']|'[^']*')*$)/)
|
37
|
+
.reject { |string| string == ',' }
|
38
|
+
end
|
39
|
+
|
34
40
|
def escape_js_to_json(js_string)
|
35
41
|
string = js_string.tr('"', '\"')
|
36
42
|
.tr("'", '"')
|
data/lib/form_stalker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: form_stalker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StreetBees Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vcr
|