sunspot_matchers 2.1.1.2 → 2.2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/sunspot_matchers/matchers.rb +2 -1
- data/lib/sunspot_matchers/version.rb +1 -1
- data/spec/sunspot_matchers_spec.rb +8 -0
- data/sunspot_matchers.gemspec +1 -1
- metadata +4 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 91130b5b43bec7fefa92d94ceec644dd95afe252
         | 
| 4 | 
            +
              data.tar.gz: a8558874a464392ad0030d4d8eb8c00ee7cd1687
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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. | 
| 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. | 
| 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. | 
| 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. | 
| 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 | 
            -
                     | 
| 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
         | 
| @@ -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
         | 
    
        data/sunspot_matchers.gemspec
    CHANGED
    
    | @@ -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. | 
| 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. | 
| 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- | 
| 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. | 
| 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. | 
| 54 | 
            +
                    version: 2.2.0
         | 
| 55 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 56 56 | 
             
              name: rake
         | 
| 57 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         |