capifony 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG +4 -0
  2. data/lib/capifony.rb +17 -15
  3. metadata +4 -4
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.3 / June 13, 2010
2
+
3
+ * added ability to change called php binary (thanks to http://github.com/xgorse)
4
+
1
5
  == 0.3.2 / June 12, 2010
2
6
 
3
7
  * fixed :finalize_update hooks (clear_controllers task now runs)
data/lib/capifony.rb CHANGED
@@ -2,6 +2,8 @@ require 'yaml'
2
2
 
3
3
  # Dirs that need to remain the same between deploys (shared dirs)
4
4
  set :shared_children, %w(log web/uploads)
5
+ # PHP binary to execute
6
+ set :php_bin, "php"
5
7
 
6
8
  def prompt_with_default(var, default)
7
9
  set(var) do
@@ -101,20 +103,20 @@ namespace :symfony do
101
103
  prompt_with_default(:version, "1.4")
102
104
 
103
105
  run "wget http://sf-to.org/#{version}/check.php -O /tmp/check_configuration.php"
104
- run "php /tmp/check_configuration.php"
106
+ run "#{php_bin} /tmp/check_configuration.php"
105
107
  run "rm /tmp/check_configuration.php"
106
108
  end
107
109
 
108
110
  desc "Clears the cache"
109
111
  task :cc do
110
- run "php #{latest_release}/symfony cache:clear"
112
+ run "#{php_bin} #{latest_release}/symfony cache:clear"
111
113
  end
112
114
 
113
115
  desc "Runs custom symfony task"
114
116
  task :run_task do
115
117
  prompt_with_default(:task_arguments, "cache:clear")
116
118
 
117
- run "php #{latest_release}/symfony #{task_arguments}"
119
+ run "#{php_bin} #{latest_release}/symfony #{task_arguments}"
118
120
  end
119
121
 
120
122
  namespace :configure do
@@ -125,40 +127,40 @@ namespace :symfony do
125
127
  prompt_with_default(:pass, "")
126
128
  dbclass = "sfDoctrineDatabase"
127
129
 
128
- run "php #{latest_release}/symfony configure:database --class=#{dbclass} '#{dsn}' '#{user}' '#{pass}'"
130
+ run "#{php_bin} #{latest_release}/symfony configure:database --class=#{dbclass} '#{dsn}' '#{user}' '#{pass}'"
129
131
  end
130
132
  end
131
133
 
132
134
  namespace :project do
133
135
  desc "Fixes symfony directory permissions"
134
136
  task :permissions do
135
- run "php #{latest_release}/symfony project:permissions"
137
+ run "#{php_bin} #{latest_release}/symfony project:permissions"
136
138
  end
137
139
 
138
140
  desc "Optimizes a project for better performance"
139
141
  task :optimize do
140
142
  prompt_with_default(:application, "frontend")
141
143
 
142
- run "php #{latest_release}/symfony project:optimize #{application}"
144
+ run "#{php_bin} #{latest_release}/symfony project:optimize #{application}"
143
145
  end
144
146
 
145
147
  desc "Clears all non production environment controllers"
146
148
  task :clear_controllers do
147
- run "php #{latest_release}/symfony project:clear-controllers"
149
+ run "#{php_bin} #{latest_release}/symfony project:clear-controllers"
148
150
  end
149
151
  end
150
152
 
151
153
  namespace :plugin do
152
154
  desc "Publishes web assets for all plugins"
153
155
  task :publish_assets do
154
- run "php #{latest_release}/symfony plugin:publish-assets"
156
+ run "#{php_bin} #{latest_release}/symfony plugin:publish-assets"
155
157
  end
156
158
  end
157
159
 
158
160
  namespace :log do
159
161
  desc "Clears log files"
160
162
  task :clear do
161
- run "php #{latest_release}/symfony log:clear"
163
+ run "#{php_bin} #{latest_release}/symfony log:clear"
162
164
  end
163
165
 
164
166
  desc "Rotates an application's log files"
@@ -166,14 +168,14 @@ namespace :symfony do
166
168
  prompt_with_default(:application, "frontend")
167
169
  prompt_with_default(:env, "prod")
168
170
 
169
- run "php #{latest_release}/symfony log:rotate #{application} #{env}"
171
+ run "#{php_bin} #{latest_release}/symfony log:rotate #{application} #{env}"
170
172
  end
171
173
  end
172
174
 
173
175
  namespace :tests do
174
176
  desc "Task to run all the tests for the application."
175
177
  task :all do
176
- run "php #{latest_release}/symfony test:all"
178
+ run "#{php_bin} #{latest_release}/symfony test:all"
177
179
  end
178
180
  end
179
181
  end
@@ -181,22 +183,22 @@ end
181
183
  namespace :doctrine do
182
184
  desc "Migrates database to current version"
183
185
  task :migrate do
184
- run "php #{latest_release}/symfony doctrine:migrate --env=prod"
186
+ run "#{php_bin} #{latest_release}/symfony doctrine:migrate --env=prod"
185
187
  end
186
188
 
187
189
  desc "Generate code & database based on your schema"
188
190
  task :build_all do
189
- run "php #{latest_release}/symfony doctrine:build --all --no-confirmation --env=prod"
191
+ run "#{php_bin} #{latest_release}/symfony doctrine:build --all --no-confirmation --env=prod"
190
192
  end
191
193
 
192
194
  desc "Generate code & database based on your schema & load fixtures"
193
195
  task :build_all_and_load do
194
- run "php #{latest_release}/symfony doctrine:build --all --and-load --no-confirmation --env=prod"
196
+ run "#{php_bin} #{latest_release}/symfony doctrine:build --all --and-load --no-confirmation --env=prod"
195
197
  end
196
198
 
197
199
  desc "Generate code & database based on your schema & load fixtures for test environment"
198
200
  task :build_all_and_load_test do
199
- run "php #{latest_release}/symfony doctrine:build --all --and-load --no-confirmation --env=test"
201
+ run "#{php_bin} #{latest_release}/symfony doctrine:build --all --and-load --no-confirmation --env=test"
200
202
  end
201
203
  end
202
204
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capifony
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Konstantin Kudryashov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-12 00:00:00 +03:00
18
+ date: 2010-06-13 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency