wp-capistrano3 0.0.33 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b44bbbfcce02ea1e10d7c71a0e2625e3ba516fbe4e5fa1e2fbbc46fa30881dfd
4
- data.tar.gz: cb3ce0c1c91570a89d5eccd2a1e3f792f654435d14243614600e691a20be0319
3
+ metadata.gz: fb00692e6e291a32e43aafc6e046d55684e12ff208cc0235545d3d4dec9f9c57
4
+ data.tar.gz: 3fcda9253fe6b2c03255657b64c833d0e567a493b4defb7bb6b2fcf6ae8a5601
5
5
  SHA512:
6
- metadata.gz: b10d3e5cd237e725b7b326fc28d93168ea292deaebe92c6b1b6223ea301ef9577f0f2ff2e4f030682a48d8b4d7eefe00f6ad667d4c013804c4d1d5317bef8bb8
7
- data.tar.gz: 8f24724107f5695f5ee7273b6b1295ff39a13e214e75cbc06c97e0cc8167a9df0e224c9752b084e12ab1f2e813b600e489af4244092bed037d19ca2ed50df5b2
6
+ metadata.gz: 71c38f351cec1f9f898875259c967343de53e0e48c041295d4d266f8e80288c9f474aac2a331bf7fdc40054c1e7aec3de9d682fabd2e7ac74abb6e74b12c52e4
7
+ data.tar.gz: fcdbb9a4f222875b00e22ba81589f708c486574409b659c7b5f75664c3e68a9e8313dafe2790798c59c9c72a8fe6addb74b175725fe593467c139276858e9758
@@ -32,19 +32,16 @@ namespace "wp-capistrano" do
32
32
  end
33
33
  if( !jsonPlugins["plugins"].nil? )
34
34
  jsonPlugins["plugins"].each do |plugin, version|
35
- plugginInfo = plugins.detect {|f| f["slug"] == plugin }
35
+ plugginInfo = plugins.detect {|f| f[:slug] == plugin }
36
36
  if(plugginInfo)
37
- index = plugins.index(plugginInfo)
38
- plugins[:index]= {:slug => plugin, :version => version, :status => "active" }
37
+ plugginInfo[:version] = version
38
+ plugginInfo[:status] = "active"
39
39
  else
40
40
  pluginInfo = {:slug => plugin, :version => version, :status => "active" }
41
41
  plugins.push(pluginInfo)
42
42
  end
43
43
  end
44
44
  end
45
- plugins.each do |plugin|
46
- info("slug => #{plugin[:slug]}, version => #{plugin[:version]}, status=> #{plugin[:status]}")
47
- end
48
45
 
49
46
  if( !jsonPlugins["languages"].nil? )
50
47
  jsonPlugins["languages"].each do |language|
@@ -68,10 +65,10 @@ namespace "wp-capistrano" do
68
65
 
69
66
  info "install #{plugin[:slug]}:#{plugin[:version]}"
70
67
  if(plugin[:version]) == "latest"
71
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path}"
68
+ execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --force"
72
69
  info "install #{plugin[:slug]}"
73
70
  else
74
- execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --version=#{plugin[:version]}"
71
+ execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin install #{plugin[:slug]} --path=#{release_path} --version=#{plugin[:version]} --force"
75
72
  info "install #{plugin[:slug]} #{plugin[:version]}"
76
73
  end
77
74
  end
@@ -79,7 +76,7 @@ namespace "wp-capistrano" do
79
76
  if (plugin[:status] == "active")
80
77
  execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin activate #{plugin[:slug]} --path=#{release_path}"
81
78
  info "activate #{plugin[:slug]}"
82
- else
79
+ elsif(plugin[:status] == "inactive")
83
80
  execute "/usr/bin/env php #{fetch(:tmp_dir)}/wp-cli.phar plugin deactivate #{plugin[:slug]} --path=#{release_path}"
84
81
  info "deactivate #{plugin[:slug]}"
85
82
  end
@@ -5,10 +5,12 @@ namespace "wp-capistrano" do
5
5
  pluginDirectory = "../app/web/wp-content/plugins/"
6
6
 
7
7
  Dir.foreach(pluginDirectory) { |directory|
8
- if (directory != "." and directory != "..")
8
+ if (directory != "." and directory != ".." && File.directory?(pluginDirectory + directory))
9
9
  puts "#################################\n# Plugin #{directory}\n#################################"
10
10
  Dir.chdir(pluginDirectory + directory) do
11
11
  puts
12
+ info(Dir.exist?(Dir.pwd + '/vendor'))
13
+ info(File.exist?(Dir.pwd + '/composer.lock'))
12
14
  if (Dir.exist?(Dir.pwd + '/vendor') == false && File.exist?(Dir.pwd + '/composer.lock') == true)
13
15
  puts '=> NEED INSTALL : There is no vendor installed and composer.lock'
14
16
  execute "ls #{release_path}/wp-content/plugins/"
@@ -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.33'
7
+ spec.version = '0.0.36'
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.33
4
+ version: 0.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas RENAULT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-11 00:00:00.000000000 Z
11
+ date: 2022-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano