hq-graphql 2.1.7 → 2.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hq/graphql/enum.rb +2 -1
- data/lib/hq/graphql/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: 2b3620be84fad5d620dfb18c0f51bd0cf726671b49320ec1910bd534ef31d569
|
4
|
+
data.tar.gz: 8974a6d0e3aa4dd0ad5e1dd37b0802c8b70d428365abfdb3342da4fffe66a0cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c67704e43e662552da1818d5f53fcd5acd3bb38da62fb556fac427d590bf002906e58a4a39d7141bc33f22c689c76c9fb1b33cf7b155f9590df0ea9ba8f056b6
|
7
|
+
data.tar.gz: f82c433ab64e9e5d34cb62f51464811621242de62220294766107fe96ad75cbaa665b69a4c99042f5a063c9f22106c1a980dbeee037de3c3e7353c4dd2cd41d0
|
data/lib/hq/graphql/enum.rb
CHANGED
@@ -34,6 +34,7 @@ module HQ::GraphQL
|
|
34
34
|
prefix: nil,
|
35
35
|
register: true,
|
36
36
|
scope: nil,
|
37
|
+
strip: /(^[^_a-zA-Z])|([^_a-zA-Z0-9]*)/,
|
37
38
|
value_method: :name
|
38
39
|
)
|
39
40
|
raise ArgumentError.new(<<~ERROR) if !klass
|
@@ -49,7 +50,7 @@ module HQ::GraphQL
|
|
49
50
|
lazy_load do
|
50
51
|
records = scope ? klass.instance_exec(&scope) : klass.all
|
51
52
|
records.each do |record|
|
52
|
-
value "#{prefix}#{record.send(value_method).
|
53
|
+
value "#{prefix}#{record.send(value_method).gsub(strip, "")}", value: record
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
data/lib/hq/graphql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hq-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|