capifony 0.3.2 → 0.3.3
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/CHANGELOG +4 -0
- data/lib/capifony.rb +17 -15
- metadata +4 -4
data/CHANGELOG
CHANGED
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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 "
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
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-
|
18
|
+
date: 2010-06-13 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|