Skip to content

Instantly share code, notes, and snippets.

View gstark's full-sized avatar

Gavin Stark gstark

View GitHub Profile
#
# Having #process dependent on File.open
# *and* #read, separate the processing to allow a
# more general IO processing and another method
# that handles the opening to get the IO and delegate
#
describe "Processing XML file" do
it "Reads from a file and processes the contents" do
file_path = "/some/path/to.xml"
stub_io = stub
require 'java'
require 'rubygems'
def require_module_jar(path)
require File.join( ENV['TORQUEBOX_HOME'], "/jboss/modules/", path )
end
require_module_jar "javax/jms/api/main/jboss-jms-api_1.1_spec-1.0.0.Final.jar"
require_module_jar "javax/transaction/api/main/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"
require_module_jar "org/hornetq/main/hornetq-core-2.2.7.Final.jar"
@gstark
gstark / workflow.md
Created January 26, 2010 20:42 — forked from zaach/workflow.md

Semantic Versioning

Details: http://semver.org/, http://apr.apache.org/versioning.html

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

Patch level changes could also be for correcting incorrect APIs. In this case, the previous patch release may be incompatible, but because of bugs.

Minor versions may introduce new features, but do not alter any of the previous API.

@gstark
gstark / timecard.rb
Created December 2, 2009 04:08 — forked from gilesbowkett/personal git punch card grapher
Personal git punch chard grapher
#!/usr/bin/env ruby
# for usage: ruby timecard.rb --help
require 'rubygems'
require 'optparse'
# This requires the 'cyberfox-gchart' gem (0.5.4), as the standard
# gchart gem is woefully broken for this kind of graph. Broken to the