capifony 2.7.0 → 2.8.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/bin/capifony +1 -1
- data/lib/symfony1/database.rb +1 -1
- data/lib/symfony2/database.rb +1 -1
- data/lib/symfony2/deploy.rb +4 -1
- data/lib/symfony2/symfony.rb +125 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63a49cfca1be6384d8d11dba3b49be49892e5db6
|
4
|
+
data.tar.gz: 796d9d09899de7a4a2bd54e94e657856382807af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26918b2ffc9114c1c7ce0218e830b77959d6837caa1dcfcaf823ad380e606d2414c0c20053298d89ccb058668cee65b109033e86568ef5870baea9d1086c605a
|
7
|
+
data.tar.gz: 9f23656a1293440ce3266a0c564878a8e024d50383598381f524e9736fcefe7953e73fb973b1bb2f495949423396ed62a268751310cdf79471ff0c50d1527e85
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 2.8.0 / August 1, 2014
|
2
|
+
|
3
|
+
* Added: alternative way on Linux/Ubuntu to deploy using chmod option: access
|
4
|
+
recursively all users write permissions to following directory.
|
5
|
+
* Added: rename database move commands to copy
|
6
|
+
* Added: check for possible already existing acl on directory
|
7
|
+
* Added: make `symfony:composer:install` run in interactive mode, to allow
|
8
|
+
`parameters.(ini|yml)` configuration using
|
9
|
+
`incenteev/composer-parameter-handle`
|
10
|
+
|
1
11
|
### 2.7.0 / May 16, 2014
|
2
12
|
|
3
13
|
* Added: support for command `doctrine:mongodb:fixtures:load`
|
data/bin/capifony
CHANGED
data/lib/symfony1/database.rb
CHANGED
data/lib/symfony2/database.rb
CHANGED
@@ -72,7 +72,7 @@ namespace :database do
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
namespace :
|
75
|
+
namespace :copy do
|
76
76
|
desc "Dumps remote database, downloads it to local, and populates here"
|
77
77
|
task :to_local, :roles => :db, :only => { :primary => true } do
|
78
78
|
env = fetch(:deploy_env, "remote")
|
data/lib/symfony2/deploy.rb
CHANGED
@@ -27,6 +27,9 @@ namespace :deploy do
|
|
27
27
|
"setfacl -R -m u:#{user}:rwX -m u:#{webserver_user}:rwX %s",
|
28
28
|
"setfacl -dR -m u:#{user}:rwx -m u:#{webserver_user}:rwx %s"
|
29
29
|
],
|
30
|
+
:chmod_alt => [
|
31
|
+
"chmod -R a+w %s"
|
32
|
+
],
|
30
33
|
:chown => ["chown -R #{webserver_user} %s"]
|
31
34
|
}
|
32
35
|
|
@@ -43,7 +46,7 @@ namespace :deploy do
|
|
43
46
|
dirs.each do |dir|
|
44
47
|
is_owner = (capture "`echo stat #{dir} -c %U`").chomp == user
|
45
48
|
if is_owner && permission_method != :chown
|
46
|
-
has_facl = (capture "getfacl --absolute-names #{dir} | grep #{webserver_user} | wc -l").chomp != "0"
|
49
|
+
has_facl = (capture "getfacl --absolute-names -t #{dir} | grep #{webserver_user}.*rwx | wc -l").chomp != "0"
|
47
50
|
if (!has_facl)
|
48
51
|
methods[permission_method].each do |cmd|
|
49
52
|
try_sudo sprintf(cmd, dir)
|
data/lib/symfony2/symfony.rb
CHANGED
@@ -154,11 +154,76 @@ namespace :symfony do
|
|
154
154
|
if use_composer_tmp
|
155
155
|
logger.debug "Installing composer dependencies to #{$temp_destination}"
|
156
156
|
capifony_pretty_print "--> Installing Composer dependencies in temp location"
|
157
|
-
|
157
|
+
|
158
|
+
tmp_options = options
|
159
|
+
|
160
|
+
if deploy_via == :capifony_copy_local
|
161
|
+
# do not run scripts locally: they must be executed on the target server
|
162
|
+
tmp_options += " --no-scripts"
|
163
|
+
end
|
164
|
+
|
165
|
+
run_locally "cd #{$temp_destination} && SYMFONY_ENV=#{symfony_env_prod} #{composer_bin} install #{tmp_options}"
|
158
166
|
capifony_puts_ok
|
159
167
|
else
|
160
168
|
capifony_pretty_print "--> Installing Composer dependencies"
|
161
|
-
|
169
|
+
|
170
|
+
command = "#{try_sudo} sh -c 'cd #{latest_release} && SYMFONY_ENV=#{symfony_env_prod} #{composer_bin} install #{options}'"
|
171
|
+
|
172
|
+
if interactive_mode
|
173
|
+
|
174
|
+
input = ''
|
175
|
+
print_wizard = false
|
176
|
+
close_header = true
|
177
|
+
run(command, { :pty => true, :eof => false }) do |channel, stream, data|
|
178
|
+
|
179
|
+
# on normal output
|
180
|
+
channel.on_data do |ch, data|
|
181
|
+
|
182
|
+
# check if composer is waiting for user input
|
183
|
+
print_wizard = data =~ /:[[:space:]]*$/
|
184
|
+
|
185
|
+
# avoid echoing the user input
|
186
|
+
if input.strip != data.strip and not print_wizard
|
187
|
+
logger.debug data
|
188
|
+
end
|
189
|
+
|
190
|
+
# if input has been requested
|
191
|
+
if print_wizard
|
192
|
+
|
193
|
+
if close_header
|
194
|
+
|
195
|
+
# finalize the info string
|
196
|
+
capifony_puts_ok
|
197
|
+
|
198
|
+
# and open a new section
|
199
|
+
capifony_pretty_print "--> Updating parameters"
|
200
|
+
puts if logger.level == Logger::IMPORTANT
|
201
|
+
|
202
|
+
close_header = false
|
203
|
+
end
|
204
|
+
|
205
|
+
print data
|
206
|
+
|
207
|
+
# capture the user input
|
208
|
+
input = $stdin.gets
|
209
|
+
|
210
|
+
# send it to the remote process
|
211
|
+
channel.send_data(input)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# on error
|
216
|
+
channel.on_extended_data do |ch, data|
|
217
|
+
warn "[err :: #{ch[:server]}] #{data}"
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
capifony_pretty_print "--> Parameters updated" if not close_header
|
222
|
+
|
223
|
+
else
|
224
|
+
run command
|
225
|
+
end
|
226
|
+
|
162
227
|
capifony_puts_ok
|
163
228
|
end
|
164
229
|
end
|
@@ -176,7 +241,64 @@ namespace :symfony do
|
|
176
241
|
end
|
177
242
|
|
178
243
|
capifony_pretty_print "--> Updating Composer dependencies"
|
179
|
-
|
244
|
+
|
245
|
+
command = "#{try_sudo} sh -c 'cd #{latest_release} && SYMFONY_ENV=#{symfony_env_prod} #{composer_bin} update #{options}'"
|
246
|
+
|
247
|
+
if interactive_mode
|
248
|
+
|
249
|
+
input = ''
|
250
|
+
print_wizard = false
|
251
|
+
close_header = true
|
252
|
+
run(command, { :pty => true, :eof => false }) do |channel, stream, data|
|
253
|
+
|
254
|
+
# on normal output
|
255
|
+
channel.on_data do |ch, data|
|
256
|
+
|
257
|
+
# check if composer is waiting for user input
|
258
|
+
print_wizard = data =~ /:[[:space:]]*$/
|
259
|
+
|
260
|
+
# avoid echoing the user input
|
261
|
+
if input.strip != data.strip and not print_wizard
|
262
|
+
logger.debug data
|
263
|
+
end
|
264
|
+
|
265
|
+
# if input has been requested
|
266
|
+
if print_wizard
|
267
|
+
|
268
|
+
if close_header
|
269
|
+
|
270
|
+
# finalize the info string
|
271
|
+
capifony_puts_ok
|
272
|
+
|
273
|
+
# and open a new section
|
274
|
+
capifony_pretty_print "--> Updating parameters"
|
275
|
+
puts if logger.level == Logger::IMPORTANT
|
276
|
+
|
277
|
+
close_header = false
|
278
|
+
end
|
279
|
+
|
280
|
+
print data
|
281
|
+
|
282
|
+
# capture the user input
|
283
|
+
input = $stdin.gets
|
284
|
+
|
285
|
+
# send it to the remote process
|
286
|
+
channel.send_data(input)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
# on error
|
291
|
+
channel.on_extended_data do |ch, data|
|
292
|
+
warn "[err :: #{ch[:server]}] #{data}"
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
capifony_pretty_print "--> Parameters updated" if not close_header
|
297
|
+
|
298
|
+
else
|
299
|
+
run command
|
300
|
+
end
|
301
|
+
|
180
302
|
capifony_puts_ok
|
181
303
|
end
|
182
304
|
|
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.
|
4
|
+
version: 2.8.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-
|
12
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|