google_chat 0.0.1

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.
Files changed (6) hide show
  1. data/Manifest +4 -0
  2. data/README +0 -0
  3. data/Rakefile +14 -0
  4. data/google_chat.gemspec +33 -0
  5. data/google_chat.rb +26 -0
  6. metadata +90 -0
data/Manifest ADDED
@@ -0,0 +1,4 @@
1
+ README
2
+ Rakefile
3
+ google_chat.rb
4
+ Manifest
data/README ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'echoe'
4
+
5
+ Echoe.new('google_chat', '0.0.1') do |p|
6
+ p.description = "gem that makes it easy to send IM using google chat"
7
+ p.url = "http://github.com/anujluthra/google-chat"
8
+ p.author = "Anuj Luthra"
9
+ p.email = "anujluthra @nospam@ gmail.com"
10
+ p.ignore_pattern = ["tmp/*", "script/*"]
11
+ p.development_dependencies = ['xmpp4r']
12
+ end
13
+
14
+
@@ -0,0 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{google_chat}
5
+ s.version = "0.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Anuj Luthra"]
9
+ s.date = %q{2010-11-02}
10
+ s.description = %q{gem that makes it easy to send IM using google chat}
11
+ s.email = %q{anujluthra @nospam@ gmail.com}
12
+ s.extra_rdoc_files = ["README"]
13
+ s.files = ["README", "Rakefile", "google_chat.rb", "Manifest", "google_chat.gemspec"]
14
+ s.homepage = %q{http://github.com/anujluthra/google-chat}
15
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Google_chat", "--main", "README"]
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = %q{google_chat}
18
+ s.rubygems_version = %q{1.3.7}
19
+ s.summary = %q{gem that makes it easy to send IM using google chat}
20
+
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 3
24
+
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
+ s.add_development_dependency(%q<xmpp4r>, [">= 0"])
27
+ else
28
+ s.add_dependency(%q<xmpp4r>, [">= 0"])
29
+ end
30
+ else
31
+ s.add_dependency(%q<xmpp4r>, [">= 0"])
32
+ end
33
+ end
data/google_chat.rb ADDED
@@ -0,0 +1,26 @@
1
+ require 'xmpp4r/client'
2
+ include Jabber
3
+
4
+ class GoogleChat
5
+ include Jabber
6
+
7
+
8
+ def initialize(user, password, resource='Resource')
9
+ jid = JID::new("#{user}/#{resource}")
10
+ @client = Client::new(jid)
11
+ @client.use_ssl = true
12
+ begin
13
+ @client.connect('talk.google.com', 443)
14
+ @client.auth(password)
15
+ return @self
16
+ rescue Exception => e
17
+ puts e.message
18
+ end
19
+ end
20
+
21
+
22
+ def send(message,to)
23
+ @client.send Message::new(to, message).set_type(:normal).set_id('1')
24
+ end
25
+
26
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google_chat
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Anuj Luthra
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-02 00:00:00 +10:30
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: xmpp4r
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :development
34
+ version_requirements: *id001
35
+ description: gem that makes it easy to send IM using google chat
36
+ email: anujluthra @nospam@ gmail.com
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - README
43
+ files:
44
+ - README
45
+ - Rakefile
46
+ - google_chat.rb
47
+ - Manifest
48
+ - google_chat.gemspec
49
+ has_rdoc: true
50
+ homepage: http://github.com/anujluthra/google-chat
51
+ licenses: []
52
+
53
+ post_install_message:
54
+ rdoc_options:
55
+ - --line-numbers
56
+ - --inline-source
57
+ - --title
58
+ - Google_chat
59
+ - --main
60
+ - README
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ hash: 3
69
+ segments:
70
+ - 0
71
+ version: "0"
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 11
78
+ segments:
79
+ - 1
80
+ - 2
81
+ version: "1.2"
82
+ requirements: []
83
+
84
+ rubyforge_project: google_chat
85
+ rubygems_version: 1.3.7
86
+ signing_key:
87
+ specification_version: 3
88
+ summary: gem that makes it easy to send IM using google chat
89
+ test_files: []
90
+