sumodev_deploy 0.8.1 → 0.8.2

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
  SHA1:
3
- metadata.gz: 0b08803c5ff3ab9bdc23dce7c227dd285635530a
4
- data.tar.gz: 2c76ef7ba211acc7c82f2f67274f9661e967cea9
3
+ metadata.gz: 00bb124f819b8608904af94faa0b80f1f22d4396
4
+ data.tar.gz: 2cf00d3bc46de7b0e0340278bee550e2c42e471b
5
5
  SHA512:
6
- metadata.gz: 82f6f98092267e59edb40a60c62dbc25df3c61768436626e9c901d7595d6de9b8c0e64878f6b9a3cbcebb638ad73388fcc85a19468734c9577f974994839285e
7
- data.tar.gz: b2b3b62426f24174c2ce23b8fb63ddb166182250688281e8c00b195dc343bb8cb6a31aac71059b570e0d03d099e32bc648a402219d437833e4a1fc43b05752ff
6
+ metadata.gz: fe015bc0ccce69cc053b2af91e91a2160f35ee9a1f0369bd2f8a208d42c71bf72dc9fecc5836bfbb05f11de769bd1e24cce14cf02106d6d2b652aa840b7b0286
7
+ data.tar.gz: '0368662a30ef873781932e959963d0e82ce97d3dac510d5540dec4acdd867033cc6142a224e909d54b1e2c74b21fc8cc85bb614712fd579c8baf45047128c53d'
@@ -33,6 +33,19 @@ Capistrano::Configuration.instance.load do
33
33
  rm -f #{current_path} &&
34
34
  ln -s #{shared_path}/redirect #{current_path}
35
35
  }
36
+
37
+ # get the PHP version
38
+ php_version = capture("#{php_bin} -v | grep 'PHP [0-9].[0-9].[0-9]' -o -m1")
39
+
40
+ # When the version is higher then 5.5 we should reset the opcache and the statcache
41
+ if Gem::Version::new(php_version.sub("PHP ", "")) > Gem::Version::new('5.5')
42
+ run "touch #{document_root}/php-opcache-reset.php"
43
+ # clearstatcache(true) will clear the file stats cache and the realpath cache
44
+ # opache_reset will clear the opcache if this is available
45
+ run "echo \"<?php clearstatcache(true); if (function_exists('opcache_reset')) { opcache_reset(); }\" > #{document_root}/php-opcache-reset.php"
46
+ run %{ curl #{site_url}/php-opcache-reset.php }
47
+ run "rm #{document_root}/php-opcache-reset.php"
48
+ end
36
49
  end
37
50
  end
38
51
  end
@@ -43,6 +43,16 @@ Capistrano::Configuration.instance.load do
43
43
  _cset(:document_root) { "#{homedir}#{client}/#{project}" }
44
44
  _cset(:keep_releases) { staging? ? 1 : 3 }
45
45
 
46
+ _cset(:php_bin) {
47
+ if staging? && staging_url.include?(".php56.")
48
+ "/usr/bin/php5"
49
+ elsif staging? && staging_url.include?(".php70.")
50
+ "/usr/bin/php7.0"
51
+ else
52
+ "php"
53
+ end
54
+ }
55
+
46
56
  set(:application) { project }
47
57
  set(:deploy_to) { "#{homedir}#{app_path}"}
48
58
 
@@ -2,15 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "sumodev_deploy"
5
- s.version = "0.8.1"
5
+ s.version = "0.8.2"
6
6
 
7
7
  s.authors = ["Jan De Poorter"]
8
8
  s.date = "2012-04-18"
9
9
  s.description = "Deploy to Sumocoders Dev server"
10
10
  s.summary = "Deployment for Fork [3|4].x.x with Capistrano"
11
11
  s.email = "info@sumocoders.be"
12
- # s.extra_rdoc_files = [
13
- # ]
14
12
  s.files = [
15
13
  "sumodev_deploy.gemspec",
16
14
  "lib/sumodev_deploy.rb",
@@ -25,6 +23,6 @@ Gem::Specification.new do |s|
25
23
  s.require_paths = ["lib"]
26
24
 
27
25
  s.add_dependency "activesupport"
28
- s.add_dependency "capistrano"
26
+ s.add_dependency "capistrano", "~> 2.15"
29
27
  end
30
28
 
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.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: capistrano
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '2.15'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '2.15'
41
41
  description: Deploy to Sumocoders Dev server
42
42
  email: info@sumocoders.be
43
43
  executables: []
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.5.1
74
+ rubygems_version: 2.5.2
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Deployment for Fork [3|4].x.x with Capistrano