Sha256: fa38b7943eb5fb80a53e630aac4738cb5c64753ef73a1cdbce59b6603e6adfbc

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

module WordPressTools
  module SharedOptions
    extend ActiveSupport::Concern

    class_methods do
      def shared_options
        [
          [:force, {type: :boolean, desc: "Overwrite existing WP-CLI / WP-CLI Server installation"}],
          [:locale, { aliases: "-l", desc: "WordPress locale", default: Configuration.for(:locale)}],
          [:bare, {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

1 entries across 1 versions & 1 rubygems

Version Path
wordpress_tools-1.1.0 lib/wordpress_tools/shared_options.rb