capifony 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/bin/capifony +3 -0
- data/lib/symfony2.rb +55 -5
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 2.1.3 / September 27, 2011
|
2
|
+
|
3
|
+
* propel support for Symfony2 (by @willdurand)
|
4
|
+
* cache warmup and assets install configurable (by @gigo6000)
|
5
|
+
* always use --no-debug with assetic (by @fernanDOTdo)
|
6
|
+
* fixed assetic bug (by @mbontemps)
|
7
|
+
|
1
8
|
== 2.1.2 / August 11, 2011
|
2
9
|
|
3
10
|
* fix for vendors install
|
data/bin/capifony
CHANGED
@@ -68,6 +68,9 @@ if symfony_version == 2
|
|
68
68
|
set :scm, :git
|
69
69
|
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, `subversion` or `none`
|
70
70
|
|
71
|
+
set :model_manager, "doctrine"
|
72
|
+
# Or: `propel`
|
73
|
+
|
71
74
|
role :web, domain # Your HTTP server, Apache/etc
|
72
75
|
role :app, domain # This may be the same as your `Web` server
|
73
76
|
role :db, domain, :primary => true # This is where Rails migrations will run
|
data/lib/symfony2.rb
CHANGED
@@ -21,6 +21,12 @@ set :dump_assetic_assets, false
|
|
21
21
|
# Whether to run the bin/vendors script to update vendors
|
22
22
|
set :update_vendors, false
|
23
23
|
|
24
|
+
# Whether to run cache warmup
|
25
|
+
set :cache_warmup, true
|
26
|
+
|
27
|
+
# Assets install
|
28
|
+
set :assets_install, true
|
29
|
+
|
24
30
|
# Dirs that need to remain the same between deploys (shared dirs)
|
25
31
|
set :shared_children, [log_path, web_path + "/uploads"]
|
26
32
|
|
@@ -30,6 +36,9 @@ set :shared_files, false
|
|
30
36
|
# Asset folders (that need to be timestamped)
|
31
37
|
set :asset_children, [web_path + "/css", web_path + "/images", web_path + "/js"]
|
32
38
|
|
39
|
+
set :model_manager, "doctrine"
|
40
|
+
# Or: `propel`
|
41
|
+
|
33
42
|
namespace :deploy do
|
34
43
|
desc "Symlink static directories and static files that need to remain between deployments."
|
35
44
|
task :share_childs do
|
@@ -126,7 +135,7 @@ namespace :symfony do
|
|
126
135
|
namespace :assetic do
|
127
136
|
desc "Dumps all assets to the filesystem"
|
128
137
|
task :dump do
|
129
|
-
run "cd #{latest_release} && #{php_bin} #{symfony_console} assetic:dump #{web_path} --env=#{symfony_env_prod}"
|
138
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} assetic:dump #{web_path} --env=#{symfony_env_prod} --no-debug"
|
130
139
|
end
|
131
140
|
end
|
132
141
|
|
@@ -248,6 +257,37 @@ namespace :symfony do
|
|
248
257
|
end
|
249
258
|
end
|
250
259
|
end
|
260
|
+
|
261
|
+
namespace :propel do
|
262
|
+
namespace :database do
|
263
|
+
desc "Create the configured databases."
|
264
|
+
task :create do
|
265
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} propel:database:create --env=#{symfony_env_prod}"
|
266
|
+
end
|
267
|
+
|
268
|
+
desc "Drop the configured databases."
|
269
|
+
task :drop do
|
270
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} propel:database:drop --env=#{symfony_env_prod}"
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
namespace :build do
|
275
|
+
desc "Build the Model classes."
|
276
|
+
task :model do
|
277
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} propel:build-model --env=#{symfony_env_prod}"
|
278
|
+
end
|
279
|
+
|
280
|
+
desc "Build SQL statements."
|
281
|
+
task :sql do
|
282
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} propel:build-sql --env=#{symfony_env_prod}"
|
283
|
+
end
|
284
|
+
|
285
|
+
desc "Build the Model classes, SQL statements and insert SQL."
|
286
|
+
task :all_and_load do
|
287
|
+
run "cd #{latest_release} && #{php_bin} #{symfony_console} propel:build --insert-sql --env=#{symfony_env_prod}"
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
251
291
|
end
|
252
292
|
|
253
293
|
# After finalizing update:
|
@@ -255,12 +295,22 @@ after "deploy:finalize_update" do
|
|
255
295
|
if update_vendors
|
256
296
|
# share the children first (to get the vendor symlink)
|
257
297
|
deploy.share_childs
|
258
|
-
symfony.vendors.update
|
298
|
+
symfony.vendors.update # 1. Update vendors
|
299
|
+
end
|
300
|
+
|
301
|
+
if assets_install
|
302
|
+
symfony.assets.install # 2. Publish bundle assets
|
303
|
+
end
|
304
|
+
|
305
|
+
if cache_warmup
|
306
|
+
symfony.cache.warmup # 3. Warmup clean cache
|
259
307
|
end
|
260
308
|
|
261
|
-
symfony.cache.warmup # 2. Warmup clean cache
|
262
|
-
symfony.assets.install # 3. Publish bundle assets
|
263
309
|
if dump_assetic_assets
|
264
|
-
symfony.assetic.dump
|
310
|
+
symfony.assetic.dump # 4. Dump assetic assets
|
311
|
+
end
|
312
|
+
|
313
|
+
if model_manager == "propel"
|
314
|
+
symfony.propel.build.model
|
265
315
|
end
|
266
316
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 2.1.
|
8
|
+
- 3
|
9
|
+
version: 2.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Konstantin Kudryashov
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-09-27 00:00:00 +03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|