Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

Mike Gehard

Posts By

LABS
Deploying Cloud Foundry Microservices

The buzz around the microservice way of architecting software systems is taking hold across the Internet. Many people are trying to figure out what this means for their deployment strategy and their DevOps folks. Cloud Foundry provides great support for deploying these types of applications and this will be the first in a series of posts that will show how to effectively deploy a microservices architecture to Cloud Foundry. We will start with a single service and build up to a web or multiple services that talk to each other.

LABS
Move Over Timecop…Hello ActiveSupport::Testing::TimeHelpers

Imagine this, you are testing a Rails application with RSpec and you have the need to freeze or travel through time in your specs. Your old trusted friend Timecop has served you well in the past but you’ve heard about this new kid in Rails 4.1, ActiveSupport::Testing::TimeHelpers.

Read more »

LABS
Testing Custom Form Builders in Rails

Rails gives you the ability to customize the output when using the form_for view helper in a view by using a custom form builder. This functionality is great if you want to change the default HTML generated by the form_for view helper.

Read more »

LABS
A Rubyist Learning Go – Testing HTTP

Welcome back to our semi-regularly scheduled program. This time around, we are going to take a look at how to write tests in Go, specifically those for http.Handler endpoints. If you are a Rails programmer, think of these handler endpoints as controller actions.

Read more »

LABS
A Rubyist Learning Go – Types and Interfaces

While looking at the websocket library for Go, I came across the following code:

func EchoServer(ws *websocket.Conn) { io.Copy(ws, ws) } http.Handle("/echo", websocket.Handler(EchoServer))

I tried to figure out where the Handler function was defined in the websocket package but couldn’t find it anywhere.

Read more »

LABS
A Rubyist Learning Go – Building an HTTP server

In our last installment, we learned how to pass in flags to our command line application using the flag library. This time around we are going build a simple, executable Hello World HTTP server. Here is the full program:

package main import "flag" import "fmt" import "net/http" import "net/url" import "strings" var port int func init() { flag.IntVar(&port, "port", 8080, "port to run the server on") flag.Parse() } func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, %sn", name(r.URL)) } func main() { http.HandleFunc("/hello/", handler) http.ListenAndServe(fmt.Sprintf(":%d", port), nil) } func name(u *url.URL) string { pathParts := strings.Split(u.String(), "/") return pathParts[len(pathParts)-1] }

Some new things to note here:

1) An init() function that runs before main() gets run that we are using to set up our command line flags.

Read more »

LABS
A Rubyist Learning Go – Command Line Flags

In our last installment, we learned how to write a basic Go command line program. Now, we want to tell the program who to greet instead of simply greeting the world. To accomplish this, we will use Go’s command line library, flag.

Read more »

LABS
A Rubyist Learning Go – A basic Go program

Starting July 1st, I am going to have the opportunity to step outside by development comfort zone and begin working on the Cloud Foundry logging system team. Why is it outside my comfort zone? The biggest reason is that is it being written in Go.

Read more »

LABS
Using Jasmine to test CoffeeScript in a Rails 3.1 App

Lately I've had the opportunity to use Jasmine to test drive a whole bunch of Javascript and am loving it. If you haven't had a chance to take Jasmine for a spin, I recommend you take some time to do so.

When I heard that Rails 3.1 was going to include CoffeeScript I decided to work to figure out how I could write both my production code as well as my specs in Coffeescript.

LABS
Waiting for jQuery Ajax calls to finish in Cucumber

You may be asking yourself why you'd want to do this in the first place. Well here's why I would want to do it.

We had some Webdriver based Cucumber tests that passed fine locally but kept failing on our CI box. Our CI box is a bit underpowered at the moment so I thought what might be happening is that our tests weren't waiting long enough for the Ajaxy stuff to happen because the Ajax responses were taking a long time.

After some poking around in the source code of jQuery, I found the $.active property. This property keeps track of the number of active Ajax requests that are going on and I thought this might help us out.

What I came up with was this gist:

I added this step right after my Cucumber step that caused the Ajax call so that Cucumber would wait to move on until I knew that everything was done.

This step solved our CI failures and all was good in our test suite again.