adhearsion 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,14 @@
1
1
  # [develop](https://github.com/adhearsion/adhearsion)
2
2
 
3
+ # [2.0.1](https://github.com/adhearsion/adhearsion/compare/v2.0.0...v2.0.1) - [2012-06-04](https://rubygems.org/gems/adhearsion/versions/2.0.1)
4
+ * Bugfix: Avoid infinitely recursive exception handlers
5
+ * Bugfix: Don't require rubygems where we don't need it
6
+ * Bugfix: Patch method name conflict with new Celluloid release
7
+ * Bugfix: Generated applications are now locked to Adhearsion major version
8
+ * Bugfix: Ensure the `#logger` method is defined more robustly on all objects
9
+ * Bugfix: Ensure actor (call) loggers are accessible outside the object
10
+ * Cleanup: Remove old invalid rake tasks, improve some documentation
11
+
3
12
  # [2.0.0](https://github.com/adhearsion/adhearsion/compare/v1.2.1...v2.0.0) - [2012-04-11](https://rubygems.org/gems/adhearsion/versions/2.0.0)
4
13
 
5
14
  ## Major architectural changes
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  # -*- ruby -*-
2
2
  ENV['RUBY_FLAGS'] = "-I#{%w(lib ext bin spec).join(File::PATH_SEPARATOR)}"
3
3
 
4
- require 'rubygems'
5
4
  require 'bundler/gem_tasks'
6
5
  require 'bundler/setup'
7
6
 
@@ -22,6 +22,10 @@ module Adhearsion
22
22
  rescue Celluloid::DeadActorError
23
23
  raise ExpiredError, "This call is expired and is no longer accessible"
24
24
  end
25
+
26
+ def proxy.join(*args)
27
+ Actor.call @mailbox, :join, *args
28
+ end
25
29
  end
26
30
  end
27
31
 
@@ -270,11 +274,6 @@ module Adhearsion
270
274
  "#{self.class}: #{id}"
271
275
  end
272
276
 
273
- # @private
274
- def logger
275
- super
276
- end
277
-
278
277
  # @private
279
278
  def to_ary
280
279
  [current_actor]
@@ -8,8 +8,16 @@ module Adhearsion
8
8
  #
9
9
  # Start a recording
10
10
  #
11
+ # @example Record in a blocking way and use result
12
+ # record_result = record :start_beep => true, :max_duration => 60_000
13
+ # logger.info "Recording saved to #{record_result.complete_event.recording.uri}"
14
+ # @example Asynchronous recording, execution of the controller will continue
15
+ # record :async => true do |event|
16
+ # logger.info "Async recording saved to #{event.recording.uri}"
17
+ # end
18
+ #
11
19
  # @param [Hash] options
12
- # @param [Block] block to process result of the record method
20
+ # @param [Block] block to process result of the record method, it will receive the complete Event for the method.
13
21
  # @option options [Boolean, Optional] :async Execute asynchronously. Defaults to false
14
22
  # @option options [Boolean, Optional] :start_beep Indicates whether subsequent record will be preceded with a beep. Default is true.
15
23
  # @option options [Boolean, Optional] :start_paused Whether subsequent record will start in PAUSE mode. Default is false.
@@ -19,7 +27,7 @@ module Adhearsion
19
27
  # @option options [String, Optional] :initial_timeout Controls how long (milliseconds) the recognizer should wait after the end of the prompt for the caller to speak before sending a Recorder event.
20
28
  # @option options [String, Optional] :final_timeout Controls the length (milliseconds) of a period of silence after callers have spoken to conclude they finished.
21
29
  #
22
- # @return Punchblock::Component::Record::Recording
30
+ # @return Punchblock::Component::Record
23
31
  #
24
32
  def record(options = {})
25
33
  async = options.delete :async
@@ -47,14 +47,17 @@ module Adhearsion
47
47
  GirlFriday.shutdown! if queue?
48
48
  # TODO: Extract number of threads to use from Adhearsion.config
49
49
  @queue = GirlFriday::WorkQueue.new 'main_queue', :error_handler => ErrorHandler do |message|
