simplec 0.7.1 → 0.8.0

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
  SHA1:
3
- metadata.gz: b0b7d4593344d7269aa06e45087efda7849a7651
4
- data.tar.gz: 0fa8f29b58a5d090641b5b888709b8cbff12eb98
3
+ metadata.gz: 60e1f58d4c9b9f14e5f5b351649420083c35e457
4
+ data.tar.gz: f5242acb988463f804efdb1b9707cfd8a1c1011b
5
5
  SHA512:
6
- metadata.gz: 95c9af9159b2f4e1d0c97ea56ce8a3630de1c87348b406302d085d7920bc52a91a77533b232fb9cb433ec7aba4999620995938a65cc9fefa7291904798ab8c8a
7
- data.tar.gz: 7e6258e48fedf02c613a691662c8198de8eb7a218b85d8b06e5c5d5c03eca1afdb00ccbf6d1b0c6e99c306fc21d439da7f37a3bce15db71378e0f18c5daedf7b
6
+ metadata.gz: 449575640f16da976384986804fc3906cbd5ce3558a1b3928d8ebefb05ae0f9a4b8e34473218301deb1fa7ea8d249dab28247fab300df94a8a096ef2d8368684
7
+ data.tar.gz: bc82948bcc1feb8e4715bb774b7b2f1957e2a1e3e2db855147c216860647cb3d06a791cd3f7403a42d847c4aae3c4bdcef1e7989564c02ccfc552226f563a0ea
@@ -105,8 +105,11 @@ module Simplec
105
105
  # @!scope class
106
106
  scope :search, ->(term, options={}) {
107
107
  _types = Array(options.delete(:types))
108
+ _subdomains = Array(options.delete(:subdomains))
108
109
 
109
110
  query = all
111
+ query = query.includes(:subdomain).
112
+ where(simplec_subdomains: {name: _subdomains}) if _subdomains.any?
110
113
  query = query.where(type: _types) if _types.any?
111
114
  options.each { |k,v| query = query.where("query->>:k = :v", k: k, v: v) }
112
115
 
@@ -1,3 +1,3 @@
1
1
  module Simplec
2
- VERSION = '0.7.1'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-20 00:00:00.000000000 Z
11
+ date: 2017-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails