sumodev_deploy 0.8.2 → 0.9.1
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 +4 -4
- data/lib/sumodev_deploy.rb +7 -4
- data/lib/sumodev_deploy/tasks/opcache.rb +40 -0
- data/sumodev_deploy.gemspec +3 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 249964d237ea0119d27949056e42dd7a5f388051
|
4
|
+
data.tar.gz: 9a6e09b71373c47ad0c2e6d3c0f52ecf5a3511cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 848d4d058e86d3b099eee1b3f52068d980ed89763fba5b3f2dfda542fd42b869941910106f3ccbcdcfbabcc8fd0dcd929f8de744e3d6c92cd163265b238c586e
|
7
|
+
data.tar.gz: 0afc9e2f2cdc43f2dcf7aec70c6a35e19a4ea490bf4f47885a73bc53ee4526be3af1ff213ef6d1b2a0beebb9b84893e952ef18084a29e939ecfbf1eaf353113d
|
data/lib/sumodev_deploy.rb
CHANGED
@@ -5,6 +5,7 @@ Capistrano::Configuration.instance.load do
|
|
5
5
|
require 'sumodev_deploy/tasks/redirect'
|
6
6
|
require 'sumodev_deploy/tasks/assets'
|
7
7
|
require 'sumodev_deploy/tasks/browse'
|
8
|
+
require 'sumodev_deploy/tasks/opcache'
|
8
9
|
|
9
10
|
def _cset(name, *args, &block)
|
10
11
|
unless exists?(name)
|
@@ -43,13 +44,15 @@ Capistrano::Configuration.instance.load do
|
|
43
44
|
_cset(:document_root) { "#{homedir}#{client}/#{project}" }
|
44
45
|
_cset(:keep_releases) { staging? ? 1 : 3 }
|
45
46
|
|
46
|
-
_cset(:
|
47
|
+
_cset(:cachetool_connection_string) {
|
47
48
|
if staging? && staging_url.include?(".php56.")
|
48
|
-
"/
|
49
|
+
"/var/run/php_fpm_sites.sock"
|
49
50
|
elsif staging? && staging_url.include?(".php70.")
|
50
|
-
"/
|
51
|
+
"/var/run/php_70_fpm_sites.sock"
|
52
|
+
elsif staging? && staging_url.include?(".php71.")
|
53
|
+
"/var/run/php_71_fpm_sites.sock"
|
51
54
|
else
|
52
|
-
"
|
55
|
+
"#{fcgi_connection_string}"
|
53
56
|
end
|
54
57
|
}
|
55
58
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Capistrano::Configuration.instance.load do
|
2
|
+
namespace :opcode do
|
3
|
+
task :clear do
|
4
|
+
opcache.file.reset
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
namespace :opcache do
|
9
|
+
namespace :file do
|
10
|
+
desc "Reset the opcache thru a PHP-file"
|
11
|
+
task :reset do
|
12
|
+
run %{
|
13
|
+
touch #{current_path}/php-opcache-reset.php
|
14
|
+
&& echo "<?php clearstatcache(true); if (function_exists('opcache_reset')) { opcache_reset(); }" > #{current_path}/php-opcache-reset.php
|
15
|
+
&& curl -L --fail --silent --show-error "#{site_url}/php-opcache-reset.php"
|
16
|
+
&& rm #{current_path}/php-opcache-reset.php
|
17
|
+
}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
namespace :phpfpm do
|
22
|
+
desc "Installs cachetool.phar to the shared directory"
|
23
|
+
task :install_executable do
|
24
|
+
run %{
|
25
|
+
if [ ! -e #{shared_path}/cachetool.phar ]; then
|
26
|
+
cd #{shared_path};
|
27
|
+
curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar;
|
28
|
+
chmod +x cachetool.phar;
|
29
|
+
fi
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Reset the opcache with the cachetool.phar"
|
34
|
+
task :reset do
|
35
|
+
opcache.phpfpm.install_executable
|
36
|
+
run %{#{php_bin} #{shared_path}/cachetool.phar opcache:reset --fcgi=#{cachetool_connection_string}}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/sumodev_deploy.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "sumodev_deploy"
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.9.1"
|
6
6
|
|
7
7
|
s.authors = ["Jan De Poorter"]
|
8
8
|
s.date = "2012-04-18"
|
@@ -13,11 +13,12 @@ Gem::Specification.new do |s|
|
|
13
13
|
"sumodev_deploy.gemspec",
|
14
14
|
"lib/sumodev_deploy.rb",
|
15
15
|
"lib/sumodev_deploy/tasks/assets.rb",
|
16
|
+
"lib/sumodev_deploy/tasks/browse.rb",
|
16
17
|
"lib/sumodev_deploy/tasks/db.rb",
|
17
18
|
"lib/sumodev_deploy/tasks/errbit.rb",
|
18
19
|
"lib/sumodev_deploy/tasks/files.rb",
|
20
|
+
"lib/sumodev_deploy/tasks/opcache.rb",
|
19
21
|
"lib/sumodev_deploy/tasks/redirect.rb",
|
20
|
-
"lib/sumodev_deploy/tasks/browse.rb",
|
21
22
|
]
|
22
23
|
s.homepage = "https://github.com/sumocoders/sumodev_deploy"
|
23
24
|
s.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sumodev_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan De Poorter
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- lib/sumodev_deploy/tasks/db.rb
|
51
51
|
- lib/sumodev_deploy/tasks/errbit.rb
|
52
52
|
- lib/sumodev_deploy/tasks/files.rb
|
53
|
+
- lib/sumodev_deploy/tasks/opcache.rb
|
53
54
|
- lib/sumodev_deploy/tasks/redirect.rb
|
54
55
|
- sumodev_deploy.gemspec
|
55
56
|
homepage: https://github.com/sumocoders/sumodev_deploy
|
@@ -71,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
72
|
version: '0'
|
72
73
|
requirements: []
|
73
74
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
75
|
+
rubygems_version: 2.6.11
|
75
76
|
signing_key:
|
76
77
|
specification_version: 4
|
77
78
|
summary: Deployment for Fork [3|4].x.x with Capistrano
|