nexia_worker_roulette 0.2.5 → 0.2.6

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: 29ea96811bb1fee09f9890edd8da8b0776ddae16
4
- data.tar.gz: 2b875564d66d96424c2100efea12372c481dbfea
3
+ metadata.gz: b27103027e8104f2bdfc46d1eadc13b0ad18254c
4
+ data.tar.gz: 49d40d641d1ba90e0bc5cb0c645e87071f2e0e47
5
5
  SHA512:
6
- metadata.gz: ee45c6f5f956e5577ef34ff6a9b2a1b87a865bb51b26d04f91c1a90fdf343297525f232dc492bf8762a2a2334c3670007c7acc2915eb756132dd6f1f1baa2265
7
- data.tar.gz: 86056140c9bc91168606265ee34f1f431b63bfb11015ac2defaff1919d9109974039057373dee76cd98d1f773b2fe902e22f4111933eef530786098dc261d809
6
+ metadata.gz: c0febfc96cc5e64720cf08079d42abb92f6e8eede7ce32e9be0340c4407a4e25e044bdaa5c6bd7ab5ce7e4b2e8f38c11ca01f373c0ca106288d06d416b2e17c9
7
+ data.tar.gz: 2d958c6ede7035620241580a5ce3563ba8cdd30d483cb9bf45fef040fc72607ecb72510639341d5b54e4114f4aac106e8bb544332a9cc2f5772f20091d092202
@@ -49,8 +49,7 @@ module WorkerRoulette
49
49
  end
50
50
 
51
51
  def self.start(config = {})
52
- instance = new(config)
53
- instance
52
+ new(config)
54
53
  end
55
54
 
56
55
  private_class_method :new
@@ -1,3 +1,3 @@
1
1
  module WorkerRoulette
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
@@ -12,14 +12,15 @@ module WorkerRoulette
12
12
  let(:foreman_work_order) { Hash["payload" => "foreman"] }
13
13
  let(:work_orders_with_headers) { default_headers.merge({ "payload" => work_orders }) }
14
14
  let(:jsonized_work_orders_with_headers) { [WorkerRoulette.dump(work_orders_with_headers)] }
15
- let(:metric_tracker) {
15
+
16
+ let(:metric_tracker) {
16
17
  {
17
18
  metric_host: "localhost",
18
19
  metric_host_port: 7777
19
20
  }
20
21
  }
21
- let(:worker_roulette) { WorkerRoulette.start(evented: true, metric_tracker: metric_tracker) }
22
- let(:redis) { Redis.new(worker_roulette.redis_config) }
22
+ let(:worker_roulette) { WorkerRoulette.start(evented: true, metric_tracker: metric_tracker, host: '127.0.0.1') }
23
+ let(:redis) { Redis.new(worker_roulette.redis_config) }
23
24
 
24
25
  before do
25
26
  allow(Time).to receive(:now).and_return(queued_at)
@@ -14,7 +14,7 @@ module WorkerRoulette
14
14
  let(:foreman_work_order) { Hash['payload' => "foreman"] }
15
15
  let(:work_orders_with_headers) { default_headers.merge({ 'payload' => work_orders }) }
16
16
  let(:jsonized_work_orders_with_headers) { [WorkerRoulette.dump(work_orders_with_headers)] }
17
- let(:worker_roulette) { WorkerRoulette.start(evented: false, metric_tracker: metric_tracker) }
17
+ let(:worker_roulette) { WorkerRoulette.start(evented: false, metric_tracker: metric_tracker, host: '127.0.0.1') }
18
18
  let(:metric_tracker) { nil }
19
19
 
20
20
  let(:redis) { Redis.new(worker_roulette.redis_config) }
@@ -12,7 +12,7 @@ module WorkerRoulette
12
12
 
13
13
  RSpec.configure do |c|
14
14
  c.after(:each) do
15
- Redis.new(WorkerRoulette.start.redis_config).flushdb
15
+ Redis.new(WorkerRoulette.start.redis_config.merge(host: '127.0.0.1')).flushdb
16
16
  end
17
17
  end
18
18
  end
@@ -10,7 +10,7 @@ module WorkerRoulette
10
10
  let(:queued_at) { 1234567 }
11
11
  let(:default_headers) { Hash["headers" => { "sender" => sender, "queued_at" => (queued_at.to_f * 1_000_000).to_i }] }
12
12
  let(:work_orders_with_headers) { default_headers.merge({ "payload" => work_orders }) }
13
- let(:worker_roulette) { WorkerRoulette.start(evented: true) }
13
+ let(:worker_roulette) { WorkerRoulette.start(evented: true, host: '127.0.0.1') }
14
14
  let(:foreman1) { worker_roulette.foreman(sender) }
15
15
  let(:foreman2) { worker_roulette.foreman("foreman2") }
16
16
  let(:tradesman2 ) { worker_roulette.tradesman }
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  module WorkerRoulette
3
3
  describe Lua do
4
4
  include EventedSpec::EMSpec
5
- let(:worker_roulette) {WorkerRoulette.start(evented: true)}
5
+ let(:worker_roulette) {WorkerRoulette.start(evented: true, host: '127.0.0.1') }
6
6
  let(:lua) { Lua.new(worker_roulette.tradesman_connection_pool) }
7
7
  let(:redis) {Redis.new(worker_roulette.redis_config)}
8
8
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency 'hiredis', '~> 0.5'
23
23
  spec.add_dependency 'em-hiredis', '~> 0.3'
24
24
  spec.add_dependency 'connection_pool', '~> 2.0'
25
- spec.add_dependency 'eventmachine', '~> 1.0.0'
25
+ spec.add_dependency 'eventmachine', '~> 1.0'
26
26
 
27
27
  spec.add_development_dependency 'bundler', '~> 1.7'
28
28
  spec.add_development_dependency 'rake', '~> 10.3'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexia_worker_roulette
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Saieg
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: 1.0.0
91
+ version: '1.0'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: 1.0.0
98
+ version: '1.0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: bundler
101
101
  requirement: !ruby/object:Gem::Requirement
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  version: '0'
257
257
  requirements: []
258
258
  rubyforge_project:
259
- rubygems_version: 2.5.1
259
+ rubygems_version: 2.4.5.1
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: Pub Sub Queue for Redis that ensures ordered processing