jsonapi_compliable 0.11.24 → 0.11.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi_compliable/scoping/filter.rb +4 -3
- data/lib/jsonapi_compliable/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: acf72913f3b6e1195890cc3acab2cb8495f93833
|
4
|
+
data.tar.gz: 5cd4565c47b237c7a8a93184186153e561ab189d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24e4611a4f68c86fb9c53a8f3696f858a2be6cf2841b75c703ae31eeea472df24ceaf923879fa1030ab1c8d365443556147ea7c947790ad5cd9b32cb7b4faa68
|
7
|
+
data.tar.gz: edd3c317eedc9bb83ec74f66a9d412ddad38b0fc599ca25093559a988b44a9f1968b28c02d93ab39c7ab866a4b97ea8146ba286eec07a4e2201ca99694de5fc3
|
@@ -59,17 +59,18 @@ module JsonapiCompliable
|
|
59
59
|
end
|
60
60
|
|
61
61
|
# foo,bar,baz becomes ["foo", "bar", "baz"]
|
62
|
+
# {{foo}} becomes ["foo"]
|
62
63
|
# {{foo,bar}},baz becomes ["foo,bar", "baz"]
|
63
64
|
def parse_string_arrays(value)
|
64
|
-
if value.is_a?(String)
|
65
|
-
#
|
65
|
+
if value.is_a?(String)
|
66
|
+
# Find the quoted strings
|
66
67
|
quotes = value.scan(/{{.*?}}/)
|
67
68
|
# remove them from the rest
|
68
69
|
quotes.each { |q| value.gsub!(q, '') }
|
69
70
|
# remove the quote characters from the quoted strings
|
70
71
|
quotes.each { |q| q.gsub!('{{', '').gsub!('}}', '') }
|
71
72
|
# merge everything back together into an array
|
72
|
-
value = value.split(',') + quotes
|
73
|
+
value = Array(value.split(',')) + quotes
|
73
74
|
# remove any blanks that are left
|
74
75
|
value.reject! { |v| v.length.zero? }
|
75
76
|
value = value[0] if value.length == 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_compliable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jsonapi-serializable
|