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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb02d8ac286808a6ec7c77a888691740036aedb2e570b0cd493ffd52723ecbae
4
- data.tar.gz: 84aac61cd4de7dc2d38fa9e325efade24f06c892db0a9fd89f0fa9ca96d43340
3
+ metadata.gz: 2b3620be84fad5d620dfb18c0f51bd0cf726671b49320ec1910bd534ef31d569
4
+ data.tar.gz: 8974a6d0e3aa4dd0ad5e1dd37b0802c8b70d428365abfdb3342da4fffe66a0cb
5
5
  SHA512:
6
- metadata.gz: 0a8ff7468d91f94463b8311daa52468229414193982b1e110ab80ded645780792086c15f4a96844761c276e0f4916af36309cc3dc9749967c677a342ebd669f7
7
- data.tar.gz: 8b4342e2b679c368941ee81ded4d3f4b4946576a7e6f65c2fd16bd830257233de7123f170068f262bc17d0b9fe1b0de179252624a23204c7312590d6e401f5ba
6
+ metadata.gz: c67704e43e662552da1818d5f53fcd5acd3bb38da62fb556fac427d590bf002906e58a4a39d7141bc33f22c689c76c9fb1b33cf7b155f9590df0ea9ba8f056b6
7
+ data.tar.gz: f82c433ab64e9e5d34cb62f51464811621242de62220294766107fe96ad75cbaa665b69a4c99042f5a063c9f22106c1a980dbeee037de3c3e7353c4dd2cd41d0
@@ -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).delete(": ")}", value: record
53
+ value "#{prefix}#{record.send(value_method).gsub(strip, "")}", value: record
53
54
  end
54
55
  end
55
56
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module HQ
4
4
  module GraphQL
5
- VERSION = "2.1.7"
5
+ VERSION = "2.1.8"
6
6
  end
7
7
  end
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.7
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-17 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails