Issue Tracker |
Appendix B: Webiva Design API ![]() |
Appendix A: Command Line Reference
Rake Tasks
-
rake cms:backup DOMAIN_ID=XX
- creates a backup tarball based on domain name / timestamp or backs up all domains
- by default will backup to the location specified in config/backup.yml
- unless NO_COPY=1 is specified in which case it will leave the file in RAILS_ROOT/backup/
-
rake cms:create_domain_db DOMAIN_ID=XX
- creates a new domain database from a domains table entry - generally called automatically
- and shouldn’t be called manually (except when initially initializing the system)
-
rake cms:domain_cron DOMAIN_ID=XX
- runs the hourly domain cron for either all domains or a specific domain
- modules can add crons via ‘register_cron’ command in their AdminController
- this needs to be scheduled to run hourly in your crontab
-
rake cms:domain_runner DOMAIN_ID=XX CLASS=ClassName METHOD=MethodName
- run a specific class method on a specific domain. Can be used to trigger specific functionality
- that needs to be called more than once per hour (via the built-in cron functionality)
-
rake cms:initialize_system CLIENT=client_name DOMAIN=initial_domain_name USERNAME=admin_username PASSWORD=admin_password
- intializes Webiva with a master admin account, an initial client and a first domain.
- called automatically by script/quick_install.rb, shouldn’t be called after the system is up.
-
rake cms:install_module MODULE=module_name
- installs a module into Webiva from the ‘git_repository’ specified in config/defaults.yml
- module will be placed in vendor/modules
-
rake cms:migrate_domain_components DOMAIN_ID=XX COMPONENT=Name
- run the module migrations on either all domains or a specific domain
- Will migrate all modules unless the COMPONENT option is specified, in which case it will only migrate the specified component
- Will migrate to the latest version unless the VERSION option is specified.
- FORCE will ignore whether the component is active on the specified DOMAIN. It must be specified with a specific DOMAIN an COMPONENT
- VERSION works similarly to standard rake db:migrate - it is the prefix on all the db/migrate files.
-
rake cms:migrate_domain_dbs DOMAIN_ID=XX
- run the core migrations on either all domains or a specific domain. Used to update domains to the latest version
- VERSION works similarly to standard rake db:migrate - it is the prefix on all the db/migrate files.
-
rake cms:migrate_system_db VERSION=XX
- run the migrations in db/system/ in the master Webiva database
- migrates the top-level webiva system database to different versions
- VERSION works similarly to standard rake db:migrate - it is the prefix on all the db/migrate files.
-
rake cms:restore DOMAIN_ID=XX or DOMAIN=domain.com CLIENT_ID=XX DIR=path/to/domain/backup
- restores a domain from backup.
- If DOMAIN_ID is specified will replace an existing domain on the system (WARNING: all data in the existing domain is lost)
- If DOMAIN and CLIENT_ID are specified will create a new domain on the specified client
- DIR should be the full path to the specific untarred directory containing the backed up domain
-
rake cms:website_export
- export a domain to a set of static index.html files.
- Supports pages and the blog only.
Generators
-
./script/generate webiva_module ModuleName
- Will create a new module called ModuleName in the vendor/modules/module_name directory
- e.g. ./script/generator webiva_module PollDemo
-
./script/generate webiva_module_migration ModuleName migration_identifier
- Will create a new timestamped module migration in vendor/modules/module_name/db/
- e.g. ./script/generate webiva_module_migration PollDemo initial_tables
-
./script/generate webiva_renderer module_directory/renderer_name paragraph_name1 paragraph_name2 …
- This will create a new ParagraphRenderer/ParagraphController/ParagraphFeature set in the specified module
- e.g. ./script/generate webiva_renderer poll_demo/page list view
- will create a renderer called PollDemo::PageRenderer and the appropriate controller, feature and views
Issue Tracker |
Appendix B: Webiva Design API ![]() |

Issue Tracker