Skip to content

Instantly share code, notes, and snippets.

@carmstrong
carmstrong / gist:f816648894aadfddf785
Created September 19, 2014 21:52
Restore Deis etcd keys
nse deis-controller
cd /app
export ETCD=172.17.8.100:4001
./manage.py shell <<EOF
from api.models import *
[k.save() for k in Key.objects.all()]
[a.save() for a in App.objects.all()]
[d.save() for d in Domain.objects.all()]
EOF
exit
@stevenharman
stevenharman / 01_spec_helper.rb
Last active October 7, 2019 07:19
Sensible RSpec config for clean, and slightly faster, specs.
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rspec'
require 'webmock/rspec'
require 'factory_girl'
require 'factory_girl_rails'
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}