rservicebus 0.1.61 → 0.1.62

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@ module RServiceBus
5
5
 
6
6
  class ScpUploadHelper
7
7
  attr_reader :uri
8
-
8
+
9
9
  def initialize( uri )
10
10
  @uri = uri
11
11
  end
12
-
12
+
13
13
  def upload( source )
14
14
  #opportunity for smarts here. Could tar zip if it was a directory of files
15
15
 
@@ -28,8 +28,7 @@ module RServiceBus
28
28
  RServiceBus.log "Host: #{@uri.host}, User: #{@uri.user}, File Pattern: #{filepattern}, Destination: #{@uri.path}", true
29
29
  Net::SSH.start( @uri.host, @uri.user ) do |ssh|
30
30
  ssh.sftp.connect do |sftp|
31
- files = sftp.dir.glob(path, filepattern)
32
- sftp.dir.foreach(path){
31
+ sftp.dir.glob(path, filepattern) {
33
32
  |file|
34
33
  sftp.remove("#{path}/#{file.name}")
35
34
  }
@@ -40,13 +39,13 @@ module RServiceBus
40
39
  end
41
40
 
42
41
  class AppResource_ScpUpload<AppResource
43
-
42
+
44
43
  def connect(uri)
45
44
  return ScpUploadHelper.new( uri )
46
-
45
+
47
46
  return inputDir;
48
47
  end
49
-
48
+
50
49
  end
51
-
50
+
52
51
  end
@@ -50,7 +50,7 @@ module RServiceBus
50
50
  #Finish
51
51
  def Commit
52
52
  @list.each do |e|
53
- IO.write( e['path'], YAML::dump( e['data'] ) )
53
+ File.open( e['path'], "w" ) { |f| f.write( YAML::dump( e['data'] ) ) }
54
54
  end
55
55
  @deleted.each do |correlationId|
56
56
  File.unlink( self.getPath( correlationId ) )
@@ -36,7 +36,7 @@ module RServiceBus
36
36
  #Finish
37
37
  def Save
38
38
  content = YAML::dump( @list )
39
- IO.write( @uri.path, content )
39
+ File.open( @uri.path, "w" ) { |f| f.write( YAML::dump( content ) ) }
40
40
  end
41
41
 
42
42
 
@@ -43,7 +43,7 @@ module RServiceBus
43
43
  #Finish
44
44
  def Commit
45
45
  @list.each do |e|
46
- IO.write( e['path'], YAML::dump( e['hash'] ) )
46
+ File.open( e['path'], "w" ) { |f| f.write( YAML::dump( e['hash'] ) ) }
47
47
  end
48
48
  end
49
49
 
@@ -32,7 +32,7 @@ class SubscriptionStorage_File<SubscriptionStorage
32
32
  subscriptions[eventName] << queueName
33
33
  subscriptions[eventName] = subscriptions[eventName].uniq
34
34
 
35
- IO.write( @uri.path, YAML::dump(subscriptions ) )
35
+ File.open( @uri.path, "w" ) { |f| f.write( YAML::dump(subscriptions ) ) }
36
36
 
37
37
  return subscriptions
38
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.61
4
+ version: 0.1.62
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2014-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uuidtools
16
- requirement: &70302801620640 !ruby/object:Gem::Requirement
16
+ requirement: &70276579584140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70302801620640
24
+ version_requirements: *70276579584140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70302801619340 !ruby/object:Gem::Requirement
27
+ requirement: &70276579572520 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70302801619340
35
+ version_requirements: *70276579572520
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: beanstalk-client
38
- requirement: &70302798446360 !ruby/object:Gem::Requirement
38
+ requirement: &70276579570180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70302798446360
46
+ version_requirements: *70276579570180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: fluiddb
49
- requirement: &70302798445760 !ruby/object:Gem::Requirement
49
+ requirement: &70276579568400 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70302798445760
57
+ version_requirements: *70276579568400
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: parse-cron
60
- requirement: &70302798445300 !ruby/object:Gem::Requirement
60
+ requirement: &70276579566940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70302798445300
68
+ version_requirements: *70276579566940
69
69
  description: A Ruby interpretation of NServiceBus
70
70
  email: guy@guyirvine.com
71
71
  executables: