capifony 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG +4 -0
  2. data/lib/symfony2.rb +9 -13
  3. metadata +4 -4
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 2.0.9 / June 15, 2011
2
+
3
+ * migrations fixed in Symfony2
4
+
1
5
  == 2.0.8 / June 14, 2011
2
6
 
3
7
  * update_vendors functionality support (via @weaverryan)
data/lib/symfony2.rb CHANGED
@@ -82,7 +82,7 @@ namespace :deploy do
82
82
  desc "Migrate Symfony2 Doctrine ORM database."
83
83
  task :migrate do
84
84
  currentVersion = nil
85
- run "#{php-bin} #{symfony_console} doctrine:migrations:status --env=#{symfony_env_prod}" do |ch, stream, out|
85
+ run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:status --env=#{symfony_env_prod}" do |ch, stream, out|
86
86
  if stream == :out and out =~ /Current Version:[^$]+\(([0-9]+)\)/
87
87
  currentVersion = Regexp.last_match(1)
88
88
  end
@@ -90,24 +90,20 @@ namespace :deploy do
90
90
  currentVersion = 0
91
91
  end
92
92
  end
93
-
93
+
94
94
  if currentVersion == nil
95
95
  raise "Could not find current database migration version"
96
96
  end
97
- puts "Current database version #{currentVersion}"
98
-
97
+ puts "Current database version: #{currentVersion}"
98
+
99
99
  on_rollback {
100
- run "#{php-bin} #{symfony_console} doctrine:migrations:migrate #{currentVersion} --env=#{symfony_env_prod}" do |ch, stream, out|
101
- if out =~ /Are you sure you wish to continue/
102
- ch.send_data("y\r\n")
103
- end
100
+ if Capistrano::CLI.ui.agree("Do you really want to migrate #{symfony_env_prod}'s database back to version #{currentVersion}? (y/N)")
101
+ run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:migrate #{currentVersion} --env=#{symfony_env_prod} --no-interaction"
104
102
  end
105
103
  }
106
-
107
- run "#{php-bin} #{symfony_console} doctrine:migrations:migrate --env=#{symfony_env_prod}" do |ch, stream, out|
108
- if out =~ /Are you sure you wish to continue/
109
- ch.send_data("y\r\n")
110
- end
104
+
105
+ if Capistrano::CLI.ui.agree("Do you really want to migrate #{symfony_env_prod}'s database? (y/N)")
106
+ run "cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:migrate --env=#{symfony_env_prod} --no-interaction"
111
107
  end
112
108
  end
113
109
  end
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 8
10
- version: 2.0.8
9
+ - 9
10
+ version: 2.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Konstantin Kudryashov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-14 00:00:00 +03:00
18
+ date: 2011-06-15 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency