Rspecのメモ。ほぼ殴り書き。
let(:fake) do
o = Object.new
o.extend(Front::Supports::DmpSectionReportsSupport)
o
########### Exec commands ########### | |
# Docker for use in existing projects | |
# May you have to remove Gemfile.lock and db/schema.rb at first | |
# | |
# docker build . -t saml | |
# docker run -d -p 3000:3000 saml | |
##################################### | |
# cahnge for your version | |
FROM ruby:2.5.0 |
#!/bin/bash | |
set -e | |
tm=$(date +\%Y\%m\%d-\%H\%M) | |
dump_file=dump-${tm}.txt | |
dump_file_path=~/dump/$dump_file | |
db=db name | |
host=host ip | |
user=db user |
version: 2.1 | |
orbs: | |
# aws-ecr: circleci/aws-ecr@6.0.0 | |
# aws-ecs: circleci/aws-ecs@1.1.0 | |
heroku: circleci/heroku@1.0.1 | |
jobs: | |
test: | |
docker: |
# alias | |
alias d='docker' | |
alias dc='docker-compose' | |
alias h='heroku' | |
alias py='python3' | |
alias wi='which' | |
alias cl='clear' | |
alias to='touch' | |
alias to='source' | |
alias g='git' |
#!/bin/bash | |
dc=$(which docker-compose) # docker-compose command with full path | |
if [[ -x "$dc" ]]; then | |
: | |
else | |
echo "Please install Docker before run this command." | |
exit 2 | |
fi |
# target_version: | |
# rubocop v0.74.0 | |
# | |
# https://gist.github.com/onk/38bfbd78899d892e0e83 | |
require: | |
- rubocop-rails | |
AllCops: | |
TargetRubyVersion: 2.5 |
個人的にRailsで困ったことやHowToを記載していく。
リンク貼るだけの場合もあるけど、気にするな。
基本的にこのエントリでOK