Skip to content

Instantly share code, notes, and snippets.

@tobeportable
tobeportable / xm.rb
Last active December 15, 2015 20:58
xm gem source file
require "xm/version"
require 'xmpp4r'
require 'yaml'
module Xm
include Jabber
@@y = YAML.load_file(ENV['HOME']+'/.xm')
@@cl = Client.new(JID.new(@@y[:login]))
if @@y.has_key? :server
@@cl.connect(@@y[:server])
else
@tobeportable
tobeportable / README.md
Last active December 15, 2015 20:48
xm gem documentation

XM

The xm gem will help you send xm(pp) messages quickly for e.g. : logging, process notification, alerts ...

installation

gem instal xm

configuration

Create the .xm file in your ENV["HOME"] : vim ~/.xm.

Adapt-paste one of the following yaml templates.