capifony 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ### 2.2.4 / December 13, 2012
2
+
3
+ * Fixed a typo
4
+ * Fix #294
5
+ * extended fallback code when using
6
+ * symlinks for file systems that don't support them
7
+ * Fix travis config
8
+ * Fix symfony:assets:update_version, add sh tests. Fixes #282
9
+ * Fix whitespaces
10
+ * Use config_path var instead of hardcoded value
11
+ * deploy:migrate primary restriction is not cascaded
12
+
1
13
  ### 2.2.3 / November 28, 2012
2
14
 
3
15
  * #273. Create only one run call in the task and Tests
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.3'
8
+ capifony_version = '2.2.4'
9
9
 
10
10
  OptionParser.new do |opts|
11
11
  opts.banner = "Usage: #{File.basename($0)} [path]"
@@ -20,7 +20,7 @@ OptionParser.new do |opts|
20
20
  exit 0
21
21
  end
22
22
 
23
- opts.on("-s", "--symfony VERSION", "Capify specific symfony verion (1|2)") do |version|
23
+ opts.on("-s", "--symfony VERSION", "Capify specific symfony version (1|2)") do |version|
24
24
  symfony_version = version.to_i
25
25
  end
26
26
 
@@ -122,7 +122,7 @@ files.each do |file, content|
122
122
  else
123
123
  unless File.exists?(File.dirname(file))
124
124
  puts "[add] making directory '#{File.dirname(file)}'"
125
- FileUtils.mkdir(File.dirname(file))
125
+ FileUtils.mkdir_p(File.dirname(file))
126
126
  end
127
127
  puts "[add] writing '#{file}'"
128
128
  File.open(file, "w") { |f| f.write(content) }
@@ -58,14 +58,14 @@ def deep_merge(hash1, hash2)
58
58
  if(hash1 == nil && hash2 == nil)
59
59
  return nil
60
60
  end
61
-
61
+
62
62
  #the config.yml may not have 'all' key but instead 'dev' 'prod' and so on
63
63
  if(hash1 == nil && hash2 != nil)
64
64
  return hash2 # no need to merge
65
65
  end
66
66
 
67
- #if only the 'all' key is specified
68
- #There might not be a second has to cascade to
67
+ #if only the 'all' key is specified
68
+ #There might not be a second has to cascade to
69
69
  if(hash2 == nil && hash1 != nil)
70
70
  return hash1;
71
71
  end
@@ -84,7 +84,7 @@ module Capifony
84
84
 
85
85
  # Need to clear *_dev controllers
86
86
  set :clear_controllers, true
87
-
87
+
88
88
  # Controllers to clear
89
89
  set :controllers_to_clear, ['app_*.php']
90
90
 
@@ -246,7 +246,7 @@ module Capifony
246
246
  if dump_assetic_assets
247
247
  symfony.assetic.dump # Dump assetic assets
248
248
  end
249
-
249
+
250
250
  if clear_controllers
251
251
  # If clear_controllers is an array set controllers_to_clear,
252
252
  # else use the default value 'app_*.php'
@@ -23,7 +23,7 @@ namespace :database do
23
23
  get file, "backups/#{filename}"
24
24
  begin
25
25
  FileUtils.ln_sf(filename, "backups/#{application}.remote_dump.latest.sql.gz")
26
- rescue NotImplementedError # hack for windows which doesnt support symlinks
26
+ rescue Exception # fallback for file systems that don't support symlinks
27
27
  FileUtils.cp_r("backups/#{filename}", "backups/#{application}.remote_dump.latest.sql.gz")
28
28
  end
29
29
  run "#{try_sudo} rm #{file}"
@@ -54,7 +54,7 @@ namespace :database do
54
54
 
55
55
  begin
56
56
  FileUtils.ln_sf(filename, "backups/#{application}.local_dump.latest.sql.gz")
57
- rescue NotImplementedError # hack for windows which doesnt support symlinks
57
+ rescue Exception # fallback for file systems that don't support symlinks
58
58
  FileUtils.cp_r("backups/#{filename}", "backups/#{application}.local_dump.latest.sql.gz")
59
59
  end
60
60
  FileUtils.rm(tmpfile)
@@ -69,7 +69,7 @@ namespace :database do
69
69
 
70
70
  begin
71
71
  zipped_file_path = `readlink -f backups/#{application}.remote_dump.latest.sql.gz`.chop # gunzip does not work with a symlink
72
- rescue NotImplementedError # hack for windows which doesnt support symlinks
72
+ rescue Exception # fallback for file systems that don't support symlinks
73
73
  zipped_file_path = "backups/#{application}.remote_dump.latest.sql.gz"
74
74
  end
75
75
  unzipped_file_path = "backups/#{application}_dump.sql"
@@ -54,4 +54,4 @@ namespace :symfony do
54
54
  end
55
55
  end
56
56
  end
57
- end
57
+ end
@@ -30,7 +30,7 @@ namespace :database do
30
30
  get file, "backups/#{filename}"
31
31
  begin
32
32
  FileUtils.ln_sf(filename, "backups/#{application}.#{env}_dump.latest.sql.gz")
33
- rescue NotImplementedError # hack for windows which doesnt support symlinks
33
+ rescue Exception # fallback for file systems that don't support symlinks
34
34
  FileUtils.cp_r("backups/#{filename}", "backups/#{application}.#{env}_dump.latest.sql.gz")
35
35
  end
36
36
  run "#{try_sudo} rm #{file}"
@@ -63,7 +63,7 @@ namespace :database do
63
63
 
64
64
  begin
65
65
  FileUtils.ln_sf(filename, "backups/#{application}.local_dump.latest.sql.gz")
66
- rescue NotImplementedError # hack for windows which doesnt support symlinks
66
+ rescue Exception # fallback for file systems that don't support symlinks
67
67
  FileUtils.cp_r("backups/#{filename}", "backups/#{application}.local_dump.latest.sql.gz")
68
68
  end
69
69
  FileUtils.rm(tmpfile)
@@ -78,7 +78,7 @@ namespace :symfony do
78
78
 
79
79
  namespace :migrations do
80
80
  desc "Executes a migration to a specified version or the latest available version"
81
- task :migrate, :roles => :app, :except => { :no_release => true } do
81
+ task :migrate, :roles => :app, :only => { :primary => true }, :except => { :no_release => true } do
82
82
  currentVersion = nil
83
83
  run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} --no-ansi doctrine:migrations:status --env=#{symfony_env_prod}'", :once => true do |ch, stream, out|
84
84
  if stream == :out and out =~ /Current Version:.+\(([\w]+)\)/
@@ -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: \\)\\([a-zA-Z0-9_]*\\)\\(.*\\)$/\\1 \"#{real_revision[0,7]}\"\\3/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_config_path}/config.yml"
29
29
  end
30
30
 
31
31
  desc "Installs bundle's assets"
@@ -193,7 +193,7 @@ namespace :symfony do
193
193
  desc "Clears all non production environment controllers"
194
194
  task :clear_controllers do
195
195
  capifony_pretty_print "--> Clear controllers"
196
-
196
+
197
197
  command = "#{try_sudo} sh -c 'cd #{latest_release} && rm -f"
198
198
  controllers_to_clear.each do |link|
199
199
  command += " #{web_path}/" + link
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: 1
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 3
10
- version: 2.2.3
9
+ - 4
10
+ version: 2.2.4
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-28 00:00:00 Z
19
+ date: 2012-12-12 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: capistrano