adhearsion 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/CHANGELOG +3 -0
  2. data/adhearsion.gemspec +1 -2
  3. data/lib/adhearsion/commands.rb +3 -9
  4. data/lib/adhearsion/console.rb +11 -2
  5. data/lib/adhearsion/generators.rb +5 -0
  6. data/{app_generators/ahn → lib/adhearsion/generators/app}/USAGE +0 -0
  7. data/lib/adhearsion/generators/app/app_generator.rb +47 -0
  8. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/.ahnrc +0 -0
  9. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/Gemfile +1 -1
  10. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/README +0 -0
  11. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/Rakefile +0 -0
  12. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/ami_remote/ami_remote.rb +0 -0
  13. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/HOW_TO_ENABLE +0 -0
  14. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/stomp_gateway/README.markdown +0 -0
  15. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/stomp_gateway/stomp_gateway.rb +0 -0
  16. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/stomp_gateway/stomp_gateway.yml +0 -0
  17. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/xmpp_gateway/README.markdown +0 -0
  18. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/xmpp_gateway/xmpp_gateway.rb +0 -0
  19. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/disabled/xmpp_gateway/xmpp_gateway.yml +0 -0
  20. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/components/simon_game/simon_game.rb +0 -0
  21. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/config/environment.rb +0 -0
  22. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/config/startup.rb +0 -0
  23. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/dialplan.rb +0 -0
  24. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/events.rb +0 -0
  25. data/{app_generators/ahn → lib/adhearsion/generators/app}/templates/script/ahn +0 -0
  26. data/lib/adhearsion/version.rb +1 -1
  27. data/spec/adhearsion/cli_spec.rb +0 -1
  28. data/spec/spec_helper.rb +0 -1
  29. data/spec/support/initializer_stubs.rb +1 -1
  30. metadata +57 -67
  31. data/app_generators/ahn/ahn_generator.rb +0 -89
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 1.2.4
2
+ - Backported Thor-based generators from Adhearsion 2 in order to escape Rubigen.
3
+
1
4
  1.2.3
2
5
  - Changes from 1.2.2, without an accidental API change which slipped in
3
6
 
@@ -27,12 +27,11 @@ Gem::Specification.new do |s|
27
27
  # on the safe side.
28
28
  s.add_runtime_dependency "i18n"
29
29
  s.add_runtime_dependency "json"
30
- s.add_runtime_dependency "rubigen", [">= 1.5.6"]
30
+ s.add_runtime_dependency "thor"
31
31
  s.add_runtime_dependency "rake"
32
32
  s.add_runtime_dependency "pry"
33
33
 
34
34
  # Development dependencies
35
- s.add_development_dependency 'rubigen', [">= 1.5.6"]
36
35
  s.add_development_dependency 'rspec', [">= 2.4.0"]
37
36
  s.add_development_dependency 'flexmock'
38
37
  s.add_development_dependency 'activerecord', [">= 2.1.0"]
@@ -91,15 +91,9 @@ USAGE
91
91
  if args.size.zero?
92
92
  raise CommandHandler::UnknownCommand.new("Must specify something to create!")
93
93
  elsif args.size == 1
94
- # We're creating a project
95
- path = args.first
96
- require 'rubigen'
97
- require 'rubigen/scripts/generate'
98
- source = RubiGen::PathSource.new(:application,
99
- File.join(File.dirname(__FILE__), "../../app_generators"))
100
- RubiGen::Base.reset_sources
101
- RubiGen::Base.append_sources source
102
- RubiGen::Scripts::Generate.new.run([path], :generator => 'ahn')
94
+ require 'adhearsion/generators'
95
+ require 'adhearsion/generators/app/app_generator'
96
+ Adhearsion::Generators::AppGenerator.start
103
97
  elsif args.size == 2
104
98
  # We're creating a feature (e.g. a component)
105
99
  feature_type, component_name = args
@@ -9,8 +9,17 @@ module Adhearsion
9
9
  # Start the Adhearsion console
10
10
  #
11
11
  def run
12
- Pry.prompt = [ proc { |obj, nest_level, pry_instance = nil| "AHN#{' ' * nest_level}> " },
13
- proc { |obj, nest_level, pry_instance = nil| "AHN#{' ' * nest_level}? " } ]
12
+ Pry.prompt = [
13
+ proc do |*args|
14
+ obj, nest_level, pry_instance = args
15
+ "AHN#{' ' * nest_level}> "
16
+ end,
17
+ proc do |*args|
18
+ obj, nest_level, pry_instance = args
19
+ "AHN#{' ' * nest_level}? "
20
+ end
21
+ ]
22
+ Pry.config.command_prefix = "%"
14
23
  pry
15
24
  end
16
25
 
@@ -0,0 +1,5 @@
1
+ module Adhearsion
2
+ module Generators
3
+ extend ActiveSupport::Autoload
4
+ end
5
+ end
@@ -0,0 +1,47 @@
1
+ begin
2
+ require 'thor/group'
3
+ rescue LoadError
4
+ puts "Thor is not available.\nIf you ran this command from a git checkout " \
5
+ "of Adhearsion, please make sure thor is installed,\nand run this command " \
6
+ "as `ruby #{$0} #{(ARGV | ['--dev']).join(" ")}`"
7
+ exit
8
+ end
9
+
10
+ module Adhearsion
11
+ module Generators
12
+ class AppGenerator < Thor::Group
13
+ include Thor::Actions
14
+
15
+ BASEDIRS = %w{
16
+ components
17
+ config
18
+ script
19
+ }
20
+
21
+ argument :app_action, :type => :string
22
+ argument :app_path, :type => :string
23
+
24
+ def self.source_root(path = nil)
25
+ path = File.join(base_root, 'templates')
26
+ path if File.exists?(path)
27
+ end
28
+
29
+ def self.base_root
30
+ File.dirname(__FILE__)
31
+ end
32
+
33
+ def setup_project
34
+ self.destination_root = @app_path
35
+ BASEDIRS.each { |dir| directory dir }
36
+ %w{
37
+ .ahnrc
38
+ dialplan.rb
39
+ events.rb
40
+ README
41
+ Rakefile
42
+ Gemfile
43
+ }.each { |file| copy_file file }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "adhearsion", ">= 1.2.1"
3
+ gem "adhearsion", ">= 1.2.4"
4
4
 
5
5
  #
6
6
  # Here are some example components you might like to use. Simply
@@ -2,7 +2,7 @@ module Adhearsion #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1 unless defined? MAJOR
4
4
  MINOR = 2 unless defined? MINOR
5
- TINY = 3 unless defined? TINY
5
+ TINY = 4 unless defined? TINY
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.') unless defined? STRING
8
8
  end
