capifony 2.4.2 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/bin/capifony +1 -1
- data/lib/capifony_symfony2.rb +15 -8
- data/lib/symfony1/deploy.rb +5 -5
- data/lib/symfony1/propel.rb +7 -7
- data/lib/symfony1/symfony.rb +7 -7
- data/lib/symfony2/deploy.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 720432fd12290f3639c054bec3af1dae093c17b3
|
4
|
+
data.tar.gz: 5fd080b5322ef20be539a1860b32520f90fe9ba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad30eebcd58614110c6074bcf049a1514f350f2891ebd5e8d8621bd171567a2987d05943fc6bb490dea1e5b1354f7bef7291b5cb235a4fbb7551c300e47e54d2
|
7
|
+
data.tar.gz: 5658e037d11ab0e55b4e23b8e9863432e62192e10e8af43d07ea55ed50cb042965e3bf8f3573482fc38446a9afefb9c13510876e6e5e7bf2af230d659b75e8ea
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 2.5.0 / February 11, 2014
|
2
|
+
|
3
|
+
* Added: more no_release attributes to allow using custom roles
|
4
|
+
* Fixed: symfony:assets:update_version executed before composer
|
5
|
+
* Fixed: updated the specified version for the ruby-progressbar to 1.4.1 (the
|
6
|
+
latest version).
|
7
|
+
* Fixed: missing parameter "-p" for "getfacl" on CentOS
|
8
|
+
* Fixed: moved `cache warmup` task after `assetic dump` task
|
9
|
+
* Fixed: recreated composer autoload after deploy:rollback
|
10
|
+
|
1
11
|
### 2.4.2 / January 7, 2014
|
2
12
|
|
3
13
|
* Fixed: add null value(tylda) to regular expression (#447)
|
data/bin/capifony
CHANGED
data/lib/capifony_symfony2.rb
CHANGED
@@ -277,6 +277,10 @@ module Capifony
|
|
277
277
|
end
|
278
278
|
|
279
279
|
after "deploy:finalize_update" do
|
280
|
+
if update_assets_version
|
281
|
+
symfony.assets.update_version # Update `assets_version`
|
282
|
+
end
|
283
|
+
|
280
284
|
if use_composer && !use_composer_tmp
|
281
285
|
if update_vendors
|
282
286
|
symfony.composer.update
|
@@ -302,14 +306,6 @@ module Capifony
|
|
302
306
|
symfony.composer.dump_autoload
|
303
307
|
end
|
304
308
|
|
305
|
-
if update_assets_version
|
306
|
-
symfony.assets.update_version # Update `assets_version`
|
307
|
-
end
|
308
|
-
|
309
|
-
if cache_warmup
|
310
|
-
symfony.cache.warmup # Warmup clean cache
|
311
|
-
end
|
312
|
-
|
313
309
|
if assets_install
|
314
310
|
symfony.assets.install # Install assets
|
315
311
|
end
|
@@ -318,6 +314,10 @@ module Capifony
|
|
318
314
|
symfony.assetic.dump # Dump assetic assets
|
319
315
|
end
|
320
316
|
|
317
|
+
if cache_warmup
|
318
|
+
symfony.cache.warmup # Warmup clean cache
|
319
|
+
end
|
320
|
+
|
321
321
|
if clear_controllers
|
322
322
|
# If clear_controllers is an array set controllers_to_clear,
|
323
323
|
# else use the default value 'app_*.php'
|
@@ -347,6 +347,13 @@ module Capifony
|
|
347
347
|
after "deploy:create_symlink" do
|
348
348
|
puts "--> Successfully deployed!".green
|
349
349
|
end
|
350
|
+
|
351
|
+
# Recreate the autoload file after rolling back
|
352
|
+
# https://github.com/everzet/capifony/issues/422
|
353
|
+
after "deploy:rollback" do
|
354
|
+
run "cd #{current_path} && #{composer_bin} dump-autoload #{composer_dump_autoload_options}"
|
355
|
+
end
|
356
|
+
|
350
357
|
end
|
351
358
|
|
352
359
|
end
|
data/lib/symfony1/deploy.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
namespace :deploy do
|
2
2
|
desc "Runs the symfony migrations"
|
3
|
-
task :migrate do
|
3
|
+
task :migrate, :roles => :app, :except => { :no_release => true } do
|
4
4
|
symfony.orm.migrate
|
5
5
|
end
|
6
6
|
|
7
7
|
desc "Symlink static directories and static files that need to remain between deployments."
|
8
|
-
task :share_childs do
|
8
|
+
task :share_childs, :roles => :app, :except => { :no_release => true } do
|
9
9
|
if shared_children
|
10
10
|
shared_children.each do |link|
|
11
11
|
run "#{try_sudo} mkdir -p #{shared_path}/#{link}"
|
@@ -24,7 +24,7 @@ namespace :deploy do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
desc "Customize the finalize_update task to work with symfony."
|
27
|
-
task :finalize_update, :except => { :no_release => true } do
|
27
|
+
task :finalize_update, :roles => :app, :except => { :no_release => true } do
|
28
28
|
run "#{try_sudo} chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
|
29
29
|
run "#{try_sudo} mkdir -p #{latest_release}/cache"
|
30
30
|
run "#{try_sudo} chmod -R g+w #{latest_release}/cache"
|
@@ -40,14 +40,14 @@ namespace :deploy do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
desc "Need to overwrite the deploy:cold task so it doesn't try to run the migrations."
|
43
|
-
task :cold do
|
43
|
+
task :cold, :roles => :app, :except => { :no_release => true } do
|
44
44
|
update
|
45
45
|
symfony.orm.build_db_and_load
|
46
46
|
start
|
47
47
|
end
|
48
48
|
|
49
49
|
desc "Deploy the application and run the test suite."
|
50
|
-
task :testall do
|
50
|
+
task :testall, :roles => :app, :except => { :no_release => true } do
|
51
51
|
update_code
|
52
52
|
create_symlink
|
53
53
|
symfony.orm.build_db_and_load
|
data/lib/symfony1/propel.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
namespace :symfony do
|
2
2
|
namespace :propel do
|
3
3
|
desc "Ensure Propel is correctly configured"
|
4
|
-
task :setup do
|
4
|
+
task :setup, :roles => :app, :except => { :no_release => true } do
|
5
5
|
conf_files_exists = capture("if test -s #{shared_path}/config/propel.ini -a -s #{shared_path}/config/databases.yml ; then echo 'exists' ; fi").strip
|
6
6
|
|
7
7
|
# share childs again (for propel.ini file)
|
@@ -15,40 +15,40 @@ namespace :symfony do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
desc "Migrates database to current version"
|
18
|
-
task :migrate do
|
18
|
+
task :migrate, :roles => :app, :except => { :no_release => true } do
|
19
19
|
puts "propel doesn't have built-in migration for now"
|
20
20
|
end
|
21
21
|
|
22
22
|
desc "Generate model lib form and filters classes based on your schema"
|
23
|
-
task :build_classes do
|
23
|
+
task :build_classes, :roles => :app, :except => { :no_release => true } do
|
24
24
|
run "#{try_sudo} #{php_bin} #{latest_release}/symfony propel:build --model --env=#{symfony_env_prod}"
|
25
25
|
run "#{try_sudo} #{php_bin} #{latest_release}/symfony propel:build --forms --env=#{symfony_env_prod}"
|
26
26
|
run "#{try_sudo} #{php_bin} #{latest_release}/symfony propel:build --filters --env=#{symfony_env_prod}"
|
27
27
|
end
|
28
28
|
|
29
29
|
desc "Generate code & database based on your schema"
|
30
|
-
task :build_all do
|
30
|
+
task :build_all, :roles => :app, :except => { :no_release => true } do
|
31
31
|
if Capistrano::CLI.ui.agree("Do you really want to rebuild #{symfony_env_prod}'s database? (y/N)")
|
32
32
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony propel:build --sql --db --no-confirmation --env=#{symfony_env_prod}'"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
desc "Generate code & database based on your schema & load fixtures"
|
37
|
-
task :build_all_and_load do
|
37
|
+
task :build_all_and_load, :roles => :app, :except => { :no_release => true } do
|
38
38
|
if Capistrano::CLI.ui.agree("Do you really want to rebuild #{symfony_env_prod}'s database and load #{symfony_env_prod}'s fixtures? (y/N)")
|
39
39
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony propel:build --sql --db --and-load --no-confirmation --env=#{symfony_env_prod}'"
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
desc "Generate sql & database based on your schema"
|
44
|
-
task :build_db do
|
44
|
+
task :build_db, :roles => :app, :except => { :no_release => true } do
|
45
45
|
if Capistrano::CLI.ui.agree("Do you really want to rebuild #{symfony_env_prod}'s database? (y/N)")
|
46
46
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony propel:build --sql --db --no-confirmation --env=#{symfony_env_prod}'"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
50
|
desc "Generate sql & database based on your schema & load fixtures"
|
51
|
-
task :build_db_and_load do
|
51
|
+
task :build_db_and_load, :roles => :app, :except => { :no_release => true } do
|
52
52
|
if Capistrano::CLI.ui.agree("Do you really want to rebuild #{symfony_env_prod}'s database and load #{symfony_env_prod}'s fixtures? (y/N)")
|
53
53
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony propel:build --sql --db --and-load --no-confirmation --env=#{symfony_env_prod}'"
|
54
54
|
end
|
data/lib/symfony1/symfony.rb
CHANGED
@@ -16,13 +16,13 @@ namespace :symfony do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
desc "Clears the cache"
|
19
|
-
task :cc do
|
19
|
+
task :cc, :roles => :app, :except => { :no_release => true } do
|
20
20
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony cache:clear'"
|
21
21
|
run "#{try_sudo} chmod -R g+w #{latest_release}/cache"
|
22
22
|
end
|
23
23
|
|
24
24
|
desc "Creates symbolic link to symfony lib in shared"
|
25
|
-
task :create_lib_symlink do
|
25
|
+
task :create_lib_symlink, :roles => :app, :except => { :no_release => true } do
|
26
26
|
prompt_with_default(:version, symfony_version)
|
27
27
|
symlink_path = "#{latest_release}/lib/vendor/symfony"
|
28
28
|
|
@@ -32,7 +32,7 @@ namespace :symfony do
|
|
32
32
|
|
33
33
|
namespace :configure do
|
34
34
|
desc "Configure database DSN"
|
35
|
-
task :database do
|
35
|
+
task :database, :roles => :app, :except => { :no_release => true } do
|
36
36
|
prompt_with_default(:dsn, "mysql:host=localhost;dbname=#{application}")
|
37
37
|
prompt_with_default(:db_username, "root")
|
38
38
|
db_password = Capistrano::CLI.password_prompt("db_password : ")
|
@@ -53,17 +53,17 @@ namespace :symfony do
|
|
53
53
|
|
54
54
|
namespace :project do
|
55
55
|
desc "Disables an application in a given environment"
|
56
|
-
task :disable do
|
56
|
+
task :disable, :roles => :app, :except => { :no_release => true } do
|
57
57
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony project:disable #{symfony_env_prod}'"
|
58
58
|
end
|
59
59
|
|
60
60
|
desc "Enables an application in a given environment"
|
61
|
-
task :enable do
|
61
|
+
task :enable, :roles => :app, :except => { :no_release => true } do
|
62
62
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony project:enable #{symfony_env_prod}'"
|
63
63
|
end
|
64
64
|
|
65
65
|
desc "Fixes symfony directory permissions"
|
66
|
-
task :permissions do
|
66
|
+
task :permissions, :roles => :app, :except => { :no_release => true } do
|
67
67
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony project:permissions'"
|
68
68
|
end
|
69
69
|
|
@@ -75,7 +75,7 @@ namespace :symfony do
|
|
75
75
|
end
|
76
76
|
|
77
77
|
desc "Clears all non production environment controllers"
|
78
|
-
task :clear_controllers do
|
78
|
+
task :clear_controllers, :roles => :app, :except => { :no_release => true } do
|
79
79
|
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony project:clear-controllers'"
|
80
80
|
end
|
81
81
|
|
data/lib/symfony2/deploy.rb
CHANGED
@@ -43,7 +43,7 @@ namespace :deploy do
|
|
43
43
|
dirs.each do |dir|
|
44
44
|
is_owner = (capture "`echo stat #{dir} -c %U`").chomp == user
|
45
45
|
if is_owner && permission_method != :chown
|
46
|
-
has_facl = (capture "getfacl -
|
46
|
+
has_facl = (capture "getfacl --absolute-names #{dir} | grep #{webserver_user} | wc -l").chomp != "0"
|
47
47
|
if (!has_facl)
|
48
48
|
methods[permission_method].each do |cmd|
|
49
49
|
try_sudo sprintf(cmd, dir)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capifony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Kudryashov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -79,14 +79,14 @@ dependencies:
|
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 1.4.1
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.4.1
|
90
90
|
description: |2
|
91
91
|
Capistrano is an open source tool for running scripts on multiple servers. It’s primary use is for easily deploying applications. While it was built specifically for deploying Rails apps, it’s pretty simple to customize it to deploy other types of applications. This package is a deployment "recipe" to work with symfony (both 1 and 2) applications.
|
92
92
|
email:
|