50
- begin
51
- handle_message message
52
- rescue Exception => e
53
- ErrorHandler.new.handle e
54
- end
50
+ work message
55
51
  end
56
52
  end
57
53
 
54
+ def work(message)
55
+ handle_message message
56
+ rescue => e
57
+ raise if message.type == :exception
58
+ trigger :exception, e
59
+ end
60
+
58
61
  def handle_message(message)
59
62
  trigger_handler message.type, message.object
60
63
  end
@@ -82,7 +85,8 @@ module Adhearsion
82
85
 
83
86
  class ErrorHandler
84
87
  def handle(exception)
85
- Events.trigger :exception, exception
88
+ logger.error "Exception encountered in exception handler!"
89
+ logger.error exception
86
90
  end
87
91
  end
88
92
 
@@ -3,29 +3,18 @@
3
3
  require 'adhearsion/logging'
4
4
 
5
5
  class Object
6
+ include Adhearsion::Logging::HasLogger
7
+
6
8
  undef :pb_logger
7
9
  def pb_logger
8
10
  logger
9
11
  end
12
+ end
10
13
 
11
- def logger_id
12
- self
13
- end
14
-
15
- def method_missing(method_id, *arguments, &block)
16
- if method_id == Adhearsion::Logging::METHOD
17
- self.class.send :define_method, method_id do
18
- Logging.logger[logger_id]
19
- end
20
- Logging.logger[logger_id]
21
- else
22
- super
14
+ module Celluloid
15
+ class ActorProxy
16
+ def logger
17
+ Actor.call @mailbox, :logger
23
18
  end
24
19
  end
25
-
26
- def respond_to?(method_id, include_private = false)
27
- return true if method_id == Adhearsion::Logging::METHOD
28
-
29
- super
30
- end
31
20
  end
@@ -1,6 +1,6 @@
1
1
  source :rubygems
2
2
 
3
- gem "adhearsion", ">=<%= Adhearsion::VERSION %>"
3
+ gem "adhearsion", "~> <%= Adhearsion::VERSION %>"
4
4
 
5
5
  #
6
6
  # Here are some example plugins you might like to use. Simply
@@ -11,7 +11,9 @@ Edit `extensions.conf` to include the following:
11
11
  exten => _.,1,AGI(agi:async)
