This is the story of a man who just wanted to write a nice CLI using GLI based on the nice tutorials in Build Awesome Command-Line Applications in Ruby 2 Control Your Computer, Simplify Your Life by David Copeland I wish he had written the book for Windows users and not Mac and Linux, but I'm just going to have to get over that.
I actually made it a significant way through the book with minimal problems. At one point I did have to open a gem called groff and change some stuff, but I won't know if my changes worked until I do a little more tinkering. My major problem came when I encountered the chapter on Cucumber testing. Oh boy! Something I am extremely experienced in! Oh Aruba? I've heard of that before. Ah it's for command-line testing of applications using Cucumber? Ah ok, that sounds really usefull. He says it doesn't work very well on Windows? Nonsense, Googling leads me to believe that no one has problems with it ever!
Oh boy was I wrong. I figured out why Googling didn't lead me to anything. No one wants to try to get it to work with Windows. It's too nasty. But I really wanted to get this working, so I dug deep. Let's begin.
I began by creating the structure of my app. It's called
rdtand it's short for Recondo Developer Tools.
gli init rtt setup build
My girlfriend's grandma is in town from New Jersey and lately I've been over at her (my girlfriend) parent's house quite a bit. Her mom is currenty driving her car because her grandma can't get into her mom's monster van. Because of this, her mom finally took a notice of the fact that my girlfriend's car is now a piece of crap. The brakes were wobbling and the whole back end is destroyed because of a hit and run driver. Now my girlfriend learned to live with this, but her mom couldn't handle it. She forced Sabrina to go get new brakes and rotors. As a result her car drives slightly better, at least it brakes well now.
While we were there fixing Sabrina's car, I asked her brother to take a look at my car and see if he could tell me what the problem was with mine. You see, I've had this horrible vibration in my car ever since I got it. It makes an enormous amount of noise and the whole car vibrates so bad that he actually got a headache driving it. I've actually gotten so used to it I barely notice it anymore, but it's still annoying. It also made a slightly similar shaking when braking. He came back after driving it around and told me I also needed new rotors and pads and that he thinks the exhaust might be causing the vibration. They suggested that I jack the car up and look for cracks in the exhaust.
Ruhoh, a better Jekyll
I've begun a move over to the Ruhoh platform. One of the main reasons for this is because I absolutely hate the Liquid Templating system used by Jekyll. Ruhoh uses Moustache which seems to be a much nicer choice overall. Also Ruhoh separates everything nice and neat like.
I use Watir-webdriver, PageObject, and several other gems (at the instruction of Jeff "Cheezy" Morgan), for my job. Currently I've been writing tests to perform some functions that business people have no care or need to know about. Because there is no need to have business rules for these tests, I'm using RSpec instead of Cucumber. I have Cucumber tests to run all of the business rules that the BA's need to know about and RSpec tests for those side scripts or non-business side of things. I've also read up extensively on Jeff's Cucumber & Cheese book, though I had forgotten several key points.
For these tests I was trying to load Default Data for different environments, and therefore I was using Jeff's FigNewton gem. FigNewton allows the use of different configuration files based on the environment the script is being run from. For this you need to place require 'fignewton' in the correct place and also call FigNewton.load('local.yml') with whatever file you want to load. If you don't want to use a specific file you can leave out the line and it will first look for an ENV variable called FIGNEWTON_FILE, then if that is not found it will look for a file named after the hostname of the computer, and then finally if even that is not found it will look for a file called 'default.yml'.
This is the story of my life. The problems I've come across and the solutions I've used to solve them. Not just compile time errors, or problems debugging, but the relationships in my life also. This is a manifesto of the reasons I chose to do specific things, why I am the way I am, and how I deal with those around me. This is my life.