Sha256: 92b6d6b75e4f47ed6682d2dd7e089246a78d3dc3681fbf73cb34448f3a7aeae9
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
module WordPressTools module SharedOptions extend ActiveSupport::Concern class_methods do def shared_options [ [:force, { type: :boolean, desc: "Overwrite existing WP-CLI installation" }], [:locale, { aliases: "-l", desc: "WordPress locale", default: Configuration.for(:locale) }], [:bare, { type: :boolean, aliases: "-b", desc: "Remove default themes and plugins" }], [:admin_user, { desc: "WordPress admin user", default: Configuration.for(:admin_user) }], [:admin_email, { desc: "WordPress admin email", default: Configuration.for(:admin_email) }], [:admin_password, { desc: "WordPress admin password", default: Configuration.for(:admin_password) }], [:db_user, { desc: "MySQL database user", default: Configuration.for(:db_user) }], [:db_password, { desc: "MySQL database pasword", default: Configuration.for(:db_password) }], [:site_url, { desc: "Wordpress site URL", default: Configuration.for(:site_url) }] ] end def add_method_options(options) options.each do |option| method_option(*option) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wordpress_tools-1.3.0 | lib/wordpress_tools/shared_options.rb |
wordpress_tools-1.2.0 | lib/wordpress_tools/shared_options.rb |