rservicebus2 0.0.4 → 0.0.5

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: 8cefcebe817e07916ac889a97b5fe82fa755a68a
4
- data.tar.gz: a6842886a0c4da7caceb7792d43c146f63011831
3
+ metadata.gz: 310f4095a8d5bdac9dc5e3289363045830b560ad
4
+ data.tar.gz: f949d25fe99b66b5936318a5ff7f9aa3ecdcf930
5
5
  SHA512:
6
- metadata.gz: 23308f1c27bd7c8b382078320bbcbc5f72b33eaa3733f78200d270156c3527bb805b5c8127ad4f02bcfb02a1140af7bbefaf879be8b1f1078cbb2421a6cbc3e9
7
- data.tar.gz: 818be84dbdb8d68244a00c3dbff927cff6b603461e92d5474d96655e1621681d4322b8cc32754f392766325d76bd4956ea6b764f054739efb7fb163459f5343b
6
+ metadata.gz: 1d08c6901b48c52854c11e339c1d247bc756685fe6e36940c5611f16f16facf431916c339ed7398a76bad9967038d106562a9cf970fbc5f7b448ece37c09b152
7
+ data.tar.gz: 8eac73140ba49a7a6c07a8a2cd53522d082deb0c1aa2381bdde3284f06d815aacc6c75fffa662e728e9bd6ac3f15143974d35276e106690ec9f7924684c92585
@@ -66,7 +66,8 @@ module RServiceBus2
66
66
  self
67
67
  end
68
68
 
69
- def add_handler(msg_name, handler)
69
+ def add_handler(lc_msg_name, handler)
70
+ msg_name = lc_msg_name.gsub(/(?<=_|^)(\w)/){$1.upcase}.gsub(/(?:_)(\w)/,'\1')
70
71
  @handler_list[msg_name] = [] if @handler_list[msg_name].nil?
71
72
  return unless @handler_list[msg_name].index{ |x| x.class.name == handler.class.name }.nil?
72
73
 
@@ -4,6 +4,7 @@ require 'zlib'
4
4
 
5
5
  module RServiceBus2
6
6
  # Monitor Directory for files
7
+ # rubocop:disable Metrics/ClassLength
7
8
  class MonitorDir < Monitor
8
9
  def connect(uri)
9
10
  # Pass the path through the Dir object to check syntax on startup
@@ -81,6 +82,7 @@ module RServiceBus2
81
82
  gz.read
82
83
  end
83
84
 
85
+ # rubocop:disable Metrics/MethodLength
84
86
  def read_content_from_file(file_path)
85
87
  content = ''
86
88
  if @input_filter.length > 0
@@ -113,6 +115,10 @@ module RServiceBus2
113
115
 
114
116
  file_list = Dir.glob("#{@path}/*")
115
117
  file_list.each do |file_path|
118
+ if File.file?(file_path) != true
119
+ RServiceBus2.log "Skipping directory, #{file_path}"
120
+ next
121
+ end
116
122
  RServiceBus2.log "Ready to process, #{file_path}"
117
123
  content = process_path(file_path)
118
124
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Irvine