Skip to content

Instantly share code, notes, and snippets.


Jordan Crawford jordancrawfordnz

View GitHub Profile
jordancrawfordnz /
Created Jul 27, 2019
Moving Git Repos from BitBucket to GitHub
OLD_REPO_NAME=[fill this in]
NEW_REPO_NAME=[fill this in]
USERNAME=[fill this in]
# Create the new repo in GitHub first.
# For all repos. This does a mirror clone so all references, tags, etc are migrated.
git clone --mirror$USERNAME/$OLD_REPO_NAME.git
git push --mirror$USERNAME/$NEW_REPO_NAME.git
jordancrawfordnz / Cloud tinc.conf
Last active Aug 26, 2017
tinc configuration for a computer at home and in the cloud
View Cloud tinc.conf
Name = cloud
AddressFamily = ipv4
Interface = tun0
jordancrawfordnz / claiming_routes.feature
Created Apr 1, 2017
An example of a Cucumber feature for Ticket to Ride.
View claiming_routes.feature
Scenario: The player uses their turn to claim a route and the route appears as claimed.
Given a game with 5 players is setup
And the player has 5 train pieces
And the player has 5 "Hopper" train cars
And the player navigates to the game page
When the player clicks the claim route button on a route between "Vancouver" and "Calgary"
And the player selects 3 "Hopper" train cars
And the player clicks the "Claim Route" button
Then the player is on the game page
And the player sees the route from "Vancouver" to "Calgary" claimed with their name
View claim_route_controller_spec.rb
context "on ClaimRoute failure" do
let(:service_double) { instance_double(ClaimRoute, call: service_result, errors: service_expected_errors) }
let(:service_result) { false }
let(:service_expected_errors) { [ClaimRoute::REQUIRED_PARAMETERS_NOT_PROVIDED] }
before do
it "redirects to the game page" do
You can’t perform that action at this time.