Skip to content

Instantly share code, notes, and snippets.

@tobeportable
Created November 29, 2012 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobeportable/4168850 to your computer and use it in GitHub Desktop.
Save tobeportable/4168850 to your computer and use it in GitHub Desktop.
Documentation for a ruby gem to send xmpp messages with a gtalk account

Gtalk

A ruby gem to send xmpp messages with a gtalk account

installation

sudo gem install gtalk

setup

vim ~/.bashrc
export GTALK_LOGIN="me"
export GTALK_PASSWORD="pwd"                   #the following are optional
export GTALK_ME="me@gmail.com"                #for gtalk and gtalk_me
export GTALK_US="me@gmail.com,him@gmail.com"  #for gtalk_us
export GTALK_HEADER="["`hostname`"] "         #to prepend to any msg e.g the machine name
exec bash

usage

pry
require 'gtalk'

# notify yourself cf. ENV['GTALK_ME']
gtalk_me "test" or gtalk "another test"

# notify your team cf. ENV['GTALK_US']
gtalk_us "test"

# notify someone
gtalk_to "x@gmail.com", "test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment