tengine_event 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile.lock +48 -30
- data/lib/tengine/event/sender.rb +3 -3
- data/lib/tengine/mq/suite.rb +113 -68
- data/lib/tengine/mq/suite/default_config.rb +52 -0
- data/spec/actual_publisher1.rb +54 -0
- data/spec/actual_publisher2.rb +142 -0
- data/spec/actual_spec.rb +103 -0
- data/spec/amqp_spec.rb +144 -0
- data/spec/eventmachine_spec.rb +68 -0
- data/spec/mq_config.yml.example +13 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/support/test_em.rb +25 -0
- data/spec/support/test_rabbitmq.rb +184 -0
- data/spec/tengine/event/model_notifiable_spec.rb +80 -0
- data/spec/tengine/event/sender_spec.rb +124 -0
- data/spec/tengine/event_spec.rb +419 -0
- data/spec/tengine/mq/connect_actually_spec.rb +38 -0
- data/spec/tengine/mq/suite_spec.rb +945 -0
- data/spec/tengine_spec.rb +17 -0
- metadata +69 -54
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
3
|
+
|
4
|
+
require 'stringio'
|
5
|
+
require 'logger'
|
6
|
+
|
7
|
+
describe Tengine do
|
8
|
+
describe :logger do
|
9
|
+
it "Tengine.loggerを設定" do
|
10
|
+
io = StringIO.new
|
11
|
+
Tengine.logger = Logger.new(io)
|
12
|
+
Tengine.logger.debug("foo")
|
13
|
+
io.rewind
|
14
|
+
io.string.should =~ /foo$/
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tengine_event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- taigou
|
@@ -13,12 +12,11 @@ authors:
|
|
13
12
|
autorequire:
|
14
13
|
bindir: bin
|
15
14
|
cert_chain: []
|
16
|
-
date:
|
15
|
+
date: 2013-04-30 00:00:00.000000000 Z
|
17
16
|
dependencies:
|
18
17
|
- !ruby/object:Gem::Dependency
|
19
18
|
name: activesupport
|
20
19
|
requirement: !ruby/object:Gem::Requirement
|
21
|
-
none: false
|
22
20
|
requirements:
|
23
21
|
- - ! '>='
|
24
22
|
- !ruby/object:Gem::Version
|
@@ -26,7 +24,6 @@ dependencies:
|
|
26
24
|
type: :runtime
|
27
25
|
prerelease: false
|
28
26
|
version_requirements: !ruby/object:Gem::Requirement
|
29
|
-
none: false
|
30
27
|
requirements:
|
31
28
|
- - ! '>='
|
32
29
|
- !ruby/object:Gem::Version
|
@@ -34,23 +31,20 @@ dependencies:
|
|
34
31
|
- !ruby/object:Gem::Dependency
|
35
32
|
name: tengine_support
|
36
33
|
requirement: !ruby/object:Gem::Requirement
|
37
|
-
none: false
|
38
34
|
requirements:
|
39
35
|
- - ~>
|
40
36
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.
|
37
|
+
version: 1.2.0
|
42
38
|
type: :runtime
|
43
39
|
prerelease: false
|
44
40
|
version_requirements: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
41
|
requirements:
|
47
42
|
- - ~>
|
48
43
|
- !ruby/object:Gem::Version
|
49
|
-
version: 1.
|
44
|
+
version: 1.2.0
|
50
45
|
- !ruby/object:Gem::Dependency
|
51
46
|
name: uuid
|
52
47
|
requirement: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
48
|
requirements:
|
55
49
|
- - ~>
|
56
50
|
- !ruby/object:Gem::Version
|
@@ -58,7 +52,6 @@ dependencies:
|
|
58
52
|
type: :runtime
|
59
53
|
prerelease: false
|
60
54
|
version_requirements: !ruby/object:Gem::Requirement
|
61
|
-
none: false
|
62
55
|
requirements:
|
63
56
|
- - ~>
|
64
57
|
- !ruby/object:Gem::Version
|
@@ -66,23 +59,20 @@ dependencies:
|
|
66
59
|
- !ruby/object:Gem::Dependency
|
67
60
|
name: amqp
|
68
61
|
requirement: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
62
|
requirements:
|
71
63
|
- - ~>
|
72
64
|
- !ruby/object:Gem::Version
|
73
|
-
version: 0.
|
65
|
+
version: 0.9.10
|
74
66
|
type: :runtime
|
75
67
|
prerelease: false
|
76
68
|
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
none: false
|
78
69
|
requirements:
|
79
70
|
- - ~>
|
80
71
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
72
|
+
version: 0.9.10
|
82
73
|
- !ruby/object:Gem::Dependency
|
83
74
|
name: bundler
|
84
75
|
requirement: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
76
|
requirements:
|
87
77
|
- - ! '>='
|
88
78
|
- !ruby/object:Gem::Version
|
@@ -90,7 +80,6 @@ dependencies:
|
|
90
80
|
type: :development
|
91
81
|
prerelease: false
|
92
82
|
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
none: false
|
94
83
|
requirements:
|
95
84
|
- - ! '>='
|
96
85
|
- !ruby/object:Gem::Version
|
@@ -98,23 +87,20 @@ dependencies:
|
|
98
87
|
- !ruby/object:Gem::Dependency
|
99
88
|
name: rake
|
100
89
|
requirement: !ruby/object:Gem::Requirement
|
101
|
-
none: false
|
102
90
|
requirements:
|
103
|
-
- -
|
91
|
+
- - ! '>='
|
104
92
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0
|
93
|
+
version: '0'
|
106
94
|
type: :development
|
107
95
|
prerelease: false
|
108
96
|
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
97
|
requirements:
|
111
|
-
- -
|
98
|
+
- - ! '>='
|
112
99
|
- !ruby/object:Gem::Version
|
113
|
-
version: 0
|
100
|
+
version: '0'
|
114
101
|
- !ruby/object:Gem::Dependency
|
115
102
|
name: rspec
|
116
103
|
requirement: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
104
|
requirements:
|
119
105
|
- - ~>
|
120
106
|
- !ruby/object:Gem::Version
|
@@ -122,7 +108,6 @@ dependencies:
|
|
122
108
|
type: :development
|
123
109
|
prerelease: false
|
124
110
|
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
none: false
|
126
111
|
requirements:
|
127
112
|
- - ~>
|
128
113
|
- !ruby/object:Gem::Version
|
@@ -130,39 +115,34 @@ dependencies:
|
|
130
115
|
- !ruby/object:Gem::Dependency
|
131
116
|
name: yard
|
132
117
|
requirement: !ruby/object:Gem::Requirement
|
133
|
-
none: false
|
134
118
|
requirements:
|
135
|
-
- -
|
119
|
+
- - ! '>='
|
136
120
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0
|
121
|
+
version: '0'
|
138
122
|
type: :development
|
139
123
|
prerelease: false
|
140
124
|
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
none: false
|
142
125
|
requirements:
|
143
|
-
- -
|
126
|
+
- - ! '>='
|
144
127
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0
|
128
|
+
version: '0'
|
146
129
|
- !ruby/object:Gem::Dependency
|
147
130
|
name: simplecov
|
148
131
|
requirement: !ruby/object:Gem::Requirement
|
149
|
-
none: false
|
150
132
|
requirements:
|
151
|
-
- -
|
133
|
+
- - ! '>='
|
152
134
|
- !ruby/object:Gem::Version
|
153
|
-
version: 0
|
135
|
+
version: '0'
|
154
136
|
type: :development
|
155
137
|
prerelease: false
|
156
138
|
version_requirements: !ruby/object:Gem::Requirement
|
157
|
-
none: false
|
158
139
|
requirements:
|
159
|
-
- -
|
140
|
+
- - ! '>='
|
160
141
|
- !ruby/object:Gem::Version
|
161
|
-
version: 0
|
142
|
+
version: '0'
|
162
143
|
- !ruby/object:Gem::Dependency
|
163
144
|
name: autotest
|
164
145
|
requirement: !ruby/object:Gem::Requirement
|
165
|
-
none: false
|
166
146
|
requirements:
|
167
147
|
- - ! '>='
|
168
148
|
- !ruby/object:Gem::Version
|
@@ -170,15 +150,41 @@ dependencies:
|
|
170
150
|
type: :development
|
171
151
|
prerelease: false
|
172
152
|
version_requirements: !ruby/object:Gem::Requirement
|
173
|
-
none: false
|
174
153
|
requirements:
|
175
154
|
- - ! '>='
|
176
155
|
- !ruby/object:Gem::Version
|
177
156
|
version: '0'
|
178
157
|
- !ruby/object:Gem::Dependency
|
179
|
-
name:
|
158
|
+
name: pry
|
159
|
+
requirement: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ! '>='
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
type: :development
|
165
|
+
prerelease: false
|
166
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - ! '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: pry-doc
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ! '>='
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ! '>='
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
- !ruby/object:Gem::Dependency
|
186
|
+
name: pry-debugger
|
180
187
|
requirement: !ruby/object:Gem::Requirement
|
181
|
-
none: false
|
182
188
|
requirements:
|
183
189
|
- - ! '>='
|
184
190
|
- !ruby/object:Gem::Version
|
@@ -186,27 +192,24 @@ dependencies:
|
|
186
192
|
type: :development
|
187
193
|
prerelease: false
|
188
194
|
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
none: false
|
190
195
|
requirements:
|
191
196
|
- - ! '>='
|
192
197
|
- !ruby/object:Gem::Version
|
193
198
|
version: '0'
|
194
199
|
- !ruby/object:Gem::Dependency
|
195
|
-
name:
|
200
|
+
name: ZenTest
|
196
201
|
requirement: !ruby/object:Gem::Requirement
|
197
|
-
none: false
|
198
202
|
requirements:
|
199
203
|
- - ~>
|
200
204
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
205
|
+
version: 4.9.0
|
202
206
|
type: :development
|
203
207
|
prerelease: false
|
204
208
|
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
none: false
|
206
209
|
requirements:
|
207
210
|
- - ~>
|
208
211
|
- !ruby/object:Gem::Version
|
209
|
-
version:
|
212
|
+
version: 4.9.0
|
210
213
|
description: Tengine Event API to access the queue
|
211
214
|
email: tengine-info@groovenauts.jp
|
212
215
|
executables:
|
@@ -224,35 +227,47 @@ files:
|
|
224
227
|
- lib/tengine/event/model_notifiable.rb
|
225
228
|
- lib/tengine/event/sender.rb
|
226
229
|
- lib/tengine/event.rb
|
230
|
+
- lib/tengine/mq/suite/default_config.rb
|
227
231
|
- lib/tengine/mq/suite.rb
|
228
232
|
- lib/tengine/mq.rb
|
229
233
|
- lib/tengine_event.rb
|
234
|
+
- spec/actual_publisher1.rb
|
235
|
+
- spec/actual_publisher2.rb
|
236
|
+
- spec/actual_spec.rb
|
237
|
+
- spec/amqp_spec.rb
|
238
|
+
- spec/eventmachine_spec.rb
|
239
|
+
- spec/mq_config.yml.example
|
240
|
+
- spec/spec_helper.rb
|
241
|
+
- spec/support/test_em.rb
|
242
|
+
- spec/support/test_rabbitmq.rb
|
243
|
+
- spec/tengine/event/model_notifiable_spec.rb
|
244
|
+
- spec/tengine/event/sender_spec.rb
|
245
|
+
- spec/tengine/event_spec.rb
|
246
|
+
- spec/tengine/mq/connect_actually_spec.rb
|
247
|
+
- spec/tengine/mq/suite_spec.rb
|
248
|
+
- spec/tengine_spec.rb
|
230
249
|
homepage: https://github.com/tengine/tengine/tree/develop/tengine_event
|
231
250
|
licenses:
|
232
251
|
- MPL2.0/LGPLv3
|
252
|
+
metadata: {}
|
233
253
|
post_install_message:
|
234
254
|
rdoc_options: []
|
235
255
|
require_paths:
|
236
256
|
- lib
|
237
257
|
required_ruby_version: !ruby/object:Gem::Requirement
|
238
|
-
none: false
|
239
258
|
requirements:
|
240
259
|
- - ! '>='
|
241
260
|
- !ruby/object:Gem::Version
|
242
261
|
version: '0'
|
243
|
-
segments:
|
244
|
-
- 0
|
245
|
-
hash: -2976382533152683923
|
246
262
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
247
|
-
none: false
|
248
263
|
requirements:
|
249
264
|
- - ! '>='
|
250
265
|
- !ruby/object:Gem::Version
|
251
266
|
version: '0'
|
252
267
|
requirements: []
|
253
268
|
rubyforge_project:
|
254
|
-
rubygems_version:
|
269
|
+
rubygems_version: 2.0.3
|
255
270
|
signing_key:
|
256
|
-
specification_version:
|
271
|
+
specification_version: 4
|
257
272
|
summary: Tengine Event API to access the queue
|
258
273
|
test_files: []
|