capifony 2.0.4 → 2.0.5

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 +5 -0
  2. data/lib/symfony2.rb +27 -24
  3. metadata +4 -4
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 2.0.5 / May 3, 2011
2
+
3
+ * made the Symfony2 console command configurable (symfony_console) (thanks @ruudk)
4
+ * added --env=#{symfony_env_prod} to every Symfony2 console command (thanks @ruudk)
5
+
1
6
  == 2.0.4 / April 23, 2011
2
7
 
3
8
  * shared lib support in symfony1 (thanks @jakzal)
data/lib/symfony2.rb CHANGED
@@ -6,6 +6,9 @@ set :app_path, "app"
6
6
  # Symfony web path
7
7
  set :web_path, "web"
8
8
 
9
+ # Symfony console bin
10
+ set :symfony_console, "console"
11
+
9
12
  # Use AsseticBundle
10
13
  set :dump_assetic_assets, false
11
14
 
@@ -69,7 +72,7 @@ namespace :deploy do
69
72
  desc "Migrate Symfony2 Doctrine ORM database."
70
73
  task :migrate do
71
74
  currentVersion = nil
72
- run "#{php-bin} #{app-path}/console doctrine:migrations:status" do |ch, stream, out|
75
+ run "#{php-bin} #{app-path}/#{symfony_console} doctrine:migrations:status --env=#{symfony_env_prod}" do |ch, stream, out|
73
76
  if stream == :out and out =~ /Current Version:[^$]+\(([0-9]+)\)/
74
77
  currentVersion = Regexp.last_match(1)
75
78
  end
@@ -84,14 +87,14 @@ namespace :deploy do
84
87
  puts "Current database version #{currentVersion}"
85
88
 
86
89
  on_rollback {
87
- run "#{php-bin} #{app-path}/console doctrine:migrations:migrate #{currentVersion}" do |ch, stream, out|
90
+ run "#{php-bin} #{app-path}/#{symfony_console} doctrine:migrations:migrate #{currentVersion} --env=#{symfony_env_prod}" do |ch, stream, out|
88
91
  if out =~ /Are you sure you wish to continue/
89
92
  ch.send_data("y\r\n")
90
93
  end
91
94
  end
92
95
  }
93
96
 
94
- run "#{php-bin} #{app-path}/console doctrine:migrations:migrate" do |ch, stream, out|
97
+ run "#{php-bin} #{app-path}/#{symfony_console} doctrine:migrations:migrate --env=#{symfony_env_prod}" do |ch, stream, out|
95
98
  if out =~ /Are you sure you wish to continue/
96
99
  ch.send_data("y\r\n")
97
100
  end
@@ -104,32 +107,32 @@ namespace :symfony do
104
107
  task :default do
105
108
  prompt_with_default(:task_arguments, "cache:clear")
106
109
 
107
- stream "cd #{latest_release} && #{php_bin} #{app_path}/console #{task_arguments}"
110
+ stream "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} #{task_arguments} --env=#{symfony_env_prod}"
108
111
  end
109
112
 
110
113
  namespace :assets do
111
114
  desc "Install bundle's assets"
112
115
  task :install do
113
- run "cd #{latest_release} && #{php_bin} #{app_path}/console assets:install #{web_path}"
116
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} assets:install #{web_path} --env=#{symfony_env_prod}"
114
117
  end
115
118
  end
116
119
 
117
120
  namespace :assetic do
118
121
  desc "Dumps all assets to the filesystem"
119
122
  task :dump do
120
- run "cd #{latest_release} && #{php_bin} #{app_path}/console assetic:dump #{web_path} --env=#{symfony_env_prod}"
123
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} assetic:dump #{web_path} --env=#{symfony_env_prod}"
121
124
  end
122
125
  end
123
126
 
124
127
  namespace :cache do
125
128
  desc "Clears project cache."
126
129
  task :clear do
127
- run "cd #{latest_release} && #{php_bin} #{app_path}/console cache:clear"
130
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} cache:clear --env=#{symfony_env_prod}"
128
131
  end
129
132
 
130
133
  desc "Warms up an empty cache."
131
134
  task :warmup do
132
- run "cd #{latest_release} && #{php_bin} #{app_path}/console cache:warmup"
135
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} cache:warmup --env=#{symfony_env_prod}"
133
136
  end
134
137
  end
135
138
 