@@ -264,7 +264,6 @@ describe 'The "create" command' do
264
264
  the_following_code {
265
265
  tmp_path = new_tmp_dir
266
266
  simulate_args "create", tmp_path
267
- RubiGen::Base.default_options.merge! :quiet => true
268
267
  # capture_stdout { Adhearsion::CLI::AhnCommand.execute! }
269
268
  execute_ahn_command
270
269
  File.exists?(File.join(tmp_path, ".ahnrc")).should be true
@@ -26,7 +26,6 @@ $: << File.dirname(__FILE__)
26
26
  bundler/setup
27
27
  flexmock/rspec
28
28
  active_support
29
- rubigen
30
29
  pp
31
30
  stringio
32
31
  adhearsion
@@ -1,6 +1,6 @@
1
1
  module InitializerStubs
2
2
  DEFAULT_AHNRC_DATA_STRUCTURE = YAML.load_file(
3
- File.dirname(__FILE__) + "/../../app_generators/ahn/templates/.ahnrc"
3
+ File.dirname(__FILE__) + "/../../lib/adhearsion/generators/app/templates/.ahnrc"
4
4
  ) unless defined? DEFAULT_AHNRC_DATA_STRUCTURE
5
5
 
6
6
  UNWANTED_BEHAVIOR = {
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: 1.2.3
4
+ version: 1.2.4
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: 2011-11-18 00:00:00.000000000 Z
15
+ date: 2012-01-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
19
- requirement: &2153249240 !ruby/object:Gem::Requirement
19
+ requirement: &2152387620 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 1.0.10
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2153249240
27
+ version_requirements: *2152387620
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: log4r
30
- requirement: &2153248640 !ruby/object:Gem::Requirement
30
+ requirement: &2152387100 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 1.0.5
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2153248640
38
+ version_requirements: *2152387100
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: activesupport
41
- requirement: &2160508360 !ruby/object:Gem::Requirement
41
+ requirement: &2152386600 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 2.1.0
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *2160508360
49
+ version_requirements: *2152386600
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: i18n
52
- requirement: &2160507740 !ruby/object:Gem::Requirement
52
+ requirement: &2152386200 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '0'
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *2160507740
60
+ version_requirements: *2152386200
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: json
63
- requirement: &2160506720 !ruby/object:Gem::Requirement
63
+ requirement: &2152385680 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,21 +68,21 @@ dependencies:
68
68
  version: '0'
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *2160506720
71
+ version_requirements: *2152385680
72
72
  - !ruby/object:Gem::Dependency
73
- name: rubigen
74
- requirement: &2160505340 !ruby/object:Gem::Requirement
73
+ name: thor
74
+ requirement: &2152385260 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ! '>='
78
78
  - !ruby/object:Gem::Version
79
- version: 1.5.6
79
+ version: '0'
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *2160505340
82
+ version_requirements: *2152385260
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
- requirement: &2160504180 !ruby/object:Gem::Requirement
85
+ requirement: &2152384840 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ! '>='
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '0'
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *2160504180
93
+ version_requirements: *2152384840
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: pry
96
- requirement: &2160500800 !ruby/object:Gem::Requirement
96
+ requirement: &2152384380 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,21 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :runtime
103
103
  prerelease: false
104
- version_requirements: *2160500800
105
- - !ruby/object:Gem::Dependency
106
- name: rubigen
107
- requirement: &2160498080 !ruby/object:Gem::Requirement
108
- none: false
109
- requirements:
110
- - - ! '>='
111
- - !ruby/object:Gem::Version
112
- version: 1.5.6
113
- type: :development
114
- prerelease: false
115
- version_requirements: *2160498080
104
+ version_requirements: *2152384380
116
105
  - !ruby/object:Gem::Dependency
117
106
  name: rspec
118
- requirement: &2160496140 !ruby/object:Gem::Requirement
107
+ requirement: &2152383840 !ruby/object:Gem::Requirement
119
108
  none: false
120
109
  requirements:
121
110
  - - ! '>='
@@ -123,10 +112,10 @@ dependencies:
123
112
  version: 2.4.0
124
113
  type: :development
125
114
  prerelease: false
126
- version_requirements: *2160496140
115
+ version_requirements: *2152383840
127
116
  - !ruby/object:Gem::Dependency
128
117
  name: flexmock
129
- requirement: &2160494480 !ruby/object:Gem::Requirement
118
+ requirement: &2152383380 !ruby/object:Gem::Requirement
130
119
  none: false
131
120
  requirements:
132
121
  - - ! '>='
@@ -134,10 +123,10 @@ dependencies:
134
123
  version: '0'
135
124
  type: :development
136
125
  prerelease: false
137
- version_requirements: *2160494480
126
+ version_requirements: *2152383380
138
127
  - !ruby/object:Gem::Dependency
139
128
  name: activerecord
140
- requirement: &2160493320 !ruby/object:Gem::Requirement
129
+ requirement: &2152382820 !ruby/object:Gem::Requirement
141
130
  none: false
142
131
  requirements:
143
132
  - - ! '>='
@@ -145,10 +134,10 @@ dependencies:
145
134
  version: 2.1.0
146
135
  type: :development
147
136
  prerelease: false
148
- version_requirements: *2160493320
137
+ version_requirements: *2152382820
149
138
  - !ruby/object:Gem::Dependency
150
139
  name: rake
151
- requirement: &2160491920 !ruby/object:Gem::Requirement
140
+ requirement: &2152382360 !ruby/object:Gem::Requirement
152
141
  none: false
153
142
  requirements:
154
143
  - - ! '>='
@@ -156,10 +145,10 @@ dependencies:
156
145
  version: '0'
157
146
  type: :development
158
147
  prerelease: false
159
- version_requirements: *2160491920
148
+ version_requirements: *2152382360
160
149
  - !ruby/object:Gem::Dependency
161
150
  name: simplecov
162
- requirement: &2160491240 !ruby/object:Gem::Requirement
151
+ requirement: &2152381860 !ruby/object:Gem::Requirement
163
152
  none: false
164
153
  requirements:
165
154
  - - ! '>='
@@ -167,10 +156,10 @@ dependencies:
167
156
  version: '0'
168
157
  type: :development
169
158
  prerelease: false
170
- version_requirements: *2160491240
159
+ version_requirements: *2152381860
171
160
  - !ruby/object:Gem::Dependency
172
161
  name: simplecov-rcov
173
- requirement: &2160490120 !ruby/object:Gem::Requirement
162
+ requirement: &2152381440 !ruby/object:Gem::Requirement
174
163
  none: false
175
164
  requirements:
176
165
  - - ! '>='
@@ -178,10 +167,10 @@ dependencies:
178
167
  version: '0'
179
168
  type: :development
180
169
  prerelease: false
181
- version_requirements: *2160490120
170
+ version_requirements: *2152381440
182
171
  - !ruby/object:Gem::Dependency
183
172
  name: ci_reporter
184
- requirement: &2160488600 !ruby/object:Gem::Requirement
173
+ requirement: &2152397320 !ruby/object:Gem::Requirement
185
174
  none: false
186
175
  requirements:
187
176
  - - ! '>='
@@ -189,7 +178,7 @@ dependencies:
189
178
  version: '0'
190
179
  type: :development
191
180
  prerelease: false
192
- version_requirements: *2160488600
181
+ version_requirements: *2152397320
193
182
  description: Adhearsion is an open-source telephony development framework
194
183
  email: dev&Adhearsion.com
195
184
  executables:
@@ -208,26 +197,6 @@ files:
208
197
  - README.markdown
209
198
  - Rakefile
210
199
  - adhearsion.gemspec
211
- - app_generators/ahn/USAGE
212
- - app_generators/ahn/ahn_generator.rb
213
- - app_generators/ahn/templates/.ahnrc
214
- - app_generators/ahn/templates/Gemfile
215
- - app_generators/ahn/templates/README
216
- - app_generators/ahn/templates/Rakefile
217
- - app_generators/ahn/templates/components/ami_remote/ami_remote.rb
218
- - app_generators/ahn/templates/components/disabled/HOW_TO_ENABLE
219
- - app_generators/ahn/templates/components/disabled/stomp_gateway/README.markdown
220
- - app_generators/ahn/templates/components/disabled/stomp_gateway/stomp_gateway.rb
221
- - app_generators/ahn/templates/components/disabled/stomp_gateway/stomp_gateway.yml
222
- - app_generators/ahn/templates/components/disabled/xmpp_gateway/README.markdown
223
- - app_generators/ahn/templates/components/disabled/xmpp_gateway/xmpp_gateway.rb
224
- - app_generators/ahn/templates/components/disabled/xmpp_gateway/xmpp_gateway.yml
225
- - app_generators/ahn/templates/components/simon_game/simon_game.rb
226
- - app_generators/ahn/templates/config/environment.rb
227
- - app_generators/ahn/templates/config/startup.rb
228
- - app_generators/ahn/templates/dialplan.rb
229
- - app_generators/ahn/templates/events.rb
230
- - app_generators/ahn/templates/script/ahn
231
200
  - bin/ahn
232
201
  - bin/ahnctl
233
202
  - bin/jahn
@@ -253,6 +222,27 @@ files:
253
222
  - lib/adhearsion/foundation/string.rb
254
223
  - lib/adhearsion/foundation/synchronized_hash.rb
255
224
  - lib/adhearsion/foundation/thread_safety.rb
225
+ - lib/adhearsion/generators.rb
226
+ - lib/adhearsion/generators/app/USAGE
227
+ - lib/adhearsion/generators/app/app_generator.rb
228
+ - lib/adhearsion/generators/app/templates/.ahnrc
229
+ - lib/adhearsion/generators/app/templates/Gemfile
230
+ - lib/adhearsion/generators/app/templates/README
231
+ - lib/adhearsion/generators/app/templates/Rakefile
232
+ - lib/adhearsion/generators/app/templates/components/ami_remote/ami_remote.rb
233
+ - lib/adhearsion/generators/app/templates/components/disabled/HOW_TO_ENABLE
234
+ - lib/adhearsion/generators/app/templates/components/disabled/stomp_gateway/README.markdown
235
+ - lib/adhearsion/generators/app/templates/components/disabled/stomp_gateway/stomp_gateway.rb
236
+ - lib/adhearsion/generators/app/templates/components/disabled/stomp_gateway/stomp_gateway.yml
237
+ - lib/adhearsion/generators/app/templates/components/disabled/xmpp_gateway/README.markdown
238
+ - lib/adhearsion/generators/app/templates/components/disabled/xmpp_gateway/xmpp_gateway.rb
239
+ - lib/adhearsion/generators/app/templates/components/disabled/xmpp_gateway/xmpp_gateway.yml
240
+ - lib/adhearsion/generators/app/templates/components/simon_game/simon_game.rb
241
+ - lib/adhearsion/generators/app/templates/config/environment.rb
242
+ - lib/adhearsion/generators/app/templates/config/startup.rb
243
+ - lib/adhearsion/generators/app/templates/dialplan.rb
244
+ - lib/adhearsion/generators/app/templates/events.rb
245
+ - lib/adhearsion/generators/app/templates/script/ahn
256
246
  - lib/adhearsion/host_definitions.rb
257
247
  - lib/adhearsion/initializer.rb
258
248
  - lib/adhearsion/initializer/asterisk.rb
@@ -377,7 +367,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
377
367
  version: '0'
378
368
  segments:
379
369
  - 0
380
- hash: 4207106213381902731
370
+ hash: 2749044386952630171
381
371
  required_rubygems_version: !ruby/object:Gem::Requirement
382
372
  none: false
383
373
  requirements:
@@ -386,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
376
  version: '0'
387
377
  segments:
388
378
  - 0
389
- hash: 4207106213381902731
379
+ hash: 2749044386952630171
390
380
  requirements: []
391
381
  rubyforge_project:
392
382
  rubygems_version: 1.8.10
@@ -1,89 +0,0 @@
1
- class AhnGenerator < RubiGen::Base
2
-
3
- DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
4
- Config::CONFIG['ruby_install_name'])
5
-
6
- default_options :author => nil
7
-
8
- attr_reader :name, :component
9
-
10
- def initialize(runtime_args, runtime_options = {})
11
- super
12
- usage if args.empty?
13
- @destination_root = File.expand_path(args.shift)
14
- @name = base_name
15
- @component = 'simon_game'
16
- extract_options
17
- end
18
-
19
- def manifest
20
- record do |m|
21
- # Ensure appropriate folder(s) exists
22
- m.directory ''
23
- BASEDIRS.each { |path| m.directory path }
24
-
25
- m.file *[".ahnrc"]*2
26
-
27
- m.file *["components/simon_game/simon_game.rb"]*2
28
- m.file *["components/ami_remote/ami_remote.rb"]*2
29
-
30
- m.file *["components/disabled/xmpp_gateway/xmpp_gateway.rb"]*2
31
- m.file *["components/disabled/xmpp_gateway/xmpp_gateway.yml"]*2
32
- m.file *["components/disabled/xmpp_gateway/README.markdown"]*2
33
-
34
- m.file *["components/disabled/stomp_gateway/stomp_gateway.rb"]*2
35
- m.file *["components/disabled/stomp_gateway/stomp_gateway.yml"]*2
36
- m.file *["components/disabled/stomp_gateway/README.markdown"]*2
37
-
38
- m.file *["config/environment.rb"]*2
39
- m.file *["config/startup.rb"]*2
40
- m.file *["dialplan.rb"]*2
41
- m.file *["events.rb"]*2
42
- m.file *["README"]*2
43
- m.file *["Rakefile"]*2
44
- m.file *["Gemfile"]*2
45
- m.file *["script/ahn"]*2
46
-
47
- # m.dependency "install_rubigen_scripts", [destination_root, 'ahn', 'adhearsion', 'test_spec'],
48
- # :shebang => options[:shebang], :collision => :force
49
- end
50
- end
51
-
52
- protected
53
- def banner
54
- <<-EOS
55
- Creates a ...
56
-
57
- USAGE: #{spec.name} name"
58
- EOS
59
- end
60
-
61
- def add_options!(opts)
62
- opts.separator ''
63
- opts.separator 'Options:'
64
- # For each option below, place the default
65
- # at the top of the file next to "default_options"
66
- # opts.on("-a", "--author=\"Your Name\"", String,
67
- # "Some comment about this option",
68
- # "Default: none") { |options[:author]| }
69
- opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
70
- end
71
-
72
- def extract_options
73
- # for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
74
- # Templates can access these value via the attr_reader-generated methods, but not the
75
- # raw instance variable value.
76
- # @author = options[:author]
77
- end
78
-
79
- # Installation skeleton. Intermediate directories are automatically
80
- # created so don't sweat their absence here.
81
- BASEDIRS = %w(
82
- components/simon_game
83
- components/disabled/stomp_gateway
84
- components/disabled/xmpp_gateway
85
- components/ami_remote
86
- config
87
- script
88
- )
89
- end