Skip to content

Instantly share code, notes, and snippets.

@exAspArk
Last active November 14, 2020 23:13
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save exAspArk/4f18795bc89b6e2666ee to your computer and use it in GitHub Desktop.
Save exAspArk/4f18795bc89b6e2666ee to your computer and use it in GitHub Desktop.
Friday deploy script for Capistrano
# Capistrano 2
before "deploy", "friday:good_luck"
namespace :friday do
friday_jumper = %{
┓┏┓┏┓┃
┛┗┛┗┛┃⟍ ○⟋
┓┏┓┏┓┃ ∕ Friday
┛┗┛┗┛┃ノ)
┓┏┓┏┓┃ deploy,
┛┗┛┗┛┃
┓┏┓┏┓┃ good
┛┗┛┗┛┃
┓┏┓┏┓┃ luck!
┃┃┃┃┃┃
┻┻┻┻┻┻
}.strip!
task :good_luck do
if Time.current.friday?
warn(friday_jumper)
end
end
end
# Capistrano 3
before "deploy:starting", "friday:good_luck"
namespace :friday do
friday_jumper = %{
┓┏┓┏┓┃
┛┗┛┗┛┃⟍ ○⟋
┓┏┓┏┓┃ ∕ Friday
┛┗┛┗┛┃ノ)
┓┏┓┏┓┃ deploy,
┛┗┛┗┛┃
┓┏┓┏┓┃ good
┛┗┛┗┛┃
┓┏┓┏┓┃ luck!
┃┃┃┃┃┃
┻┻┻┻┻┻
}.strip!
task :good_luck do
if Time.current.friday?
warn(friday_jumper.yellow)
end
end
end
@igorshubovych
Copy link

  1. You have to put
# encoding: utf-8

in the beginning of each file

See more details here:
http://stackoverflow.com/questions/3678172/ruby-1-9-invalid-multibyte-char-us-ascii

  1. Time.now instead of Time.current

@igorshubovych
Copy link

But overall great thanks. Finally something useful from open-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment