makandra_sidekiq 0.1.3 → 0.1.4
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 +5 -5
- data/.travis.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/README.md +11 -0
- data/lib/makandra_sidekiq/sidekiq_control.rb +12 -2
- data/lib/makandra_sidekiq/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: d1a031fd7e128b55c5af83a18fd3c66b1bce4253a71506d3d7d6e5ea863ede57
         | 
| 4 | 
            +
              data.tar.gz: 797ec99395f49ab6099288054b407a8b2b7f277539037662aaae9329bc13ce24
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 9cb9832fe0e4c3ab143abcd544bd76b30dda4d916f35ce2536e2f4f7158c10dfbd9988ddfdd49be1750fa616966f284cfc58c1326b6411381b5efd11a77860a4
         | 
| 7 | 
            +
              data.tar.gz: 13881f0bd8099f15bcf8c838b256d33e0f5b7dd7542696f696f1a6cc973ca2517fa8b42a796d152fcdc2c1941453caed35be51613914377963692c99e729cca7
         | 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -2,6 +2,10 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            All notable changes to this project will be documented in this file.
         | 
| 4 4 |  | 
| 5 | 
            +
            ## [0.1.3][] (2017-02-13)
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            Gem no longer depends on `capistrano`, since using its Capistrano recipes is optional.
         | 
| 8 | 
            +
             | 
| 5 9 | 
             
            ## [0.1.2][] (2017-01-12)
         | 
| 6 10 |  | 
| 7 11 | 
             
            `sidekiq:start` checks that sidekiq really comes up and will retry a few times.
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -27,6 +27,17 @@ Make sure you include at least `:pidfile` and `:logfile`. Sane values are | |
| 27 27 | 
             
            :logfile: ./log/sidekiq.log
         | 
| 28 28 | 
             
            ```
         | 
| 29 29 |  | 
| 30 | 
            +
             | 
| 31 | 
            +
            ### Passing additional options to sidekiq
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            Sometimes you will have to pass additional options to the sidekiq binary. You can do this by adding
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            ```
         | 
| 36 | 
            +
            :sidekiq_command_line_args: '--some --options'
         | 
| 37 | 
            +
            ```
         | 
| 38 | 
            +
            to your `config/sidekiq.yml`.
         | 
| 39 | 
            +
             | 
| 40 | 
            +
             | 
| 30 41 | 
             
            ### Capistrano
         | 
| 31 42 |  | 
| 32 43 | 
             
            makandra_sidekiq comes with [Capistrano](https://github.com/capistrano/capistrano) recipes to call its rake tasks for (re)starting Sidekiq during deployment.
         | 
| @@ -1,3 +1,4 @@ | |
| 1 | 
            +
            require 'bundler'
         | 
| 1 2 | 
             
            require 'pathname'
         | 
| 2 3 | 
             
            require 'yaml'
         | 
| 3 4 | 
             
            require 'open3'
         | 
| @@ -131,17 +132,26 @@ module MakandraSidekiq | |
| 131 132 | 
             
                    '--index', sidekiq_index.to_s,
         | 
| 132 133 | 
             
                    '--environment', rails_env,
         | 
| 133 134 | 
             
                    '--config', config_path.to_s,
         | 
| 134 | 
            -
                    '--daemon'
         | 
| 135 | 
            +
                    '--daemon',
         | 
| 136 | 
            +
                    *additional_command_line_args,
         | 
| 135 137 | 
             
                  ]
         | 
| 136 138 | 
             
                  bundle_exec('sidekiq', *arguments)
         | 
| 137 139 | 
             
                end
         | 
| 138 140 |  | 
| 141 | 
            +
                def additional_command_line_args
         | 
| 142 | 
            +
                  if (raw_args = @config[:sidekiq_command_line_args])
         | 
| 143 | 
            +
                    raw_args.split(' ')
         | 
| 144 | 
            +
                  else
         | 
| 145 | 
            +
                    []
         | 
| 146 | 
            +
                  end
         | 
| 147 | 
            +
                end
         | 
| 148 | 
            +
             | 
| 139 149 | 
             
                def sidekiq_index
         | 
| 140 150 | 
             
                  ENV['SIDEKIQ_INDEX'] || 0
         | 
| 141 151 | 
             
                end
         | 
| 142 152 |  | 
| 143 153 | 
             
                def bundle_exec(*command)
         | 
| 144 | 
            -
                  stdout_str, stderr_str, status = Open3.capture3('bundle', 'exec', *command, chdir: @root.to_s)
         | 
| 154 | 
            +
                  stdout_str, stderr_str, status = Bundler.with_clean_env { Open3.capture3('bundle', 'exec', *command, chdir: @root.to_s) }
         | 
| 145 155 | 
             
                  puts stdout_str
         | 
| 146 156 | 
             
                  unless status.success?
         | 
| 147 157 | 
             
                    fail "#{command} failed with message: #{stderr_str}"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: makandra_sidekiq
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Tobias Kraze
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2018-07-11 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 97 97 | 
             
                  version: '0'
         | 
| 98 98 | 
             
            requirements: []
         | 
| 99 99 | 
             
            rubyforge_project: 
         | 
| 100 | 
            -
            rubygems_version: 2. | 
| 100 | 
            +
            rubygems_version: 2.7.6
         | 
| 101 101 | 
             
            signing_key: 
         | 
| 102 102 | 
             
            specification_version: 4
         | 
| 103 103 | 
             
            summary: Support code for sidekiq, including rake tasks and capistrano recipes.
         |