social_stream-presence 0.0.4 → 0.0.5
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/app/assets/javascripts/xmpp_client.js +8 -2
- data/app/views/xmpp/_chat.html.erb +1 -0
- data/app/views/xmpp/_chat_contacts.html.erb +1 -1
- data/ejabberd/conf/ejabberd.cfg +2 -2
- data/ejabberd/conf/ssconfig.cfg +1 -1
- data/lib/generators/social_stream/presence/install_generator.rb +28 -0
- data/lib/generators/social_stream/presence/templates/initializer.rb +12 -0
- data/lib/social_stream/presence/version.rb +1 -1
- data/lib/tasks/presence/synchronize.rake +1 -1
- metadata +3 -2
- data/ejabberd/conf/server.pem +0 -37
@@ -241,6 +241,12 @@ function initAndPlaySound(sound){
|
|
241
241
|
//Chat view jquery
|
242
242
|
////////////////////
|
243
243
|
|
244
|
+
function initDelegates(){
|
245
|
+
$('.user_presence').delegate( '.user_presence a[title]', 'hover', function(){
|
246
|
+
e.preventDefault();
|
247
|
+
});
|
248
|
+
}
|
249
|
+
|
244
250
|
function setUserFunctions(){
|
245
251
|
|
246
252
|
$("div.user_presence").click(function(event, ui){
|
@@ -254,7 +260,6 @@ function setUserFunctions(){
|
|
254
260
|
};
|
255
261
|
});
|
256
262
|
|
257
|
-
|
258
263
|
//JQuery DropdwanStatus
|
259
264
|
|
260
265
|
$(".dropdown dt a").click(function(event) {
|
@@ -326,7 +331,8 @@ function refreshChatWindow(){
|
|
326
331
|
function updateChatWindow(){
|
327
332
|
timerCounter=0;
|
328
333
|
log("updateChatWindow()");
|
329
|
-
$.post("/chatWindow", { userConnected: userConnected }, function(data){
|
334
|
+
$.post("/chatWindow", { userConnected: userConnected }, function(data){
|
335
|
+
$(".tooltip").hide() //Prevent tooltips
|
330
336
|
$("#chat_partial").html(data);
|
331
337
|
if (userConnected) {
|
332
338
|
$(".user_presence a[title]").tooltip();
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<%@contacts.each do |contact| %>
|
29
29
|
<div class="user_presence" name='<%=contact.name%>' slug='<%=contact.slug%>'>
|
30
30
|
<a title='<%=contact.name%>' class="presence_user_link" width="28">
|
31
|
-
<%=image_tag(contact.logo.url, :alt => contact.name , :
|
31
|
+
<%=image_tag(contact.logo.url, :alt => contact.name , :size => "28x28")%>
|
32
32
|
<% if contact.user.status %>
|
33
33
|
<%=image_tag("status/" + contact.user.status + ".png", :class => "presence_status") %></a>
|
34
34
|
<% end %>
|
data/ejabberd/conf/ejabberd.cfg
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
%% You can define one or several, for example:
|
89
89
|
%% {hosts, ["example.net", "example.com", "example.org"]}.
|
90
90
|
%%
|
91
|
-
{hosts, ["
|
91
|
+
{hosts, ["localhost"]}.
|
92
92
|
|
93
93
|
%%
|
94
94
|
%% route_subdomains: Delegate subdomains to other XMPP servers.
|
@@ -376,7 +376,7 @@
|
|
376
376
|
%%
|
377
377
|
%%{acl, admin, {user, "aleksey", "localhost"}}.
|
378
378
|
%%{acl, admin, {user, "ermine", "example.org"}}.
|
379
|
-
{acl, admin, {user, "admin", "
|
379
|
+
{acl, admin, {user, "admin", "localhost"}}.
|
380
380
|
|
381
381
|
%%
|
382
382
|
%% Blocked users
|
data/ejabberd/conf/ssconfig.cfg
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
class SocialStream::Presence::InstallGenerator < Rails::Generators::Base
|
2
|
+
include Rails::Generators::Migration
|
3
|
+
|
4
|
+
source_root File.expand_path('../templates', __FILE__)
|
5
|
+
|
6
|
+
def create_initializer_file
|
7
|
+
copy_file 'initializer.rb', 'config/initializers/social_stream-presence.rb'
|
8
|
+
end
|
9
|
+
|
10
|
+
def create_migration_file
|
11
|
+
require 'rake'
|
12
|
+
Rails.application.load_tasks
|
13
|
+
Rake::Task['railties:install:migrations'].reenable
|
14
|
+
Rake::Task['social_stream_presence_engine:install:migrations'].invoke
|
15
|
+
end
|
16
|
+
|
17
|
+
def require_javascripts
|
18
|
+
inject_into_file 'app/assets/javascripts/application.js',
|
19
|
+
"//= require social_stream-presence\n",
|
20
|
+
:before => '//= require_tree .'
|
21
|
+
end
|
22
|
+
|
23
|
+
def require_stylesheets
|
24
|
+
inject_into_file 'app/assets/stylesheets/application.css',
|
25
|
+
" *= require social_stream-presence\n",
|
26
|
+
:before => ' *= require_tree .'
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
SocialStream::Presence.setup do |config|
|
2
|
+
#Configures XMPP Server Domain
|
3
|
+
config.domain = "localhost"
|
4
|
+
#Configures Bosh Service Path
|
5
|
+
config.bosh_service = "http://localhost:8080/http-bind"
|
6
|
+
#Configures Social Stream Rails App Password
|
7
|
+
config.password = "DnVCB8G|R$VGmZ@2?5=CYS8z)NrL@LuQ<CUh^9B(DF4gC&sQpfbCMbaNKEdNrGYkT4L5zxM0wNWs5q3?ww(b&0d5fK87z^BmgJMMF2SKXT9pEk^UEcch!GX!Avf5GT9)j@FpHe)4RH)BK7J98u!sUmJHUN(Je6aBmn!FtZ4Ab5h8$|nsvUt3Jkq?21HOH$r0sDyJZZvGOCgFS2EKw@0wXsJRHYVRPBe&Eb!1X55e55bQ^h2AW&^R70TK0m)Fu8"
|
8
|
+
#Configures XMPP Server Password
|
9
|
+
config.xmpp_server_password = "G&s6GBnO)anw2Ene%K12Cb=0quj@uDmA"
|
10
|
+
#Username of the the Social Stream Admin sid
|
11
|
+
config.social_stream_presence_username = "social_stream-presence"
|
12
|
+
end
|
@@ -4,7 +4,6 @@ namespace :presence do
|
|
4
4
|
|
5
5
|
namespace :synchronize do
|
6
6
|
|
7
|
-
|
8
7
|
desc "Synchronize user presence."
|
9
8
|
task :connections => :environment do
|
10
9
|
puts "Starting presence:synchronize:connections"
|
@@ -26,6 +25,7 @@ namespace :presence do
|
|
26
25
|
puts "Connecting to Xmpp Server"
|
27
26
|
client = Jabber::Client.new(Jabber::JID.new(ss_sid))
|
28
27
|
client.connect
|
28
|
+
puts "Authentication..."
|
29
29
|
client.auth(password)
|
30
30
|
puts "Connected to Xmpp Server"
|
31
31
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: social_stream-presence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Aldo Gordillo
|
@@ -92,7 +92,6 @@ files:
|
|
92
92
|
- ejabberd/conf/ejabberd.cfg
|
93
93
|
- ejabberd/conf/ejabberdctl.cfg
|
94
94
|
- ejabberd/conf/inetrc
|
95
|
-
- ejabberd/conf/server.pem
|
96
95
|
- ejabberd/conf/ssconfig.cfg
|
97
96
|
- ejabberd/ejabberd_scripts/authentication_script
|
98
97
|
- ejabberd/ejabberd_scripts/authentication_script_org
|
@@ -113,6 +112,8 @@ files:
|
|
113
112
|
- ejabberd/mod_admin_extra/mod_admin_extra.erl
|
114
113
|
- ejabberd/mod_sspresence/mod_sspresence.beam
|
115
114
|
- ejabberd/mod_sspresence/mod_sspresence.erl
|
115
|
+
- lib/generators/social_stream/presence/install_generator.rb
|
116
|
+
- lib/generators/social_stream/presence/templates/initializer.rb
|
116
117
|
- lib/social_stream-presence.rb
|
117
118
|
- lib/social_stream/migrations/presence.rb
|
118
119
|
- lib/social_stream/presence/engine.rb
|
data/ejabberd/conf/server.pem
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIDvDCCAyWgAwIBAgIJAOBE76dYOsdsMA0GCSqGSIb3DQEBBAUAMIGbMQswCQYD
|
3
|
-
VQQGEwJGUjEMMAoGA1UECBMDSURGMQ4wDAYDVQQHEwVQYXJpczEXMBUGA1UEChMO
|
4
|
-
VGVzdCBTZXJ2ZXIgUDExFDASBgNVBAsTC1Byb2Nlc3Mtb25lMRcwFQYDVQQDEw5N
|
5
|
-
aWNrYWVsIFJlbW9uZDEmMCQGCSqGSIb3DQEJARY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