adhearsion 2.5.4 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/CHANGELOG.md +15 -0
- data/README.markdown +2 -1
- data/Rakefile +1 -6
- data/adhearsion.gemspec +4 -3
- data/features/cli_daemon.feature +2 -4
- data/features/cli_restart.feature +14 -5
- data/features/cli_start.feature +0 -2
- data/features/cli_stop.feature +15 -6
- data/lib/adhearsion.rb +21 -23
- data/lib/adhearsion/call.rb +49 -5
- data/lib/adhearsion/call_controller.rb +29 -11
- data/lib/adhearsion/call_controller/dial.rb +21 -9
- data/lib/adhearsion/call_controller/menu_dsl.rb +12 -12
- data/lib/adhearsion/call_controller/menu_dsl/array_match_calculator.rb +1 -1
- data/lib/adhearsion/call_controller/menu_dsl/fixnum_match_calculator.rb +1 -0
- data/lib/adhearsion/call_controller/menu_dsl/string_match_calculator.rb +1 -1
- data/lib/adhearsion/call_controller/output.rb +36 -7
- data/lib/adhearsion/call_controller/output/abstract_player.rb +4 -0
- data/lib/adhearsion/call_controller/record.rb +1 -0
- data/lib/adhearsion/cli_commands/ahn_command.rb +7 -4
- data/lib/adhearsion/cli_commands/plugin_command.rb +2 -0
- data/lib/adhearsion/generators.rb +2 -4
- data/lib/adhearsion/generators/app/templates/simon_game_spec.rb +20 -20
- data/lib/adhearsion/initializer.rb +2 -2
- data/lib/adhearsion/plugin.rb +6 -6
- data/lib/adhearsion/punchblock_plugin.rb +3 -4
- data/lib/adhearsion/punchblock_plugin/initializer.rb +2 -1
- data/lib/adhearsion/router.rb +7 -7
- data/lib/adhearsion/router/route.rb +10 -4
- data/lib/adhearsion/rspec.rb +2 -0
- data/lib/adhearsion/version.rb +1 -1
- data/spec/adhearsion/call_controller/dial_spec.rb +589 -557
- data/spec/adhearsion/call_controller/input_spec.rb +91 -91
- data/spec/adhearsion/call_controller/menu_dsl/array_match_calculator_spec.rb +29 -29
- data/spec/adhearsion/call_controller/menu_dsl/calculated_match_collection_spec.rb +6 -6
- data/spec/adhearsion/call_controller/menu_dsl/calculated_match_spec.rb +19 -19
- data/spec/adhearsion/call_controller/menu_dsl/fixnum_match_calculator_spec.rb +6 -6
- data/spec/adhearsion/call_controller/menu_dsl/match_calculator_spec.rb +1 -1
- data/spec/adhearsion/call_controller/menu_dsl/menu_builder_spec.rb +21 -17
- data/spec/adhearsion/call_controller/menu_dsl/menu_spec.rb +96 -83
- data/spec/adhearsion/call_controller/menu_dsl/range_match_calculator_spec.rb +5 -5
- data/spec/adhearsion/call_controller/menu_dsl/string_match_calculator_spec.rb +9 -9
- data/spec/adhearsion/call_controller/output/async_player_spec.rb +14 -4
- data/spec/adhearsion/call_controller/output/formatter_spec.rb +14 -14
- data/spec/adhearsion/call_controller/output/player_spec.rb +15 -5
- data/spec/adhearsion/call_controller/output_spec.rb +126 -78
- data/spec/adhearsion/call_controller/record_spec.rb +38 -26
- data/spec/adhearsion/call_controller/utility_spec.rb +11 -11
- data/spec/adhearsion/call_controller_spec.rb +176 -136
- data/spec/adhearsion/call_spec.rb +443 -218
- data/spec/adhearsion/calls_spec.rb +33 -33
- data/spec/adhearsion/configuration_spec.rb +61 -61
- data/spec/adhearsion/console_spec.rb +29 -29
- data/spec/adhearsion/events_spec.rb +14 -14
- data/spec/adhearsion/generators_spec.rb +1 -1
- data/spec/adhearsion/initializer_spec.rb +42 -42
- data/spec/adhearsion/logging_spec.rb +33 -33
- data/spec/adhearsion/outbound_call_spec.rb +69 -55
- data/spec/adhearsion/plugin_spec.rb +53 -44
- data/spec/adhearsion/process_spec.rb +21 -21
- data/spec/adhearsion/punchblock_plugin/initializer_spec.rb +68 -52
- data/spec/adhearsion/punchblock_plugin_spec.rb +6 -6
- data/spec/adhearsion/router/evented_route_spec.rb +2 -2
- data/spec/adhearsion/router/openended_route_spec.rb +9 -9
- data/spec/adhearsion/router/route_spec.rb +61 -31
- data/spec/adhearsion/router/unaccepting_route_spec.rb +13 -13
- data/spec/adhearsion/router_spec.rb +47 -33
- data/spec/adhearsion/statistics/dump_spec.rb +6 -6
- data/spec/adhearsion/statistics_spec.rb +9 -9
- data/spec/adhearsion_spec.rb +23 -20
- data/spec/spec_helper.rb +3 -6
- data/spec/support/call_controller_test_helpers.rb +7 -7
- data/spec/support/initializer_stubs.rb +1 -1
- data/spec/support/punchblock_mocks.rb +1 -1
- metadata +22 -10
- data/features/support/utils.rb +0 -9
@@ -36,6 +36,9 @@ module Adhearsion
|
|
36
36
|
# @option options [CallController] :confirm the controller to execute on the first outbound call to be answered, to give an opportunity to screen the call. The calls will be joined if the outbound call is still active after this controller completes.
|
37
37
|
# @option options [Hash] :confirm_metadata Metadata to set on the confirmation controller before executing it. This is shared between all calls if dialing multiple endpoints; if you care about it being mutated, you should provide an immutable value (using eg https://github.com/harukizaemon/hamster).
|
38
38
|
#
|
39
|
+
# @option options [CallController] :cleanup The controller to execute on each call being cleaned up. This can be used, for instance, to notify that the call is being terminated. Calls are terminated right after this controller completes execution. If this is not specified, calls are silently terminated during cleanup.
|
40
|
+
# @option options [Hash] :cleanup_metadata Metadata to set on the cleanup controller before executing it. Defaults to :confirm_metadata if not specified.
|
41
|
+
#
|
39
42
|
# @option options [Hash] :join_options Options to specify the kind of join operation to perform. See `Call#join` for details.
|
40
43
|
# @option options [Call, String, Hash] :join_target the target to join to. May be a Call object, a call ID (String, Hash) or a mixer name (Hash). See `Call#join` for details.
|
41
44
|
#
|
@@ -225,31 +228,30 @@ module Adhearsion
|
|
225
228
|
# @option options [Adhearsion::CallController] :others The call controller class to execute on the 'other' call legs (the ones created as a result of the #dial)
|
226
229
|
# @option options [Proc] :others_callback A block to call when the :others controller completes on an individual call
|
227
230
|
def split(targets = {})
|
228
|
-
logger.info "Splitting calls apart"
|
229
231
|
@splitting = true
|
230
232
|
calls_to_split = @calls.map do |call|
|
231
233
|
ignoring_ended_calls do
|
232
234
|
[call.id, call] if call.active?
|
233
235
|
end
|
234
236
|
end.compact
|
235
|
-
logger.info "Splitting peer calls #{calls_to_split.map(&:first).join ", "}"
|
237
|
+
logger.info "Splitting off peer calls #{calls_to_split.map(&:first).join ", "}"
|
236
238
|
calls_to_split.each do |id, call|
|
237
239
|
ignoring_ended_calls do
|
238
|
-
logger.
|
240
|
+
logger.debug "Unjoining peer #{call.id} from #{join_target}"
|
239
241
|
ignoring_missing_joins { call.unjoin join_target }
|
240
242
|
if split_controller = targets[:others]
|
241
|
-
logger.info "Executing
|
243
|
+
logger.info "Executing controller #{split_controller} on split call #{call.id}"
|
242
244
|
call.execute_controller split_controller.new(call, 'current_dial' => self), targets[:others_callback]
|
243
245
|
end
|
244
246
|
end
|
245
247
|
end
|
246
248
|
ignoring_ended_calls do
|
247
249
|
if join_target != @call
|
248
|
-
logger.
|
250
|
+
logger.debug "Unjoining main call #{@call.id} from #{join_target}"
|
249
251
|
@call.unjoin join_target
|
250
252
|
end
|
251
253
|
if split_controller = targets[:main]
|
252
|
-
logger.info "Executing
|
254
|
+
logger.info "Executing controller #{split_controller} on main call"
|
253
255
|
@call.execute_controller split_controller.new(@call, 'current_dial' => self), targets[:main_callback]
|
254
256
|
end
|
255
257
|
end
|
@@ -327,7 +329,15 @@ module Adhearsion
|
|
327
329
|
else
|
328
330
|
logger.info "#dial finished. Hanging up #{calls_to_hangup.size} outbound calls which are still active: #{calls_to_hangup.map(&:first).join ", "}."
|
329
331
|
calls_to_hangup.each do |id, outbound_call|
|
330
|
-
ignoring_ended_calls
|
332
|
+
ignoring_ended_calls do
|
333
|
+
if @cleanup_controller
|
334
|
+
logger.info "#dial running #{@cleanup_controller.class.name} on #{outbound_call.id}"
|
335
|
+
outbound_call.execute_controller @cleanup_controller.new(outbound_call, @cleanup_metadata), ->(call) { call.hangup }
|
336
|
+
else
|
337
|
+
logger.info "#dial hanging up #{outbound_call.id}"
|
338
|
+
outbound_call.hangup
|
339
|
+
end
|
340
|
+
end
|
331
341
|
end
|
332
342
|
end
|
333
343
|
end
|
@@ -373,6 +383,8 @@ module Adhearsion
|
|
373
383
|
@join_options = @options.delete(:join_options) || {}
|
374
384
|
@join_target = @options.delete(:join_target) || @call
|
375
385
|
|
386
|
+
@cleanup_controller = @options.delete :cleanup
|
387
|
+
@cleanup_metadata = @options.delete :cleanup_metadata || @confirmation_metadata
|
376
388
|
@skip_cleanup = false
|
377
389
|
end
|
378
390
|
|
@@ -384,7 +396,7 @@ module Adhearsion
|
|
384
396
|
end
|
385
397
|
|
386
398
|
def pre_join_tasks(call)
|
387
|
-
@pre_join
|
399
|
+
@pre_join.call(call) if @pre_join
|
388
400
|
terminate_ringback
|
389
401
|
end
|
390
402
|
|
@@ -425,7 +437,7 @@ module Adhearsion
|
|
425
437
|
super
|
426
438
|
on_all_except call do |target_call|
|
427
439
|
if @apology_controller
|
428
|
-
logger.info "#dial
|
440
|
+
logger.info "#dial executing apology controller #{@apology_controller} on call #{target_call.id} because this call has been confirmed by another channel"
|
429
441
|
target_call.async.execute_controller @apology_controller.new(target_call, @confirmation_metadata), ->(call) { call.hangup }
|
430
442
|
else
|
431
443
|
logger.info "#dial hanging up call #{target_call.id} because this call has been confirmed by another channel"
|
@@ -1,21 +1,21 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
%w(
|
4
|
+
calculated_match
|
5
|
+
calculated_match_collection
|
6
|
+
match_calculator
|
7
|
+
fixnum_match_calculator
|
8
|
+
range_match_calculator
|
9
|
+
string_match_calculator
|
10
|
+
array_match_calculator
|
11
|
+
menu_builder
|
12
|
+
menu
|
13
|
+
).each { |r| require "adhearsion/call_controller/menu_dsl/#{r}" }
|
14
|
+
|
3
15
|
module Adhearsion
|
4
16
|
class CallController
|
5
17
|
# @private
|
6
18
|
module MenuDSL
|
7
|
-
extend ActiveSupport::Autoload
|
8
|
-
|
9
|
-
autoload :Exceptions
|
10
|
-
autoload :CalculatedMatch
|
11
|
-
autoload :CalculatedMatchCollection
|
12
|
-
autoload :MatchCalculator
|
13
|
-
autoload :FixnumMatchCalculator
|
14
|
-
autoload :RangeMatchCalculator
|
15
|
-
autoload :StringMatchCalculator
|
16
|
-
autoload :ArrayMatchCalculator
|
17
|
-
autoload :MenuBuilder
|
18
|
-
autoload :Menu
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
require 'uri'
|
3
|
+
|
4
|
+
%w(
|
5
|
+
abstract_player
|
6
|
+
async_player
|
7
|
+
formatter
|
8
|
+
player
|
9
|
+
).each { |r| require "adhearsion/call_controller/output/#{r}" }
|
2
10
|
|
3
11
|
module Adhearsion
|
4
12
|
class CallController
|
5
13
|
module Output
|
6
|
-
extend ActiveSupport::Autoload
|
7
|
-
|
8
|
-
autoload :AbstractPlayer
|
9
|
-
autoload :AsyncPlayer
|
10
|
-
autoload :Formatter
|
11
|
-
autoload :Player
|
12
|
-
|
13
14
|
PlaybackError = Class.new Adhearsion::Error # Represents failure to play audio, such as when the sound file cannot be found
|
14
15
|
NoDocError = Class.new Adhearsion::Error # Represents failure to provide documents to playback
|
15
16
|
|
@@ -245,6 +246,34 @@ module Adhearsion
|
|
245
246
|
async_player.play_ssml output_formatter.ssml_for_numeric(number), options
|
246
247
|
end
|
247
248
|
|
249
|
+
#
|
250
|
+
# Plays the given SSML document from a URL.
|
251
|
+
#
|
252
|
+
# @param [String] url String containing a valid URL, like "http://example.com/document.ssml".
|
253
|
+
# @param [Hash] options A set of options for output. See Punchblock::Component::Output.new for details.
|
254
|
+
#
|
255
|
+
# @raise [ArgumentError] if the given argument can not be played
|
256
|
+
#
|
257
|
+
def play_document(url, options = {})
|
258
|
+
raise ArgumentError unless url =~ URI::regexp
|
259
|
+
player.play_url url, options
|
260
|
+
true
|
261
|
+
end
|
262
|
+
|
263
|
+
#
|
264
|
+
# Plays the given SSML document from a URL and returns as soon as it begins.
|
265
|
+
#
|
266
|
+
# @param [String] url String containing a valid URL, like "http://example.com/document.ssml".
|
267
|
+
# @param [Hash] options A set of options for output. See Punchblock::Component::Output.new for details.
|
268
|
+
#
|
269
|
+
# @raise [ArgumentError] if the given argument can not be played
|
270
|
+
# @return [Punchblock::Component::Output]
|
271
|
+
#
|
272
|
+
def play_document!(url, options = {})
|
273
|
+
raise ArgumentError unless url =~ URI::regexp
|
274
|
+
async_player.play_url url, options
|
275
|
+
end
|
276
|
+
|
248
277
|
#
|
249
278
|
# Plays the given output, allowing for DTMF input of a single digit from the user
|
250
279
|
# At the end of the played file it returns nil
|
@@ -22,6 +22,7 @@ module Adhearsion
|
|
22
22
|
# @option options [String, Optional] :initial_timeout Controls how long (seconds) the recognizer should wait after the end of the prompt for the caller to speak before sending a Recorder event.
|
23
23
|
# @option options [String, Optional] :final_timeout Controls the length (seconds) of a period of silence after callers have spoken to conclude they finished.
|
24
24
|
# @option options [Boolean, Optional] :interruptible Allows the recording to be terminated by any single DTMF key, default is false
|
25
|
+
# @option options [Symbol, Optional] :direction Controls which sides of the conversation are recorded: :recv (what the caller hears), :send (what the caller said), or :duplex (both)
|
25
26
|
#
|
26
27
|
def initialize(controller, options = {})
|
27
28
|
@controller = controller
|
@@ -52,7 +52,7 @@ module Adhearsion
|
|
52
52
|
desc "stop </path/to/directory>", "Stop a running Adhearsion server"
|
53
53
|
method_option :pidfile, :type => :string, :aliases => %w(--pid-file)
|
54
54
|
def stop(path = nil)
|
55
|
-
execute_from_app_dir! path
|
55
|
+
path = execute_from_app_dir! path
|
56
56
|
|
57
57
|
pid_file = if options[:pidfile]
|
58
58
|
File.exists?(File.expand_path(options[:pidfile])) ?
|
@@ -87,7 +87,7 @@ module Adhearsion
|
|
87
87
|
desc "restart </path/to/directory>", "Restart the Adhearsion server"
|
88
88
|
method_option :pidfile, :type => :string, :aliases => %w(--pid-file)
|
89
89
|
def restart(path = nil)
|
90
|
-
execute_from_app_dir! path
|
90
|
+
path = execute_from_app_dir! path
|
91
91
|
begin
|
92
92
|
invoke :stop
|
93
93
|
rescue PIDReadError => e
|
@@ -99,13 +99,15 @@ module Adhearsion
|
|
99
99
|
protected
|
100
100
|
|
101
101
|
def start_app(path, mode, pid_file = nil)
|
102
|
-
execute_from_app_dir! path
|
102
|
+
path = execute_from_app_dir! path
|
103
103
|
say "Starting Adhearsion server at #{Dir.pwd}"
|
104
104
|
Adhearsion::Initializer.start :mode => mode, :pid_file => pid_file
|
105
105
|
end
|
106
106
|
|
107
107
|
def execute_from_app_dir!(path)
|
108
|
-
|
108
|
+
if in_app? and running_script_ahn?
|
109
|
+
return Dir.pwd
|
110
|
+
end
|
109
111
|
|
110
112
|
path ||= Dir.pwd if in_app?
|
111
113
|
|
@@ -117,6 +119,7 @@ module Adhearsion
|
|
117
119
|
args[1] = '.'
|
118
120
|
ScriptAhnLoader.exec_script_ahn! args
|
119
121
|
end
|
122
|
+
path
|
120
123
|
end
|
121
124
|
|
122
125
|
def running_script_ahn?
|
@@ -15,21 +15,21 @@ describe SimonGame do
|
|
15
15
|
|
16
16
|
describe "#random_number" do
|
17
17
|
|
18
|
-
before { subject.
|
18
|
+
before { allow(subject).to receive(:rand).and_return(example_number) }
|
19
19
|
|
20
20
|
it "generates a random number" do
|
21
|
-
subject.random_number.
|
21
|
+
expect(subject.random_number).to eq example_number
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe "#update_number" do
|
26
26
|
|
27
27
|
before { subject.number = "123" }
|
28
|
-
before { subject.
|
28
|
+
before { allow(subject).to receive(:random_number).and_return "4" }
|
29
29
|
|
30
30
|
it "adds a digit to the end of the number" do
|
31
31
|
subject.update_number
|
32
|
-
subject.number.
|
32
|
+
expect(subject.number).to eq "1234"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -40,7 +40,7 @@ describe SimonGame do
|
|
40
40
|
before { subject.number = "3" }
|
41
41
|
|
42
42
|
it "asks for a 1 digits number" do
|
43
|
-
subject.
|
43
|
+
expect(subject).to receive(:ask).with("3", :limit => 1).and_return(example_response)
|
44
44
|
subject.collect_attempt
|
45
45
|
end
|
46
46
|
end
|
@@ -50,7 +50,7 @@ describe SimonGame do
|
|
50
50
|
before { subject.number = long_number }
|
51
51
|
|
52
52
|
it "asks for a 5 digits number" do
|
53
|
-
subject.
|
53
|
+
expect(subject).to receive(:ask).with(long_number, :limit => 5).and_return(long_response)
|
54
54
|
subject.collect_attempt
|
55
55
|
end
|
56
56
|
end
|
@@ -60,9 +60,9 @@ describe SimonGame do
|
|
60
60
|
before { subject.number = "12345" }
|
61
61
|
|
62
62
|
it "based on the user's response" do
|
63
|
-
subject.
|
63
|
+
expect(subject).to receive(:ask).with("12345", :limit => 5).and_return(long_response)
|
64
64
|
subject.collect_attempt
|
65
|
-
subject.attempt.
|
65
|
+
expect(subject.attempt).to eq long_number
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -76,7 +76,7 @@ describe SimonGame do
|
|
76
76
|
before { subject.attempt = "7" }
|
77
77
|
|
78
78
|
it "returns true" do
|
79
|
-
subject.attempt_correct
|
79
|
+
expect(subject.attempt_correct?).to be_truthy
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -85,7 +85,7 @@ describe SimonGame do
|
|
85
85
|
before { subject.attempt = "9" }
|
86
86
|
|
87
87
|
it "returns true" do
|
88
|
-
subject.attempt_correct
|
88
|
+
expect(subject.attempt_correct?).to be_falsey
|
89
89
|
end
|
90
90
|
end
|
91
91
|
end
|
@@ -93,10 +93,10 @@ describe SimonGame do
|
|
93
93
|
describe "#verify_attempt" do
|
94
94
|
context "when the user is a good guesser" do
|
95
95
|
|
96
|
-
before { subject.
|
96
|
+
before { allow(subject).to receive(:attempt_correct?).and_return true }
|
97
97
|
|
98
98
|
it "congradulates them" do
|
99
|
-
subject.
|
99
|
+
expect(subject).to receive(:speak).with('good')
|
100
100
|
subject.verify_attempt
|
101
101
|
end
|
102
102
|
end
|
@@ -107,7 +107,7 @@ describe SimonGame do
|
|
107
107
|
before { subject.attempt = "12346" }
|
108
108
|
|
109
109
|
it "congradulates them" do
|
110
|
-
subject.
|
110
|
+
expect(subject).to receive(:speak).with('4 times wrong, try again smarty')
|
111
111
|
subject.verify_attempt
|
112
112
|
end
|
113
113
|
end
|
@@ -118,22 +118,22 @@ describe SimonGame do
|
|
118
118
|
before { subject.reset }
|
119
119
|
|
120
120
|
it "sets @number" do
|
121
|
-
subject.number.
|
121
|
+
expect(subject.number).to eq ''
|
122
122
|
end
|
123
123
|
|
124
124
|
it "sets @attempt" do
|
125
|
-
subject.attempt.
|
125
|
+
expect(subject.attempt).to eq ''
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
129
129
|
describe "#run" do
|
130
130
|
it "loops the loop" do
|
131
|
-
subject.
|
132
|
-
subject.
|
131
|
+
expect(subject).to receive :answer
|
132
|
+
expect(subject).to receive :reset
|
133
133
|
|
134
|
-
subject.
|
135
|
-
subject.
|
136
|
-
subject.
|
134
|
+
expect(subject).to receive :update_number
|
135
|
+
expect(subject).to receive :collect_attempt
|
136
|
+
expect(subject).to receive(:verify_attempt).and_throw :rspec_loop_stop
|
137
137
|
|
138
138
|
catch :rspec_loop_stop do
|
139
139
|
subject.run
|
@@ -163,10 +163,10 @@ module Adhearsion
|
|
163
163
|
logger.info "Received SIG#{signal}. Shutting down."
|
164
164
|
Adhearsion::Process.shutdown
|
165
165
|
when 'HUP'
|
166
|
-
logger.
|
166
|
+
logger.info "Received SIGHUP. Reopening logfiles."
|
167
167
|
Adhearsion::Logging.reopen_logs
|
168
168
|
when 'ALRM'
|
169
|
-
logger.
|
169
|
+
logger.info "Received SIGALRM. Toggling trace logging."
|
170
170
|
Adhearsion::Logging.toggle_trace!
|
171
171
|
when 'ABRT'
|
172
172
|
logger.info "Received ABRT signal. Forcing stop."
|
data/lib/adhearsion/plugin.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'loquacious'
|
4
|
+
require 'active_support/inflector'
|
5
|
+
require 'adhearsion/configuration'
|
6
|
+
%w(
|
7
|
+
collection
|
8
|
+
initializer
|
9
|
+
).each { |r| require "adhearsion/plugin/#{r}" }
|
4
10
|
|
5
11
|
module Adhearsion
|
6
12
|
|
@@ -51,14 +57,8 @@ module Adhearsion
|
|
51
57
|
#
|
52
58
|
class Plugin
|
53
59
|
|
54
|
-
extend ActiveSupport::Autoload
|
55
|
-
|
56
60
|
METHODS_OPTIONS = {:load => true, :scope => false}
|
57
61
|
|
58
|
-
autoload :Configuration
|
59
|
-
autoload :Collection
|
60
|
-
autoload :Initializer
|
61
|
-
|
62
62
|
class << self
|
63
63
|
##
|
64
64
|
# Class method that allows any subclass (any Adhearsion plugin) to register rake tasks.
|