cf-message-bus 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3f44b8edf33ee0f3ade43fb6c5bfa11220852138
4
+ data.tar.gz: 4932e90cd8c99ec5dc77406edf0faca2653f211c
5
+ SHA512:
6
+ metadata.gz: d0f4874010fc8fb44f62384bc74ebaec31d4ab013e0219a4bfd341cbd1a9a24fa1199be68a27308b5a53796b00a0f359a2216bb24d16ce986cf6f1d7017430a3
7
+ data.tar.gz: d4717ddabca602a0c29e9a6333cb7064692eee0254292063e81e7d2e5d17b0d5d70746aeeb398fc27f0a32dbd156588c2b6e96f8ab6d23ec65ec6a36b669c365
@@ -17,7 +17,7 @@ module CfMessageBus
17
17
  end
18
18
 
19
19
  def publish(subject, message = nil, inbox = nil, &callback)
20
- @subscriptions[subject].each do |subscription|
20
+ @subscriptions.fetch(subject, []).each do |subscription|
21
21
  subscription.call(stringify_keys(message))
22
22
  end
23
23
 
@@ -86,6 +86,10 @@ module CfMessageBus
86
86
  end
87
87
  end
88
88
 
89
+ def reset
90
+ @subscriptions = {}
91
+ end
92
+
89
93
  private
90
94
 
91
95
  def stringify_keys(object)
@@ -1,3 +1,3 @@
1
1
  module CfMessageBus
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,116 +1,103 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-message-bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
5
- prerelease:
4
+ version: 0.3.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - CloudFoundry Core Team
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-12-16 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.3'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.3'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: eventmachine
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: 1.0.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: 1.0.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: nats
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: 0.5.0.beta.16
70
- - - <
62
+ - - "<"
71
63
  - !ruby/object:Gem::Version
72
64
  version: '0.6'
73
65
  type: :runtime
74
66
  prerelease: false
75
67
  version_requirements: !ruby/object:Gem::Requirement
76
- none: false
77
68
  requirements:
78
- - - ! '>='
69
+ - - ">="
79
70
  - !ruby/object:Gem::Version
80
71
  version: 0.5.0.beta.16
81
- - - <
72
+ - - "<"
82
73
  - !ruby/object:Gem::Version
83
74
  version: '0.6'
84
75
  - !ruby/object:Gem::Dependency
85
76
  name: vcap-concurrency
86
77
  requirement: !ruby/object:Gem::Requirement
87
- none: false
88
78
  requirements:
89
- - - ! '>='
79
+ - - ">="
90
80
  - !ruby/object:Gem::Version
91
81
  version: '0'
92
82
  type: :runtime
93
83
  prerelease: false
94
84
  version_requirements: !ruby/object:Gem::Requirement
95
- none: false
96
85
  requirements:
97
- - - ! '>='
86
+ - - ">="
98
87
  - !ruby/object:Gem::Version
99
88
  version: '0'
100
89
  - !ruby/object:Gem::Dependency
101
90
  name: yajl-ruby
102
91
  requirement: !ruby/object:Gem::Requirement
103
- none: false
104
92
  requirements:
105
- - - ! '>='
93
+ - - ">="
106
94
  - !ruby/object:Gem::Version
107
95
  version: '0'
108
96
  type: :runtime
109
97
  prerelease: false
110
98
  version_requirements: !ruby/object:Gem::Requirement
111
- none: false
112
99
  requirements:
113
- - - ! '>='
100
+ - - ">="
114
101
  - !ruby/object:Gem::Version
115
102
  version: '0'
116
103
  description: Abstraction layer around NATS messaging bus
@@ -120,35 +107,34 @@ executables: []
120
107
  extensions: []
121
108
  extra_rdoc_files: []
122
109
  files:
110
+ - lib/cf_message_bus.rb
123
111
  - lib/cf_message_bus/message_bus.rb
124
112
  - lib/cf_message_bus/message_bus_factory.rb
125
113
  - lib/cf_message_bus/mock_message_bus.rb
126
114
  - lib/cf_message_bus/version.rb
127
- - lib/cf_message_bus.rb
128
115
  - lib/eventmachine/schedule_sync.rb
129
116
  homepage:
130
117
  licenses:
131
118
  - Apache
119
+ metadata: {}
132
120
  post_install_message:
133
121
  rdoc_options: []
134
122
  require_paths:
135
123
  - lib
136
124
  required_ruby_version: !ruby/object:Gem::Requirement
137
- none: false
138
125
  requirements:
139
- - - ! '>='
126
+ - - ">="
140
127
  - !ruby/object:Gem::Version
141
128
  version: '0'
142
129
  required_rubygems_version: !ruby/object:Gem::Requirement
143
- none: false
144
130
  requirements:
145
- - - ! '>='
131
+ - - ">="
146
132
  - !ruby/object:Gem::Version
147
133
  version: '0'
148
134
  requirements: []
149
135
  rubyforge_project:
150
- rubygems_version: 1.8.23.2
136
+ rubygems_version: 2.2.2
151
137
  signing_key:
152
- specification_version: 3
138
+ specification_version: 4
153
139
  summary: Cloud Foundry message bus
154
140
  test_files: []