Skip to content

Instantly share code, notes, and snippets.

View Patru's full-sized avatar

Paul Trunz Patru

View GitHub Profile
@Patru
Patru / gist:505681f2d52431d78c48018688be1b9f
Created August 26, 2019 15:27
How not to find a Software Engineer for an agile team
I ran into this job description:
Tasks
As a member of a delivery team:
• Collaborate with Product Owner to create and refine User Stories and Acceptance Criteria, as well as confirm that the code and acceptance tests reflect the desired functionality
• Participate in Product Increment and Iteration Plannings by:
• Analyzing the product and team backlog items
• Estimating the work effort
• Committing to the iterations and Product Increment objectives
@Patru
Patru / Make a Cuba Template.md
Last active March 16, 2017 18:02
How I got to my Cuba template

Since I did not want to constantly re-invent the wheel I will write down my choices for putting together my Cuba template.

  1. Choose your favorite version of ruby and install it using rbenv (I happened to use MRI 2.2.3 at this point).
  2. create your template directory and CD into it.
  3. fix your ruby version using rbenv local 2.2.3 or somesuch
  4. create a github repository and follow the instructions for the README.md and the first commit.
  5. get a Gemfile from a running project and edit away the stuff I considered project specific
  6. run bundle install, takes a while, but looks nice, remember to add Gemfile.lock to git too
  7. create routes and config directories, want to put stuff in there
  8. create an initial Cuba route in routes/default.rb
@Patru
Patru / deploy-ruby-1.9.2.md
Last active August 29, 2015 14:27
Deployment-Setup for ruby 1.9.2

Well, my Yosemite Mac refused to run Ruby 1.9.2, but I still had these apps running with this stubborn hoster, so I needed a way to not just develop, but also deploy these things. Capistrano would easily cut it, but it usually runs out of the same directory. Deploying from vagrant would be an option, but I wanted something more "durable" which would work for several setups with the same credentials. Ubuntu headless server would do nicely for this, so i used these instructions to get it up and running:

https://leemendelowitz.github.io/blog/ubuntu-server-virtualbox.html

This mostly worked all right, with just a minor oversight of his part which became apparent since I wanted just one deployment disk which I could use for several deployments. The variable he defines is not used, so I ended up doing the following:

VM_NAME="Deploy-1.9.2-server"
UBUNTU_ISO_PATH=~/Downloads/ubuntu-14.04.1-server-amd64.iso

VM_HD_PATH="DeployDisk.vdi" # The path to VM hard disk (ended up in an inconvenient place like th

I used this to manually set up my vagrant box once OS X stopped compiling 1.9.2 and I am still stuck with it on my hoster.

vagrant init trusty64 trusty64.box
# now edit your Vagrantfile to include something like
  config.vm.network "forwarded_port", guest: 3000, host: 3696
# to put your rails app wherever you like it
vagrant up
vagrant ssh
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
@Patru
Patru / Cuba Setup.md
Last active March 16, 2017 18:02
Setting up Cuba with Sequel, Fortitude, Capybara and Minitest

Setup for Cuba in a sample app

I recently read up quite some articles on microframworks and I liked the idea to try out Cuba instead of the regular Sinatra for a change. Here is what I ended up with.

First of all my Gemfile:

source "https://rubygems.org"
ruby "2.0.0"
@Patru
Patru / minitest-capybara fix
Created September 19, 2013 13:48
fix for minitest-capybara when used with capybara 2.0.3
# put this in your test_helper.rb if you encounter the following error:
# NoMethodError: undefined method `failure_message' for Capybara::Helpers:Module
# (eval):19:in `block in assert_link'
# when using minitest-capybara with capybara 2.0.3 e.g. if you are stuck on Ruby 1.9.2
# and you will have decent error messages again
# (stolen from Capybara 2.1.0 on which minitest-capybara implicitely depends)
module Capybara