ts-sidekiq-delta 0.3.0 → 0.4.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/README.markdown +2 -2
- data/lib/thinking_sphinx/deltas/sidekiq_delta/delta_job.rb +1 -1
- data/lib/thinking_sphinx/deltas/sidekiq_delta/flag_as_deleted_job.rb +1 -1
- data/spec/acceptance/sidekiq_deltas_spec.rb +2 -2
- data/spec/acceptance/support/database_cleaner.rb +2 -4
- data/spec/acceptance/support/sphinx_controller.rb +0 -7
- data/spec/acceptance/support/sphinx_helpers.rb +3 -2
- data/spec/internal/app/models/book.rb +3 -1
- data/ts-sidekiq-delta.gemspec +2 -2
- metadata +8 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 34668cf810659d724a770fabad19841b92e40cb06f22d79f5df942e6d4c7bb15
         | 
| 4 | 
            +
              data.tar.gz: 0fa4dac9ab3ebfc622b439f6a3d84abe702e0a22613dc318d77531180439295f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4af5489c0957f6b9e75d2903c42c20d6ad17dd46d206cbaf26fe0fce03307645a7373e272d433ed02a56bfcea922d33b8c062f2cf4ed00db9d980182df540d2a
         | 
| 7 | 
            +
              data.tar.gz: 36af1174a628ed52eca178d64842123543d4c55e67aaba6d158bf5711277952374ad46385882c5e85964dfa9a711baaf9f70aee22409c9f020dca4cef0e148f4
         | 
    
        data/README.markdown
    CHANGED
    
    | @@ -8,7 +8,7 @@ This version of `ts-sidekiq-delta` works only with [Thinking Sphinx](https://git | |
| 8 8 |  | 
| 9 9 | 
             
            Get it into your Gemfile - and don't forget the version constraint!
         | 
| 10 10 |  | 
| 11 | 
            -
                gem 'ts-sidekiq-delta', '~> 0. | 
| 11 | 
            +
                gem 'ts-sidekiq-delta', '~> 0.4.0'
         | 
| 12 12 |  | 
| 13 13 | 
             
            If you're using Thinking Sphinx v3.0.x, you'll need to jump back to the 0.1.0 release of this gem.
         | 
| 14 14 |  | 
| @@ -37,4 +37,4 @@ Make sure you have a sidekiq worker monitoring the `ts_delta` queue. | |
| 37 37 |  | 
| 38 38 | 
             
            ## Licence
         | 
| 39 39 |  | 
| 40 | 
            -
            Copyright (c) 2013, ts-sidekiq-delta was originally developed by Danny Hawkins, is currently maintained by Pat Allan, and is released under the open MIT Licence.
         | 
| 40 | 
            +
            Copyright (c) 2013-2021, ts-sidekiq-delta was originally developed by Danny Hawkins, is currently maintained by Pat Allan, and is released under the open MIT Licence.
         | 
| @@ -3,7 +3,7 @@ | |
| 3 3 | 
             
            class ThinkingSphinx::Deltas::SidekiqDelta::DeltaJob
         | 
| 4 4 | 
             
              include Sidekiq::Worker
         | 
| 5 5 |  | 
| 6 | 
            -
              sidekiq_options lock: :until_executed, retry: true, queue: 'ts_delta',  | 
| 6 | 
            +
              sidekiq_options lock: :until_executed, retry: true, queue: 'ts_delta', lock_prefix: 'tsdelta'
         | 
| 7 7 |  | 
| 8 8 | 
             
              # Runs Sphinx's indexer tool to process the index.
         | 
| 9 9 | 
             
              #
         | 
| @@ -3,7 +3,7 @@ class ThinkingSphinx::Deltas::SidekiqDelta::FlagAsDeletedJob | |
| 3 3 |  | 
| 4 4 | 
             
              # Runs Sphinx's indexer tool to process the index. Currently assumes Sphinx
         | 
| 5 5 | 
             
              # is running.
         | 
| 6 | 
            -
              sidekiq_options lock: :until_executed, retry: true, queue: 'ts_delta',  | 
| 6 | 
            +
              sidekiq_options lock: :until_executed, retry: true, queue: 'ts_delta', lock_prefix: "tsflagasdeleted"
         | 
| 7 7 |  | 
| 8 8 | 
             
              def perform(index, document_id)
         | 
| 9 9 | 
             
                ThinkingSphinx::Deltas::DeleteJob.new(index, document_id).perform
         | 
| @@ -28,7 +28,7 @@ describe 'SQL delta indexing', :live => true do | |
| 28 28 |  | 
| 29 29 | 
             
                Book.search('Harry').to_a.should == [book]
         | 
| 30 30 |  | 
| 31 | 
            -
                book.reload. | 
| 31 | 
            +
                book.reload.update!(:author => 'Terry Pratchett')
         | 
| 32 32 | 
             
                work
         | 
| 33 33 | 
             
                sleep 0.25
         | 
| 34 34 |  | 
| @@ -41,7 +41,7 @@ describe 'SQL delta indexing', :live => true do | |
| 41 41 |  | 
| 42 42 | 
             
                Book.search('Harry').to_a.should == [book]
         | 
| 43 43 |  | 
| 44 | 
            -
                book.reload. | 
| 44 | 
            +
                book.reload.update!(:author => 'Terry Pratchett')
         | 
| 45 45 | 
             
                work
         | 
| 46 46 | 
             
                sleep 0.25
         | 
| 47 47 |  | 
| @@ -7,13 +7,6 @@ class SphinxController | |
| 7 7 | 
             
                FileUtils.mkdir_p config.indices_location
         | 
| 8 8 | 
             
                config.render_to_file && index
         | 
| 9 9 |  | 
| 10 | 
            -
                ThinkingSphinx::Configuration.reset
         | 
| 11 | 
            -
                ActiveSupport::Dependencies.clear
         | 
| 12 | 
            -
             | 
| 13 | 
            -
                config.index_paths.each do |path|
         | 
| 14 | 
            -
                  Dir["#{path}/**/*.rb"].each { |file| $LOADED_FEATURES.delete file }
         | 
| 15 | 
            -
                end
         | 
| 16 | 
            -
             | 
| 17 10 | 
             
                config.searchd.mysql41 = 9307
         | 
| 18 11 | 
             
                config.settings['quiet_deltas']      = true
         | 
| 19 12 | 
             
                config.settings['attribute_updates'] = true
         | 
| @@ -14,10 +14,11 @@ module SphinxHelpers | |
| 14 14 | 
             
              end
         | 
| 15 15 |  | 
| 16 16 | 
             
              def work
         | 
| 17 | 
            -
                client    = Redis. | 
| 17 | 
            +
                client    = Redis.new(:url => "redis://localhost:6379/")
         | 
| 18 18 | 
             
                namespace = Redis::Namespace.new('test', :redis => client)
         | 
| 19 19 |  | 
| 20 | 
            -
                 | 
| 20 | 
            +
                queues = namespace.sscan_each("queues").to_a
         | 
| 21 | 
            +
                queues.each do |queue_name|
         | 
| 21 22 | 
             
                  while message = namespace.lpop("queue:#{queue_name}")
         | 
| 22 23 | 
             
                    message = JSON.parse(message)
         | 
| 23 24 | 
             
                    message['class'].constantize.new.perform(*message['args'])
         | 
    
        data/ts-sidekiq-delta.gemspec
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            # -*- encoding: utf-8 -*-
         | 
| 2 2 | 
             
            Gem::Specification.new do |s|
         | 
| 3 3 | 
             
              s.name        = 'ts-sidekiq-delta'
         | 
| 4 | 
            -
              s.version     = '0. | 
| 4 | 
            +
              s.version     = '0.4.0'
         | 
| 5 5 | 
             
              s.platform    = Gem::Platform::RUBY
         | 
| 6 6 | 
             
              s.authors     = ['Pat Allan', 'Aaron Gibralter', 'Danny Hawkins']
         | 
| 7 7 | 
             
              s.email       = ['pat@freelancing-gods.com', 'danny.hawkins@gmail.com']
         | 
| @@ -17,7 +17,7 @@ Gem::Specification.new do |s| | |
| 17 17 |  | 
| 18 18 | 
             
              s.add_dependency 'thinking-sphinx',     '>= 3.1.0'
         | 
| 19 19 | 
             
              s.add_dependency 'sidekiq',             '>= 2.5.4'
         | 
| 20 | 
            -
              s.add_dependency 'sidekiq-unique-jobs', '>=  | 
| 20 | 
            +
              s.add_dependency 'sidekiq-unique-jobs', '>= 7.0.0'
         | 
| 21 21 |  | 
| 22 22 | 
             
              s.add_development_dependency 'activerecord',     '>= 3.1.0'
         | 
| 23 23 | 
             
              s.add_development_dependency 'combustion'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,16 +1,16 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ts-sidekiq-delta
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.4.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Pat Allan
         | 
| 8 8 | 
             
            - Aaron Gibralter
         | 
| 9 9 | 
             
            - Danny Hawkins
         | 
| 10 | 
            -
            autorequire: | 
| 10 | 
            +
            autorequire:
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date:  | 
| 13 | 
            +
            date: 2021-12-22 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: thinking-sphinx
         | 
| @@ -46,14 +46,14 @@ dependencies: | |
| 46 46 | 
             
                requirements:
         | 
| 47 47 | 
             
                - - ">="
         | 
| 48 48 | 
             
                  - !ruby/object:Gem::Version
         | 
| 49 | 
            -
                    version:  | 
| 49 | 
            +
                    version: 7.0.0
         | 
| 50 50 | 
             
              type: :runtime
         | 
| 51 51 | 
             
              prerelease: false
         | 
| 52 52 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 53 53 | 
             
                requirements:
         | 
| 54 54 | 
             
                - - ">="
         | 
| 55 55 | 
             
                  - !ruby/object:Gem::Version
         | 
| 56 | 
            -
                    version:  | 
| 56 | 
            +
                    version: 7.0.0
         | 
| 57 57 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 58 58 | 
             
              name: activerecord
         | 
| 59 59 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -216,7 +216,7 @@ homepage: https://github.com/pat/ts-sidekiq-delta | |
| 216 216 | 
             
            licenses:
         | 
| 217 217 | 
             
            - MIT
         | 
| 218 218 | 
             
            metadata: {}
         | 
| 219 | 
            -
            post_install_message: | 
| 219 | 
            +
            post_install_message:
         | 
| 220 220 | 
             
            rdoc_options: []
         | 
| 221 221 | 
             
            require_paths:
         | 
| 222 222 | 
             
            - lib
         | 
| @@ -231,8 +231,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 231 231 | 
             
                - !ruby/object:Gem::Version
         | 
| 232 232 | 
             
                  version: '0'
         | 
| 233 233 | 
             
            requirements: []
         | 
| 234 | 
            -
            rubygems_version: 3. | 
| 235 | 
            -
            signing_key: | 
| 234 | 
            +
            rubygems_version: 3.2.32
         | 
| 235 | 
            +
            signing_key:
         | 
| 236 236 | 
             
            specification_version: 4
         | 
| 237 237 | 
             
            summary: Thinking Sphinx - Sidekiq Deltas
         | 
| 238 238 | 
             
            test_files:
         |