troystribling-agent_xmpp 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/.document +5 -0
  2. data/.gitignore +9 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +7 -0
  5. data/Rakefile +62 -0
  6. data/VERSION +1 -0
  7. data/agent_xmpp.gemspec +89 -0
  8. data/bin/agent_xmpp +56 -0
  9. data/lib/agent_xmpp/app/boot.rb +64 -0
  10. data/lib/agent_xmpp/app/chat_message_body_controller.rb +16 -0
  11. data/lib/agent_xmpp/app/controller.rb +44 -0
  12. data/lib/agent_xmpp/app/format.rb +41 -0
  13. data/lib/agent_xmpp/app/map.rb +45 -0
  14. data/lib/agent_xmpp/app/routes.rb +77 -0
  15. data/lib/agent_xmpp/app/view.rb +49 -0
  16. data/lib/agent_xmpp/app.rb +7 -0
  17. data/lib/agent_xmpp/client/client.rb +197 -0
  18. data/lib/agent_xmpp/client/connection.rb +314 -0
  19. data/lib/agent_xmpp/client/parser.rb +71 -0
  20. data/lib/agent_xmpp/client.rb +3 -0
  21. data/lib/agent_xmpp/patches/standard_library_patches/array.rb +40 -0
  22. data/lib/agent_xmpp/patches/standard_library_patches/float.rb +25 -0
  23. data/lib/agent_xmpp/patches/standard_library_patches/hash.rb +28 -0
  24. data/lib/agent_xmpp/patches/standard_library_patches/object.rb +30 -0
  25. data/lib/agent_xmpp/patches/standard_library_patches/string.rb +25 -0
  26. data/lib/agent_xmpp/patches/standard_library_patches.rb +5 -0
  27. data/lib/agent_xmpp/patches/xmpp4r_patches/command.rb +26 -0
  28. data/lib/agent_xmpp/patches/xmpp4r_patches/iq.rb +26 -0
  29. data/lib/agent_xmpp/patches/xmpp4r_patches/x_data.rb +116 -0
  30. data/lib/agent_xmpp/patches/xmpp4r_patches.rb +3 -0
  31. data/lib/agent_xmpp/patches.rb +3 -0
  32. data/lib/agent_xmpp/utils/logger.rb +24 -0
  33. data/lib/agent_xmpp/utils/roster.rb +23 -0
  34. data/lib/agent_xmpp/utils.rb +2 -0
  35. data/lib/agent_xmpp/version.rb +6 -0
  36. data/lib/agent_xmpp.rb +16 -0
  37. data/test/agent_xmpp_test.rb +7 -0
  38. data/test/test_helper.rb +10 -0
  39. metadata +131 -0
