Class: Isomorfeus::Installer::Target::Web
- Inherits:
-
Object
- Object
- Isomorfeus::Installer::Target::Web
show all
- Extended by:
- DSL
- Defined in:
- lib/isomorfeus/installer/target/web.rb
Class Method Summary
collapse
Methods included from DSL
config_path, copy_file, create_common_framework_directories, create_directory, create_file_from_template, install_basic_components, install_basic_policy, install_rake_file, install_spec_files
Class Method Details
.execute ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/isomorfeus/installer/target/web.rb', line 8
def execute
install_roda_app
install_configuration
install_web_loaders
install_web_layouts
install_web_specs unless Isomorfeus::Installer.project_name == 'test_app'
end
|
.install_configuration ⇒ Object
.install_roda_app ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/isomorfeus/installer/target/web.rb', line 18
def install_roda_app
data_hash = { roda_app_class: Isomorfeus::Installer.roda_app_class, app_class: Isomorfeus::Installer.app_class }
create_file_from_template(templates_path, 'roda_app.rb.erb', File.join('app', 'server', Isomorfeus::Installer.roda_app_path + '.rb'), data_hash)
data_hash = { roda_app_class: Isomorfeus::Installer.roda_app_class, roda_app_path: Isomorfeus::Installer.roda_app_path }
create_file_from_template(templates_path, 'config.ru.erb', 'config.ru', data_hash)
create_file_from_template(templates_path, File.join('app_loader.rb.erb'), 'app_loader.rb', {})
create_file_from_template(templates_path, File.join('.gitignore.erb'), '.gitignore', {})
end
|
.install_web_layouts ⇒ Object
32
33
34
35
|
# File 'lib/isomorfeus/installer/target/web.rb', line 32
def install_web_layouts
copy_file(File.join(templates_path, 'web.mustache.erb'), File.join('app', 'layouts', 'web.mustache'))
copy_file(File.join(templates_path, 'mail_preview.mustache.erb'), File.join('app', 'layouts', 'mail_preview.mustache'))
end
|
.install_web_loaders ⇒ Object
37
38
39
40
41
|
# File 'lib/isomorfeus/installer/target/web.rb', line 37
def install_web_loaders
create_file_from_template(templates_path, 'isomorfeus_loader.rb.erb', File.join('app', 'isomorfeus_loader.rb'), {})
create_file_from_template(templates_path, 'mail_loader.rb.erb', File.join('app', 'mail_loader.rb'), {})
end
|
.install_web_specs ⇒ Object
43
44
45
|
# File 'lib/isomorfeus/installer/target/web.rb', line 43
def install_web_specs
create_file_from_template(templates_path, 'web_spec.rb.erb', File.join('spec', 'web_spec.rb'), {})
end
|