rservicebus2 0.0.5 → 0.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 310f4095a8d5bdac9dc5e3289363045830b560ad
4
- data.tar.gz: f949d25fe99b66b5936318a5ff7f9aa3ecdcf930
3
+ metadata.gz: 66b583f35d22632de50cebffc0f14da977b34ebe
4
+ data.tar.gz: af799890c57aa6da4b9131b86b7e7d09d2b0164c
5
5
  SHA512:
6
- metadata.gz: 1d08c6901b48c52854c11e339c1d247bc756685fe6e36940c5611f16f16facf431916c339ed7398a76bad9967038d106562a9cf970fbc5f7b448ece37c09b152
7
- data.tar.gz: 8eac73140ba49a7a6c07a8a2cd53522d082deb0c1aa2381bdde3284f06d815aacc6c75fffa662e728e9bd6ac3f15143974d35276e106690ec9f7924684c92585
6
+ metadata.gz: 33a47a2626517b000f718fa1d82e0380bad8517aa6a82969035fafe19a80ba435ff0fec5235c313825763732bbf7807a4018644f444d5ae2cf994d728f4c65d6
7
+ data.tar.gz: 9dabddd4f50f500082260806b8a2e93d71a951a81c9fc8da7a6d75d799e165ded827d0a4258aeaacf2d4fa3507adf035e28cc4b2d5c00ba54360afd847beccb6
@@ -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
 
@@ -1,6 +1,7 @@
1
1
  module RServiceBus2
2
2
  # AppResourceDir
3
3
  class AppResourceDir < AppResource
4
+ # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
4
5
  def connect(uri)
5
6
  begin
6
7
  input_dir = Dir.new(uri.path)
@@ -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) && k.start_with?('RSBFDB_')
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)
@@ -33,7 +33,7 @@ module RServiceBus2
33
33
  @queue_name_list << match[2]
34
34
  end
35
35
 
36
- def configure(local_queue_name=nil)
36
+ def configure(local_queue_name = nil)
37
37
  log('EndpointMapping.Configure')
38
38
 
39
39
  @queue_name_list = []
@@ -1,4 +1,4 @@
1
- require 'rservicebus2/Monitor/Dir'
1
+ require 'rservicebus2/monitor/dir'
2
2
  require 'csv'
3
3
 
4
4
  module RServiceBus2
@@ -16,7 +16,7 @@ module RServiceBus2
16
16
 
17
17
  case uri.scheme
18
18
  when 'beanstalk'
19
- require 'rservicebus2/MQ/Beanstalk'
19
+ require 'rservicebus2/mq/beanstalk'
20
20
  mq = MQBeanstalk.new(uri)
21
21
  else
22
22
  abort("Scheme, #{uri.scheme}, not recognised when configuring mq,
@@ -1,10 +1,11 @@
1
1
  require 'beanstalk-client'
2
- require 'rservicebus2/MQ'
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,6 +1,7 @@
1
1
  module RServiceBus2
2
2
  # Saga Storage Dir
3
3
  class SagaStorageDir
4
+ # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
4
5
  def initialize(uri)
5
6
  @saga_dir = uri.path
6
7
 
@@ -1,20 +1,20 @@
1
1
  module RServiceBus2
2
- # Send at storage in memory
3
- class SendAtStorageInMemory
4
- def initialize(_uri)
5
- @list = []
6
- end
2
+ # Send at storage in memory
3
+ class SendAtStorageInMemory
4
+ def initialize(_uri)
5
+ @list = []
6
+ end
7
7
 
8
- def add(msg)
9
- @list << msg
10
- end
8
+ def add(msg)
9
+ @list << msg
10
+ end
11
11
 
12
- def all
13
- @list
14
- end
12
+ def all
13
+ @list
14
+ end
15
15
 
16
- def delete(idx)
17
- @list.delete_at(idx)
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
- inputdir = Dir.new(@state_dir)
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.5
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-26 00:00:00.000000000 Z
11
+ date: 2016-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uuidtools