Skip to content

Commit 718da38

Browse files
committed
paths api
1 parent d04ded3 commit 718da38

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

passenger/shell/functions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ passenger_stop() {
2020
passenger_restart() {
2121
log "Triggering restart of Passenger application."
2222

23-
ensure_paths_exist "$release_path/tmp"
23+
paths create "$release_path/tmp"
2424

25-
ensure_files_exist "$release_path/tmp/restart.txt"
25+
paths create "$release_path/tmp/restart.txt"
2626

2727
log "Restart triggered."
2828
}

rails/shell/functions

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ setup_shared_path()
190190
for _path in config log pids sockets "public/assets" tmp
191191
do
192192
log_step "Ensuring path exists ~ ${shared_path}/${_path}" \
193-
ensure_paths_exist "${shared_path}/${_path}"
193+
paths create "${shared_path}/${_path}"
194194
done
195195
}
196196

@@ -282,7 +282,7 @@ bootstrap_gems()
282282

283283
command_exists "gem" || return 0
284284

285-
enter "${release_path}"
285+
paths enter "${release_path}"
286286

287287
if file_exists "Gemfile"
288288
then
@@ -303,17 +303,17 @@ rails_setup()
303303
log_step "Configuring profiles (~/.rvmrc, ~/.bashrc ~/.bash_profile)" \
304304
configure_profiles
305305

306-
ensure_paths_exist "${shared_path}"
306+
paths create "${shared_path}"
307307

308-
enter "${shared_path}"
308+
paths enter "${shared_path}"
309309

310310
log_step "Setting up shared path (~/shared)"
311311
setup_shared_path
312312

313313
log_step "Configuring database.yml (~/shared/config/database.yml)" \
314314
configure_database_yml
315315

316-
path_exists "$shared_path/$project" ||
316+
path exists "$shared_path/$project" ||
317317
fetch_uri "$repository_url" "$shared_path/$project" ${scm_flags[@]}
318318

319319
configure_rvm
@@ -327,7 +327,7 @@ rails_setup()
327327

328328
rails_server()
329329
{
330-
enter "${release_path}"
330+
paths enter "${release_path}"
331331

332332
if command_exists "ruby"
333333
then
@@ -346,7 +346,7 @@ rails_server()
346346

347347
rails_dbconsole()
348348
{
349-
enter "${release_path}"
349+
paths enter "${release_path}"
350350

351351
if command_exists "ruby"
352352
then
@@ -369,7 +369,7 @@ rails_dbconsole()
369369

370370
rails_console()
371371
{
372-
enter "${release_path}"
372+
paths enter "${release_path}"
373373

374374
if command_exists ruby
375375
then
@@ -395,7 +395,7 @@ rails_logtail()
395395

396396
rails_migrate()
397397
{
398-
enter "${release_path}"
398+
paths enter "${release_path}"
399399

400400
if ! command_exists rake
401401
then
@@ -428,7 +428,7 @@ rails_new()
428428

429429
rails_generate()
430430
{
431-
enter "${release_path}"
431+
paths enter "${release_path}"
432432

433433
if command_exists "ruby"
434434
then
@@ -449,7 +449,7 @@ rails_generate()
449449

450450
rails_bootstrap()
451451
{
452-
enter "${release_path}"
452+
paths enter "${release_path}"
453453

454454
if file_is_nonempty *.gems && command_exists "rvm"
455455
then
@@ -485,7 +485,7 @@ rails_bootstrap()
485485

486486
rails_install()
487487
{
488-
enter "${release_path}"
488+
paths enter "${release_path}"
489489

490490
if ! command_exists rails
491491
then

rainbows/shell/functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rainbows_initialize()
4242
master_pid=0 # Not found!
4343
fi
4444

45-
path_exists "$release_path" && enter "${release_path}"
45+
path exists "$release_path" && enter "${release_path}"
4646

4747
# Since enter will not trigger project rvmrc files,
4848
source_files "$release_path/.rvmrc" "$HOME/.rvm/hooks/after_cd"

rvm/shell/functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
rvm_install()
44
{
5-
enter "${src_path}"
5+
paths enter "${src_path}"
66

77
url="https://rvm.beginrescueend.com/install/rvm"
88

trinidad/shell/functions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ trinidad_initialize()
1818

1919
load_ruby_environment
2020

21-
if path_exists "$release_path"
21+
if path exists "$release_path"
2222
then
23-
enter "${release_path}"
23+
paths enter "${release_path}"
2424
# Since enter will not trigger project rvmrc files,
2525
source_files "$release_path/.rvmrc" "$HOME/.rvm/hooks/after_cd" || true
2626
fi
@@ -92,7 +92,7 @@ trinidad_setup()
9292
{
9393
if template_exists "trinidad/trinidad.rb"
9494
then
95-
ensure_paths_exist "$shared_path/config"
95+
paths create "$shared_path/config"
9696

9797
install_template "trinidad/trinidad.rb" "${shared_path}/config/"
9898

unicorn/shell/functions

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ unicorn_initialize()
1717

1818
load_ruby_environment
1919

20-
if path_exists "$release_path"
20+
if path exists "$release_path"
2121
then
22-
enter "${release_path}"
22+
paths enter "${release_path}"
2323
# Since enter will not trigger project rvmrc files,
2424
source_files "$release_path/.rvmrc" "$HOME/.rvm/hooks/after_cd" || true
2525
fi
@@ -120,7 +120,7 @@ unicorn_setup()
120120
{
121121
if template_exists "unicorn/unicorn.rb"
122122
then
123-
ensure_paths_exist "$shared_path/config"
123+
paths create "$shared_path/config"
124124

125125
install_template "unicorn/unicorn.rb" "${shared_path}/config/"
126126

@@ -239,7 +239,7 @@ unicorn_pause()
239239
{
240240
if (( master_pid > 0 ))
241241
then
242-
enter "${release_path}"
242+
paths enter "${release_path}"
243243
service_signal WINCH ${master_pid}
244244
else
245245
succeed "Unicorn is not running for $project yet."

0 commit comments

Comments
 (0)