@@ -0,0 +1,23 @@
1
+ ##############################################################################################################
2
+ module AgentXmpp
3
+
4
+ #####-------------------------------------------------------------------------------------------------------
5
+ class Roster
6
+
7
+ #.........................................................................................................
8
+ def initialize(jid, contacts)
9
+ @items = Hash.new{|hash, key| hash[key] = {:activated => false, :resources => {}}}
10
+ contacts.each{|c| @items[c]}
11
+ @items[jid.bare.to_s] = {:activated => true, :resources => {}}
12
+ end
13
+
14
+ #.........................................................................................................
15
+ def method_missing(meth, *args, &blk)
16
+ @items.send(meth, *args, &blk)
17
+ end
18
+
19
+ #### Roster
20
+ end
21
+
22
+ #### AgentXmpp
23
+ end
@@ -0,0 +1,2 @@
1
+ require 'agent_xmpp/utils/roster'
2
+ require 'agent_xmpp/utils/logger'
@@ -0,0 +1,6 @@
1
+ module AgentXmpp
2
+ VERSION = "0.0.0"
3
+ AGENT_XMPP_NAME = 'AgentXMPP'
4
+ OS_VERSION = IO.popen('uname -sr').readlines.to_s.strip
5
+ end
6
+
data/lib/agent_xmpp.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'find'
2
+ require 'ftools'
3
+
4
+ require 'eventmachine'
5
+ require 'evma_xmlpushparser'
6
+ require 'xmpp4r'
7
+ require 'xmpp4r/roster'
8
+ require 'xmpp4r/version'
9
+ require 'xmpp4r/dataforms'
10
+ require 'xmpp4r/command/iq/command'
11
+
12
+ require 'agent_xmpp/version'
13
+ require 'agent_xmpp/patches'
14
+ require 'agent_xmpp/app'
15
+ require 'agent_xmpp/client'
16
+ require 'agent_xmpp/utils'
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class AgentXmppTest < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'agent_xmpp'
8
+
9
+ class Test::Unit::TestCase
10
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: troystribling-agent_xmpp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Troy Stribling
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-02 00:00:00 -07:00
13
+ default_executable: agent_xmpp
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.8.3
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: eventmachine
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.12.6
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: troystribling-evma_xmlpushparser
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.1
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: xmpp4r
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "="
52
+ - !ruby/object:Gem::Version
53
+ version: "0.4"
54
+ version:
55
+ description:
56
+ email: troy.stribling@gmail.com
57
+ executables:
58
+ - agent_xmpp
59
+ extensions: []
60
+
61
+ extra_rdoc_files:
62
+ - LICENSE
63
+ - README.rdoc
64
+ files:
65
+ - .document
66
+ - .gitignore
67
+ - LICENSE
68
+ - README.rdoc
69
+ - Rakefile
70
+ - VERSION
71
+ - agent_xmpp.gemspec
72
+ - bin/agent_xmpp
73
+ - lib/agent_xmpp.rb
74
+ - lib/agent_xmpp/app.rb
75
+ - lib/agent_xmpp/app/boot.rb
76
+ - lib/agent_xmpp/app/chat_message_body_controller.rb
77
+ - lib/agent_xmpp/app/controller.rb
78
+ - lib/agent_xmpp/app/format.rb
79
+ - lib/agent_xmpp/app/map.rb
80
+ - lib/agent_xmpp/app/routes.rb
81
+ - lib/agent_xmpp/app/view.rb
82
+ - lib/agent_xmpp/client.rb
83
+ - lib/agent_xmpp/client/client.rb
84
+ - lib/agent_xmpp/client/connection.rb
85
+ - lib/agent_xmpp/client/parser.rb
86
+ - lib/agent_xmpp/patches.rb
87
+ - lib/agent_xmpp/patches/standard_library_patches.rb
88
+ - lib/agent_xmpp/patches/standard_library_patches/array.rb
89
+ - lib/agent_xmpp/patches/standard_library_patches/float.rb
90
+ - lib/agent_xmpp/patches/standard_library_patches/hash.rb
91
+ - lib/agent_xmpp/patches/standard_library_patches/object.rb
92
+ - lib/agent_xmpp/patches/standard_library_patches/string.rb
93
+ - lib/agent_xmpp/patches/xmpp4r_patches.rb
94
+ - lib/agent_xmpp/patches/xmpp4r_patches/command.rb
95
+ - lib/agent_xmpp/patches/xmpp4r_patches/iq.rb
96
+ - lib/agent_xmpp/patches/xmpp4r_patches/x_data.rb
97
+ - lib/agent_xmpp/utils.rb
98
+ - lib/agent_xmpp/utils/logger.rb
99
+ - lib/agent_xmpp/utils/roster.rb
100
+ - lib/agent_xmpp/version.rb
101
+ - test/agent_xmpp_test.rb
102
+ - test/test_helper.rb
103
+ has_rdoc: true
104
+ homepage: http://github.com/troystribling/agent_xmpp
105
+ post_install_message:
106
+ rdoc_options:
107
+ - --charset=UTF-8
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: "0"
115
+ version:
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: "0"
121
+ version:
122
+ requirements: []
123
+
124
+ rubyforge_project:
125
+ rubygems_version: 1.2.0
126
+ signing_key:
127
+ specification_version: 2
128
+ summary: TODO
129
+ test_files:
130
+ - test/agent_xmpp_test.rb
131
+ - test/test_helper.rb