wp-capistrano3 0.0.23 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ca168db5f7da9071aeed62dc11988a90d2b17184703982f36603cca8c866de4
4
- data.tar.gz: 2db592a3e816a82a8370da759935dd5a675c471a9eae8ca71dc78240fc73f2d8
3
+ metadata.gz: 0a62289fbe60b2342f36813d209bf0678db00784f9f7f97d0098f5c0608e5130
4
+ data.tar.gz: fdf4e1cd555b6a0fc546f60678e44fc77d624be0dc099646a3027cb5e6d10eed
5
5
  SHA512:
6
- metadata.gz: 4257b40f9f7f1c4fb34141efa9bc66fdedb419a5a7da81efba1c47fb7543054b307b142e63af578706fd0937c42fe7d995f1fea210592b5d5f7f7cf5f7b8a3c0
7
- data.tar.gz: afcbabfb6c5231075fed2ddbf5193290a47e81b5f62b480b1173b0bda4fb396af2c9f70318d5ad3535475d870c9bc6ca8a9405d56817c25f60fd94395f944a6c
6
+ metadata.gz: 0ec88182eb2385c359aa9b7b4158f66be55440ea2cbb4f7fa7a90c5156954ac290f13d54fe1d8fde8c2bb515b5e1cfd04c4586cbc8e54fe0778bd7fc1b46c236
7
+ data.tar.gz: 0c937d316bdb8f4c60e669908370cd45ae0d467fe546c2b3053548598693d3e8f22b6c05eafc8d5ab6b4b1e230eb9314b114b00370c39b484438338bb06a0b97
@@ -0,0 +1,29 @@
1
+ namespace "wp-capistrano" do
2
+ desc 'Install Custom Plugins with composer'
3
+ task :install_custom_plugins do
4
+ on roles(:app) do
5
+ pluginDirectory = "#{release_path}/wp-content/plugins/"
6
+
7
+ Dir.foreach(pluginDirectory) { |directory|
8
+ if (directory != "." and directory != "..")
9
+ puts "#################################\n# Plugin #{directory}\n#################################"
10
+ Dir.chdir(pluginDirectory + directory) do
11
+ puts
12
+ if (Dir.exist?(Dir.pwd + '/vendor') == false && File.exist?(Dir.pwd + '/composer.lock') == true)
13
+ puts '=> NEED INSTALL : There is no vendor installed and composer.lock'
14
+ execute "ls #{release_path}/wp-content/plugins/"
15
+ execute "composer install --working-dir=#{release_path}/wp-content/plugins/" + directory
16
+ else
17
+ puts '=> NO NEED INSTALL'
18
+ end
19
+ end
20
+
21
+ puts ' '
22
+ end
23
+ }
24
+
25
+ puts "#################################\n#End Install Plugins\n#################################"
26
+ end
27
+ end
28
+ end
29
+
@@ -2,8 +2,8 @@ namespace "wp-capistrano" do
2
2
  desc 'Install wordpress'
3
3
  task :install_wordpress do
4
4
  on roles(:app), filter: :no_release do
5
- puts "#{fetch(:shared_directory)}/wp-config.php exist ?"
6
- if (File.exist?("#{fetch(:shared_directory)}/wp-config.php") == false)
5
+ puts "#{shared_path}/wp-config.php exist ?"
6
+ if test("[ -f #{shared_path}/wp-config.php ]") == false
7
7
  execute "php #{fetch(:tmp_dir)}/wp-cli.phar config create --dbname=#{fetch(:wp_db_name)} --dbuser=#{fetch(:wp_db_user)} --dbpass=#{fetch(:wp_db_password)} --dbhost='#{fetch(:wp_db_host)}' --locale=#{fetch(:wp_locale)} --path=#{release_path}"
8
8
  execute "cp #{release_path}/wp-config.php #{shared_path}/"
9
9
  end
@@ -1,6 +1,7 @@
1
1
  # Default Flow
2
2
  #before 'deploy:check:linked_files', 'wp-capistrano:create_wp_config'
3
- before 'deploy:updating', 'wp-capistrano:download_wordpress'
3
+ before 'deploy:updated', 'wp-capistrano:download_wordpress'
4
4
  after 'wp-capistrano:download_wordpress', 'wp-capistrano:install_wordpress'
5
5
  after 'wp-capistrano:install_plugins', 'wp-capistrano:update_wordpress'
6
- after 'deploy:updating', 'wp-capistrano:install_plugins'
6
+ after 'wp-capistrano:install_wordpress', 'install_custom_plugins'
7
+ after 'install_custom_plugins', 'wp-capistrano:install_plugins'
@@ -3,6 +3,7 @@ load File.expand_path("../tasks/download_wordpress.rake", __FILE__)
3
3
  load File.expand_path("../tasks/install_wordpress.rake", __FILE__)
4
4
  load File.expand_path("../tasks/update_wordpress.rake", __FILE__)
5
5
  load File.expand_path("../tasks/install_plugins.rake", __FILE__)
6
+ load File.expand_path("../tasks/install_custom_plugins.rake", __FILE__)
6
7
 
7
8
  namespace :load do
8
9
  task :defaults do
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'wp-capistrano3'
7
- spec.version = '0.0.23'
7
+ spec.version = '0.0.27'
8
8
  spec.authors = ['Nicolas RENAULT']
9
9
  spec.email = ['nrenault@tangkoko.com']
10
10
  spec.description = %q{Wordpress tasks for Capistrano 3.x}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wp-capistrano3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas RENAULT
@@ -69,6 +69,7 @@ files:
69
69
  - gemfile
70
70
  - lib/capistrano/tasks/create_wp_config.rake
71
71
  - lib/capistrano/tasks/download_wordpress.rake
72
+ - lib/capistrano/tasks/install_custom_plugins.rake
72
73
  - lib/capistrano/tasks/install_plugins.rake
73
74
  - lib/capistrano/tasks/install_wordpress.rake
74
75
  - lib/capistrano/tasks/update_wordpress.rake