kstrano 1.1.8 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -125,6 +125,9 @@ module KStrano
125
125
 
126
126
  ["symfony:composer:install", "symfony:composer:update", "symfony:vendors:install", "symfony:vendors:upgrade"].each do |action|
127
127
  after action do |variable|
128
+
129
+ sudo "sh -c 'php #{release_path}/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php'"
130
+
128
131
  if bower_install
129
132
  frontend.bower.install
130
133
  end
@@ -0,0 +1,71 @@
1
+ require 'railsless-deploy'
2
+ require "#{File.dirname(__FILE__)}/helpers/kuma_helper.rb"
3
+
4
+ module KStrano
5
+ module Wordpress
6
+ def self.load_into(configuration)
7
+ configuration.load do
8
+
9
+ load_paths.push File.expand_path('../', __FILE__)
10
+ load 'kstrano'
11
+
12
+ namespace :deploy do
13
+ desc "Updates latest release source path"
14
+ task :finalize_update, :roles => :app, :except => { :no_release => true } do
15
+ run "#{try_sudo} chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
16
+ kuma::share_childs
17
+ end
18
+ end
19
+
20
+ namespace :kuma do
21
+ namespace :fpm do
22
+ desc "Reload PHP5 fpm"
23
+ task :reload do
24
+ sudo "/etc/init.d/php5-fpm reload"
25
+ end
26
+
27
+ desc "Restart PHP5 fpm"
28
+ task :restart do
29
+ sudo "/etc/init.d/php5-fpm restart"
30
+ end
31
+
32
+ desc "Gracefully restart PHP5 fpm"
33
+ task :graceful_restart do
34
+ sudo "pkill -QUIT -f \"^php-fpm: pool #{application} \" "
35
+ end
36
+ end
37
+
38
+ namespace :apc do
39
+ desc "Prepare for APC cache clear"
40
+ task :prepare_clear do
41
+ server_project_name = "#{server_name}"
42
+ if server_project_name.nil? || server_project_name.empty?
43
+ server_project_name = domain.split('.')[0]
44
+ end
45
+ sudo "sh -c 'if [ ! -f /home/projects/#{server_project_name}/site/apcclear.php ]; then curl https://raw.github.com/Kunstmaan/kStrano/master/resources/symfony2/apcclear.php > /home/projects/#{server_project_name}/site/apcclear.php; fi'"
46
+ sudo "chmod 777 /home/projects/#{server_project_name}/site/apcclear.php"
47
+ end
48
+
49
+ desc "Clear the APC cache"
50
+ task :clear do
51
+ hostname = "#{domain}"
52
+ server_project_name = "#{server_name}"
53
+ if !server_project_name.nil? && !server_project_name.empty?
54
+ hostname = "#{server_project_name}.#{hostname}"
55
+ end
56
+ sudo "curl http://#{hostname}/apcclear.php"
57
+ end
58
+ end
59
+ end
60
+
61
+ before "deploy:finalize_update", "kuma:apc:prepare_clear"
62
+ after "deploy:finalize_update", "kuma:apc:clear", "kuma:fpm:graceful_restart"
63
+ after "deploy:create_symlink", "kuma:apc:clear", "kuma:fpm:graceful_restart"
64
+ end
65
+ end
66
+ end
67
+ end
68
+
69
+ if Capistrano::Configuration.instance
70
+ KStrano::Wordpress.load_into(Capistrano::Configuration.instance)
71
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kstrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-07 00:00:00.000000000 Z
12
+ date: 2014-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capifony
@@ -125,6 +125,7 @@ files:
125
125
  - lib/kstrano_play.rb
126
126
  - lib/kstrano_silex.rb
127
127
  - lib/kstrano_symfony2.rb
128
+ - lib/kstrano_wordpress.rb
128
129
  - resources/deploy.rb
129
130
  - resources/deploy_production.rb
130
131
  - resources/deploy_staging.rb