gtalk 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +14 -6
  2. data/lib/gtalk.rb +2 -2
  3. metadata +4 -4
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Gtalk
2
- A ruby gem to send xmpp messages with a gtalk account
2
+ A ruby gem to send XMPP/Jabber messages with a gtalk account
3
3
 
4
4
  ### installation
5
5
  ```bash
@@ -11,11 +11,11 @@
11
11
  vim ~/.bashrc
12
12
  ```
13
13
  ```bash
14
- export GTALK_ME="me@gmail.com"
15
- export GTALK_US="me@gmail.com,him@gmail.com"
16
- export GTALK_HEADER="["`hostname`"] "
17
14
  export GTALK_LOGIN="me"
18
- export GTALK_PASSWORD="pwd"
15
+ export GTALK_PASSWORD="pwd" #the following are optional
16
+ export GTALK_ME="me@gmail.com" #for gtalk and gtalk_me
17
+ export GTALK_US="me@gmail.com,him@gmail.com" #for gtalk_us
18
+ export GTALK_HEADER="["`hostname`"] " #to prepend to any msg e.g the machine name
19
19
  ```
20
20
  ```bash
21
21
  exec bash
@@ -26,5 +26,13 @@
26
26
  ```
27
27
  ```ruby
28
28
  require 'gtalk'
29
- gtalk "test"
29
+
30
+ # notify yourself cf. ENV['GTALK_ME']
31
+ gtalk_me "test" or gtalk "another test"
32
+
33
+ # notify your team cf. ENV['GTALK_US']
34
+ gtalk_us "test"
35
+
36
+ # notify someone
37
+ gtalk_to "x@gmail.com", "test"
30
38
  ```
@@ -29,7 +29,7 @@ include GtalkMsgPrivate
29
29
 
30
30
  def gtalk_to(to,msg)
31
31
  bot = gbot
32
- bot.message(to,"#{ENV['GTALK_HEADER']}#{msg}")
32
+ bot.message(to.strip,"#{ENV['GTALK_HEADER']}#{msg}")
33
33
  end
34
34
 
35
35
  def gtalk_me(msg)
@@ -41,6 +41,6 @@ def gtalk_us(msg)
41
41
  us = ENV['GTALK_US'].split(",")
42
42
  bot = gbot
43
43
  us.each do |one|
44
- bot.message("#{one}","#{ENV['GTALK_HEADER']}#{msg}")
44
+ bot.message("#{one.strip}","#{ENV['GTALK_HEADER']}#{msg}")
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-29 00:00:00.000000000 Z
12
+ date: 2012-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: easy-gtalk-bot
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- description: A ruby gem to send xmpp messages with a gtalk account
30
+ description: A ruby gem to send XMPP/Jabber messages with a gtalk account
31
31
  email: tobeportable@gmail.com
32
32
  executables: []
33
33
  extensions: []
@@ -59,6 +59,6 @@ rubyforge_project:
59
59
  rubygems_version: 1.8.24
60
60
  signing_key:
61
61
  specification_version: 3
62
- summary: gtalk('alert' website offline)
62
+ summary: Send XMPP/Jabber messages with a gtalk account
63
63
  test_files: []
64
64
  has_rdoc: