capifony 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 2.2.2 / November 13, 2012
2
+
3
+ * test when running symfony:composer:{install,update} with enabled copy_vendors
4
+ * Fix missing #{php_bin} variables
5
+ * Added optional symfony:composer:copy_vendors
6
+
1
7
  ### 2.2.1 / November 2, 2012
2
8
 
3
9
  * Move warn message to the description. Fix #201
data/bin/capifony CHANGED
@@ -5,7 +5,7 @@ require 'fileutils'
5
5
 
6
6
  symfony_version = nil
7
7
  symfony_app_path = 'app'
8
- capifony_version = '2.2.1'
8
+ capifony_version = '2.2.2'
9
9
 
10
10
  OptionParser.new do |opts|
11
11
  opts.banner = "Usage: #{File.basename($0)} [path]"
@@ -65,6 +65,9 @@ module Capifony
65
65
  # run bin/vendors script in mode (upgrade, install (faster if shared /vendor folder) or reinstall)
66
66
  set :vendors_mode, "reinstall"
67
67
 
68
+ # Copy vendors from previous release
69
+ set :copy_vendors, false
70
+
68
71
  # Whether to run cache warmup
69
72
  set :cache_warmup, true
70
73
 
@@ -182,6 +185,14 @@ module Capifony
182
185
  end
183
186
  end
184
187
 
188
+ ["symfony:composer:install", "symfony:composer:update"].each do |action|
189
+ before action do
190
+ if copy_vendors
191
+ symfony.composer.copy_vendors
192
+ end
193
+ end
194
+ end
195
+
185
196
  after "deploy:finalize_update" do
186
197
  if use_composer
187
198
  if update_vendors
@@ -21,9 +21,9 @@ namespace :symfony do
21
21
 
22
22
  desc "Generate model lib form and filters classes based on your schema"
23
23
  task :build_classes do
24
- run "#{try_sudo} php #{latest_release}/symfony propel:build --model --env=#{symfony_env_prod}"
25
- run "#{try_sudo} php #{latest_release}/symfony propel:build --forms --env=#{symfony_env_prod}"
26
- run "#{try_sudo} php #{latest_release}/symfony propel:build --filters --env=#{symfony_env_prod}"
24
+ run "#{try_sudo} #{php_bin} #{latest_release}/symfony propel:build --model --env=#{symfony_env_prod}"
25
+ run "#{try_sudo} #{php_bin} #{latest_release}/symfony propel:build --forms --env=#{symfony_env_prod}"
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"
@@ -54,4 +54,4 @@ namespace :symfony do
54
54
  end
55
55
  end
56
56
  end
57
- end
57
+ end
@@ -162,6 +162,13 @@ namespace :symfony do
162
162
  run "#{try_sudo} sh -c 'cd #{latest_release} && #{composer_bin} dump-autoload --optimize'"
163
163
  capifony_puts_ok
164
164
  end
165
+
166
+ task :copy_vendors, :except => { :no_release => true } do
167
+ capifony_pretty_print "--> Copying vendors from previous release"
168
+
169
+ run "vendorDir=#{current_path}/vendor; if [ -d $vendorDir ] || [ -h $vendorDir ]; then cp -a $vendorDir #{latest_release}/vendor; fi;"
170
+ capifony_puts_ok
171
+ end
165
172
  end
166
173
 
167
174
  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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 1
10
- version: 2.2.1
9
+ - 2
10
+ version: 2.2.2
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-11-02 00:00:00 Z
19
+ date: 2012-11-13 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: capistrano