sunspot_matchers 2.1.1.2 → 2.2.0.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: 2f9638b2e0405f2318ea981cbc3f943391b3c245
4
- data.tar.gz: 3393b79ea2608a515e1eabb9f10ecf7e314d0ead
3
+ metadata.gz: 91130b5b43bec7fefa92d94ceec644dd95afe252
4
+ data.tar.gz: a8558874a464392ad0030d4d8eb8c00ee7cd1687
5
5
  SHA512:
6
- metadata.gz: a3ab73b9fdc51ad5ac5f339a0550a67d4130853946bbe3b0f56711f430bc942194bae261cb6f84d0ddeb421aed7865e6176df3e23c97012f1fcc9b108eee0f39
7
- data.tar.gz: b14ea7b125f77710509c675eab598add202af4a07667c0fbdf9bdbe6560ebe6ade8768f29107ce5953511cf306c4f8ea9949dfee37f02d14660905916ce4186a
6
+ metadata.gz: e13522c0759d9969053f23dd529552b84783b92d5a809c4670fa737845322826f8a32d7291d6612ffcc77f5dfd31314d9207db5f5e393e195c25e7195f32743a
7
+ data.tar.gz: 9d8d5ee9500fa5a6ea413e2bae51223adebe4bf452e92edbab44830c1ffec8ece3285b36e5ef19af3581664344da5c195c47eb65fa968ee3feaa5d502c582951
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sunspot_matchers (2.1.1.1)
4
+ sunspot_matchers (2.2.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,7 +10,7 @@ GEM
10
10
  diff-lcs (1.2.5)
11
11
  pr_geohash (1.0.0)
12
12
  rake (10.4.2)
13
- rsolr (1.0.10)
13
+ rsolr (1.0.12)
14
14
  builder (>= 2.1.2)
15
15
  rspec (3.2.0)
16
16
  rspec-core (~> 3.2.0)
@@ -25,7 +25,7 @@ GEM
25
25
  diff-lcs (>= 1.2.0, < 2.0)
26
26
  rspec-support (~> 3.2.0)
27
27
  rspec-support (3.2.1)
28
- sunspot (2.1.1)
28
+ sunspot (2.2.0)
29
29
  pr_geohash (~> 1.0)
30
30
  rsolr (~> 1.0.7)
31
31
 
@@ -36,5 +36,5 @@ DEPENDENCIES
36
36
  bundler (>= 1.0.0)
37
37
  rake
38
38
  rspec
39
- sunspot (~> 2.1.1)
39
+ sunspot (~> 2.2.0)
40
40
  sunspot_matchers!
@@ -107,7 +107,8 @@ module SunspotMatchers
107
107
  comparison = [comparison] unless comparison.is_a?(Array)
108
108
  filter_values(comparison).reject do |value|
109
109
  next false unless actual
110
- value_matcher = Regexp.new("^#{Regexp.escape(value)}")
110
+ tag_matcher = Regexp.new('{!tag=\w+}')
111
+ value_matcher = Regexp.new("^(#{tag_matcher})?#{Regexp.escape(value)}")
111
112
  actual.any?{ |actual_value| actual_value =~ value_matcher }
112
113
  end
113
114
  end
@@ -1,3 +1,3 @@
1
1
  module SunspotMatchers
2
- VERSION = "2.1.1.2"
2
+ VERSION = "2.2.0.0"
3
3
  end
@@ -233,6 +233,14 @@ describe "Sunspot Matchers" do
233
233
  end
234
234
  expect(Sunspot.session).to_not have_search_params(:with, :blog_id, any_param)
235
235
  end
236
+
237
+ it "works when tags exist on the field query" do
238
+ Sunspot.search(Post) do
239
+ restriction = with :category_ids, 7
240
+ facet :category_ids, exclude: restriction
241
+ end
242
+ expect(Sunspot.session).to have_search_params(:with, :category_ids, 7)
243
+ end
236
244
  end
237
245
 
238
246
  describe "without matcher" do
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_development_dependency "bundler", ">= 1.0.0"
18
18
  s.add_development_dependency "rspec"
19
- s.add_development_dependency "sunspot", "~> 2.1.1"
19
+ s.add_development_dependency "sunspot", "~> 2.2.0"
20
20
  s.add_development_dependency "rake"
21
21
 
22
22
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1.2
4
+ version: 2.2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Palermo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-24 00:00:00.000000000 Z
11
+ date: 2015-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.1.1
47
+ version: 2.2.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 2.1.1
54
+ version: 2.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement