gtalk 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/gtalk.rb +9 -9
- metadata +2 -2
data/lib/gtalk.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'easy-gtalk-bot'
|
3
3
|
|
4
|
-
if !ENV['GTALK_LOGIN'] or !ENV['GTALK_PASSWORD']
|
4
|
+
if !Object::ENV['GTALK_LOGIN'] or !Object::ENV['GTALK_PASSWORD']
|
5
5
|
p "LOGIN & PASSWORD ENV VARIABLES MISSING"
|
6
6
|
end
|
7
7
|
=begin
|
@@ -14,12 +14,12 @@ p "ENV['GTALK_PASSWORD'] #{ENV['GTALK_PASSWORD']}"
|
|
14
14
|
|
15
15
|
module GtalkMsgPrivate
|
16
16
|
def gbot()
|
17
|
-
if ENV['GTALK_LOGIN'].include?("@")
|
18
|
-
login = ENV['GTALK_LOGIN']
|
17
|
+
if Object::ENV['GTALK_LOGIN'].include?("@")
|
18
|
+
login = Object::ENV['GTALK_LOGIN']
|
19
19
|
else
|
20
|
-
login = "#{ENV['GTALK_LOGIN']}@gmail.com"
|
20
|
+
login = "#{Object::ENV['GTALK_LOGIN']}@gmail.com"
|
21
21
|
end
|
22
|
-
bot = GTalk::Bot.new(:email => login, :password => "#{ENV['GTALK_PASSWORD']}")
|
22
|
+
bot = GTalk::Bot.new(:email => login, :password => "#{Object::ENV['GTALK_PASSWORD']}")
|
23
23
|
bot.get_online
|
24
24
|
return bot
|
25
25
|
end
|
@@ -29,18 +29,18 @@ include GtalkMsgPrivate
|
|
29
29
|
|
30
30
|
def gtalk_to(to,msg)
|
31
31
|
bot = gbot
|
32
|
-
bot.message(to.strip,"#{ENV['GTALK_HEADER']}#{msg}")
|
32
|
+
bot.message(to.strip,"#{Object::ENV['GTALK_HEADER']}#{msg}")
|
33
33
|
end
|
34
34
|
|
35
35
|
def gtalk_me(msg)
|
36
|
-
gtalk_to("#{ENV['GTALK_ME']}",msg)
|
36
|
+
gtalk_to("#{Object::ENV['GTALK_ME']}",msg)
|
37
37
|
end
|
38
38
|
alias gtalk gtalk_me
|
39
39
|
|
40
40
|
def gtalk_us(msg)
|
41
|
-
us = ENV['GTALK_US'].split(",")
|
41
|
+
us = Object::ENV['GTALK_US'].split(",")
|
42
42
|
bot = gbot
|
43
43
|
us.each do |one|
|
44
|
-
bot.message("#{one.strip}","#{ENV['GTALK_HEADER']}#{msg}")
|
44
|
+
bot.message("#{one.strip}","#{Object::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.
|
4
|
+
version: 0.0.7
|
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-
|
12
|
+
date: 2012-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: easy-gtalk-bot
|