capifony 2.5.0 → 2.6.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 720432fd12290f3639c054bec3af1dae093c17b3
4
- data.tar.gz: 5fd080b5322ef20be539a1860b32520f90fe9ba9
3
+ metadata.gz: 1fa99fc5b5f004ec80818f553f487295b2f753d9
4
+ data.tar.gz: e60758b6f8207fb374f3cc4ac2be8d2e3534d934
5
5
  SHA512:
6
- metadata.gz: ad30eebcd58614110c6074bcf049a1514f350f2891ebd5e8d8621bd171567a2987d05943fc6bb490dea1e5b1354f7bef7291b5cb235a4fbb7551c300e47e54d2
7
- data.tar.gz: 5658e037d11ab0e55b4e23b8e9863432e62192e10e8af43d07ea55ed50cb042965e3bf8f3573482fc38446a9afefb9c13510876e6e5e7bf2af230d659b75e8ea
6
+ metadata.gz: 0e2b2a47913ccc5b73dbdebcd3c2e16b08578ce1a21c537c1850e363ee1afb131090521259d170d65ea020501c2238f0b6479d35d052cfc37ab710deb4c40b30
7
+ data.tar.gz: ea084b66d208d806956edf9954c49da22163d81705b4ead24f47541bde565ff950eae4385582c4c9bf5bb59a717f1495f18948f4014cd1d16c2334d768fae5f2
@@ -1,3 +1,10 @@
1
+ ### 2.6.0 / April 9, 2014
2
+
3
+ * Added: `no_release` for symfony1 `publish_assets`
4
+ * Added: allow to skip or not interactive_mode for the task `capifony:doctrine:load:fixtures`
5
+ * Added: support composer version specify (install/self-update)
6
+ * Removed: unneeded dump of autoload files
7
+
1
8
  ### 2.5.0 / February 11, 2014
2
9
 
3
10
  * Added: more no_release attributes to allow using custom roles
@@ -5,7 +5,7 @@ require 'fileutils'
5
5
 
6
6
  symfony_version = nil
7
7
  symfony_app_path = 'app'
8
- capifony_version = '2.5.0'
8
+ capifony_version = '2.6.0'
9
9
 
10
10
  OptionParser.new do |opts|
11
11
  opts.banner = "Usage: #{File.basename($0)} [path]"
@@ -64,6 +64,10 @@ module Capifony
64
64
  # If set to false, Capifony will download/install composer
65
65
  set :composer_bin, false
66
66
 
67
+ # Release number to composer
68
+ # If you would like to instead update to a specific release simply specify it (for example '1.0.0-alpha8')
69
+ set :composer_version, ""
70
+
67
71
  # Options to pass to composer when installing/updating
68
72
  set :composer_options, "--no-dev --verbose --prefer-dist --optimize-autoloader --no-progress"
69
73
 
@@ -302,10 +306,6 @@ module Capifony
302
306
  symfony.propel.build.model
303
307
  end
304
308
 
305
- if use_composer && !use_composer_tmp
306
- symfony.composer.dump_autoload
307
- end
308
-
309
309
  if assets_install
310
310
  symfony.assets.install # Install assets
311
311
  end
@@ -110,7 +110,7 @@ namespace :symfony do
110
110
 
111
111
  namespace :plugin do
112
112
  desc "Publishes web assets for all plugins"
113
- task :publish_assets do
113
+ task :publish_assets, :roles => :app, :except => { :no_release => true } do
114
114
  run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} ./symfony plugin:publish-assets'"
115
115
  end
116
116
  end
@@ -94,7 +94,10 @@ namespace :symfony do
94
94
 
95
95
  desc "Load data fixtures"
96
96
  task :load_fixtures, :roles => :app, :except => { :no_release => true } do
97
- run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:fixtures:load #{console_options}#{doctrine_em_flag}'", :once => true
97
+ if !interactive_mode || Capistrano::CLI.ui.agree("Careful, database will be purged. Do you want to continue? (Y/N)")
98
+ run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:fixtures:load --no-interaction #{console_options}#{doctrine_em_flag}'", :once => true
99
+ end
100
+ capifony_puts_ok
98
101
  end
99
102
 
100
103
  namespace :migrations do
@@ -112,20 +112,25 @@ namespace :symfony do
112
112
  namespace :composer do
113
113
  desc "Gets composer and installs it"
114
114
  task :get, :roles => :app, :except => { :no_release => true } do
115
+ install_options = ''
116
+ unless composer_version.empty?
117
+ install_options += " -- --version=#{composer_version}"
118
+ end
119
+
115
120
  if use_composer_tmp
116
121
  # Because we always install to temp location we assume that we download composer every time.
117
122
  logger.debug "Downloading composer to #{$temp_destination}"
118
123
  capifony_pretty_print "--> Downloading Composer to temp location"
119
- run_locally "cd #{$temp_destination} && curl -s http://getcomposer.org/installer | #{php_bin}"
124
+ run_locally "cd #{$temp_destination} && curl -s http://getcomposer.org/installer | #{php_bin}#{install_options}"
120
125
  else
121
126
  if !remote_file_exists?("#{latest_release}/composer.phar")
122
127
  capifony_pretty_print "--> Downloading Composer"
123
128
 
124
- run "#{try_sudo} sh -c 'cd #{latest_release} && curl -s http://getcomposer.org/installer | #{php_bin}'"
129
+ run "#{try_sudo} sh -c 'cd #{latest_release} && curl -s http://getcomposer.org/installer | #{php_bin}#{install_options}'"
125
130
  else
126
131
  capifony_pretty_print "--> Updating Composer"
127
132
 
128
- run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} composer.phar self-update'"
133
+ run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} composer.phar self-update #{composer_version}'" \
129
134
  end
130
135
  end
131
136
  capifony_puts_ok
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.5.0
4
+ version: 2.6.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-02-11 00:00:00.000000000 Z
12
+ date: 2014-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano