rservicebus2 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rservicebus2/agent.rb +1 -0
- data/lib/rservicebus2/appresource/dir.rb +1 -0
- data/lib/rservicebus2/appresource_configure.rb +4 -1
- data/lib/rservicebus2/endpointmapping.rb +1 -1
- data/lib/rservicebus2/monitor/csvdir.rb +1 -1
- data/lib/rservicebus2/mq.rb +1 -1
- data/lib/rservicebus2/mq/beanstalk.rb +2 -1
- data/lib/rservicebus2/saga_storage/dir.rb +1 -0
- data/lib/rservicebus2/sendat_storage/inmemory.rb +14 -14
- data/lib/rservicebus2/state_storage/dir.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66b583f35d22632de50cebffc0f14da977b34ebe
|
4
|
+
data.tar.gz: af799890c57aa6da4b9131b86b7e7d09d2b0164c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33a47a2626517b000f718fa1d82e0380bad8517aa6a82969035fafe19a80ba435ff0fec5235c313825763732bbf7807a4018644f444d5ae2cf994d728f4c65d6
|
7
|
+
data.tar.gz: 9dabddd4f50f500082260806b8a2e93d71a951a81c9fc8da7a6d75d799e165ded827d0a4258aeaacf2d4fa3507adf035e28cc4b2d5c00ba54360afd847beccb6
|
data/lib/rservicebus2/agent.rb
CHANGED
@@ -22,6 +22,7 @@ module RServiceBus2
|
|
22
22
|
# @param [Object] messageObj The msg to be sent
|
23
23
|
# @param [String] queueName the name of the queue to be send the msg to
|
24
24
|
# @param [String] returnAddress the name of a queue to send replies to
|
25
|
+
# rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
25
26
|
def send_msg(message_obj, queue_name, return_address = nil)
|
26
27
|
fail QueueNotFoundForMsg, message_obj.class.name if queue_name.nil?
|
27
28
|
|
@@ -3,11 +3,14 @@ require 'uri'
|
|
3
3
|
module RServiceBus2
|
4
4
|
# Configure AppResources for an rservicebus host
|
5
5
|
class ConfigureAppResource
|
6
|
+
# rubocop:disable Metrics/AbcSize,Metrics/MethodLength,CyclomaticComplexity
|
6
7
|
def get_resources(env, host, state_manager, saga_storage)
|
7
8
|
# rm = resource_manager
|
8
9
|
rm = ResourceManager.new(state_manager, saga_storage)
|
9
10
|
env.each do |k, v|
|
10
|
-
if v.is_a?(String) &&
|
11
|
+
if v.is_a?(String) &&
|
12
|
+
(k.start_with?('RSBFDB_') || v.index('fluiddb') == 0)
|
13
|
+
v = v['fluiddb'.length..-1] if v.index('fluiddb') == 0
|
11
14
|
uri = URI.parse(v)
|
12
15
|
require 'rservicebus2/appresource/fluiddb'
|
13
16
|
rm.add k.sub('RSBFDB_', ''), AppResourceFluidDb.new(host, uri)
|
data/lib/rservicebus2/mq.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require 'beanstalk-client'
|
2
|
-
require 'rservicebus2/
|
2
|
+
require 'rservicebus2/mq'
|
3
3
|
|
4
4
|
module RServiceBus2
|
5
5
|
# Beanstalk client implementation.
|
6
6
|
class MQBeanstalk < MQ
|
7
7
|
# Connect to the broker
|
8
|
+
# rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
8
9
|
def connect(host, port)
|
9
10
|
port ||= 11_300
|
10
11
|
string = "#{host}:#{port}"
|
@@ -1,20 +1,20 @@
|
|
1
1
|
module RServiceBus2
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
# Send at storage in memory
|
3
|
+
class SendAtStorageInMemory
|
4
|
+
def initialize(_uri)
|
5
|
+
@list = []
|
6
|
+
end
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
def add(msg)
|
9
|
+
@list << msg
|
10
|
+
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
def all
|
13
|
+
@list
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
end
|
16
|
+
def delete(idx)
|
17
|
+
@list.delete_at(idx)
|
19
18
|
end
|
19
|
+
end
|
20
20
|
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module RServiceBus2
|
2
2
|
# State Storage on the file system
|
3
3
|
class StateStorageDir
|
4
|
+
# rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
4
5
|
def initialize(uri)
|
5
6
|
@state_dir = uri.path
|
6
7
|
|
7
|
-
|
8
|
+
Dir.new(@state_dir)
|
8
9
|
unless File.writable?(@state_dir)
|
9
10
|
puts "***** Directory is not writable, #{@state_dir}."
|
10
11
|
puts "***** Make the directory, #{@state_dir}, writable and try
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rservicebus2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guy Irvine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uuidtools
|