capifony 2.1.15 → 2.1.16

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ == 2.1.16 / September 25, 2012
2
+
3
+ * Add composer:dump_autoload to the finalize_update after hook
4
+ * Add new task to allow composer dump-autoload
5
+ * Added back the '#{try_sudo}' option to the command
6
+ * Tweaked the way 'assets_version' value is updated
7
+ * run "#{try_sudo}"
8
+ * Use try_sudo instead of run
9
+
1
10
  == 2.1.15 / September 10, 2012
2
11
 
3
12
  * Fix #203
data/lib/symfony2.rb CHANGED
@@ -119,6 +119,8 @@ after "deploy:finalize_update" do
119
119
  else
120
120
  symfony.composer.install
121
121
  end
122
+
123
+ symfony.composer.dump_autoload
122
124
  else
123
125
  if update_vendors
124
126
  vendors_mode.chomp # To remove trailing whiteline
@@ -141,4 +141,11 @@ namespace :deploy do
141
141
  end
142
142
  end
143
143
  end
144
+
145
+ desc "Totaly drops :deploy_to directory"
146
+ task :drop do
147
+ if Capistrano::CLI.ui.ask("Are you sure remove #{deploy_to} (y/n)") == 'y'
148
+ run "#{try_sudo} rm -rf #{deploy_to}"
149
+ end
150
+ end
144
151
  end
@@ -25,7 +25,7 @@ namespace :symfony do
25
25
  namespace :assets do
26
26
  desc "Updates assets version (in config.yml)"
27
27
  task :update_version, :roles => :app, :except => { :no_release => true } do
28
- run "#{try_sudo} sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/#{app_path}/config/config.yml"
28
+ run "#{try_sudo} sed -i 's/\\(assets_version: \\)\\([a-zA-Z0-9_]*\\)\\(.*\\)$/\\1 \"#{real_revision[0,7]}\"\\3/g' #{latest_release}/#{app_path}/config/config.yml"
29
29
  end
30
30
 
31
31
  desc "Installs bundle's assets"
@@ -145,6 +145,20 @@ namespace :symfony do
145
145
  run "#{try_sudo} sh -c 'cd #{latest_release} && #{composer_bin} update #{composer_options}'"
146
146
  puts_ok
147
147
  end
148
+
149
+ desc "Dumps an optimized autoloader"
150
+ task :dump_autoload, :roles => :app, :except => { :no_release => true } do
151
+ if composer_bin
152
+ symfony.composer.update
153
+ else
154
+ symfony.composer.get
155
+ composer_bin = "#{php_bin} composer.phar"
156
+ end
157
+
158
+ pretty_print "--> Dumping an optimized autoloader"
159
+ run "#{try_sudo} sh -c 'cd #{latest_release} && #{composer_bin} dump-autoload --optimize'"
160
+ puts_ok
161
+ end
148
162
  end
149
163
 
150
164
  namespace :cache do
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: 21
4
+ hash: 43
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 15
10
- version: 2.1.15
9
+ - 16
10
+ version: 2.1.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Konstantin Kudryashov
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-09-10 00:00:00 Z
19
+ date: 2012-09-24 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: capistrano