-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
@@ -109,3 +109,10 @@ nav { | |||
width: 15%; | |||
} | |||
} | |||
|
|||
img.emoji { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid qualifying class selectors with an element.
Good feature! |
@@ -0,0 +1,14 @@ | |||
module Emojifier | |||
def emojify | |||
self.content.gsub(/:([\w+-]+):/) do |match| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yield block使うんじゃなくて変数に代入したらネスト浅くならないだろうか
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変数に代入する、とは
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変数に入れても結局mapなりでネストすることに気づいた
# bower_rails.root_path = Dir.pwd | ||
|
||
# Invokes rake bower:install before precompilation. Defaults to false | ||
bower_rails.install_before_precompile = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miyukki なんかこれでいい感じにPrecompile前にBowerが走ってくれる気がするんだけど、Capistranoこれで大丈夫かな?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cap production deploy --dry-run
INFO [9d49f8e1] Running /usr/local/rvm/bin/rvm version as [email protected]
DEBUG [9d49f8e1] Command: /usr/local/rvm/bin/rvm version
INFO [97b392c5] Running /usr/local/rvm/bin/rvm current as [email protected]
DEBUG [97b392c5] Command: /usr/local/rvm/bin/rvm current
INFO [5113ca9f] Running /usr/local/rvm/bin/rvm 2.2.1 do ruby --version as [email protected]
DEBUG [5113ca9f] Command: /usr/local/rvm/bin/rvm 2.2.1 do ruby --version
INFO [0ace9629] Running /usr/bin/env mkdir -p /tmp/rg-portal/ as [email protected]
DEBUG [0ace9629] Command: /usr/bin/env mkdir -p /tmp/rg-portal/
INFO [dfff2869] Running /usr/bin/env #<StringIO:0x007fa4a9b3dbc0> /tmp/rg-portal/git-ssh.sh as [email protected]
DEBUG [dfff2869] Command: /usr/bin/env #<StringIO:0x007fa4a9b3dbc0> /tmp/rg-portal/git-ssh.sh
INFO [60613fc8] Running /usr/bin/env chmod +x /tmp/rg-portal/git-ssh.sh as [email protected]
DEBUG [60613fc8] Command: /usr/bin/env chmod +x /tmp/rg-portal/git-ssh.sh
INFO [6bc54ab4] Running /usr/bin/env git ls-remote --heads [email protected]:sfc-arch/rg-team-io.git as [email protected]
DEBUG [6bc54ab4] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git ls-remote --heads [email protected]:sfc-arch/rg-team-io.git )
INFO [5391ed96] Running /usr/bin/env mkdir -p /var/www/rg-portal/shared /var/www/rg-portal/releases as [email protected]
DEBUG [5391ed96] Command: /usr/bin/env mkdir -p /var/www/rg-portal/shared /var/www/rg-portal/releases
INFO [27d1b86a] Running /usr/bin/env mkdir -p /var/www/rg-portal/shared/public/assets as [email protected]
DEBUG [27d1b86a] Command: /usr/bin/env mkdir -p /var/www/rg-portal/shared/public/assets
INFO [1e834feb] Running /usr/bin/env mkdir -p /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config as [email protected]
DEBUG [1e834feb] Command: /usr/bin/env mkdir -p /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config
INFO [68cc878d] Running /usr/bin/env [ -f /var/www/rg-portal/shared/config/secrets.yml ] as [email protected]
DEBUG [68cc878d] Command: [ -f /var/www/rg-portal/shared/config/secrets.yml ]
INFO [14d6e07c] Running /usr/bin/env [ -f /var/www/rg-portal/shared/config/oauth.yml ] as [email protected]
DEBUG [14d6e07c] Command: [ -f /var/www/rg-portal/shared/config/oauth.yml ]
INFO [279934c2] Running /usr/bin/env [ -f /var/www/rg-portal/shared/config/database.yml ] as [email protected]
DEBUG [279934c2] Command: [ -f /var/www/rg-portal/shared/config/database.yml ]
INFO [5733d70d] Running /usr/bin/env [ -f /var/www/rg-portal/current/REVISION ] as [email protected]
DEBUG [5733d70d] Command: [ -f /var/www/rg-portal/current/REVISION ]
INFO [740a14cd] Running /usr/bin/env cat /var/www/rg-portal/current/REVISION 2>/dev/null as [email protected]
DEBUG [740a14cd] Command: /usr/bin/env cat /var/www/rg-portal/current/REVISION 2>/dev/null
INFO [9795c413] Running /usr/bin/env [ -f /var/www/rg-portal/repo/HEAD ] as [email protected]
DEBUG [9795c413] Command: [ -f /var/www/rg-portal/repo/HEAD ]
INFO The repository mirror is at /var/www/rg-portal/repo
DEBUG [842734ba] Running /usr/bin/env if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi as [email protected]
DEBUG [842734ba] Command: if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi
INFO [46490930] Running /usr/bin/env git remote update as [email protected]
DEBUG [46490930] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git remote update )
DEBUG [c2e553a6] Running /usr/bin/env if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi as [email protected]
DEBUG [c2e553a6] Command: if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi
INFO [fc519aac] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613 as [email protected]
DEBUG [fc519aac] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613 )
INFO [6cef24ef] Running /usr/bin/env git archive demmys/emoji | tar -x -f - -C /var/www/rg-portal/releases/20150914022613 as [email protected]
DEBUG [6cef24ef] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git archive demmys/emoji | tar -x -f - -C /var/www/rg-portal/releases/20150914022613 )
DEBUG [097142f0] Running /usr/bin/env if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi as [email protected]
DEBUG [097142f0] Command: if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi
INFO [376eacd7] Running /usr/bin/env git rev-list --max-count=1 --abbrev-commit demmys/emoji as [email protected]
DEBUG [376eacd7] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git rev-list --max-count=1 --abbrev-commit demmys/emoji )
DEBUG [c68a043c] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi as [email protected]
DEBUG [c68a043c] Command: if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi
INFO [458476c5] Running /usr/bin/env echo "" >> REVISION as [email protected]
DEBUG [458476c5] Command: cd /var/www/rg-portal/releases/20150914022613 && /usr/bin/env echo "" >> REVISION
INFO [5445451c] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613/config /var/www/rg-portal/releases/20150914022613/config /var/www/rg-portal/releases/20150914022613/config as [email protected]
DEBUG [5445451c] Command: /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613/config /var/www/rg-portal/releases/20150914022613/config /var/www/rg-portal/releases/20150914022613/config
INFO [f143e7db] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150914022613/config/secrets.yml ] as [email protected]
DEBUG [f143e7db] Command: [ -L /var/www/rg-portal/releases/20150914022613/config/secrets.yml ]
INFO [a81cc083] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150914022613/config/oauth.yml ] as [email protected]
DEBUG [a81cc083] Command: [ -L /var/www/rg-portal/releases/20150914022613/config/oauth.yml ]
INFO [811c9af6] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150914022613/config/database.yml ] as [email protected]
DEBUG [811c9af6] Command: [ -L /var/www/rg-portal/releases/20150914022613/config/database.yml ]
INFO [afd6b0e7] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613/public as [email protected]
DEBUG [afd6b0e7] Command: /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613/public
INFO [c04892c6] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150914022613/public/assets ] as [email protected]
DEBUG [c04892c6] Command: [ -L /var/www/rg-portal/releases/20150914022613/public/assets ]
DEBUG [fe69ae96] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi as [email protected]
DEBUG [fe69ae96] Command: if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi
INFO [0539383c] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle install --path /var/www/rg-portal/shared/bundle --without development test --deployment --quiet as [email protected]
DEBUG [0539383c] Command: cd /var/www/rg-portal/releases/20150914022613 && /usr/local/rvm/bin/rvm 2.2.1 do bundle install --path /var/www/rg-portal/shared/bundle --without development test --deployment --quiet
DEBUG [bbc1dbb2] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi as [email protected]
DEBUG [bbc1dbb2] Command: if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi
INFO [28625bbe] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake assets:precompile as [email protected]
DEBUG [28625bbe] Command: cd /var/www/rg-portal/releases/20150914022613 && ( RAILS_ENV=production /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake assets:precompile )
DEBUG [7dd5a58a] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi as [email protected]
DEBUG [7dd5a58a] Command: if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi
INFO [587a4926] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613/assets_manifest_backup as [email protected]
DEBUG [587a4926] Command: cd /var/www/rg-portal/releases/20150914022613 && /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150914022613/assets_manifest_backup
INFO [b6a47c8a] Running /usr/bin/env ls /var/www/rg-portal/releases/20150914022613/public/assets/.sprockets-manifest* as [email protected]
DEBUG [b6a47c8a] Command: cd /var/www/rg-portal/releases/20150914022613 && /usr/bin/env ls /var/www/rg-portal/releases/20150914022613/public/assets/.sprockets-manifest*
INFO [8c5f1c0b] Running /usr/bin/env ls /var/www/rg-portal/releases/20150914022613/public/assets/.sprockets-manifest* as [email protected]
DEBUG [8c5f1c0b] Command: cd /var/www/rg-portal/releases/20150914022613 && /usr/bin/env ls /var/www/rg-portal/releases/20150914022613/public/assets/.sprockets-manifest*
INFO [2228e80e] Running /usr/bin/env cp /var/www/rg-portal/releases/20150914022613/assets_manifest_backup as [email protected]
DEBUG [2228e80e] Command: cd /var/www/rg-portal/releases/20150914022613 && /usr/bin/env cp /var/www/rg-portal/releases/20150914022613/assets_manifest_backup
INFO [deploy:migrate] Run `rake db:migrate`
DEBUG [66e5a53c] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi as [email protected]
DEBUG [66e5a53c] Command: if test ! -d /var/www/rg-portal/releases/20150914022613; then echo "Directory does not exist '/var/www/rg-portal/releases/20150914022613'" 1>&2; false; fi
INFO [437d1da0] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake db:migrate as [email protected]
DEBUG [437d1da0] Command: cd /var/www/rg-portal/releases/20150914022613 && ( RAILS_ENV=production /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake db:migrate )
INFO [3ade6476] Running /usr/bin/env ln -s /var/www/rg-portal/releases/20150914022613 /var/www/rg-portal/releases/current as [email protected]
DEBUG [3ade6476] Command: /usr/bin/env ln -s /var/www/rg-portal/releases/20150914022613 /var/www/rg-portal/releases/current
INFO [8ed32f74] Running /usr/bin/env mv /var/www/rg-portal/releases/current /var/www/rg-portal as [email protected]
DEBUG [8ed32f74] Command: /usr/bin/env mv /var/www/rg-portal/releases/current /var/www/rg-portal
DEBUG [0762f5b2] Running /usr/bin/env if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi as [email protected]
DEBUG [0762f5b2] Command: if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi
INFO [9092eb1c] Running /usr/bin/env [ -e /var/www/rg-portal/shared/tmp/unicorn.pid ] && kill -0 `cat /var/www/rg-portal/shared/tmp/unicorn.pid` as [email protected]
DEBUG [9092eb1c] Command: [ -e /var/www/rg-portal/shared/tmp/unicorn.pid ] && kill -0 `cat /var/www/rg-portal/shared/tmp/unicorn.pid`
INFO unicorn is running...
DEBUG [40988e63] Running /usr/bin/env if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi as [email protected]
DEBUG [40988e63] Command: if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi
INFO unicorn restarting...
INFO [e0957674] Running /usr/bin/env kill -s USR2 `cat /var/www/rg-portal/shared/tmp/unicorn.pid` as [email protected]
DEBUG [e0957674] Command: cd /var/www/rg-portal/current && /usr/bin/env kill -s USR2 `cat /var/www/rg-portal/shared/tmp/unicorn.pid`
INFO [b1b75645] Running /usr/bin/env ls -xtr /var/www/rg-portal/releases as [email protected]
DEBUG [b1b75645] Command: /usr/bin/env ls -xtr /var/www/rg-portal/releases
DEBUG [b0d34b1a] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases; then echo "Directory does not exist '/var/www/rg-portal/releases'" 1>&2; false; fi as [email protected]
DEBUG [b0d34b1a] Command: if test ! -d /var/www/rg-portal/releases; then echo "Directory does not exist '/var/www/rg-portal/releases'" 1>&2; false; fi
INFO [ac691393] Running /usr/bin/env echo "Branch demmys/emoji (at ) deployed as release 20150914022613 by Sakura" >> /var/www/rg-portal/revisions.log as [email protected]
DEBUG [ac691393] Command: echo "Branch demmys/emoji (at ) deployed as release 20150914022613 by Sakura" >> /var/www/rg-portal/revisions.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capfile触れていない時点でなんかおかしいと思う
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そうか。ずっと避けてきたからCapistrano触ったこと無いんだよね。まあちゃんと調べます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これで検証できます(たぶん)
$ BRANCH=demmys/emoji cap production deploy --dry-run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
さんきゅー
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ BRANCH=demmys/emoji bundle exec cap production deploy --dry-run
INFO [c52e4ef6] Running /usr/local/rvm/bin/rvm version as [email protected]
DEBUG [c52e4ef6] Command: /usr/local/rvm/bin/rvm version
INFO [9463735f] Running /usr/local/rvm/bin/rvm current as [email protected]
DEBUG [9463735f] Command: /usr/local/rvm/bin/rvm current
INFO [4b11f75d] Running /usr/local/rvm/bin/rvm 2.2.1 do ruby --version as [email protected]
DEBUG [4b11f75d] Command: /usr/local/rvm/bin/rvm 2.2.1 do ruby --version
INFO [d2147bee] Running /usr/bin/env mkdir -p /tmp/rg-portal/ as [email protected]
DEBUG [d2147bee] Command: /usr/bin/env mkdir -p /tmp/rg-portal/
INFO [036c608d] Running /usr/bin/env #<StringIO:0x007f9b7cb32418> /tmp/rg-portal/git-ssh.sh as [email protected]
DEBUG [036c608d] Command: /usr/bin/env #<StringIO:0x007f9b7cb32418> /tmp/rg-portal/git-ssh.sh
INFO [9048a520] Running /usr/bin/env chmod +x /tmp/rg-portal/git-ssh.sh as [email protected]
DEBUG [9048a520] Command: /usr/bin/env chmod +x /tmp/rg-portal/git-ssh.sh
INFO [0f7fd9fe] Running /usr/bin/env git ls-remote --heads [email protected]:sfc-arch/rg-team-io.git as [email protected]
DEBUG [0f7fd9fe] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git ls-remote --heads [email protected]:sfc-arch/rg-team-io.git )
INFO [49f7151c] Running /usr/bin/env mkdir -p /var/www/rg-portal/shared /var/www/rg-portal/releases as [email protected]
DEBUG [49f7151c] Command: /usr/bin/env mkdir -p /var/www/rg-portal/shared /var/www/rg-portal/releases
INFO [f56ffea6] Running /usr/bin/env mkdir -p /var/www/rg-portal/shared/public/assets as [email protected]
DEBUG [f56ffea6] Command: /usr/bin/env mkdir -p /var/www/rg-portal/shared/public/assets
INFO [d410dfa1] Running /usr/bin/env mkdir -p /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config as [email protected]
DEBUG [d410dfa1] Command: /usr/bin/env mkdir -p /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config /var/www/rg-portal/shared/config
INFO [5fb55a3e] Running /usr/bin/env [ -f /var/www/rg-portal/shared/config/secrets.yml ] as [email protected]
DEBUG [5fb55a3e] Command: [ -f /var/www/rg-portal/shared/config/secrets.yml ]
INFO [7db7415c] Running /usr/bin/env [ -f /var/www/rg-portal/shared/config/oauth.yml ] as [email protected]
DEBUG [7db7415c] Command: [ -f /var/www/rg-portal/shared/config/oauth.yml ]
INFO [18d5c8c2] Running /usr/bin/env [ -f /var/www/rg-portal/shared/config/database.yml ] as [email protected]
DEBUG [18d5c8c2] Command: [ -f /var/www/rg-portal/shared/config/database.yml ]
INFO [5dd3eec9] Running /usr/bin/env [ -f /var/www/rg-portal/current/REVISION ] as [email protected]
DEBUG [5dd3eec9] Command: [ -f /var/www/rg-portal/current/REVISION ]
INFO [78113d4c] Running /usr/bin/env cat /var/www/rg-portal/current/REVISION 2>/dev/null as [email protected]
DEBUG [78113d4c] Command: /usr/bin/env cat /var/www/rg-portal/current/REVISION 2>/dev/null
INFO [097ff79d] Running /usr/bin/env [ -f /var/www/rg-portal/repo/HEAD ] as [email protected]
DEBUG [097ff79d] Command: [ -f /var/www/rg-portal/repo/HEAD ]
INFO The repository mirror is at /var/www/rg-portal/repo
DEBUG [2d4d342a] Running /usr/bin/env if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi as [email protected]
DEBUG [2d4d342a] Command: if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi
INFO [871f15f6] Running /usr/bin/env git remote update as [email protected]
DEBUG [871f15f6] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git remote update )
DEBUG [e4708cde] Running /usr/bin/env if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi as [email protected]
DEBUG [e4708cde] Command: if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi
INFO [d03f6502] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146 as [email protected]
DEBUG [d03f6502] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146 )
INFO [7df18968] Running /usr/bin/env git archive demmys/emoji | tar -x -f - -C /var/www/rg-portal/releases/20150917153146 as [email protected]
DEBUG [7df18968] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git archive demmys/emoji | tar -x -f - -C /var/www/rg-portal/releases/20150917153146 )
DEBUG [7248a7e2] Running /usr/bin/env if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi as [email protected]
DEBUG [7248a7e2] Command: if test ! -d /var/www/rg-portal/repo; then echo "Directory does not exist '/var/www/rg-portal/repo'" 1>&2; false; fi
INFO [7516b310] Running /usr/bin/env git rev-list --max-count=1 --abbrev-commit demmys/emoji as [email protected]
DEBUG [7516b310] Command: cd /var/www/rg-portal/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/rg-portal/git-ssh.sh /usr/bin/env git rev-list --max-count=1 --abbrev-commit demmys/emoji )
DEBUG [56202b30] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [56202b30] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [264fe2c4] Running /usr/bin/env echo "" >> REVISION as [email protected]
DEBUG [264fe2c4] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/bin/env echo "" >> REVISION
INFO [24d1b9ad] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146/config /var/www/rg-portal/releases/20150917153146/config /var/www/rg-portal/releases/20150917153146/config as [email protected]
DEBUG [24d1b9ad] Command: /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146/config /var/www/rg-portal/releases/20150917153146/config /var/www/rg-portal/releases/20150917153146/config
INFO [0cb2f098] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150917153146/config/secrets.yml ] as [email protected]
DEBUG [0cb2f098] Command: [ -L /var/www/rg-portal/releases/20150917153146/config/secrets.yml ]
INFO [0eac7711] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150917153146/config/oauth.yml ] as [email protected]
DEBUG [0eac7711] Command: [ -L /var/www/rg-portal/releases/20150917153146/config/oauth.yml ]
INFO [f5a696a1] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150917153146/config/database.yml ] as [email protected]
DEBUG [f5a696a1] Command: [ -L /var/www/rg-portal/releases/20150917153146/config/database.yml ]
INFO [326348bd] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146/public as [email protected]
DEBUG [326348bd] Command: /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146/public
INFO [384d2182] Running /usr/bin/env [ -L /var/www/rg-portal/releases/20150917153146/public/assets ] as [email protected]
DEBUG [384d2182] Command: [ -L /var/www/rg-portal/releases/20150917153146/public/assets ]
DEBUG [c3b3cb62] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [c3b3cb62] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [ad17e677] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle install --path /var/www/rg-portal/shared/bundle --without development test --deployment --quiet as [email protected]
DEBUG [ad17e677] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/local/rvm/bin/rvm 2.2.1 do bundle install --path /var/www/rg-portal/shared/bundle --without development test --deployment --quiet
DEBUG [0ea5924f] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [0ea5924f] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [47c1a1c9] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake bower:install CI=true as [email protected]
DEBUG [47c1a1c9] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake bower:install CI=true
DEBUG [f48d1289] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [f48d1289] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [d83c62a2] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake gemoji as [email protected]
DEBUG [d83c62a2] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake gemoji
DEBUG [27ba2e35] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [27ba2e35] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [d6419496] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake assets:precompile as [email protected]
DEBUG [d6419496] Command: cd /var/www/rg-portal/releases/20150917153146 && ( RAILS_ENV=production /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake assets:precompile )
DEBUG [5a8e28ff] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [5a8e28ff] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [6f88deeb] Running /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146/assets_manifest_backup as [email protected]
DEBUG [6f88deeb] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/bin/env mkdir -p /var/www/rg-portal/releases/20150917153146/assets_manifest_backup
INFO [5fdde84b] Running /usr/bin/env ls /var/www/rg-portal/releases/20150917153146/public/assets/.sprockets-manifest* as [email protected]
DEBUG [5fdde84b] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/bin/env ls /var/www/rg-portal/releases/20150917153146/public/assets/.sprockets-manifest*
INFO [0fe3b713] Running /usr/bin/env ls /var/www/rg-portal/releases/20150917153146/public/assets/.sprockets-manifest* as [email protected]
DEBUG [0fe3b713] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/bin/env ls /var/www/rg-portal/releases/20150917153146/public/assets/.sprockets-manifest*
INFO [97b235a6] Running /usr/bin/env cp /var/www/rg-portal/releases/20150917153146/assets_manifest_backup as [email protected]
DEBUG [97b235a6] Command: cd /var/www/rg-portal/releases/20150917153146 && /usr/bin/env cp /var/www/rg-portal/releases/20150917153146/assets_manifest_backup
INFO [deploy:migrate] Run `rake db:migrate`
DEBUG [8d9976a7] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi as [email protected]
DEBUG [8d9976a7] Command: if test ! -d /var/www/rg-portal/releases/20150917153146; then echo "Directory does not exist '/var/www/rg-portal/releases/20150917153146'" 1>&2; false; fi
INFO [c03268a3] Running /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake db:migrate as [email protected]
DEBUG [c03268a3] Command: cd /var/www/rg-portal/releases/20150917153146 && ( RAILS_ENV=production /usr/local/rvm/bin/rvm 2.2.1 do bundle exec rake db:migrate )
INFO [d2327fce] Running /usr/bin/env ln -s /var/www/rg-portal/releases/20150917153146 /var/www/rg-portal/releases/current as [email protected]
DEBUG [d2327fce] Command: /usr/bin/env ln -s /var/www/rg-portal/releases/20150917153146 /var/www/rg-portal/releases/current
INFO [dad3dc78] Running /usr/bin/env mv /var/www/rg-portal/releases/current /var/www/rg-portal as [email protected]
DEBUG [dad3dc78] Command: /usr/bin/env mv /var/www/rg-portal/releases/current /var/www/rg-portal
DEBUG [4619b8c1] Running /usr/bin/env if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi as [email protected]
DEBUG [4619b8c1] Command: if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi
INFO [287cc217] Running /usr/bin/env [ -e /var/www/rg-portal/shared/tmp/unicorn.pid ] && kill -0 `cat /var/www/rg-portal/shared/tmp/unicorn.pid` as [email protected]
DEBUG [287cc217] Command: [ -e /var/www/rg-portal/shared/tmp/unicorn.pid ] && kill -0 `cat /var/www/rg-portal/shared/tmp/unicorn.pid`
INFO unicorn is running...
DEBUG [1f96c688] Running /usr/bin/env if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi as [email protected]
DEBUG [1f96c688] Command: if test ! -d /var/www/rg-portal/current; then echo "Directory does not exist '/var/www/rg-portal/current'" 1>&2; false; fi
INFO unicorn restarting...
INFO [707adf7f] Running /usr/bin/env kill -s USR2 `cat /var/www/rg-portal/shared/tmp/unicorn.pid` as [email protected]
DEBUG [707adf7f] Command: cd /var/www/rg-portal/current && /usr/bin/env kill -s USR2 `cat /var/www/rg-portal/shared/tmp/unicorn.pid`
INFO [997b9f0a] Running /usr/bin/env ls -xtr /var/www/rg-portal/releases as [email protected]
DEBUG [997b9f0a] Command: /usr/bin/env ls -xtr /var/www/rg-portal/releases
DEBUG [c29a203c] Running /usr/bin/env if test ! -d /var/www/rg-portal/releases; then echo "Directory does not exist '/var/www/rg-portal/releases'" 1>&2; false; fi as [email protected]
DEBUG [c29a203c] Command: if test ! -d /var/www/rg-portal/releases; then echo "Directory does not exist '/var/www/rg-portal/releases'" 1>&2; false; fi
INFO [9ae7d8d2] Running /usr/bin/env echo "Branch demmys/emoji (at ) deployed as release 20150917153146 by demmys" >> /var/www/rg-portal/revisions.log as [email protected]
DEBUG [9ae7d8d2] Command: echo "Branch demmys/emoji (at ) deployed as release 20150917153146 by demmys" >> /var/www/rg-portal/revisions.log
@@ -0,0 +1,15 @@ | |||
module Emojifier | |||
def emojify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method has too many lines. [11/10]
cap だけできたらデプロイしましょ〜 |
self.content.gsub(/:([\w+-]+):/) do |match| | ||
emoji = Emoji.find_by_alias(Regexp.last_match(1)) | ||
if emoji | ||
return ActionController::Base.helpers.image_tag( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この改善は微妙…こうするなら
return match[1] unless emoji
ActionController::Base.helpers.image_tag(
ActionController::Base.helpers.image_path("emoji/#{emoji.image_filename}"), alt: match, class: 'emoji')
のほうがいい(短い例外の方を先にreturnして後は正常処理
もしくは、元のネストした状態にするか
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
後折り返さなくても128文字超えないような?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
たしかに。出掛けにとりあえずHoundウザいなと思って直したのがひどかった。
a43691b でなおした。
折り返しているのは、自分の普段使いのディスプレイでVimを2分割して使った時に折り返したほうが見やすいからであって、128文字はあまり考えてない。
だからたぶんおれの書くコードだと100字超えるとだいたい改行してると思う。
@miyukki 遅くなってしまったけど、Capistranoの設定っぽいやつとテストを追加したので確認してもらえますか |
@demmys 多分これでも動くのだろうけど、ちゃんとCapistranoとエコシステムを活用するならこういう gem を使ったほうがいいかも… といってもどっちでも良いのだけど… |
@miyukki |
@demmys まぁじゃあよしとしますかー |
To close #12
TODO