Skip to content

Instantly share code, notes, and snippets.

View mikegehard's full-sized avatar

Mike Gehard mikegehard

  • Chattanooga, TN
  • 04:33 (UTC -05:00)
View GitHub Profile
[
{
"openapi": "3.0.1",
"info": {
"title": "Animal Rescue (from Gist)",
"description": "Sample application for Spring Cloud Gateway commercial product demos.",
"version": "1.0.0-K8s-hack"
},
"externalDocs": {
"url": "https://github.com/spring-cloud-services-samples/animal-rescue/"
@mikegehard
mikegehard / sketch.rb
Created July 5, 2012 00:02 — forked from mattwynne/sketch.rb
Responders implemented using a block instead of another class
class Organization
def to_param
"42"
end
def saved?
rand > 0.5
end
end
@mikegehard
mikegehard / config.ru
Created March 5, 2012 20:05
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
# We are not loading Active Record, nor the Assets Pipeline, etc.
# This could also be in your Gemfile.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
# The following lines should come as no surprise. Except by
@mikegehard
mikegehard / 0_README.md
Created May 5, 2011 02:39 — forked from netzpirat/0_README.md
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@mikegehard
mikegehard / active_model_lint.rb
Created April 8, 2011 21:26 — forked from pairing/active_model_lint.rb
RSpec shared examples for ActiveModel::Lint
# adapted from rspec-rails http://github.com/rspec/rspec-rails/blob/master/spec/rspec/rails/mocks/mock_model_spec.rb
# put this in a file in your spec/support directory
# USAGE:
#
# let(:model) { ModelUnderTest.new(params) }
# it_behaves_like "ActiveModel"
shared_examples_for "ActiveModel" do
require 'test/unit/assertions'
require 'active_model/lint'