We started out with two apps.
- foo-staging
- foo-production
Our CI would run tests, then deploy to staging, run smoke tests and then run to production and run smoke tests.
This took about 22-25 min.
RSpec.configure do |config| | |
config.before(:suite) do | |
FactoryBot.find_definitions if FactoryBot.factories.count == 0 | |
DatabaseCleaner[:active_record].clean_with(:transaction) | |
end | |
config.around(:each) do |example| | |
unless User.count.zero? | |
# we will output to current terminal but also into a file in tmp | |
open('tmp/leaky.txt', 'a') { |f| |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
# spec/support/capybara_chrome.rb | |
require 'selenium/webdriver' | |
require 'capybara/rspec' | |
require 'capybara-screenshot/rspec' | |
RSpec.configure do | |
Capybara.server = :puma | |
Capybara.server_port = 5000 |
Author: Chris Lattner
# Contains : | |
# * attachment-rc.yml : How to attach a console to a process inside a pod | |
# * script.sh : Set of script for managing pods easily | |
# * minikube_on-mac.sh : Install minikube on macos | |
# Strace & Docker | |
# https://medium.com/@rothgar/how-to-debug-a-running-docker-container-from-a-separate-container-983f11740dc6 |
# Welcome to my "arel gist"! | |
## It started hacky, then as an example, but we want it cleaner. | |
# ActiveRecord | |
## This is an ORM: you call Ruby methods and get Ruby objects, it makes SQL and object instantiations for you. | |
## It's Rails' default, but there are alternatives: https://github.com/Sdogruyol/awesome-ruby#orm | |
Student.all | |
Topic.first | |
Workshop.sum(:hours) |
Prerequisite: latest Docker for Mac on MacOS Sierra
$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
Retry count | Retry Time | Total Cumulative Time | Total Cumulative Days | |
---|---|---|---|---|
0 | 0:00:00 | 0:00:00 | 0.0 | |
1 | 0:00:16 | 0:00:16 | 0.0 | |
2 | 0:00:31 | 0:00:47 | 0.0 | |
3 | 0:01:36 | 0:02:23 | 0.0 | |
4 | 0:04:31 | 0:06:54 | 0.0 | |
5 | 0:10:40 | 0:17:34 | 0.0 | |
6 | 0:21:51 | 0:39:25 | 0.0 | |
7 | 0:40:16 | 1:19:41 | 0.1 | |
8 | 1:08:31 | 2:28:12 | 0.1 |