wp-capistrano3 0.0.39 → 0.0.41

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: b659de3a0b9306bdd5ebc75c638a9e3065b4ed82edc60f60182186f55523c964
4
- data.tar.gz: 3b6d2d641e1ef11e5fd82b6483167bce26499e06f410460c2b1aa2de00fc74be
3
+ metadata.gz: 9a070b9a864afbe240ca9eb4f4ce6a385df2286bbdef3466618db8d81421a6a2
4
+ data.tar.gz: d462a92e3577b724d799cc8709dd63ea32e256bce615850f46872397720e2620
5
5
  SHA512:
6
- metadata.gz: c0640c86ffd72836b908332cfdc2e2934aa63ece87293af87c88ba563390416397e202a01db5f6212ba9eae6f54d4d2f9fb371f411522f4c51a2ce6436e4c516
7
- data.tar.gz: 50eed66f78763177d69f4a683ed39e6e3602a043d8e99317d70c898fc251638c22dbfc9e33cf80e45f9dd1f5d8293a8c305ce020a76b8a1183b5a8164c1b97aa
6
+ metadata.gz: 92cab3844c07da731dd7b05156866914eb2525aee1a14963ed49d554dc547629bf2c75107f9d32207261d8593e5f6809c71f75c7774349c4caae5d95b97d1b1a
7
+ data.tar.gz: 5ce8927e70176a3657511c6a72ae49d220d43974d8e2e14ebb35e40c60533b191e21ec980a584b3bcfc98cf8d1ef516c9e2d5b7f0b0067ad1cc5aca853536d88
@@ -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,12 @@ 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
+ if(plugin[:slug].empty?){
61
+ warn "Slug empty : '#{plugin[:slug]}'"
62
+ next
63
+ }
64
+
65
+ existingPlugins = capture("php #{fetch(:tmp_dir)}/wp-cli.phar plugin search #{plugin[:slug]} --path=#{release_path} --field=slug --per-page=999999")
61
66
  if (existingPlugins.to_s.gsub(/\n/, '|').split("|").include?("#{plugin[:slug]}") == false)
62
67
  warn "Pluggin #{plugin[:slug]} not known in wordpress repository. skip installation"
63
68
  next
@@ -65,10 +70,10 @@ namespace "wp-capistrano" do
65
70
 
66
71
  info "install #{plugin[:slug]}:#{plugin[:version]}"
67
72
  if(plugin[:version]) == "latest"
68
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --force"
73
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --force"
69
74
  info "install #{plugin[:slug]}"
70
75
  else
71
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --version=#{plugin[:version]} --force"
76
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --version=#{plugin[:version]} --force"
72
77
  info "install #{plugin[:slug]} #{plugin[:version]}"
73
78
  end
74
79
  end
@@ -78,19 +83,19 @@ namespace "wp-capistrano" do
78
83
  next
79
84
  end
80
85
  if (plugin[:status] == "active")
81
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path}"
86
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path}"
82
87
  info "activate #{plugin[:slug]}"
83
88
  elsif(plugin[:status] == "active-network")
84
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path} --network"
89
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path} --network"
85
90
  elsif(plugin[:status] == "inactive")
86
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin deactivate #{plugin[:slug]} --path=#{release_path}"
91
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar plugin deactivate #{plugin[:slug]} --path=#{release_path}"
87
92
  info "deactivate #{plugin[:slug]}"
88
93
  end
89
94
  end
90
95
 
91
96
  if( !jsonPlugins["languages"].nil? )
92
97
  jsonPlugins["languages"].each do |language|
93
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar language plugin install --all #{language} --path=#{release_path}"
98
+ execute "php #{fetch(:tmp_dir)}/wp-cli.phar language plugin install --all #{language} --path=#{release_path}"
94
99
  end
95
100
  end
96
101
  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.39'
7
+ spec.version = '0.0.41'
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.39
4
+ version: 0.0.41
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-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano