wp-capistrano3 0.0.38 → 0.0.40

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: 40f206837328d69794d78d494eb166b824cb2b80e0a7f9c332a94353df415eee
4
- data.tar.gz: 872356e78f1c74cb4f76adde179111bb2d1dfb27b2ac95684802c3bfd7707d6c
3
+ metadata.gz: a2f8651568b1a42cc326132d7194a7a0d1941d475e53f10f61f0d1df05432020
4
+ data.tar.gz: df4a43097b3203502f49e67fd60d6c95a18655cb688d39152c88689216ad2b77
5
5
  SHA512:
6
- metadata.gz: 1bca3c81c216c2da7f276827e35ba2d2b32fbb063d806ea7ec1d1800fce3e950b671aa3d2dbf346dfccc7e80417a1b84e6c0d2df424cc64b55a60ef1a063f52a
7
- data.tar.gz: 790e319db40815a549ae574a968fe477a13caa0512ce5d915335076db223e62a0c4f7e7b8ee03f2d78a329952c382754bdbdf672ae44df1c176825416175bba5
6
+ metadata.gz: 4ce3568ac3d7c025e8d4cde42bd63f938b0e40eba12b6a6da86c75771c77afb200f5362ad50eb99bfa997352d0666bf7dd9588234bfd94333f2b261153e80397
7
+ data.tar.gz: 91e145cd081b313d3dc142cdfa19d02b119cc03bd362985a8116895242da97c7b941f85e5eade481f5a8f2efc88e6b6a36763a21d7bb8479eb725357ab8bb398
@@ -13,11 +13,11 @@ namespace "wp-capistrano" do
13
13
 
14
14
  if(test("[ -L #{current_path} ]"))
15
15
  info "installing pluggins..."
16
- installedPlugins = capture("/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin list --path=#{current_path} |awk '{ print $1 }'")
16
+ installedPlugins = capture("php #{fetch(:tmp_dir)}/wp-cli.phar plugin list --path=#{current_path} |awk '{ print $1 }'")
17
17
  installedPluginsArr = installedPlugins.to_s.gsub(/\n/, '|').split("|")
18
- installedPluginsStatus = capture("/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin list --path=#{current_path} |awk '{ print $2 }'")
18
+ installedPluginsStatus = capture("php #{fetch(:tmp_dir)}/wp-cli.phar plugin list --path=#{current_path} |awk '{ print $2 }'")
19
19
  installedPluginsStatusArr = installedPluginsStatus.to_s.gsub(/\n/, '|').split("|")
20
- installedPluginsVersion = capture("/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin list --path=#{current_path} |awk '{ print $4 }'")
20
+ installedPluginsVersion = capture("php #{fetch(:tmp_dir)}/wp-cli.phar plugin list --path=#{current_path} |awk '{ print $4 }'")
21
21
  installedPluginsVersionArr = installedPluginsVersion.to_s.gsub(/\n/, '|').split("|")
22
22
 
23
23
  plugins = []
@@ -45,8 +45,8 @@ namespace "wp-capistrano" do
45
45
 
46
46
  if( !jsonPlugins["languages"].nil? )
47
47
  jsonPlugins["languages"].each do |language|
48
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar language core install #{language} --path=#{release_path}"
49
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar language core activate #{language} --path=#{release_path}"
48
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar language core install #{language} --path=#{release_path}"
49
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar language core activate #{language} --path=#{release_path}"
50
50
  end
51
51
  end
52
52
 
@@ -57,7 +57,7 @@ namespace "wp-capistrano" do
57
57
  next
58
58
  end
59
59
 
60
- existingPlugins = capture("/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin search #{plugin[:slug]} --path=#{release_path} --field=slug --per-page=999999")
60
+ existingPlugins = capture("php #{fetch(:tmp_dir)}/wp-cli.phar plugin search #{plugin[:slug]} --path=#{release_path} --field=slug --per-page=999999")
61
61
  if (existingPlugins.to_s.gsub(/\n/, '|').split("|").include?("#{plugin[:slug]}") == false)
62
62
  warn "Pluggin #{plugin[:slug]} not known in wordpress repository. skip installation"
63
63
  next
@@ -65,28 +65,32 @@ namespace "wp-capistrano" do
65
65
 
66
66
  info "install #{plugin[:slug]}:#{plugin[:version]}"
67
67
  if(plugin[:version]) == "latest"
68
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --force"
68
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --force"
69
69
  info "install #{plugin[:slug]}"
70
70
  else
71
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --version=#{plugin[:version]} --force"
71
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --version=#{plugin[:version]} --force"
72
72
  info "install #{plugin[:slug]} #{plugin[:version]}"
73
73
  end
74
74
  end
75
75
  plugins.each do |plugin|
76
+ if(plugin[:version] == "uninstall")
77
+ warn "Skipping #{plugin[:slug]}"
78
+ next
79
+ end
76
80
  if (plugin[:status] == "active")
77
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path}"
81
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path}"
78
82
  info "activate #{plugin[:slug]}"
79
83
  elsif(plugin[:status] == "active-network")
80
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path} --network"
84
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path} --network"
81
85
  elsif(plugin[:status] == "inactive")
82
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin deactivate #{plugin[:slug]} --path=#{release_path}"
86
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin deactivate #{plugin[:slug]} --path=#{release_path}"
83
87
  info "deactivate #{plugin[:slug]}"
84
88
  end
85
89
  end
86
90
 
87
91
  if( !jsonPlugins["languages"].nil? )
88
92
  jsonPlugins["languages"].each do |language|
89
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar language plugin install --all #{language} --path=#{release_path}"
93
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar language plugin install --all #{language} --path=#{release_path}"
90
94
  end
91
95
  end
92
96
  end
@@ -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.38'
7
+ spec.version = '0.0.40'
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wp-capistrano3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.38
4
+ version: 0.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas RENAULT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-19 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano