From f0f472306fb6730f47d040557a8b168bbcf0ac41 Mon Sep 17 00:00:00 2001 From: miya0001 Date: Sat, 21 Feb 2015 02:03:40 +0900 Subject: [PATCH 1/3] cast attr vlues from int to str --- provision/site-cookbooks/wpcli/recipes/install.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provision/site-cookbooks/wpcli/recipes/install.rb b/provision/site-cookbooks/wpcli/recipes/install.rb index f60e00a..7e998f5 100644 --- a/provision/site-cookbooks/wpcli/recipes/install.rb +++ b/provision/site-cookbooks/wpcli/recipes/install.rb @@ -64,7 +64,7 @@ WP_CLI_CONFIG_PATH=#{Shellwords.shellescape(node[:wpcli][:config_path])} wp core download \\ --path=#{File.join(node[:wpcli][:wp_docroot], node[:wpcli][:wp_siteurl])} \\ --locale=#{Shellwords.shellescape(node[:wpcli][:locale])} \\ ---version=#{Shellwords.shellescape(node[:wpcli][:wp_version])} \\ +--version=#{Shellwords.shellescape(node[:wpcli][:wp_version].to_s)} \\ --force EOH end @@ -203,7 +203,7 @@ user node[:wpcli][:user] group node[:wpcli][:group] cwd File.join(node[:wpcli][:wp_docroot], node[:wpcli][:wp_siteurl]) - code "WP_CLI_CONFIG_PATH=#{Shellwords.shellescape(node[:wpcli][:config_path])} wp option update #{Shellwords.shellescape(key)} #{Shellwords.shellescape(value)}" + code "WP_CLI_CONFIG_PATH=#{Shellwords.shellescape(node[:wpcli][:config_path])} wp option update #{Shellwords.shellescape(key.to_s)} #{Shellwords.shellescape(value.to_s)}" end end From 3dd46eafd60ca9d2a1e15d63a44be574ffd72cf7 Mon Sep 17 00:00:00 2001 From: miya0001 Date: Sat, 21 Feb 2015 02:09:07 +0900 Subject: [PATCH 2/3] cast attr vlues from int to str with test --- spec/default/wp_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/default/wp_spec.rb b/spec/default/wp_spec.rb index 6ed4244..cf4e962 100644 --- a/spec/default/wp_spec.rb +++ b/spec/default/wp_spec.rb @@ -71,9 +71,9 @@ end _conf['options'].each do |key, value| - describe command("wp option get " + Shellwords.shellescape(key)) do + describe command("wp option get " + Shellwords.shellescape(key.to_s)) do let(:disable_sudo) { true } its(:exit_status) { should eq 0 } - its(:stdout){ should eq value + "\n" } + its(:stdout){ should eq value.to_s + "\n" } end end From 9a0135d47213d55405cbf5974d3a3812a669eabf Mon Sep 17 00:00:00 2001 From: amekusa Date: Sat, 21 Feb 2015 14:45:48 +0900 Subject: [PATCH 3/3] Add constant:WP_ALLOW_MULTISITE --- provision/site-cookbooks/wpcli/recipes/install.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/provision/site-cookbooks/wpcli/recipes/install.rb b/provision/site-cookbooks/wpcli/recipes/install.rb index 7e998f5..80b3ef4 100644 --- a/provision/site-cookbooks/wpcli/recipes/install.rb +++ b/provision/site-cookbooks/wpcli/recipes/install.rb @@ -96,6 +96,10 @@ define( 'WP_DEBUG', #{node[:wpcli][:debug_mode]} ); define( 'FORCE_SSL_ADMIN', #{node[:wpcli][:force_ssl_admin]} ); define( 'SAVEQUERIES', #{node[:wpcli][:savequeries]} ); +#{if node[:wpcli][:is_multisite] == true then <