12
12
  ```
13
13
 
14
- and setup a user in `manager.conf` with read/write access to `all`, `dialplan` and `agi`.
14
+ and setup a user in `manager.conf` with read/write access to `all`.
15
+
16
+ If you are using Asterisk 1.8, you will need to add an additional context with the name `adhearsion-redirect`. On Asterisk 10 and above this is auto-provisioned.
15
17
 
16
18
  ## Voxeo PRISM
17
19
 
@@ -1,6 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'rubygems'
4
3
  require 'bundler'
5
4
  Bundler.setup
6
5
  Bundler.require
@@ -7,7 +7,15 @@ module Adhearsion
7
7
 
8
8
  LOG_LEVELS = %w(TRACE DEBUG INFO WARN ERROR FATAL)
9
9
 
10
- METHOD = :logger
10
+ module HasLogger
11
+ def logger
12
+ ::Logging.logger[logger_id]
13
+ end
14
+
15
+ def logger_id
16
+ self
17
+ end
18
+ end
11
19
 
12
20
  class << self
13
21
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Adhearsion
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
@@ -17,7 +17,6 @@ unless ENV['SKIP_RCOV']
17
17
  end
18
18
 
19
19
  %w{
20
- rubygems
21
20
  bundler/setup
22
21
  flexmock/rspec
23
22
  active_support
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhearsion
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,11 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-04-11 00:00:00.000000000 Z
15
+ date: 2012-06-04 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
19
- requirement: &2168665360 !ruby/object:Gem::Requirement
19
+ requirement: !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,15 @@ dependencies:
24
24
  version: 3.0.10
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2168665360
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 3.0.10
28
33
  - !ruby/object:Gem::Dependency
29
34
  name: adhearsion-loquacious
30
- requirement: &2168664720 !ruby/object:Gem::Requirement
35
+ requirement: !ruby/object:Gem::Requirement
31
36
  none: false
32
37
  requirements:
33
38
  - - ! '>='
@@ -35,10 +40,15 @@ dependencies:
35
40
  version: 1.9.0
36
41
  type: :runtime
37
42
  prerelease: false
38
- version_requirements: *2168664720
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: 1.9.0
39
49
  - !ruby/object:Gem::Dependency
40
50
  name: bundler
41
- requirement: &2168663960 !ruby/object:Gem::Requirement
51
+ requirement: !ruby/object:Gem::Requirement
42
52
  none: false
43
53
  requirements:
44
54
  - - ~>
@@ -46,10 +56,15 @@ dependencies:
46
56
  version: '1.0'
47
57
  type: :runtime
48
58
  prerelease: false
49
- version_requirements: *2168663960
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ~>
63
+ - !ruby/object:Gem::Version
64
+ version: '1.0'
50
65
  - !ruby/object:Gem::Dependency
51
66
  name: celluloid
52
- requirement: &2168663000 !ruby/object:Gem::Requirement
67
+ requirement: !ruby/object:Gem::Requirement
53
68
  none: false
54
69
  requirements:
55
70
  - - ! '>='
@@ -57,10 +72,15 @@ dependencies:
57
72
  version: 0.10.0
58
73
  type: :runtime
59
74
  prerelease: false
60
- version_requirements: *2168663000
75
+ version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: 0.10.0
61
81
  - !ruby/object:Gem::Dependency
62
82
  name: countdownlatch
63
- requirement: &2168662120 !ruby/object:Gem::Requirement
83
+ requirement: !ruby/object:Gem::Requirement
64
84
  none: false
65
85
  requirements:
66
86
  - - ! '>='
@@ -68,10 +88,15 @@ dependencies:
68
88
  version: '0'
69
89
  type: :runtime
70
90
  prerelease: false
71
- version_requirements: *2168662120
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
72
97
  - !ruby/object:Gem::Dependency
73
98
  name: deep_merge
74
- requirement: &2168661120 !ruby/object:Gem::Requirement
99
+ requirement: !ruby/object:Gem::Requirement
75
100
  none: false
76
101
  requirements:
77
102
  - - ! '>='
@@ -79,10 +104,15 @@ dependencies:
79
104
  version: '0'
80
105
  type: :runtime
81
106
  prerelease: false
82
- version_requirements: *2168661120
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
83
113
  - !ruby/object:Gem::Dependency
84
114
  name: ffi
85
- requirement: &2168659800 !ruby/object:Gem::Requirement
115
+ requirement: !ruby/object:Gem::Requirement
86
116
  none: false
87
117
  requirements:
88
118
  - - ! '>='
@@ -90,10 +120,15 @@ dependencies:
90
120
  version: 1.0.11
91
121
  type: :runtime
92
122
  prerelease: false
93
- version_requirements: *2168659800
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ! '>='
127
+ - !ruby/object:Gem::Version
128
+ version: 1.0.11
94
129
  - !ruby/object:Gem::Dependency
95
130
  name: future-resource
96
- requirement: &2168659000 !ruby/object:Gem::Requirement
131
+ requirement: !ruby/object:Gem::Requirement
97
132
  none: false
98
133
  requirements:
99
134
  - - ~>
@@ -101,10 +136,15 @@ dependencies:
101
136
  version: '1.0'
102
137
  type: :runtime
103
138
  prerelease: false
104
- version_requirements: *2168659000
139
+ version_requirements: !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ~>
143
+ - !ruby/object:Gem::Version
144
+ version: '1.0'
105
145
  - !ruby/object:Gem::Dependency
106
146
  name: girl_friday
107
- requirement: &2168528540 !ruby/object:Gem::Requirement
147
+ requirement: !ruby/object:Gem::Requirement
108
148
  none: false
109
149
  requirements:
110
150
  - - ! '>='
@@ -112,10 +152,15 @@ dependencies:
112
152
  version: '0'
113
153
  type: :runtime
114
154
  prerelease: false
115
- version_requirements: *2168528540
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
116
161
  - !ruby/object:Gem::Dependency
117
162
  name: has-guarded-handlers
118
- requirement: &2168527220 !ruby/object:Gem::Requirement
163
+ requirement: !ruby/object:Gem::Requirement
119
164
  none: false
120
165
  requirements:
121
166
  - - ~>
@@ -123,10 +168,15 @@ dependencies:
123
168
  version: '1.1'
124
169
  type: :runtime
125
170
  prerelease: false
126
- version_requirements: *2168527220
171
+ version_requirements: !ruby/object:Gem::Requirement
172
+ none: false
173
+ requirements:
174
+ - - ~>
175
+ - !ruby/object:Gem::Version
176
+ version: '1.1'
127
177
  - !ruby/object:Gem::Dependency
128
178
  name: logging
129
- requirement: &2168525580 !ruby/object:Gem::Requirement
179
+ requirement: !ruby/object:Gem::Requirement
130
180
  none: false
131
181
  requirements:
132
182
  - - ! '>='
@@ -134,10 +184,15 @@ dependencies:
134
184
  version: 1.6.1
135
185
  type: :runtime
136
186
  prerelease: false
137
- version_requirements: *2168525580
187
+ version_requirements: !ruby/object:Gem::Requirement
188
+ none: false
189
+ requirements:
190
+ - - ! '>='
191
+ - !ruby/object:Gem::Version
192
+ version: 1.6.1
138
193
  - !ruby/object:Gem::Dependency
139
194
  name: pry
140
- requirement: &2168524680 !ruby/object:Gem::Requirement
195
+ requirement: !ruby/object:Gem::Requirement
141
196
  none: false
142
197
  requirements:
143
198
  - - ! '>='
@@ -145,10 +200,15 @@ dependencies:
145
200
  version: '0'
146
201
  type: :runtime
147
202
  prerelease: false
148
- version_requirements: *2168524680
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ none: false
205
+ requirements:
206
+ - - ! '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
149
209
  - !ruby/object:Gem::Dependency
150
210
  name: punchblock
151
- requirement: &2168523120 !ruby/object:Gem::Requirement
211
+ requirement: !ruby/object:Gem::Requirement
152
212
  none: false
153
213
  requirements:
154
214
  - - ~>
@@ -156,10 +216,15 @@ dependencies:
156
216
  version: '1.0'
157
217
  type: :runtime
158
218
  prerelease: false
159
- version_requirements: *2168523120
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ none: false
221
+ requirements:
222
+ - - ~>
223
+ - !ruby/object:Gem::Version
224
+ version: '1.0'
160
225
  - !ruby/object:Gem::Dependency
161
226
  name: rake
162
- requirement: &2168521780 !ruby/object:Gem::Requirement
227
+ requirement: !ruby/object:Gem::Requirement
163
228
  none: false
164
229
  requirements:
165
230
  - - ! '>='
@@ -167,10 +232,15 @@ dependencies:
167
232
  version: '0'
168
233
  type: :runtime
169
234
  prerelease: false
170
- version_requirements: *2168521780
235
+ version_requirements: !ruby/object:Gem::Requirement
236
+ none: false
237
+ requirements:
238
+ - - ! '>='
239
+ - !ruby/object:Gem::Version
240
+ version: '0'
171
241
  - !ruby/object:Gem::Dependency
172
242
  name: ruby_speech
173
- requirement: &2168587840 !ruby/object:Gem::Requirement
243
+ requirement: !ruby/object:Gem::Requirement
174
244
  none: false
175
245
  requirements:
176
246
  - - ~>
@@ -178,10 +248,15 @@ dependencies:
178
248
  version: '1.0'
179
249
  type: :runtime
180
250
  prerelease: false
181
- version_requirements: *2168587840
251
+ version_requirements: !ruby/object:Gem::Requirement
252
+ none: false
253
+ requirements:
254
+ - - ~>
255
+ - !ruby/object:Gem::Version
256
+ version: '1.0'
182
257
  - !ruby/object:Gem::Dependency
183
258
  name: thor
184
- requirement: &2168587340 !ruby/object:Gem::Requirement
259
+ requirement: !ruby/object:Gem::Requirement
185
260
  none: false
186
261
  requirements:
187
262
  - - ! '>='
@@ -189,10 +264,15 @@ dependencies:
189
264
  version: '0'
190
265
  type: :runtime
191
266
  prerelease: false
192
- version_requirements: *2168587340
267
+ version_requirements: !ruby/object:Gem::Requirement
268
+ none: false
269
+ requirements:
270
+ - - ! '>='
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
193
273
  - !ruby/object:Gem::Dependency
194
274
  name: uuid
195
- requirement: &2168586720 !ruby/object:Gem::Requirement
275
+ requirement: !ruby/object:Gem::Requirement
196
276
  none: false
197
277
  requirements:
198
278
  - - ! '>='
@@ -200,10 +280,15 @@ dependencies:
200
280
  version: '0'
201
281
  type: :runtime
202
282
  prerelease: false
203
- version_requirements: *2168586720
283
+ version_requirements: !ruby/object:Gem::Requirement
284
+ none: false
285
+ requirements:
286
+ - - ! '>='
287
+ - !ruby/object:Gem::Version
288
+ version: '0'
204
289
  - !ruby/object:Gem::Dependency
205
290
  name: aruba
206
- requirement: &2168585940 !ruby/object:Gem::Requirement
291
+ requirement: !ruby/object:Gem::Requirement
207
292
  none: false
208
293
  requirements:
209
294
  - - ! '>='
@@ -211,10 +296,15 @@ dependencies:
211
296
  version: '0'
212
297
  type: :development
213
298
  prerelease: false
214
- version_requirements: *2168585940
299
+ version_requirements: !ruby/object:Gem::Requirement
300
+ none: false
301
+ requirements:
302
+ - - ! '>='
303
+ - !ruby/object:Gem::Version
304
+ version: '0'
215
305
  - !ruby/object:Gem::Dependency
216
306
  name: ci_reporter
217
- requirement: &2168585360 !ruby/object:Gem::Requirement
307
+ requirement: !ruby/object:Gem::Requirement
218
308
  none: false
219
309
  requirements:
220
310
  - - ! '>='
@@ -222,10 +312,15 @@ dependencies:
222
312
  version: '0'
223
313
  type: :development
224
314
  prerelease: false
225
- version_requirements: *2168585360
315
+ version_requirements: !ruby/object:Gem::Requirement
316
+ none: false
317
+ requirements:
318
+ - - ! '>='
319
+ - !ruby/object:Gem::Version
320
+ version: '0'
226
321
  - !ruby/object:Gem::Dependency
227
322
  name: cucumber
228
- requirement: &2168584740 !ruby/object:Gem::Requirement
323
+ requirement: !ruby/object:Gem::Requirement
229
324
  none: false
230
325
  requirements:
231
326
  - - ! '>='
@@ -233,10 +328,15 @@ dependencies:
233
328
  version: '0'
234
329
  type: :development
235
330
  prerelease: false
236
- version_requirements: *2168584740
331
+ version_requirements: !ruby/object:Gem::Requirement
332
+ none: false
333
+ requirements:
334
+ - - ! '>='
335
+ - !ruby/object:Gem::Version
336
+ version: '0'
237
337
  - !ruby/object:Gem::Dependency
238
338
  name: flexmock
239
- requirement: &2168584160 !ruby/object:Gem::Requirement
339
+ requirement: !ruby/object:Gem::Requirement
240
340
  none: false
241
341
  requirements:
242
342
  - - ! '>='
@@ -244,10 +344,15 @@ dependencies:
244
344
  version: '0'
245
345
  type: :development
246
346
  prerelease: false
247
- version_requirements: *2168584160
347
+ version_requirements: !ruby/object:Gem::Requirement
348
+ none: false
349
+ requirements:
350
+ - - ! '>='
351
+ - !ruby/object:Gem::Version
352
+ version: '0'
248
353
  - !ruby/object:Gem::Dependency
249
354
  name: guard-cucumber
250
- requirement: &2168583560 !ruby/object:Gem::Requirement
355
+ requirement: !ruby/object:Gem::Requirement
251
356
  none: false
252
357
  requirements:
253
358
  - - ! '>='
@@ -255,10 +360,15 @@ dependencies:
255
360
  version: '0'
256
361
  type: :development
257
362
  prerelease: false
258
- version_requirements: *2168583560
363
+ version_requirements: !ruby/object:Gem::Requirement
364
+ none: false
365
+ requirements:
366
+ - - ! '>='
367
+ - !ruby/object:Gem::Version
368
+ version: '0'
259
369
  - !ruby/object:Gem::Dependency
260
370
  name: guard-rspec
261
- requirement: &2168582980 !ruby/object:Gem::Requirement
371
+ requirement: !ruby/object:Gem::Requirement
262
372
  none: false
263
373
  requirements:
264
374
  - - ! '>='
@@ -266,10 +376,15 @@ dependencies:
266
376
  version: '0'
267
377
  type: :development
268
378
  prerelease: false
269
- version_requirements: *2168582980
379
+ version_requirements: !ruby/object:Gem::Requirement
380
+ none: false
381
+ requirements:
382
+ - - ! '>='
383
+ - !ruby/object:Gem::Version
384
+ version: '0'
270
385
  - !ruby/object:Gem::Dependency
271
386
  name: rspec
272
- requirement: &2168582240 !ruby/object:Gem::Requirement
387
+ requirement: !ruby/object:Gem::Requirement
273
388
  none: false
274
389
  requirements:
275
390
  - - ~>
@@ -277,10 +392,15 @@ dependencies:
277
392
  version: 2.7.0
278
393
  type: :development
279
394
  prerelease: false
280
- version_requirements: *2168582240
395
+ version_requirements: !ruby/object:Gem::Requirement
396
+ none: false
397
+ requirements:
398
+ - - ~>
399
+ - !ruby/object:Gem::Version
400
+ version: 2.7.0
281
401
  - !ruby/object:Gem::Dependency
282
402
  name: ruby_gntp
283
- requirement: &2168581440 !ruby/object:Gem::Requirement
403
+ requirement: !ruby/object:Gem::Requirement
284
404
  none: false
285
405
  requirements:
286
406
  - - ! '>='
@@ -288,10 +408,15 @@ dependencies:
288
408
  version: '0'
289
409
  type: :development
290
410
  prerelease: false
291
- version_requirements: *2168581440
411
+ version_requirements: !ruby/object:Gem::Requirement
412
+ none: false
413
+ requirements:
414
+ - - ! '>='
415
+ - !ruby/object:Gem::Version
416
+ version: '0'
292
417
  - !ruby/object:Gem::Dependency
293
418
  name: simplecov
294
- requirement: &2168580760 !ruby/object:Gem::Requirement
419
+ requirement: !ruby/object:Gem::Requirement
295
420
  none: false
296
421
  requirements:
297
422
  - - ! '>='
@@ -299,10 +424,15 @@ dependencies:
299
424
  version: '0'
300
425
  type: :development
301
426
  prerelease: false
302
- version_requirements: *2168580760
427
+ version_requirements: !ruby/object:Gem::Requirement
428
+ none: false
429
+ requirements:
430
+ - - ! '>='
431
+ - !ruby/object:Gem::Version
432
+ version: '0'
303
433
  - !ruby/object:Gem::Dependency
304
434
  name: simplecov-rcov
305
- requirement: &2168580140 !ruby/object:Gem::Requirement
435
+ requirement: !ruby/object:Gem::Requirement
306
436
  none: false
307
437
  requirements:
308
438
  - - ! '>='
@@ -310,10 +440,15 @@ dependencies:
310
440
  version: '0'
311
441
  type: :development
312
442
  prerelease: false
313
- version_requirements: *2168580140
443
+ version_requirements: !ruby/object:Gem::Requirement
444
+ none: false
445
+ requirements:
446
+ - - ! '>='
447
+ - !ruby/object:Gem::Version
448
+ version: '0'
314
449
  - !ruby/object:Gem::Dependency
315
450
  name: yard
316
- requirement: &2168470660 !ruby/object:Gem::Requirement
451
+ requirement: !ruby/object:Gem::Requirement
317
452
  none: false
318
453
  requirements:
319
454
  - - ! '>='
@@ -321,7 +456,12 @@ dependencies:
321
456
  version: '0'
322
457
  type: :development
323
458
  prerelease: false
324
- version_requirements: *2168470660
459
+ version_requirements: !ruby/object:Gem::Requirement
460
+ none: false
461
+ requirements:
462
+ - - ! '>='
463
+ - !ruby/object:Gem::Version
464
+ version: '0'
325
465
  description: Adhearsion is an open-source telephony development framework
326
466
  email: dev@adhearsion.com
327
467
  executables:
@@ -435,7 +575,6 @@ files:
435
575
  - lib/adhearsion/tasks/debugging.rb
436
576
  - lib/adhearsion/tasks/environment.rb
437
577
  - lib/adhearsion/tasks/plugins.rb
438
- - lib/adhearsion/tasks/testing.rb
439
578
  - lib/adhearsion/version.rb
440
579
  - pre-commit
441
580
  - spec/adhearsion/call_controller/dial_spec.rb
@@ -488,7 +627,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
488
627
  version: '0'
489
628
  segments:
490
629
  - 0
491
- hash: -3465123136377635342
630
+ hash: 1504459880693852795
492
631
  required_rubygems_version: !ruby/object:Gem::Requirement
493
632
  none: false
494
633
  requirements:
@@ -497,10 +636,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
497
636
  version: '0'
498
637
  segments:
499
638
  - 0
500
- hash: -3465123136377635342
639
+ hash: 1504459880693852795
501
640
  requirements: []
502
641
  rubyforge_project:
503
- rubygems_version: 1.8.10
642
+ rubygems_version: 1.8.21
504
643
  signing_key:
505
644
  specification_version: 3
506
645
  summary: Adhearsion, open-source telephony development framework
@@ -1,70 +0,0 @@
1
- # encoding: utf-8
2
-
3
- begin
4
- require 'rspec/core/rake_task'
5
- rescue LoadError
6
- end
7
-
8
- desc 'Run app tests, including components'
9
- task :test => 'test:component'
10
-
11
- desc 'Run app specs, including components'
12
- task :spec => :test
13
-
14
- namespace :test do
15
- desc "Run tests for a component specified by COMPONENT=<component_name>. If no component is specified, tests will be executed for all components"
16
- task :component do
17
- component = ENV['COMPONENT']
18
- components_to_test = component.nil? ? all_component_directories : [full_path_for(component)]
19
- components_to_test.each do |component_name|
20
- setup_and_execute component_name
21
- end
22
- end
23
-
24
- private
25
-
26
- def setup_and_execute(component_path)
27
- task = create_test_task_for(component_path)
28
- Rake::Task[task.name].execute if task
29
- end
30
-
31
- def create_test_task_for(component_path)
32
- case task_type_for(component_path)
33
- when :test_unit
34
- Rake::TestTask.new task_name_for(component_path) do |t|
35
- t.libs = ["lib", "test"].map { |subdir| File.join component_path, subdir }
36
- t.test_files = FileList["#{component_path}/test/test_*.rb"]
37
- t.verbose = true
38
- end
39
- when :rspec
40
- if defined?(RSpec)
41
- RSpec::Core::RakeTask.new task_name_for(component_path) do |spec|
42
- spec.pattern = "#{component_path}/spec/**/*_spec.rb"
43
- spec.rspec_opts = '--color'
44
- end
45
- else
46
- puts "It looks like you have components with RSpec tests. You can run them by adding RSpec to your Gemfile."
47
- end
48
- end
49
- end
50
-
51
- def task_type_for(component_path)
52
- if Dir.exists?("#{component_path}/test")
53
- :test_unit
54
- elsif Dir.exists?("#{component_path}/spec")
55
- :rspec
56
- end
57
- end
58
-
59
- def task_name_for(component_path)
60
- "test_#{component_path.split(/\//).last}"
61
- end
62
-
63
- def all_component_directories
64
- Dir['components/*']
65
- end
66
-
67
- def full_path_for(component)
68
- component =~ /^components\// ? component : File.join("components", component)
69
- end
70
- end