capifony 2.2.7 → 2.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### 2.2.8 / March 5, 2013
2
+
3
+ * Remove the ability to copy of Composer
4
+ * Use composer optimize autoloader
5
+ * BugFix running cap deploy with user_sudo = true
6
+ * replace run block for data capturing with capture method + make try_sudo work
7
+ * Update assets_version before installing assets
8
+ * Add pretty printing to symfony:assets:update_version
9
+ * Update capifony.gemspec
10
+
1
11
  ### 2.2.7 / February 3, 2013
2
12
 
3
13
  * Implemented :doctrine_em configuration option (#321)
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.7'
8
+ capifony_version = '2.2.8'
9
9
 
10
10
  OptionParser.new do |opts|
11
11
  opts.banner = "Usage: #{File.basename($0)} [path]"
@@ -57,7 +57,7 @@ module Capifony
57
57
  set :composer_bin, false
58
58
 
59
59
  # Options to pass to composer when installing/updating
60
- set :composer_options, "--no-scripts --verbose --prefer-dist"
60
+ set :composer_options, "--no-scripts --verbose --prefer-dist --optimize-autoloader"
61
61
 
62
62
  # Whether to update vendors using the configured dependency manager (composer or bin/vendors)
63
63
  set :update_vendors, false
@@ -250,14 +250,14 @@ module Capifony
250
250
  symfony.composer.dump_autoload
251
251
  end
252
252
 
253
- if assets_install
254
- symfony.assets.install # Publish bundle assets
255
- end
256
-
257
253
  if update_assets_version
258
254
  symfony.assets.update_version # Update `assets_version`
259
255
  end
260
256
 
257
+ if assets_install
258
+ symfony.assets.install # Publish bundle assets
259
+ end
260
+
261
261
  if cache_warmup
262
262
  symfony.cache.warmup # Warmup clean cache
263
263
  end
@@ -17,7 +17,7 @@ namespace :symfony do
17
17
 
18
18
  desc "Clears the cache"
19
19
  task :cc do
20
- run "#{try_sudo} sh -c 'cd #{latest_release} && #{try_sudo} #{php_bin} ./symfony cache:clear'"
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
 
@@ -11,19 +11,16 @@ namespace :database do
11
11
  sqlfile = "#{application}_dump.sql"
12
12
  config = ""
13
13
 
14
- run "#{try_sudo} cat #{current_path}/#{app_config_path}/#{app_config_file}" do |ch, st, data|
15
- config = load_database_config data, symfony_env_prod
16
- end
14
+ data = capture("#{try_sudo} cat #{current_path}/#{app_config_path}/#{app_config_file}")
15
+ config = load_database_config data, symfony_env_prod
17
16
 
18
17
  case config['database_driver']
19
18
  when "pdo_mysql", "mysql"
20
- run "#{try_sudo} mysqldump -u#{config['database_user']} --host='#{config['database_host']}' --password='#{config['database_password']}' #{config['database_name']} | gzip -c > #{file}" do |ch, stream, data|
21
- puts data
22
- end
19
+ data = capture("#{try_sudo} sh -c 'mysqldump -u#{config['database_user']} --host='#{config['database_host']}' --password='#{config['database_password']}' #{config['database_name']} | gzip -c > #{file}'")
20
+ puts data
23
21
  when "pdo_pgsql", "pgsql"
24
- run "#{try_sudo} pg_dump -U #{config['database_user']} #{config['database_name']} --clean | gzip -c > #{file}" do |ch, stream, data|
25
- puts data
26
- end
22
+ data = capture("#{try_sudo} sh -c 'pg_dump -U #{config['database_user']} #{config['database_name']} --clean | gzip -c > #{file}'")
23
+ puts data
27
24
  end
28
25
 
29
26
  FileUtils.mkdir_p("backups")
@@ -33,7 +30,7 @@ namespace :database do
33
30
  rescue Exception # fallback for file systems that don't support symlinks
34
31
  FileUtils.cp_r("backups/#{filename}", "backups/#{application}.#{env}_dump.latest.sql.gz")
35
32
  end
36
- run "#{try_sudo} rm #{file}"
33
+ run "#{try_sudo} rm -f #{file}"
37
34
  end
38
35
 
39
36
  desc "Dumps local database"
@@ -106,23 +103,20 @@ namespace :database do
106
103
  upload(file, "#{remote_tmp_dir}/#{filename}", :via => :scp)
107
104
  run "#{try_sudo} gunzip -c #{remote_tmp_dir}/#{filename} > #{remote_tmp_dir}/#{sqlfile}"
108
105
 
109
- run "#{try_sudo} cat #{current_path}/#{app_config_path}/#{app_config_file}" do |ch, st, data|
110
- config = load_database_config data, symfony_env_prod
111
- end
106
+ data = capture("#{try_sudo} cat #{current_path}/#{app_config_path}/#{app_config_file}")
107
+ config = load_database_config data, symfony_env_prod
112
108
 
113
109
  case config['database_driver']
114
110
  when "pdo_mysql", "mysql"
115
- run "#{try_sudo} mysql -u#{config['database_user']} --host='#{config['database_host']}' --password='#{config['database_password']}' #{config['database_name']} < #{remote_tmp_dir}/#{sqlfile}" do |ch, stream, data|
116
- puts data
117
- end
111
+ data = capture("#{try_sudo} mysql -u#{config['database_user']} --host='#{config['database_host']}' --password='#{config['database_password']}' #{config['database_name']} < #{remote_tmp_dir}/#{sqlfile}")
112
+ puts data
118
113
  when "pdo_pgsql", "pgsql"
119
- run "#{try_sudo} psql -U #{config['database_user']} #{config['database_name']} < #{remote_tmp_dir}/#{sqlfile}" do |ch, stream, data|
120
- puts data
121
- end
114
+ data = capture("#{try_sudo} psql -U #{config['database_user']} #{config['database_name']} < #{remote_tmp_dir}/#{sqlfile}")
115
+ puts data
122
116
  end
123
117
 
124
- run "#{try_sudo} rm #{remote_tmp_dir}/#{filename}"
125
- run "#{try_sudo} rm #{remote_tmp_dir}/#{sqlfile}"
118
+ run "#{try_sudo} rm -f #{remote_tmp_dir}/#{filename}"
119
+ run "#{try_sudo} rm -f #{remote_tmp_dir}/#{sqlfile}"
126
120
  end
127
121
  end
128
122
  end
@@ -26,7 +26,10 @@ namespace :symfony do
26
26
  namespace :assets do
27
27
  desc "Updates assets version (in config.yml)"
28
28
  task :update_version, :roles => :app, :except => { :no_release => true } do
29
+ capifony_pretty_print "--> Updating assets version (in config.yml)"
30
+
29
31
  run "#{try_sudo} sed -i 's/\\(assets_version:[ ]*\\)\\([a-zA-Z0-9_]*\\)\\(.*\\)$/\\1#{real_revision[0,7]}\\3/g' #{latest_release}/#{app_config_path}/config.yml"
32
+ capifony_puts_ok
30
33
  end
31
34
 
32
35
  desc "Installs bundle's assets"
@@ -97,12 +100,6 @@ namespace :symfony do
97
100
  namespace :composer do
98
101
  desc "Gets composer and installs it"
99
102
  task :get, :roles => :app, :except => { :no_release => true } do
100
- if remote_file_exists?("#{previous_release}/composer.phar")
101
- capifony_pretty_print "--> Copying Composer from previous release"
102
- run "#{try_sudo} sh -c 'cp #{previous_release}/composer.phar #{latest_release}/'"
103
- capifony_puts_ok
104
- end
105
-
106
103
  if !remote_file_exists?("#{latest_release}/composer.phar")
107
104
  capifony_pretty_print "--> Downloading Composer"
108
105
 
metadata CHANGED
@@ -1,106 +1,102 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: capifony
3
- version: !ruby/object:Gem::Version
4
- hash: 9
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.8
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 2
9
- - 7
10
- version: 2.2.7
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Konstantin Kudryashov
14
9
  - William Durand
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2013-02-03 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2013-03-05 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: capistrano
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
25
18
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 49
30
- segments:
31
- - 2
32
- - 13
33
- - 5
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
34
22
  version: 2.13.5
35
- - - <=
36
- - !ruby/object:Gem::Version
37
- hash: 53
38
- segments:
39
- - 2
40
- - 14
41
- - 1
42
- version: 2.14.1
23
+ - - <
24
+ - !ruby/object:Gem::Version
25
+ version: '2.15'
43
26
  type: :runtime
44
- version_requirements: *id001
45
- - !ruby/object:Gem::Dependency
46
- name: colored
47
27
  prerelease: false
48
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.13.5
34
+ - - <
35
+ - !ruby/object:Gem::Version
36
+ version: '2.15'
37
+ - !ruby/object:Gem::Dependency
38
+ name: colored
39
+ requirement: !ruby/object:Gem::Requirement
49
40
  none: false
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- hash: 31
54
- segments:
55
- - 1
56
- - 2
57
- - 0
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
58
44
  version: 1.2.0
59
45
  type: :runtime
60
- version_requirements: *id002
61
- - !ruby/object:Gem::Dependency
62
- name: inifile
63
46
  prerelease: false
64
- requirement: &id003 !ruby/object:Gem::Requirement
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: 1.2.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: inifile
55
+ requirement: !ruby/object:Gem::Requirement
65
56
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- hash: 11
70
- segments:
71
- - 2
72
- - 0
73
- - 2
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
74
60
  version: 2.0.2
75
61
  type: :runtime
76
- version_requirements: *id003
77
- - !ruby/object:Gem::Dependency
78
- name: capistrano-maintenance
79
62
  prerelease: false
80
- requirement: &id004 !ruby/object:Gem::Requirement
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 2.0.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: capistrano-maintenance
71
+ requirement: !ruby/object:Gem::Requirement
81
72
  none: false
82
- requirements:
83
- - - "="
84
- - !ruby/object:Gem::Version
85
- hash: 27
86
- segments:
87
- - 0
88
- - 0
89
- - 2
73
+ requirements:
74
+ - - '='
75
+ - !ruby/object:Gem::Version
90
76
  version: 0.0.2
91
77
  type: :runtime
92
- version_requirements: *id004
93
- description: " Capistrano is an open source tool for running scripts on multiple servers. It\xE2\x80\x99s primary use is for easily deploying applications. While it was built specifically for deploying Rails apps, it\xE2\x80\x99s 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.\n"
94
- email:
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - '='
83
+ - !ruby/object:Gem::Version
84
+ version: 0.0.2
85
+ description: ! ' Capistrano is an open source tool for running scripts on multiple
86
+ servers. It’s primary use is for easily deploying applications. While it was built
87
+ specifically for deploying Rails apps, it’s pretty simple to customize it to deploy
88
+ other types of applications. This package is a deployment "recipe" to work with
89
+ symfony (both 1 and 2) applications.
90
+
91
+ '
92
+ email:
95
93
  - ever.zet@gmail.com
96
94
  - william.durand1@gmail.com
97
- executables:
95
+ executables:
98
96
  - capifony
99
97
  extensions: []
100
-
101
98
  extra_rdoc_files: []
102
-
103
- files:
99
+ files:
104
100
  - bin/capifony
105
101
  - lib/capifony.rb
106
102
  - lib/capifony_symfony1.rb
@@ -124,36 +120,26 @@ files:
124
120
  - UPGRADE.md
125
121
  homepage: http://capifony.org
126
122
  licenses: []
127
-
128
123
  post_install_message:
129
124
  rdoc_options: []
130
-
131
- require_paths:
125
+ require_paths:
132
126
  - lib
133
- required_ruby_version: !ruby/object:Gem::Requirement
127
+ required_ruby_version: !ruby/object:Gem::Requirement
134
128
  none: false
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- hash: 3
139
- segments:
140
- - 0
141
- version: "0"
142
- required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
143
134
  none: false
144
- requirements:
145
- - - ">="
146
- - !ruby/object:Gem::Version
147
- hash: 3
148
- segments:
149
- - 0
150
- version: "0"
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
151
139
  requirements: []
152
-
153
140
  rubyforge_project: capifony
154
- rubygems_version: 1.8.24
141
+ rubygems_version: 1.8.23
155
142
  signing_key:
156
143
  specification_version: 3
157
144
  summary: Deploying symfony PHP applications with Capistrano.
158
145
  test_files: []
159
-