Module: Shuttle::WordpressPlugins
- Included in:
- Wordpress
- Defined in:
- lib/shuttle/deployment/wordpress/plugins.rb
Instance Method Summary collapse
- #plugin_custom_install(name, url) ⇒ Object
-
#plugin_install(name) ⇒ Object
Install wordpresss plugin.
-
#plugin_installed?(name) ⇒ Boolean
Check if wordpress plugin is installed.
Instance Method Details
#plugin_custom_install(name, url) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/shuttle/deployment/wordpress/plugins.rb', line 14 def plugin_custom_install(name, url) log "Installing custom plugin: #{name} -> #{url}" if git_url?(url) install_git_plugin(name, url) elsif file_url?(url) install_file_plugin(name, url) else error "Valid git URL or archive URL is required for plugin: #{name}" end end |
#plugin_install(name) ⇒ Object
Install wordpresss plugin
5 6 7 8 9 10 11 12 |
# File 'lib/shuttle/deployment/wordpress/plugins.rb', line 5 def plugin_install(name) log "Installing plugin: #{name}" res = ssh.run("cd #{release_path} && wp plugin install #{name}") if !res.success? error "Unable to install plugin '#{name}'. Reason: #{res.output}" end end |
#plugin_installed?(name) ⇒ Boolean
Check if wordpress plugin is installed
28 29 30 |
# File 'lib/shuttle/deployment/wordpress/plugins.rb', line 28 def plugin_installed?(name) raise "Not Implemented" end |