Sha256: c60b509d26580fc3784f4b9a1658ffaca40b120786c0ccc833d5fa58687472e7
Contents?: true
Size: 806 Bytes
Versions: 2
Compression:
Stored size: 806 Bytes
Contents
module WordPressTools class CLI < Thor include CLIHelper include SharedOptions desc "new [DIR_NAME]", "download the latest stable version of WordPress in a new directory with specified name (default is wordpress)" add_method_options(shared_options) def new(dir_name = 'wordpress') if File.exist?(dir_name) say "Directory #{dir_name} already exists.", :red exit end info("Starting...") Database.new.invoke :create, [dir_name], options WPCLICore.new.invoke :install, [], options WordPress.new.invoke :download, [dir_name], options WordPress.new.invoke :setup, [dir_name], options success("All done. Run 'wp server' inside '#{dir_name}' and visit '#{options[:site_url]}'") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wordpress_tools-1.4.1 | lib/wordpress_tools/cli.rb |
wordpress_tools-1.4.0 | lib/wordpress_tools/cli.rb |