@@ -137,65 +140,65 @@ namespace :symfony do
137
140
  namespace :cache do
138
141
  desc "Clear all metadata cache for a entity manager."
139
142
  task :clear_metadata do
140
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:cache:clear-metadata"
143
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:cache:clear-metadata --env=#{symfony_env_prod}"
141
144
  end
142
145
 
143
146
  desc "Clear all query cache for a entity manager."
144
147
  task :clear_query do
145
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:cache:clear-query"
148
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:cache:clear-query --env=#{symfony_env_prod}"
146
149
  end
147
150
 
148
151
  desc "Clear result cache for a entity manager."
149
152
  task :clear_result do
150
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:cache:clear-result"
153
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:cache:clear-result --env=#{symfony_env_prod}"
151
154
  end
152
155
  end
153
156
 
154
157
  namespace :database do
155
158
  desc "Create the configured databases."
156
159
  task :create do
157
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:database:create"
160
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:database:create --env=#{symfony_env_prod}"
158
161
  end
159
162
 
160
163
  desc "Drop the configured databases."
161
164
  task :drop do
162
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:database:drop"
165
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:database:drop --env=#{symfony_env_prod}"
163
166
  end
164
167
  end
165
168
 
166
169
  namespace :generate do
167
170
  desc "Generates proxy classes for entity classes."
168
171
  task :hydrators do
169
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:generate:proxies"
172
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:generate:proxies --env=#{symfony_env_prod}"
170
173
  end
171
174
 
172
175
  desc "Generate repository classes from your mapping information."
173
176
  task :hydrators do
174
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:generate:repositories"
177
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:generate:repositories --env=#{symfony_env_prod}"
175
178
  end
176
179
  end
177
180
 
178
181
  namespace :schema do
179
182
  desc "Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output."
180
183
  task :create do
181
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:schema:create"
184
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:schema:create --env=#{symfony_env_prod}"
182
185
  end
183
186
 
184
187
  desc "Drop the complete database schema of EntityManager Storage Connection or generate the corresponding SQL output."
185
188
  task :drop do
186
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:schema:drop"
189
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:schema:drop --env=#{symfony_env_prod}"
187
190
  end
188
191
  end
189
192
 
190
193
  namespace :migrations do
191
194
  desc "Execute a migration to a specified version or the latest available version."
192
195
  task :migrate do
193
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:migrations:migrate"
196
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:migrations:migrate --env=#{symfony_env_prod}"
194
197
  end
195
198
 
196
199
  desc "View the status of a set of migrations."
197
200
  task :status do
198
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:migrations:status"
201
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:migrations:status --env=#{symfony_env_prod}"
199
202
  end
200
203
  end
201
204
 
@@ -203,29 +206,29 @@ namespace :symfony do
203
206
  namespace :generate do
204
207
  desc "Generates hydrator classes for document classes."
205
208
  task :hydrators do
206
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:mongodb:generate:hydrators"
209
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:mongodb:generate:hydrators --env=#{symfony_env_prod}"
207
210
  end
208
211
 
209
212
  desc "Generates proxy classes for document classes."
210
213
  task :hydrators do
211
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:mongodb:generate:proxies"
214
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:mongodb:generate:proxies --env=#{symfony_env_prod}"
212
215
  end
213
216
 
214
217
  desc "Generates repository classes for document classes."
215
218
  task :hydrators do
216
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:mongodb:generate:repositories"
219
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:mongodb:generate:repositories --env=#{symfony_env_prod}"
217
220
  end
218
221
  end
219
222
 
220
223
  namespace :schema do
221
224
  desc "Allows you to create databases, collections and indexes for your documents."
222
225
  task :create do
223
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:mongodb:schema:create"
226
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:mongodb:schema:create --env=#{symfony_env_prod}"
224
227
  end
225
228
 
226
229
  desc "Allows you to drop databases, collections and indexes for your documents."
227
230
  task :drop do
228
- run "cd #{latest_release} && #{php_bin} #{app_path}/console doctrine:mongodb:schema:drop"
231
+ run "cd #{latest_release} && #{php_bin} #{app_path}/#{symfony_console} doctrine:mongodb:schema:drop --env=#{symfony_env_prod}"
229
232
  end
230
233
  end
231
234
  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: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 4
10
- version: 2.0.4
9
+ - 5
10
+ version: 2.0.5
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-04-23 00:00:00 +03:00
18
+ date: 2011-05-03 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency