kstrano 1.1.3 → 1.1.4

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.
data/bin/kumafy CHANGED
@@ -142,35 +142,40 @@ def update_deploy_config(ui, base, context, force)
142
142
  end
143
143
 
144
144
  def update_symfony2(ui, base, context, force)
145
- file = File.join(base, "build.xml")
146
- write = true
145
+ build_dir = File.join(base, "build")
146
+ web_dir = File.join(base, "web")
147
147
 
148
- if File.exists?(file)
149
- overwrite = ui.ask("The file #{file} already exists, do you want to override it? ") { |q| q.default = 'n' }
150
- if !overwrite.match(/^y/)
151
- write = false
148
+ Dir.mkdir(build_dir) unless File.directory?(build_dir)
149
+ Dir.mkdir(web_dir) unless File.directory?(web_dir)
150
+
151
+ {
152
+ File.join(base, "build.xml") => "#{context['recipe']}/build.xml",
153
+ File.join(build_dir, "phpdox.xml") => "#{context['recipe']}/build.xml"
154
+ }.each do |target_file, source_file|
155
+ write = true
156
+
157
+ if File.exists?(target_file)
158
+ overwrite = ui.ask("The file #{target_file} already exists, do you want to override it? ") { |q| q.default = 'n' }
159
+ if !overwrite.match(/^y/)
160
+ write = false
161
+ end
152
162
  end
153
- end
154
163
 
155
- if write
156
- build_file = read_resource_file("#{context['recipe']}/build.xml")
164
+ if write
165
+ build_file = read_resource_file("#{context['recipe']}/build.xml")
157
166
 
158
- context["app_name"] ||= ui.ask("What's the name of the application?")
159
- app_name = context["app_name"]
160
- build_file.gsub!(/(\<project\sname=)(\"\")/, '\1' + "\"#{app_name}\"")
167
+ context["app_name"] ||= ui.ask("What's the name of the application?")
168
+ app_name = context["app_name"]
169
+ build_file.gsub!(/(\<project\sname=)(\"\")/, '\1' + "\"#{app_name}\"")
161
170
 
162
- File.open(file, "w") do |f|
163
- build_file.each_line do |line|
164
- f.print line
171
+ File.open(file, "w") do |f|
172
+ build_file.each_line do |line|
173
+ f.print line
174
+ end
165
175
  end
166
176
  end
167
177
  end
168
178
 
169
- build_dir = File.join(base, "build")
170
- web_dir = File.join(base, "web")
171
- Dir.mkdir(build_dir) unless File.directory?(build_dir)
172
- Dir.mkdir(web_dir) unless File.directory?(web_dir)
173
-
174
179
  copy_resources({
175
180
  File.join(build_dir, "phpcs.xml") => "#{context['recipe']}/phpcs.xml",
176
181
  File.join(build_dir, "phpmd.xml") => "#{context['recipe']}/phpmd.xml",
@@ -50,27 +50,9 @@ module KStrano
50
50
  task :restart do
51
51
  sudo "/etc/init.d/php5-fpm restart"
52
52
  end
53
- end
54
-
55
- namespace :apc do
56
- desc "Prepare for APC cache clear"
57
- task :prepare_clear do
58
- server_project_name = "#{server_name}"
59
- if server_project_name.nil? || server_project_name.empty?
60
- server_project_name = domain.split('.')[0]
61
- end
62
- sudo "sh -c 'if [ ! -f /home/projects/#{server_project_name}/site/apcclear.php ]; then curl https://raw.github.com/Kunstmaan/kStrano/master/config/apcclear.php > /home/projects/#{server_project_name}/site/apcclear.php; fi'"
63
- sudo "chmod 777 /home/projects/#{server_project_name}/site/apcclear.php"
64
- end
65
53
 
66
- desc "Clear the APC cache"
67
- task :clear do
68
- hostname = "#{domain}"
69
- server_project_name = "#{server_name}"
70
- if !server_project_name.nil? && !server_project_name.empty?
71
- hostname = "#{server_project_name}.#{hostname}"
72
- end
73
- sudo "curl http://#{hostname}/apcclear.php"
54
+ desc "Gracefully restart PHP5 fpm"
55
+ task :graceful_restart do
74
56
  sudo "pkill -QUIT -f \"^php-fpm: pool #{application} \" "
75
57
  end
76
58
  end
@@ -148,9 +130,8 @@ module KStrano
148
130
  end
149
131
  end
150
132
 
151
- before "deploy:finalize_update", "kuma:apc:prepare_clear"
152
- after "deploy:finalize_update", "kuma:apc:clear"
153
- after "deploy:create_symlink", "kuma:apc:clear"
133
+ after "deploy:finalize_update", "kuma:fpm:graceful_restart"
134
+ after "deploy:create_symlink", "kuma:fpm:graceful_restart"
154
135
 
155
136
  end
156
137
  end
@@ -1,5 +1,5 @@
1
1
  <phpdox xmlns="http://phpdox.de/config">
2
- <project name="bancontactcoc" source="src" workdir="build/phpdox">
2
+ <project name="your-project-name" source="src" workdir="build/phpdox">
3
3
  <collector publiconly="false">
4
4
  <include mask="*.php" />
5
5
  <exclude mask="*Autoload.php" />
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.3
4
+ version: 1.1.4
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-07-22 00:00:00.000000000 Z
12
+ date: 2013-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capifony