Skip to content

Instantly share code, notes, and snippets.

View sprsquish's full-sized avatar

Jeff Smick sprsquish

View GitHub Profile
diff --git a/lib/blather/stanza/iq/command.rb b/lib/blather/stanza/iq/command.rb
index aa486b5..0a716e6 100644
--- a/lib/blather/stanza/iq/command.rb
+++ b/lib/blather/stanza/iq/command.rb
@@ -87,7 +87,7 @@ class Iq
# List of X objects
def form
- X.new command.find_first('//ns:x', :ns => self.class.registered_ns)
+ X.new command.find_first('//ns:x', :ns => X.registered_ns)
diff --git a/spec/blather/stanza/iq/command_spec.rb b/spec/blather/stanza/iq/command_spec.rb
index 1f4d3df..14c1b08 100644
--- a/spec/blather/stanza/iq/command_spec.rb
+++ b/spec/blather/stanza/iq/command_spec.rb
@@ -24,16 +24,16 @@ describe Blather::Stanza::Iq::Command do
it 'ensures a command node is present on create' do
c = Blather::Stanza::Iq::Command.new
- c.xpath('command').wont_be_empty
+ c.xpath('xmlns:command', :xmlns => Blather::Stanza::Iq::Command.registered_ns).wont_be_empty
def get_bread_crumb(url)
begin
breadcrumb = ''
so_far = '/'
elements = url.split('/')
for i in 1...elements.size
so_far += elements[i] + '/'
if elements[i] =~ /^[0-9]*$/
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Switch to 1.9.1 and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.1@rails3
#include <avro.h>
#include <stdio.h>
#include <stdlib.h>
#define PERSON_SCHEMA \
"{\"type\":\"record\",\
\"name\":\"Person\",\
\"fields\":[\
{\"name\": \"ID\", \"type\": \"long\"},\
{\"name\": \"First\", \"type\": \"string\"},\
# View man documentation in Preview
pman ()
{
man -t "${1}" | open -f -a /Applications/Preview.app/
}
so my workflow is that each ticket gets a branch. Before merging the branch to master
it needs to be peer-reviewed. So sometimes I have a bunch of branches that are off
being reviewed while I work on something else.
Currently when I run "git branch" I see:
[branch 1]
[branch 2]
[branch 3]
*[branch 4]
[branch 5]
so my workflow is that each ticket gets a branch. Before merging the branch to master
it needs to be peer-reviewed. So sometimes I have a bunch of branches that are off
being reviewed while I work on something else.
Currently when I run "git branch" I see:
[branch 1]
[branch 2]
[branch 3]
*[branch 4]
[branch 5]
config.middleware.use "Hostname", %x"hostname".chomp
/*
File: QuickTime/QuickTime.h
Contains: Master include for all of QuickTime on OS X
Version: QuickTime 7.6.3
Copyright: © 1999-2008 by Apple Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on