spiderfw 0.6.23 → 0.6.24
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -1
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/apps/config_editor/_init.rb +1 -2
- data/apps/config_editor/controllers/config_editor_controller.rb +1 -7
- data/apps/core/admin/controllers/admin_controller.rb +1 -1
- data/apps/core/admin/public/css/sass/admin.css +35 -31
- data/apps/core/admin/public/sass/admin.scss +6 -1
- data/apps/core/components/widgets/crud/crud.shtml +2 -2
- data/apps/core/components/widgets/table/table.rb +5 -5
- data/apps/core/forms/tags/element_row.erb +15 -10
- data/apps/core/forms/widgets/form/form.rb +35 -22
- data/apps/core/forms/widgets/inputs/checkbox/checkbox.shtml +2 -2
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +2 -2
- data/apps/core/forms/widgets/inputs/file_input/file_input.shtml +2 -2
- data/apps/core/forms/widgets/inputs/html_area/html_area.shtml +2 -2
- data/apps/core/forms/widgets/inputs/input/input.shtml +2 -2
- data/apps/core/forms/widgets/inputs/password/password.shtml +2 -2
- data/apps/core/forms/widgets/inputs/search_select/search_select.shtml +1 -1
- data/apps/core/forms/widgets/inputs/select/select.shtml +2 -2
- data/apps/core/forms/widgets/inputs/text/text.shtml +2 -2
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +2 -2
- data/apps/core/forms/widgets/inputs/time_span/time_span.shtml +1 -1
- data/blueprints/home/config.ru +8 -0
- data/lib/spiderfw/app.rb +416 -224
- data/lib/spiderfw/cmd/commands/app.rb +243 -239
- data/lib/spiderfw/cmd/commands/cert.rb +421 -417
- data/lib/spiderfw/cmd/commands/config.rb +85 -82
- data/lib/spiderfw/cmd/commands/console.rb +64 -40
- data/lib/spiderfw/cmd/commands/content.rb +29 -25
- data/lib/spiderfw/cmd/commands/create.rb +58 -54
- data/lib/spiderfw/cmd/commands/model.rb +118 -114
- data/lib/spiderfw/cmd/commands/setup.rb +55 -51
- data/lib/spiderfw/cmd/commands/test.rb +63 -59
- data/lib/spiderfw/cmd/commands/webserver.rb +56 -51
- data/lib/spiderfw/config/options/spider.rb +4 -3
- data/lib/spiderfw/controller/controller.rb +2 -0
- data/lib/spiderfw/controller/http_controller.rb +1 -2
- data/lib/spiderfw/controller/mixins/static_content.rb +3 -3
- data/lib/spiderfw/controller/mixins/visual.rb +30 -15
- data/lib/spiderfw/controller/response.rb +84 -0
- data/lib/spiderfw/controller/session/file_session.rb +2 -2
- data/lib/spiderfw/http/adapters/rack.rb +12 -13
- data/lib/spiderfw/http/server.rb +80 -46
- data/lib/spiderfw/i18n/cldr.rb +6 -9
- data/lib/spiderfw/model/base_model.rb +103 -23
- data/lib/spiderfw/model/condition.rb +110 -25
- data/lib/spiderfw/model/mappers/db_mapper.rb +14 -6
- data/lib/spiderfw/model/mappers/mapper.rb +440 -197
- data/lib/spiderfw/model/model.rb +105 -21
- data/lib/spiderfw/model/model_hash.rb +9 -1
- data/lib/spiderfw/model/query.rb +50 -9
- data/lib/spiderfw/model/query_set.rb +211 -44
- data/lib/spiderfw/model/request.rb +28 -21
- data/lib/spiderfw/model/storage/base_storage.rb +125 -10
- data/lib/spiderfw/model/storage/db/db_storage.rb +7 -4
- data/lib/spiderfw/model/storage.rb +8 -1
- data/lib/spiderfw/setup/spider_setup_wizard.rb +9 -7
- data/lib/spiderfw/spider.rb +270 -43
- data/lib/spiderfw/templates/layout.rb +9 -4
- data/lib/spiderfw/templates/resources/sass.rb +3 -2
- data/lib/spiderfw/templates/template.rb +1 -0
- data/lib/spiderfw/utils/annotations.rb +3 -1
- data/lib/spiderfw/utils/logger.rb +1 -1
- data/lib/spiderfw/utils/monkey/symbol.rb +4 -2
- data/lib/spiderfw/utils/shared_store/file_shared_store.rb +2 -2
- data/lib/spiderfw/utils/thread_out.rb +3 -1
- data/public/css/error_page.css +83 -0
- data/public/js/error_page.js +5 -0
- data/spider.gemspec +4 -1
- data/templates/email/error.erb +9 -0
- metadata +28 -12
- data/apps/config_editor/widgets/edit_bool/edit_bool.rb +0 -8
- data/apps/config_editor/widgets/edit_bool/edit_bool.shtml +0 -5
@@ -1,263 +1,267 @@
|
|
1
|
-
|
1
|
+
module Spider::CommandLine
|
2
2
|
|
3
|
+
class AppCommand < CmdParse::Command
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
list.set_execution_block do |args|
|
40
|
-
if @installed
|
41
|
-
require 'spiderfw/home'
|
42
|
-
home = Spider::Home.new(Dir.pwd)
|
43
|
-
installed = {}
|
44
|
-
Spider.init_base
|
45
|
-
active = Spider.config.get('apps')
|
46
|
-
Spider.home.apps.each do |app, info|
|
47
|
-
installed[app] = {
|
48
|
-
:active => active.include?(app)
|
49
|
-
}
|
50
|
-
if spec = info[:spec]
|
51
|
-
installed[app].merge!({
|
52
|
-
:version => spec.version
|
53
|
-
})
|
54
|
-
end
|
55
|
-
end
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
super('app', true, true )
|
8
|
+
@short_desc = _("Manage apps")
|
9
|
+
|
10
|
+
|
11
|
+
self.options = CmdParse::OptionParserWrapper.new do |opt|
|
12
|
+
opt.on("--proxy [SERVER]", _("Proxy server to use (http://user:pass@host:port)"), "-p"){ |p|
|
13
|
+
ENV['http_proxy'] = p
|
14
|
+
}
|
15
|
+
opt.on("--server [SERVER]", _("App server"), "-s") { |s|
|
16
|
+
@server_url = s
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
@installed = true
|
21
|
+
|
22
|
+
list = CmdParse::Command.new( 'list', false )
|
23
|
+
list.short_desc = _("List installed and available apps")
|
24
|
+
list.options = CmdParse::OptionParserWrapper.new do |opt|
|
25
|
+
opt.on("--installed", _("List installed apps (the default)")) { |installed|
|
26
|
+
@remote = false
|
27
|
+
}
|
28
|
+
opt.on("--remote", _("List only remote apps"), "-r"){ |r|
|
29
|
+
@installed = false
|
30
|
+
@remote = true
|
31
|
+
}
|
32
|
+
opt.on("--all", _("List both local and remote apps"), "-a"){ |a|
|
33
|
+
@installed = true
|
34
|
+
@remote = true
|
35
|
+
@all = true
|
36
|
+
}
|
37
|
+
opt.on("--core", _("Include apps that come with spider"), "-c"){ |c|
|
38
|
+
@core = true
|
39
|
+
}
|
56
40
|
end
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
41
|
+
list.set_execution_block do |args|
|
42
|
+
if @installed
|
43
|
+
require 'spiderfw/home'
|
44
|
+
home = Spider::Home.new(Dir.pwd)
|
45
|
+
installed = {}
|
61
46
|
Spider.init_base
|
62
|
-
|
47
|
+
active = Spider.config.get('apps')
|
48
|
+
Spider.home.apps.each do |app, info|
|
49
|
+
installed[app] = {
|
50
|
+
:active => active.include?(app)
|
51
|
+
}
|
52
|
+
if spec = info[:spec]
|
53
|
+
installed[app].merge!({
|
54
|
+
:version => spec.version
|
55
|
+
})
|
56
|
+
end
|
57
|
+
end
|
63
58
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
59
|
+
if @remote
|
60
|
+
require 'spiderfw/setup/app_server_client'
|
61
|
+
unless @server_url
|
62
|
+
require 'spiderfw/spider'
|
63
|
+
Spider.init_base
|
64
|
+
@server_url = Spider.config.get('app_server.url')
|
65
|
+
end
|
66
|
+
client = Spider::AppServerClient.new(@server_url)
|
67
|
+
remote = {}
|
68
|
+
client.specs.each do |app|
|
69
|
+
remote[app.app_id] = {
|
70
|
+
:version => app.version
|
71
|
+
}
|
72
|
+
if installed && installed[app] && installed[app][:version]
|
73
|
+
v = Gem::Version.new(installed[app][:version])
|
74
|
+
if v < app.version
|
75
|
+
installed[app][:available] = app.version
|
76
|
+
end
|
74
77
|
end
|
75
78
|
end
|
76
79
|
end
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
80
|
+
if @installed
|
81
|
+
puts
|
82
|
+
puts "*** "+_('INSTALLED APPS')+" ***"
|
83
|
+
puts
|
84
|
+
installed.keys.sort.each do |app|
|
85
|
+
details = installed[app]
|
86
|
+
str = app
|
87
|
+
str += " #{details[:version]}" if details[:version]
|
88
|
+
str += " (#{_('not loaded')})" unless details[:active]
|
89
|
+
puts str
|
90
|
+
end
|
88
91
|
end
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
92
|
+
if @remote
|
93
|
+
puts
|
94
|
+
puts "*** "+_('REMOTE APPS')+" ***"
|
95
|
+
puts
|
96
|
+
remote.keys.sort.each do |app|
|
97
|
+
details = remote[app]
|
98
|
+
str = app
|
99
|
+
str += " #{details[:version]}" if details[:version]
|
100
|
+
puts str
|
101
|
+
end
|
99
102
|
end
|
103
|
+
puts
|
100
104
|
end
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
@
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
@
|
117
|
-
|
118
|
-
|
119
|
-
opt.on("--no-activate", _("Don't activate installed apps")){ |s| @no_activate = true }
|
120
|
-
opt.on("--branch [BRANCH]", _("Install app from specific branch"), "-b"){ |b| @branch = b }
|
121
|
-
end
|
122
|
-
install.set_execution_block do |args|
|
123
|
-
$SPIDER_INTERACTIVE = true
|
124
|
-
unless File.exist?('init.rb') && File.directory?('apps')
|
125
|
-
puts _("Please execute this command from the home folder")
|
126
|
-
exit
|
127
|
-
end
|
128
|
-
require 'spiderfw/setup/app_manager'
|
129
|
-
options = {
|
130
|
-
:use_git => @git, :all => @all, :no_deps => @no_deps, :optional => @optional,
|
131
|
-
:no_gems => @no_gems, :no_optional_gems => @no_optional_gems, :no_activate => @no_activate
|
132
|
-
}
|
133
|
-
options[:url] = @server_url if @server_url
|
134
|
-
options[:branch] = @branch if @branch
|
135
|
-
if @git && !Spider::AppManager.git_available?
|
136
|
-
puts _("git gem not available; install git gem for Git support")
|
137
|
-
exit
|
138
|
-
end
|
139
|
-
apps = args
|
140
|
-
installed = []
|
141
|
-
apps.each do |app|
|
142
|
-
installed << app if Spider::AppManager.installed?(app)
|
143
|
-
end
|
144
|
-
unless installed.empty?
|
145
|
-
puts _("%s already installed") % installed.join(', ')
|
105
|
+
self.add_command( list )
|
106
|
+
|
107
|
+
|
108
|
+
install = CmdParse::Command.new( 'install', false )
|
109
|
+
install.short_desc = _("Install an app")
|
110
|
+
install.options = CmdParse::OptionParserWrapper.new do |opt|
|
111
|
+
opt.on("--[no-]git", _("Use git for installing apps"), "-g"){ |r| @git = r }
|
112
|
+
opt.on("--no-dependencies", _("Don't install other apps this one depends on"), "-d"){ |d|
|
113
|
+
@no_deps = true
|
114
|
+
}
|
115
|
+
opt.on("--no-gems", _("Don't install ruby gems this app depends on"), "-g"){ |g| @no_gems = true }
|
116
|
+
opt.on("--optional", _("Install optional app dependencies"), "-o"){ |o| @optional = true }
|
117
|
+
opt.on("--no-optional-gems", _("Don't install optional gem dependencies"), "-G"){ |g|
|
118
|
+
@no_optional_gems = true
|
119
|
+
}
|
120
|
+
opt.on("--ssh-user [USERNAME]", _("SSH user")){ |s| @ssh_user = s }
|
121
|
+
opt.on("--no-activate", _("Don't activate installed apps")){ |s| @no_activate = true }
|
122
|
+
opt.on("--branch [BRANCH]", _("Install app from specific branch"), "-b"){ |b| @branch = b }
|
146
123
|
end
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
124
|
+
install.set_execution_block do |args|
|
125
|
+
$SPIDER_INTERACTIVE = true
|
126
|
+
unless File.exist?('init.rb') && File.directory?('apps')
|
127
|
+
puts _("Please execute this command from the home folder")
|
128
|
+
exit
|
129
|
+
end
|
130
|
+
require 'spiderfw/setup/app_manager'
|
131
|
+
options = {
|
132
|
+
:use_git => @git, :all => @all, :no_deps => @no_deps, :optional => @optional,
|
133
|
+
:no_gems => @no_gems, :no_optional_gems => @no_optional_gems, :no_activate => @no_activate
|
134
|
+
}
|
135
|
+
options[:url] = @server_url if @server_url
|
136
|
+
options[:branch] = @branch if @branch
|
137
|
+
if @git && !Spider::AppManager.git_available?
|
138
|
+
puts _("git gem not available; install git gem for Git support")
|
139
|
+
exit
|
140
|
+
end
|
141
|
+
apps = args
|
142
|
+
installed = []
|
143
|
+
apps.each do |app|
|
144
|
+
installed << app if Spider::AppManager.installed?(app)
|
145
|
+
end
|
146
|
+
unless installed.empty?
|
147
|
+
puts _("%s already installed") % installed.join(', ')
|
148
|
+
end
|
149
|
+
specs = Spider::AppManager.resolve(apps, options)
|
150
|
+
iapps = specs[:install].map{ |spec| spec.app_id }
|
151
|
+
deps = iapps - apps
|
152
|
+
unless deps.empty?
|
153
|
+
puts _("The following apps will be installed as a dependency: %s") % deps.join(', ')
|
154
|
+
end
|
155
|
+
unless specs[:update].empty?
|
156
|
+
puts _("The following apps will be updated as a dependency: %s") % specs[:update].map{ |s| s.app_id }.join(', ')
|
157
|
+
end
|
158
|
+
Spider::AppManager.new(:interactive => true).install(specs, options)
|
152
159
|
end
|
153
|
-
|
154
|
-
|
160
|
+
self.add_command(install)
|
161
|
+
|
162
|
+
activate = CmdParse::Command.new('activate', false )
|
163
|
+
activate.short_desc = _("Activate an app")
|
164
|
+
activate.set_execution_block do |args|
|
165
|
+
$SPIDER_INTERACTIVE = true
|
166
|
+
apps = args
|
167
|
+
require 'spiderfw/spider'
|
168
|
+
apps = Spider.get_app_deps(apps)
|
169
|
+
Spider.activate_apps(apps)
|
155
170
|
end
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
opt.on("--no-dependencies", _("Don't install/update other apps this one depends on"), "-d"){ |d|
|
177
|
-
@no_deps = true
|
178
|
-
}
|
179
|
-
opt.on("--no-gems", _("Don't install ruby gems this app depends on"), "-g"){ |g| @no_gems = true }
|
180
|
-
opt.on("--no-optional", _("Don't install optional app dependencies"), "-D"){ |o| @no_optional = true }
|
181
|
-
opt.on("--no-optional-gems", _("Don't install optional gem dependencies"), "-G"){ |g|
|
182
|
-
@no_optional_gems = true
|
183
|
-
}
|
184
|
-
opt.on("--no-activate", _("Don't activate installed apps, if any")){ |s| @no_activate = true }
|
185
|
-
opt.on("--refresh", _("Update apps even if the version has not changed"), "-r"){ |r| @refresh = true }
|
186
|
-
opt.on("--no-clear-cache", _("Don't clear cache"), "-C"){ |c| @no_clear_cache = true }
|
187
|
-
opt.on("--no-restart", _("Don't restart the server after the udpate"), "-R"){ |r| @no_restart = true }
|
188
|
-
opt.on("--branch [BRANCH]", _("Install app from specific branch"), "-b"){ |b| @branch = b }
|
189
|
-
end
|
190
|
-
update.set_execution_block do |args|
|
191
|
-
$SPIDER_INTERACTIVE = true
|
192
|
-
unless File.exist?('init.rb') && File.directory?('apps')
|
193
|
-
puts _("Please execute this command from the home folder")
|
194
|
-
exit
|
171
|
+
self.add_command(activate)
|
172
|
+
|
173
|
+
update = CmdParse::Command.new( 'update', false )
|
174
|
+
update.short_desc = _("Update an app")
|
175
|
+
update.options = CmdParse::OptionParserWrapper.new do |opt|
|
176
|
+
opt.on("--all", _("Update all apps"), "-a"){ |a| @all = true }
|
177
|
+
opt.on("--no-git", _("Don't use git for updating apps"), "-g"){ |r| @no_git = true }
|
178
|
+
opt.on("--no-dependencies", _("Don't install/update other apps this one depends on"), "-d"){ |d|
|
179
|
+
@no_deps = true
|
180
|
+
}
|
181
|
+
opt.on("--no-gems", _("Don't install ruby gems this app depends on"), "-g"){ |g| @no_gems = true }
|
182
|
+
opt.on("--no-optional", _("Don't install optional app dependencies"), "-D"){ |o| @no_optional = true }
|
183
|
+
opt.on("--no-optional-gems", _("Don't install optional gem dependencies"), "-G"){ |g|
|
184
|
+
@no_optional_gems = true
|
185
|
+
}
|
186
|
+
opt.on("--no-activate", _("Don't activate installed apps, if any")){ |s| @no_activate = true }
|
187
|
+
opt.on("--refresh", _("Update apps even if the version has not changed"), "-r"){ |r| @refresh = true }
|
188
|
+
opt.on("--no-clear-cache", _("Don't clear cache"), "-C"){ |c| @no_clear_cache = true }
|
189
|
+
opt.on("--no-restart", _("Don't restart the server after the udpate"), "-R"){ |r| @no_restart = true }
|
190
|
+
opt.on("--branch [BRANCH]", _("Install app from specific branch"), "-b"){ |b| @branch = b }
|
195
191
|
end
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
:clear_cache => !@no_clear_cache, :restart => !@no_restart
|
201
|
-
}
|
202
|
-
options[:url] = @server_url if @server_url
|
203
|
-
options[:branch] = @branch if @branch
|
204
|
-
apps = args
|
205
|
-
options[:refresh] = apps if @refresh
|
206
|
-
apps.each do |app|
|
207
|
-
unless Spider::AppManager.installed?(app)
|
208
|
-
puts _("App %s is not installed") % app
|
192
|
+
update.set_execution_block do |args|
|
193
|
+
$SPIDER_INTERACTIVE = true
|
194
|
+
unless File.exist?('init.rb') && File.directory?('apps')
|
195
|
+
puts _("Please execute this command from the home folder")
|
209
196
|
exit
|
210
197
|
end
|
198
|
+
require 'spiderfw/setup/app_manager'
|
199
|
+
options = {
|
200
|
+
:no_git => @no_git, :all => @all, :no_deps => @no_deps, :no_optional => @no_optional,
|
201
|
+
:no_gems => @no_gems, :no_optional_gems => @no_optional_gems, :no_activate => @no_activate,
|
202
|
+
:clear_cache => !@no_clear_cache, :restart => !@no_restart
|
203
|
+
}
|
204
|
+
options[:url] = @server_url if @server_url
|
205
|
+
options[:branch] = @branch if @branch
|
206
|
+
apps = args
|
207
|
+
options[:refresh] = apps if @refresh
|
208
|
+
apps.each do |app|
|
209
|
+
unless Spider::AppManager.installed?(app)
|
210
|
+
puts _("App %s is not installed") % app
|
211
|
+
exit
|
212
|
+
end
|
213
|
+
end
|
214
|
+
specs = Spider::AppManager.resolve(apps, options)
|
215
|
+
unless specs[:install].empty?
|
216
|
+
puts _("The following apps will be installed as a dependency: %s") % specs[:install].map{ |s| s.app_id }.join(', ')
|
217
|
+
end
|
218
|
+
uapps = specs[:update].map{ |spec| spec.app_id }
|
219
|
+
udeps = uapps - apps
|
220
|
+
unless udeps.empty?
|
221
|
+
puts _("The following apps will be updated as a dependency: %s") % udeps.join(', ')
|
222
|
+
end
|
223
|
+
noupdate = apps - uapps
|
224
|
+
unless noupdate.empty?
|
225
|
+
puts _("Already up-to-date: %s") % noupdate.join(', ')
|
226
|
+
end
|
227
|
+
Spider::AppManager.new(:interactive => true).install(specs, options)
|
211
228
|
end
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
229
|
+
self.add_command(update)
|
230
|
+
|
231
|
+
setup = CmdParse::Command.new( 'setup', false )
|
232
|
+
setup.short_desc = _("Setup an app")
|
233
|
+
setup.options = CmdParse::OptionParserWrapper.new do |opt|
|
234
|
+
opt.on("--from [VERSION]", _("Assume a specific version is installed"), "-f"){ |from|
|
235
|
+
@from = Gem::Version.new(from)
|
236
|
+
}
|
237
|
+
opt.on("--to [VERSION]", _("Setup to a specific version"), "-t"){ |to|
|
238
|
+
@to = Gem::Version.new(to)
|
239
|
+
}
|
240
|
+
opt.on("--version [VERSION]", _("Only run the setup script for the given version"), "-v"){ |v|
|
241
|
+
@version = Gem::Version.new(v)
|
242
|
+
}
|
243
|
+
opt.on("--all", _("Setup all active apps")){ |all|
|
244
|
+
@all = true
|
245
|
+
}
|
246
|
+
opt.on("--no-cleanup", _("Don't cleanup"), "-C"){ |no_cleanup| @no_cleanup = true }
|
224
247
|
end
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
}
|
238
|
-
opt.on("--version [VERSION]", _("Only run the setup script for the given version"), "-v"){ |v|
|
239
|
-
@version = Gem::Version.new(v)
|
240
|
-
}
|
241
|
-
opt.on("--all", _("Setup all active apps")){ |all|
|
242
|
-
@all = true
|
243
|
-
}
|
244
|
-
opt.on("--no-cleanup", _("Don't cleanup"), "-C"){ |no_cleanup| @no_cleanup = true }
|
245
|
-
end
|
246
|
-
|
247
|
-
setup.set_execution_block do |args|
|
248
|
-
$SPIDER_INTERACTIVE = true
|
249
|
-
require 'spiderfw/setup/app_manager'
|
250
|
-
tasks = Spider::AppManager.new(:interactive => true).setup(name)
|
251
|
-
unless @no_cleanup
|
252
|
-
tasks.each do |t|
|
253
|
-
begin
|
254
|
-
t.do_cleanup
|
255
|
-
rescue => exc
|
256
|
-
Spider.logger.error(exc)
|
248
|
+
|
249
|
+
setup.set_execution_block do |args|
|
250
|
+
$SPIDER_INTERACTIVE = true
|
251
|
+
require 'spiderfw/setup/app_manager'
|
252
|
+
tasks = Spider::AppManager.new(:interactive => true).setup(name)
|
253
|
+
unless @no_cleanup
|
254
|
+
tasks.each do |t|
|
255
|
+
begin
|
256
|
+
t.do_cleanup
|
257
|
+
rescue => exc
|
258
|
+
Spider.logger.error(exc)
|
259
|
+
end
|
257
260
|
end
|
258
261
|
end
|
259
262
|
end
|
263
|
+
|
260
264
|
end
|
261
|
-
|
262
265
|
end
|
263
|
-
|
266
|
+
|
267
|
+
end
|