social_stream 0.13.3 → 0.14.0
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/base/app/assets/javascripts/activities.js.erb +0 -2
- data/base/app/views/objects/_new_activity.html.erb +1 -1
- data/base/lib/social_stream/base/version.rb +1 -1
- data/lib/generators/social_stream/install_generator.rb +1 -0
- data/lib/social_stream.rb +2 -0
- data/lib/social_stream/version.rb +1 -1
- data/linkser/app/assets/stylesheets/linkser.css.scss +40 -0
- data/linkser/app/controllers/links_controller.rb +3 -0
- data/linkser/app/controllers/linkser_controller.rb +22 -0
- data/linkser/app/models/link.rb +34 -0
- data/linkser/app/views/links/_link.html.erb +24 -0
- data/linkser/app/views/links/_link_preview.html.erb +25 -0
- data/linkser/app/views/links/_link_with_details.html.erb +4 -0
- data/linkser/app/views/links/create.js.erb +15 -0
- data/linkser/app/views/links/destroy.js.erb +1 -0
- data/linkser/app/views/links/show.html.erb +10 -0
- data/linkser/app/views/posts/_new_activity_fields.erb +53 -0
- data/linkser/config/locales/en.yml +11 -0
- data/linkser/config/locales/es.yml +12 -1
- data/linkser/config/routes.rb +2 -2
- data/linkser/db/migrate/20111129100618_create_social_stream_linkser.rb +21 -0
- data/linkser/lib/social_stream-linkser.rb +7 -0
- data/linkser/social_stream-linkser.gemspec +2 -2
- data/presence/app/views/xmpp/active_users.html.erb +1 -1
- data/presence/config/routes.rb +3 -3
- data/presence/ejabberd/conf/ssconfig_example.cfg +14 -20
- data/presence/ejabberd/ejabberd_files.zip +0 -0
- data/presence/ejabberd/ejabberd_scripts/authentication_script +3 -13
- data/presence/ejabberd/ejabberd_scripts/development_scripts/show_config.sh +13 -9
- data/presence/ejabberd/ejabberd_scripts/emanagement +65 -22
- data/presence/ejabberd/ejabberd_scripts/reset_connection_script +1 -1
- data/presence/ejabberd/ejabberd_scripts/set_connection_script +1 -1
- data/presence/ejabberd/ejabberd_scripts/set_presence_script +1 -1
- data/presence/ejabberd/ejabberd_scripts/synchronize_presence_script +4 -2
- data/presence/ejabberd/ejabberd_scripts/unset_connection_script +1 -1
- data/presence/ejabberd/ejabberd_scripts/unset_presence_script +48 -0
- data/presence/ejabberd/mod_sspresence/mod_sspresence.beam +0 -0
- data/presence/ejabberd/mod_sspresence/mod_sspresence.erl +4 -0
- data/presence/lib/social_stream/presence/models/buddy_manager.rb +1 -1
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/presence/lib/social_stream/presence/xmpp_server_order.rb +9 -24
- data/social_stream.gemspec +2 -1
- data/spec/dummy/db/schema.rb +1 -0
- data/spec/support/db.rb +13 -8
- metadata +51 -22
@@ -32,14 +32,12 @@ $(function() {
|
|
32
32
|
});
|
33
33
|
|
34
34
|
$('#securities .search-choice a').click(function(){
|
35
|
-
console.log($('#security').children("option:selected").size());
|
36
35
|
if($('#security').children("option:selected").size()==0){
|
37
36
|
$('#securities input').css('width', default_security_width)
|
38
37
|
}
|
39
38
|
});
|
40
39
|
});
|
41
40
|
$('#securities input').blur(function(){
|
42
|
-
console.log($('#security').children("option:selected").size());
|
43
41
|
if($('#security').children("option:selected").size()==0){
|
44
42
|
$('#securities input').css('width', default_security_width)
|
45
43
|
}
|
@@ -4,5 +4,5 @@
|
|
4
4
|
<%= form_for object, :remote => remote do |f| %>
|
5
5
|
<%= f.hidden_field :owner_id %>
|
6
6
|
|
7
|
-
<%= render :partial => object.class.to_s.tableize+'/new_activity_fields' , :locals => {:f => f} %>
|
7
|
+
<%= render :partial => object.class.to_s.tableize+'/new_activity_fields' , :locals => {:f => f, :receiver => receiver} %>
|
8
8
|
<% end %>
|
data/lib/social_stream.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
require 'social_stream-base'
|
2
2
|
require 'social_stream-documents'
|
3
3
|
require 'social_stream-events'
|
4
|
+
require 'social_stream-linkser'
|
4
5
|
|
5
6
|
module SocialStream
|
6
7
|
class Engine < ::Rails::Engine #:nodoc:
|
7
8
|
config.app_generators.base 'social_stream:base'
|
8
9
|
config.app_generators.documents 'social_stream:documents'
|
9
10
|
config.app_generators.events 'social_stream:events'
|
11
|
+
config.app_generators.linkser 'social_stream:linkser'
|
10
12
|
end
|
11
13
|
end
|
@@ -1 +1,41 @@
|
|
1
1
|
@import "colors";
|
2
|
+
|
3
|
+
#link_preview {
|
4
|
+
width: 510px;
|
5
|
+
height: 120px;
|
6
|
+
border: 1px solid $auxiliar-color;
|
7
|
+
margin: 5px auto;
|
8
|
+
}
|
9
|
+
|
10
|
+
#link_preview img.loading{
|
11
|
+
margin: auto;
|
12
|
+
margin-top: 40px;
|
13
|
+
}
|
14
|
+
.link {
|
15
|
+
position: relative;
|
16
|
+
padding: 10px;
|
17
|
+
}
|
18
|
+
.link .thumbnail, .link .thumbnail img{
|
19
|
+
float: left;
|
20
|
+
max-height: 100px;
|
21
|
+
max-width: 120px;
|
22
|
+
margin-right:10px;
|
23
|
+
}
|
24
|
+
.link .info{
|
25
|
+
float: left;
|
26
|
+
width: 360px;
|
27
|
+
text-align: left;
|
28
|
+
}
|
29
|
+
.activity_objects .link .info{
|
30
|
+
width: 320px;
|
31
|
+
}
|
32
|
+
.link .info .title{
|
33
|
+
font-weight: bold;
|
34
|
+
margin-bottom: 3px;
|
35
|
+
}
|
36
|
+
.link .info .url{
|
37
|
+
text-decoration: underline;
|
38
|
+
margin-bottom: 5px;
|
39
|
+
}
|
40
|
+
.link .info .description{
|
41
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class LinkserController < ApplicationController
|
2
|
+
def index
|
3
|
+
if params[:url].present?
|
4
|
+
url = params[:url]
|
5
|
+
o = Linkser.parse url, {:max_images => 1}
|
6
|
+
if o.is_a? Linkser::Objects::HTML
|
7
|
+
link = Link.new
|
8
|
+
link.title = o.title if o.title
|
9
|
+
link.description = o.description if o.description
|
10
|
+
link.url = o.last_url
|
11
|
+
if o.ogp and o.ogp.image
|
12
|
+
link.image = o.ogp.image
|
13
|
+
elsif o.images and o.images.first
|
14
|
+
link.image = o.images.first.url
|
15
|
+
end
|
16
|
+
render :partial => "links/link_preview", :locals => {:link => link}
|
17
|
+
return
|
18
|
+
end
|
19
|
+
end
|
20
|
+
render :text => I18n.t("link.errors.only_web")
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
class Link < ActiveRecord::Base
|
2
|
+
include SocialStream::Models::Object
|
3
|
+
|
4
|
+
validates_presence_of :url
|
5
|
+
|
6
|
+
attr_accessor :loaded
|
7
|
+
|
8
|
+
before_create :check_loaded
|
9
|
+
|
10
|
+
define_index do
|
11
|
+
indexes title
|
12
|
+
indexes description
|
13
|
+
indexes url
|
14
|
+
|
15
|
+
has created_at
|
16
|
+
end
|
17
|
+
|
18
|
+
def check_loaded
|
19
|
+
if !self.loaded.eql?"true" and self.title.nil? and self.description.nil? and self.image.nil?
|
20
|
+
o = Linkser.parse self.url, {:max_images => 1}
|
21
|
+
if o.is_a? Linkser::Objects::HTML
|
22
|
+
self.title = o.title if o.title
|
23
|
+
self.description = o.description if o.description
|
24
|
+
self.url = o.last_url
|
25
|
+
if o.ogp and o.ogp.image
|
26
|
+
self.image = o.ogp.image
|
27
|
+
elsif o.images and o.images.first
|
28
|
+
self.image = o.images.first.url
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%= div_for link, :class => 'content_size' do %>
|
2
|
+
<% if link.image %>
|
3
|
+
<div class="thumbnail">
|
4
|
+
<%= link_to image_tag(link.image),link.url %>
|
5
|
+
</div>
|
6
|
+
<% end %>
|
7
|
+
<div class="info">
|
8
|
+
<% if link.title %>
|
9
|
+
<div class="title">
|
10
|
+
<%= link.title %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<div class="url">
|
14
|
+
<%= auto_link(link.url) %>
|
15
|
+
</div>
|
16
|
+
<% if link.description %>
|
17
|
+
<div class="description">
|
18
|
+
<%= auto_link(link.description) %>
|
19
|
+
</div>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<br class="clearfloat">
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= div_for link, :class => 'content_size' do %>
|
2
|
+
<% if link.image %>
|
3
|
+
<div class="thumbnail">
|
4
|
+
<%= image_tag(link.image)%>
|
5
|
+
<%= hidden_field_tag "link[image]", link.image %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
8
|
+
<div class="info">
|
9
|
+
<% if link.title %>
|
10
|
+
<div class="title">
|
11
|
+
<%= link.title %>
|
12
|
+
<%= hidden_field_tag "link[title]", link.title %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
<div class="url">
|
16
|
+
<%= auto_link(link.url) %>
|
17
|
+
</div>
|
18
|
+
<% if link.description %>
|
19
|
+
<div class="description">
|
20
|
+
<%= auto_link(link.description) %>
|
21
|
+
<%= hidden_field_tag "link[description]", link.description %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
//Display the new post
|
2
|
+
$("#wall").prepend("<%= escape_javascript(render @link.post_activity) %>");
|
3
|
+
|
4
|
+
setActivityPrivacyTooltips("<%= escape_javascript dom_id(@link.post_activity) %>");
|
5
|
+
|
6
|
+
unblock_all_forms();
|
7
|
+
|
8
|
+
$("#link_preview").hide();
|
9
|
+
$("#link_preview").html("");
|
10
|
+
$("#link_loaded").val(false);
|
11
|
+
$("#link_preview").html("");
|
12
|
+
$("#link_url").val("");
|
13
|
+
|
14
|
+
|
15
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<%=render(:partial => 'objects/destroy') %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% content_for :javascript do %>
|
2
|
+
var message_hash = window.location.hash.match(/^.*activity_(\d+).*$/);
|
3
|
+
if (message_hash && message_hash > 0){
|
4
|
+
$.scrollTo('#activity_' + message_hash[1] ,1500,{axis:'y'});
|
5
|
+
}
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= render :partial => 'objects/show',
|
9
|
+
:locals => { :object => @link } %>
|
10
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<%= f.text_field :text, :id => "input_activities", :size => 85 %>
|
2
|
+
<%= hidden_field_tag "link[owner_id]", Actor.normalize_id(receiver) %>
|
3
|
+
<%= hidden_field_tag "link[url]" %>
|
4
|
+
<%= hidden_field_tag "link[loaded]", false %>
|
5
|
+
<div id="link_preview" style="display:none;"></div>
|
6
|
+
|
7
|
+
<%= javascript_tag do %>
|
8
|
+
$(function() {
|
9
|
+
$.preloadImages ("assets/loading.gif");
|
10
|
+
$("#input_activities").Watermark("<%= I18n.t('post.input') %>","#666");
|
11
|
+
|
12
|
+
var urlDetect = function(){
|
13
|
+
this.currentValue = $("#input_activities").val();
|
14
|
+
if(this.lastValue==null) this.lastValue = "";
|
15
|
+
|
16
|
+
var regexp = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/
|
17
|
+
if(regexp.test($("#input_activities").val())){
|
18
|
+
$("#link_url").val($("#input_activities").val());
|
19
|
+
$("#link_loaded").val(false);
|
20
|
+
$("#new_post").attr("action","<%= links_path %>");
|
21
|
+
if(this.currentValue!=this.lastValue){
|
22
|
+
$("#link_preview").html("<%= escape_javascript(image_tag('loading.gif', :class => :loading)) %>");
|
23
|
+
this.lastValue = this.currentValue;
|
24
|
+
var url = this.currentValue;
|
25
|
+
var urlDetect = this;
|
26
|
+
$.ajax({
|
27
|
+
type : "GET",
|
28
|
+
url : "<%= linkser_parse_url %>?url=" + url,
|
29
|
+
success : function(html) {
|
30
|
+
console.log("Peticion guay a " + url);
|
31
|
+
if ($("#input_activities").val()==url){ //Only show if input value is still the same
|
32
|
+
$("#link_preview").html(html);
|
33
|
+
$("#link_loaded").val(true);
|
34
|
+
}
|
35
|
+
},
|
36
|
+
error: function (xhr, ajaxOptions, thrownError){
|
37
|
+
$("#link_preview").html("<span class=\"loading\"><%= escape_javascript(t("link.errors.loading"))%> " + url + "</span>");
|
38
|
+
}
|
39
|
+
});
|
40
|
+
}
|
41
|
+
$("#link_preview").show();
|
42
|
+
}else{
|
43
|
+
$("#new_post").attr("action","<%= posts_path %>");
|
44
|
+
$("#link_preview").hide();
|
45
|
+
$("#link_preview").html("");
|
46
|
+
$("#link_url").val("");
|
47
|
+
}
|
48
|
+
}
|
49
|
+
$("#input_activities").change(urlDetect).keyup(urlDetect);
|
50
|
+
|
51
|
+
});
|
52
|
+
|
53
|
+
<% end %>
|
@@ -1,3 +1,14 @@
|
|
1
1
|
en:
|
2
2
|
linkser:
|
3
3
|
title: "Linkser"
|
4
|
+
link:
|
5
|
+
confirm_delete: "Delete link?"
|
6
|
+
errors:
|
7
|
+
loading: "Error loading"
|
8
|
+
only_webs: "Only webpages are supported"
|
9
|
+
form:
|
10
|
+
title: "Link"
|
11
|
+
input: "Write the web address"
|
12
|
+
name: "link"
|
13
|
+
one: "a link"
|
14
|
+
title: "Links"
|
@@ -1,3 +1,14 @@
|
|
1
1
|
es:
|
2
2
|
linkser:
|
3
|
-
title: "Linkser"
|
3
|
+
title: "Linkser"
|
4
|
+
link:
|
5
|
+
confirm_delete: "¿Borrar enlace?"
|
6
|
+
errors:
|
7
|
+
loading: "Error cargando"
|
8
|
+
only_webs: "Solo puedes compartir págnas web"
|
9
|
+
form:
|
10
|
+
title: "Enlace"
|
11
|
+
input: "Escribe una dirección"
|
12
|
+
name: "enlace"
|
13
|
+
one: "una enlace"
|
14
|
+
title: "Enlaces"
|
data/linkser/config/routes.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
match 'linkser_parse' => 'linkser#index', :as => :linkser_parse
|
3
3
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateSocialStreamLinkser < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table "links", :force => true do |t|
|
4
|
+
t.integer "activity_object_id"
|
5
|
+
t.datetime "created_at"
|
6
|
+
t.datetime "updated_at"
|
7
|
+
t.string "url"
|
8
|
+
t.string "callback_url"
|
9
|
+
t.string "title"
|
10
|
+
t.string "image"
|
11
|
+
t.text "description"
|
12
|
+
end
|
13
|
+
|
14
|
+
add_index "links", "activity_object_id"
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
remove_foreign_key "links", :name => "links_on_activity_object_id"
|
19
|
+
drop_table :links
|
20
|
+
end
|
21
|
+
end
|
@@ -1,7 +1,14 @@
|
|
1
1
|
require 'social_stream-base'
|
2
|
+
require 'linkser'
|
2
3
|
|
3
4
|
module SocialStream
|
4
5
|
module Linkser
|
6
|
+
# Add :link to SocialStream.objects and SocialStream.activity_forms by default
|
7
|
+
# It can be configured by users at application's config/initializers/social_stream.rb
|
8
|
+
#%w(objects activity_forms).each do |m|
|
9
|
+
%w(objects).each do |m|
|
10
|
+
SocialStream.__send__(m).push(:link) unless SocialStream.__send__(m).include?(:link)
|
11
|
+
end
|
5
12
|
|
6
13
|
end
|
7
14
|
end
|
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
|
14
14
|
# Gem dependencies
|
15
|
-
s.add_runtime_dependency('social_stream-base', '~> 0.
|
16
|
-
s.add_runtime_dependency('linkser', '~> 0.0.
|
15
|
+
s.add_runtime_dependency('social_stream-base', '~> 0.10.1')
|
16
|
+
s.add_runtime_dependency('linkser', '~> 0.0.6')
|
17
17
|
# Development Gem dependencies
|
18
18
|
s.add_development_dependency('sqlite3-ruby')
|
19
19
|
if RUBY_VERSION < '1.9'
|
data/presence/config/routes.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
#match "/active_users" => "Xmpp#active_users"
|
3
3
|
|
4
|
-
match '/xmpp/resetConnection' => "Xmpp#resetConnection"
|
5
4
|
match '/xmpp/setConnection' => "Xmpp#setConnection"
|
6
5
|
match '/xmpp/unsetConnection' => "Xmpp#unsetConecction"
|
7
|
-
match '/xmpp/synchronizePresence' => "Xmpp#synchronizePresence"
|
8
6
|
match '/xmpp/setPresence' => "Xmpp#setPresence"
|
9
7
|
match '/xmpp/unsetPresence' => "Xmpp#unsetPresence"
|
10
|
-
match '/
|
8
|
+
match '/xmpp/resetConnection' => "Xmpp#resetConnection"
|
9
|
+
match '/xmpp/synchronizePresence' => "Xmpp#synchronizePresence"
|
11
10
|
match '/xmpp/updateSettings'=> "Xmpp#updateSettings"
|
11
|
+
match '/chatWindow'=> "Xmpp#chatWindow"
|
12
12
|
|
13
13
|
end
|
@@ -1,38 +1,32 @@
|
|
1
|
-
#Social Stream Presence:
|
1
|
+
#Social Stream Presence: Ejabberd configuration file
|
2
2
|
|
3
3
|
#Ejabberd node server domain
|
4
|
-
server_domain=
|
4
|
+
server_domain=xmppdomain.example.com
|
5
5
|
|
6
6
|
#Scripts Path
|
7
7
|
scripts_path=/my_scripts_path
|
8
8
|
|
9
|
-
#Source path: uncomment to compile ejabberd social stream module
|
10
|
-
#source_path=/.../ejabberd_source/src
|
11
|
-
|
12
9
|
#It is also necessary to modify the file: /etc/ejabberd/ejabberd.cfg
|
13
10
|
#%%{auth_method, external}.
|
14
11
|
#%%{extauth_program, "scripts_path/authentication_script"}.
|
15
12
|
|
16
|
-
#
|
17
|
-
|
18
|
-
|
19
|
-
cookie_name=_rails_server_cookie
|
20
|
-
set_connection_api=http://localhost/xmpp/setConnection
|
21
|
-
unset_connection_api=http://localhost/xmpp/unsetConnection
|
22
|
-
reset_connection_api=http://localhost/xmpp/resetConnection
|
23
|
-
synchronize_presence_api=http://localhost/xmpp/synchronizePresence
|
24
|
-
set_presence_api=http://localhost/xmpp/setPresence
|
25
|
-
unset_presence_api=http://localhost/xmpp/unsetPresence
|
13
|
+
#Source path: uncomment to compile ejabberd social stream module
|
14
|
+
#source_path=/.../ejabberd_source/src
|
15
|
+
|
26
16
|
|
27
|
-
#
|
28
|
-
|
17
|
+
#Web Domain for REST API
|
18
|
+
web_domain=ssdomain.example.com
|
19
|
+
|
20
|
+
#Rails Web Server Cookie name
|
21
|
+
#Check this line in your app/config/initializers/session_store.rb: Global::Application.config.session_store :cookie_store, :key => '_rails_server_cookie'
|
22
|
+
cookie_name=_rails_server_cookie
|
29
23
|
|
30
|
-
#Social Stream PASSWORD
|
31
|
-
ss_password=password
|
32
24
|
|
33
25
|
#Ejabberd Server Password
|
34
26
|
ejabberd_password=password
|
35
27
|
|
28
|
+
|
36
29
|
#Emanagement configuration
|
37
|
-
|
30
|
+
ejabberd_server_user=ejabberd
|
31
|
+
users_require_sudo=all
|
38
32
|
verbose=false
|
Binary file
|
@@ -31,11 +31,9 @@ def getOption(option)
|
|
31
31
|
return "Undefined"
|
32
32
|
end
|
33
33
|
|
34
|
-
$
|
35
|
-
$accessByCookieUrl = getOption("
|
34
|
+
$accessByPasswordUrl = "http://" + getOption("web_domain=") + "/users/sign_in"
|
35
|
+
$accessByCookieUrl = "http://" + getOption("web_domain=") + "/api/me"
|
36
36
|
$cookie_name = getOption("cookie_name=")
|
37
|
-
$sslogin = getOption("ss_login=")
|
38
|
-
$sspass = getOption("ss_password=")
|
39
37
|
|
40
38
|
|
41
39
|
def auth(username, password)
|
@@ -48,17 +46,9 @@ def auth(username, password)
|
|
48
46
|
# return true
|
49
47
|
#end
|
50
48
|
|
51
|
-
#Social Stream password
|
52
|
-
if username == $sslogin
|
53
|
-
if password == $sspass
|
54
|
-
return true
|
55
|
-
else
|
56
|
-
return false
|
57
|
-
end
|
58
|
-
end
|
59
49
|
|
60
50
|
begin
|
61
|
-
response = RestClient.post $
|
51
|
+
response = RestClient.post $accessByPasswordUrl, :user => { :email => username , :password => password }
|
62
52
|
|
63
53
|
if response.code == 201
|
64
54
|
return true
|
@@ -17,17 +17,21 @@ end
|
|
17
17
|
puts ""
|
18
18
|
puts "############### Ejabberd Configuration ###############"
|
19
19
|
puts "Config file for Social Stream Presence: /etc/ejabberd/ssconfig.cfg"
|
20
|
+
puts "Xmpp Server domain: #{getOption("server_domain=")}"
|
20
21
|
puts "Scripts Path: #{getOption("scripts_path=")}"
|
21
22
|
puts "mod_sspresence Path: #{getOption("source_path=")}"
|
22
|
-
puts "
|
23
|
-
puts "
|
24
|
-
puts "
|
25
|
-
puts "
|
26
|
-
puts "
|
27
|
-
puts "
|
28
|
-
puts "
|
29
|
-
puts "
|
30
|
-
puts "
|
23
|
+
puts "Web Domain for REST API: #{getOption("web_domain=")}"
|
24
|
+
puts "##############################"
|
25
|
+
puts "REST API"
|
26
|
+
puts "Authentication by password: http://#{getOption("web_domain=")}/users/sign_in"
|
27
|
+
puts "Authentication by cookie: http://#{getOption("web_domain=")}/api/me"
|
28
|
+
puts "onRegisterConnection: http://#{getOption("web_domain=")}/xmpp/setConnection"
|
29
|
+
puts "onRemoveConnection: http://#{getOption("web_domain=")}/xmpp/unsetConnection"
|
30
|
+
puts "onPresence: http://#{getOption("web_domain=")}/xmpp/setPresence"
|
31
|
+
puts "onUnsetPresence: http://#{getOption("web_domain=")}/xmpp/unsetPresence"
|
32
|
+
puts "ResetConnection: http://#{getOption("web_domain=")}/xmpp/resetConnection"
|
33
|
+
puts "SynchronizePresence: http://#{getOption("web_domain=")}/xmpp/synchronizePresence"
|
34
|
+
puts "##############################"
|
31
35
|
puts "Social Stream Presence logs in var/log/ejabberd/"
|
32
36
|
puts "######################################################"
|
33
37
|
puts ""
|
@@ -31,6 +31,8 @@ end
|
|
31
31
|
#Configuration variables
|
32
32
|
$domain = getOption("server_domain=")
|
33
33
|
$verbose = (getOption("verbose=")=="true")
|
34
|
+
$ejabberd_user = getOption("ejabberd_server_user=")
|
35
|
+
$checkEjabberdctlQuotedString = false
|
34
36
|
|
35
37
|
|
36
38
|
PARAMS_FOR_COMMANDS = {
|
@@ -41,9 +43,7 @@ PARAMS_FOR_COMMANDS = {
|
|
41
43
|
'getRoster' => 1,
|
42
44
|
'removeRoster' => 1,
|
43
45
|
'removeAllRosters' => 0,
|
44
|
-
'getBuddysFromRoster' => 1,
|
45
46
|
'getAllUsersWithRoster' => 0,
|
46
|
-
'getAllRosters' => 0,
|
47
47
|
'printAllRosters' => 0,
|
48
48
|
'printAllBidirecctionalBuddys' => 0,
|
49
49
|
'checkUser' => 1,
|
@@ -54,7 +54,9 @@ PARAMS_FOR_COMMANDS = {
|
|
54
54
|
'sendMessageToUser' => 3,
|
55
55
|
'getUserResource' => 1,
|
56
56
|
'isEjabberdNodeStarted' => 0,
|
57
|
+
'broadcast' => 2,
|
57
58
|
'checkEjabberdctlQuotedString' => 0,
|
59
|
+
'getConnectedUsers' => 0,
|
58
60
|
'help' => 0,
|
59
61
|
}
|
60
62
|
|
@@ -66,9 +68,7 @@ SYNTAX_FOR_COMMANDS = {
|
|
66
68
|
'getRoster' => 'getRoster username',
|
67
69
|
'removeRoster' => 'removeRoster username',
|
68
70
|
'removeAllRosters' => 'removeAllRosters',
|
69
|
-
'getBuddysFromRoster' => 'getBuddysFromRoster roster',
|
70
71
|
'getAllUsersWithRoster' => 'getAllUsersWithRoster',
|
71
|
-
'getAllRosters' => 'getAllRosters',
|
72
72
|
'printAllRosters' => 'printAllRosters',
|
73
73
|
'printAllBidirecctionalBuddys' => 'printAllBidirecctionalBuddys',
|
74
74
|
'checkUser' => 'checkUser user',
|
@@ -79,7 +79,9 @@ SYNTAX_FOR_COMMANDS = {
|
|
79
79
|
'sendMessageToUser' => 'sendMessageToUser from_name to_name msg',
|
80
80
|
'getUserResource' => 'getUserResource username',
|
81
81
|
'isEjabberdNodeStarted' => 'isEjabberdNodeStarted',
|
82
|
+
'broadcast' => 'broadcast users msg (users values: "all" or slugs array)',
|
82
83
|
'checkEjabberdctlQuotedString' => 'checkEjabberdctlQuotedString',
|
84
|
+
'getConnectedUsers' => 'getConnectedUsers',
|
83
85
|
'help' => 'help',
|
84
86
|
}
|
85
87
|
|
@@ -285,13 +287,6 @@ end
|
|
285
287
|
|
286
288
|
#Manage stanzas Utilities
|
287
289
|
|
288
|
-
def sendStanzaUserMessage(username,msg)
|
289
|
-
resource = getUserResource(username);
|
290
|
-
stanza = "\\<\\'message\\'\\>\\<\\'body\\'\\>\\'" + msg + "\\'\\<\\'/body\\'\\>\\<\\'/message\\'\\>"
|
291
|
-
executeCommand("ejabberdctl send_stanza_c2s " + username + " " + $domain + " " + resource + " " + stanza)
|
292
|
-
return "Done"
|
293
|
-
end
|
294
|
-
|
295
290
|
def setPresence(username)
|
296
291
|
sendPresenceStanzaWithType(username,username,"available")
|
297
292
|
end
|
@@ -305,12 +300,14 @@ def sendPresence(username,show)
|
|
305
300
|
end
|
306
301
|
|
307
302
|
def sendPresenceWithShow(from_name,to_name,show)
|
308
|
-
puts from_name
|
303
|
+
#puts from_name
|
309
304
|
resource = getUserResource(from_name);
|
310
|
-
puts resource
|
305
|
+
#puts resource
|
311
306
|
from_sid = from_name + "@" + $domain;
|
312
307
|
to_sid = to_name + "@" + $domain;
|
313
|
-
pres_stanza = "
|
308
|
+
pres_stanza = "\\<" + buildQuotedString("presence from=") + "\\\"" + buildQuotedString(from_sid) + "\\\"" + buildQuotedString(" to=") + "\\\"" +
|
309
|
+
buildQuotedString(to_sid) + "\\\"\\>\\<" + buildQuotedString("show") + "\\>" + buildQuotedString(show) + "\\<" +
|
310
|
+
buildQuotedString("/show") + "\\>\\<" + buildQuotedString("/presence") + "\\>"
|
314
311
|
executeCommand("ejabberdctl send_stanza_c2s " + from_name + " " + $domain + " " + resource + " " + pres_stanza)
|
315
312
|
return "Done"
|
316
313
|
end
|
@@ -319,7 +316,8 @@ def sendPresenceStanzaWithType(from_name,to_name,presence_type)
|
|
319
316
|
resource = getUserResource(from_name);
|
320
317
|
from_sid = from_name + "@" + $domain;
|
321
318
|
to_sid = to_name + "@" + $domain;
|
322
|
-
pres_stanza = "
|
319
|
+
pres_stanza = "\\<" + buildQuotedString("presence type=") + "\\\"" + buildQuotedString(presence_type) + "\\\"" + buildQuotedString(" from=") + "\\\"" +
|
320
|
+
buildQuotedString(from_sid) + "\\\"" + buildQuotedString(" to=") + "\\\"" + buildQuotedString(to_sid) + "\\\"\\>\\<" + buildQuotedString("/presence") + "\\>"
|
323
321
|
executeCommand("ejabberdctl send_stanza_c2s " + from_name + " " + $domain + " " + resource + " " + pres_stanza)
|
324
322
|
return "Done"
|
325
323
|
end
|
@@ -356,17 +354,52 @@ def isEjabberdNodeStarted
|
|
356
354
|
return false
|
357
355
|
end
|
358
356
|
|
357
|
+
def getConnectedUsers
|
358
|
+
users = []
|
359
|
+
output = executeCommand("ejabberdctl connected-users")
|
360
|
+
sessions = output.split("\n")
|
361
|
+
sessions.each do |session|
|
362
|
+
users << session.split("@")[0]
|
363
|
+
end
|
364
|
+
return users
|
365
|
+
end
|
366
|
+
|
367
|
+
def broadcast(users,msg)
|
368
|
+
output = executeCommand("ejabberdctl connected-users")
|
369
|
+
lines = output.split("\n");
|
370
|
+
lines.each do |line|
|
371
|
+
username = line.split("@")[0]
|
372
|
+
if (users == "all") or (users.length > 1 and users.include?(username))
|
373
|
+
s = line.split("@")[1];
|
374
|
+
resource = s.split("/")[1];
|
375
|
+
sendMessageToUser("SocialStream",username,msg)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
return "Done"
|
379
|
+
end
|
380
|
+
|
381
|
+
#Determine how to scape characters for build quoted strings
|
359
382
|
def checkEjabberdctlQuotedString
|
360
383
|
puts "checkForSimpleSlash: " + checkForSimpleSlash.to_s()
|
361
384
|
puts "checkForDoubleSlash: " + checkForDoubleSlash.to_s()
|
362
385
|
end
|
363
386
|
|
387
|
+
def checkAndSetEjabberdctlQuotedString
|
388
|
+
if checkForSimpleSlash
|
389
|
+
$checkForSimpleSlash = true
|
390
|
+
end
|
391
|
+
if checkForDoubleSlash
|
392
|
+
$checkForDoubleSlash = true
|
393
|
+
end
|
394
|
+
$checkEjabberdctlQuotedString = true
|
395
|
+
end
|
396
|
+
|
364
397
|
def checkForDoubleSlash
|
365
398
|
command = "ejabberdctl send_message_chat example@localhost example@localhost \\'Hello quoted string\\'"
|
366
399
|
if execute_as_sudo
|
367
400
|
command = "sudo " + command
|
368
401
|
end
|
369
|
-
|
402
|
+
|
370
403
|
output = %x[#{command}]
|
371
404
|
firstLine = ""
|
372
405
|
lines = output.split("\n")
|
@@ -414,10 +447,14 @@ def checkForSimpleSlash
|
|
414
447
|
end
|
415
448
|
|
416
449
|
def buildQuotedString(msg)
|
417
|
-
if
|
450
|
+
if !$checkEjabberdctlQuotedString
|
451
|
+
checkAndSetEjabberdctlQuotedString
|
452
|
+
end
|
453
|
+
|
454
|
+
if $checkForSimpleSlash
|
418
455
|
return "\'" + msg + "\'"
|
419
456
|
end
|
420
|
-
if checkForDoubleSlash
|
457
|
+
if $checkForDoubleSlash
|
421
458
|
return "\\'" + msg + "\\'"
|
422
459
|
end
|
423
460
|
return msg
|
@@ -431,7 +468,8 @@ def executeCommand(command)
|
|
431
468
|
command = buildCommand(command)
|
432
469
|
|
433
470
|
if $verbose
|
434
|
-
|
471
|
+
#Logging...
|
472
|
+
#puts "Executing: " + command
|
435
473
|
ejabberdLog("Executing (#{command})")
|
436
474
|
end
|
437
475
|
|
@@ -442,15 +480,20 @@ end
|
|
442
480
|
|
443
481
|
def buildCommand(command)
|
444
482
|
if execute_as_sudo
|
445
|
-
command = "sudo -u
|
483
|
+
command = "sudo -u " + $ejabberd_user + " " + command
|
446
484
|
end
|
447
485
|
return command
|
448
486
|
end
|
449
487
|
|
450
488
|
def execute_as_sudo
|
451
|
-
current_user = %x["whoami"].split("\n")[0]
|
452
489
|
sudo_users = getOption("users_require_sudo=")
|
490
|
+
|
491
|
+
if sudo_users=="all"
|
492
|
+
return true
|
493
|
+
end
|
494
|
+
|
453
495
|
sudo_users_array = sudo_users.split(",")
|
496
|
+
current_user = %x["whoami"].split("\n")[0]
|
454
497
|
if sudo_users_array.include?(current_user)
|
455
498
|
return true
|
456
499
|
end
|
@@ -468,7 +511,7 @@ end
|
|
468
511
|
|
469
512
|
#Main thread
|
470
513
|
|
471
|
-
log("Init Ejabberd Maintenance script")
|
514
|
+
#log("Init Ejabberd Maintenance script")
|
472
515
|
|
473
516
|
begin
|
474
517
|
if ARGV[0] and PARAMS_FOR_COMMANDS.keys.include?(ARGV[0])
|
@@ -25,8 +25,9 @@ def getOption(option)
|
|
25
25
|
return "Undefined"
|
26
26
|
end
|
27
27
|
|
28
|
-
$url = getOption("
|
28
|
+
$url = "http://" + getOption("web_domain=") + "/xmpp/synchronizePresence"
|
29
29
|
$pass = getOption("ejabberd_password=")
|
30
|
+
$scripts_path = getOption("scripts_path=")
|
30
31
|
|
31
32
|
|
32
33
|
def log(text)
|
@@ -37,7 +38,8 @@ def synchronize()
|
|
37
38
|
log("Start Synchronize")
|
38
39
|
|
39
40
|
users = []
|
40
|
-
|
41
|
+
command = $scripts_path + "/emanagement getConnectedUsers"
|
42
|
+
output = %x[#{command}]
|
41
43
|
sessions = output.split("\n")
|
42
44
|
|
43
45
|
sessions.each do |session|
|
@@ -0,0 +1,48 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#Unset Presence Script
|
3
|
+
#@author Aldo
|
4
|
+
|
5
|
+
require 'logger'
|
6
|
+
require 'rest_client'
|
7
|
+
|
8
|
+
path = "/var/log/ejabberd/scripts.log"
|
9
|
+
file = File.open(path, File::WRONLY | File::APPEND | File::CREAT)
|
10
|
+
file.sync = true
|
11
|
+
$logger = Logger.new(file)
|
12
|
+
$logger.level = Logger::DEBUG
|
13
|
+
|
14
|
+
def getOption(option)
|
15
|
+
File.open('/etc/ejabberd/ssconfig.cfg', 'r') do |f1|
|
16
|
+
while line = f1.gets
|
17
|
+
line = line.gsub(/\n/,'')
|
18
|
+
if line.match(/^#/)
|
19
|
+
#Comments
|
20
|
+
elsif line.match(/^#{option}/)
|
21
|
+
return line.gsub(/#{option}/,'')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
return "Undefined"
|
26
|
+
end
|
27
|
+
|
28
|
+
$url = "http://" + getOption("web_domain=") + "/xmpp/unsetPresence"
|
29
|
+
$pass = getOption("ejabberd_password=")
|
30
|
+
|
31
|
+
|
32
|
+
def log(text)
|
33
|
+
$logger.info "Unset Presence Script: " + text
|
34
|
+
end
|
35
|
+
|
36
|
+
def unsetPresence(username)
|
37
|
+
log("unsetPresence(#{username})")
|
38
|
+
RestClient.post($url, :name => username, :password => $pass)
|
39
|
+
return true
|
40
|
+
|
41
|
+
rescue RestClient::Exception
|
42
|
+
log("RestClient::Exception with unsetPresence(#{username})")
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
unsetPresence(ARGV[0])
|
47
|
+
|
48
|
+
|
Binary file
|
@@ -61,6 +61,10 @@ on_presence(User, _Server, _Resource, Packet) ->
|
|
61
61
|
|
62
62
|
on_unset_presence(User, _Server, _Resource, _Status) ->
|
63
63
|
?INFO_MSG("mod_sspresence: on_unset_presence (~p)", [User]),
|
64
|
+
Login_path = string:concat(getOptionValue("scripts_path="), "/unset_presence_script "),
|
65
|
+
%% Wait for on_remove_connection
|
66
|
+
%% ?INFO_MSG("mod_sspresence: unset_presence_script call with user (~p)", [User]),
|
67
|
+
%% os:cmd(string:join([Login_path, User , Status], " "));
|
64
68
|
ok.
|
65
69
|
|
66
70
|
on_packet_send(From, _To, {xmlelement, Type, _Attr, Subel} = _Packet) ->
|
@@ -39,7 +39,7 @@ module SocialStream
|
|
39
39
|
elsif self.positive?
|
40
40
|
#Case: Possitive tie unidirectional
|
41
41
|
#Execute addBuddyToRoster(userSID,buddySID,buddyNick,buddyGroup,subscription_type)
|
42
|
-
subscription_type = "
|
42
|
+
subscription_type = "from"
|
43
43
|
SocialStream::Presence::XmppServerOrder::addBuddyToRoster(user_sid,buddy_sid,buddy_name,"SocialStream",subscription_type)
|
44
44
|
else
|
45
45
|
#Negative Tie
|
@@ -31,32 +31,16 @@ module SocialStream
|
|
31
31
|
end
|
32
32
|
|
33
33
|
|
34
|
+
|
34
35
|
def synchronizePresence
|
35
|
-
|
36
|
-
|
36
|
+
if isEjabberdNodeUp
|
37
|
+
output = executeEmanagementCommand("getConnectedUsers",[])
|
38
|
+
user_slugs = output.split("\n")
|
39
|
+
synchronizePresenceForSlugs(user_slugs)
|
40
|
+
else
|
37
41
|
resetPresence
|
38
42
|
return "Xmpp Server Down: Reset Connected Users"
|
39
|
-
end
|
40
|
-
|
41
|
-
if SocialStream::Presence.remote_xmpp_server
|
42
|
-
command = buildCommand("synchronize_presence_script","",[])
|
43
|
-
executeCommand(command)
|
44
|
-
else
|
45
|
-
#SocialStream::Presence.remote_xmpp_server=false
|
46
|
-
|
47
|
-
#Get connected users locally
|
48
|
-
users = []
|
49
|
-
output = %x[ejabberdctl connected-users]
|
50
|
-
sessions = output.split("\n")
|
51
|
-
|
52
|
-
sessions.each do |session|
|
53
|
-
users << session.split("@")[0]
|
54
|
-
puts session.split("@")[0]
|
55
|
-
end
|
56
|
-
|
57
|
-
synchronizePresenceForSlugs(users)
|
58
|
-
|
59
|
-
end
|
43
|
+
end
|
60
44
|
end
|
61
45
|
|
62
46
|
|
@@ -93,6 +77,7 @@ module SocialStream
|
|
93
77
|
|
94
78
|
|
95
79
|
def synchronizePresenceForSlugs(user_slugs)
|
80
|
+
|
96
81
|
#Check connected users
|
97
82
|
users = User.find_all_by_connected(true)
|
98
83
|
|
@@ -211,7 +196,7 @@ module SocialStream
|
|
211
196
|
|
212
197
|
def isEjabberdNodeUp
|
213
198
|
output = executeEmanagementCommand("isEjabberdNodeStarted",[])
|
214
|
-
nodeUp = output.split("\n")[
|
199
|
+
nodeUp = output.split("\n")[0]
|
215
200
|
return (nodeUp and nodeUp.strip()=="true")
|
216
201
|
end
|
217
202
|
|
data/social_stream.gemspec
CHANGED
@@ -11,9 +11,10 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
|
13
13
|
# Gem dependencies
|
14
|
-
s.add_runtime_dependency('social_stream-base', '~> 0.10.
|
14
|
+
s.add_runtime_dependency('social_stream-base', '~> 0.10.4')
|
15
15
|
s.add_runtime_dependency('social_stream-documents', '~> 0.5.0')
|
16
16
|
s.add_runtime_dependency('social_stream-events', '~> 0.1.0')
|
17
|
+
s.add_runtime_dependency('social_stream-linkser', '~> 0.0.1')
|
17
18
|
|
18
19
|
# Development Gem dependencies
|
19
20
|
#
|
data/spec/dummy/db/schema.rb
CHANGED
data/spec/support/db.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
-
|
2
|
-
require 'social_stream/migrations/events'
|
1
|
+
gems = %w{ documents events linkser }
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
gems.each do |g|
|
4
|
+
require "social_stream/migrations/#{ g }"
|
5
|
+
end
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
gems.unshift("base")
|
8
|
+
|
9
|
+
gems.reverse.each do |g|
|
10
|
+
"SocialStream::Migrations::#{ g.camelize }".constantize.new.down
|
11
|
+
end
|
12
|
+
|
13
|
+
gems.each do |g|
|
14
|
+
"SocialStream::Migrations::#{ g.camelize }".constantize.new.up
|
15
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 14
|
9
|
+
- 0
|
10
|
+
version: 0.14.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- GING - DIT - UPM
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-12-
|
19
|
+
date: 2011-12-05 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -27,12 +27,12 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 63
|
31
31
|
segments:
|
32
32
|
- 0
|
33
33
|
- 10
|
34
|
-
-
|
35
|
-
version: 0.10.
|
34
|
+
- 4
|
35
|
+
version: 0.10.4
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id001
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -68,9 +68,25 @@ dependencies:
|
|
68
68
|
type: :runtime
|
69
69
|
version_requirements: *id003
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: social_stream-linkser
|
72
72
|
prerelease: false
|
73
73
|
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
hash: 29
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
- 0
|
82
|
+
- 1
|
83
|
+
version: 0.0.1
|
84
|
+
type: :runtime
|
85
|
+
version_requirements: *id004
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: capybara
|
88
|
+
prerelease: false
|
89
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
74
90
|
none: false
|
75
91
|
requirements:
|
76
92
|
- - ~>
|
@@ -82,11 +98,11 @@ dependencies:
|
|
82
98
|
- 9
|
83
99
|
version: 0.3.9
|
84
100
|
type: :development
|
85
|
-
version_requirements: *
|
101
|
+
version_requirements: *id005
|
86
102
|
- !ruby/object:Gem::Dependency
|
87
103
|
name: sqlite3
|
88
104
|
prerelease: false
|
89
|
-
requirement: &
|
105
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
90
106
|
none: false
|
91
107
|
requirements:
|
92
108
|
- - ">="
|
@@ -96,11 +112,11 @@ dependencies:
|
|
96
112
|
- 0
|
97
113
|
version: "0"
|
98
114
|
type: :development
|
99
|
-
version_requirements: *
|
115
|
+
version_requirements: *id006
|
100
116
|
- !ruby/object:Gem::Dependency
|
101
117
|
name: ruby-debug
|
102
118
|
prerelease: false
|
103
|
-
requirement: &
|
119
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
104
120
|
none: false
|
105
121
|
requirements:
|
106
122
|
- - ~>
|
@@ -112,11 +128,11 @@ dependencies:
|
|
112
128
|
- 3
|
113
129
|
version: 0.10.3
|
114
130
|
type: :development
|
115
|
-
version_requirements: *
|
131
|
+
version_requirements: *id007
|
116
132
|
- !ruby/object:Gem::Dependency
|
117
133
|
name: rspec-rails
|
118
134
|
prerelease: false
|
119
|
-
requirement: &
|
135
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
120
136
|
none: false
|
121
137
|
requirements:
|
122
138
|
- - ~>
|
@@ -128,11 +144,11 @@ dependencies:
|
|
128
144
|
- 0
|
129
145
|
version: 2.5.0
|
130
146
|
type: :development
|
131
|
-
version_requirements: *
|
147
|
+
version_requirements: *id008
|
132
148
|
- !ruby/object:Gem::Dependency
|
133
149
|
name: factory_girl
|
134
150
|
prerelease: false
|
135
|
-
requirement: &
|
151
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
136
152
|
none: false
|
137
153
|
requirements:
|
138
154
|
- - ~>
|
@@ -144,11 +160,11 @@ dependencies:
|
|
144
160
|
- 2
|
145
161
|
version: 1.3.2
|
146
162
|
type: :development
|
147
|
-
version_requirements: *
|
163
|
+
version_requirements: *id009
|
148
164
|
- !ruby/object:Gem::Dependency
|
149
165
|
name: forgery
|
150
166
|
prerelease: false
|
151
|
-
requirement: &
|
167
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
152
168
|
none: false
|
153
169
|
requirements:
|
154
170
|
- - ~>
|
@@ -160,11 +176,11 @@ dependencies:
|
|
160
176
|
- 6
|
161
177
|
version: 0.3.6
|
162
178
|
type: :development
|
163
|
-
version_requirements: *
|
179
|
+
version_requirements: *id010
|
164
180
|
- !ruby/object:Gem::Dependency
|
165
181
|
name: ci_reporter
|
166
182
|
prerelease: false
|
167
|
-
requirement: &
|
183
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
168
184
|
none: false
|
169
185
|
requirements:
|
170
186
|
- - ~>
|
@@ -176,7 +192,7 @@ dependencies:
|
|
176
192
|
- 4
|
177
193
|
version: 1.6.4
|
178
194
|
type: :development
|
179
|
-
version_requirements: *
|
195
|
+
version_requirements: *id011
|
180
196
|
description: Social Stream is a Ruby on Rails engine for building social network websites. It supports contacts, posts, file uploads, private messages and many more.
|
181
197
|
email:
|
182
198
|
executables: []
|
@@ -1126,9 +1142,20 @@ files:
|
|
1126
1142
|
- linkser/app/assets/javascripts/social_stream-linkser.js
|
1127
1143
|
- linkser/app/assets/stylesheets/linkser.css.scss
|
1128
1144
|
- linkser/app/assets/stylesheets/social_stream-linkser.css
|
1145
|
+
- linkser/app/controllers/links_controller.rb
|
1146
|
+
- linkser/app/controllers/linkser_controller.rb
|
1147
|
+
- linkser/app/models/link.rb
|
1148
|
+
- linkser/app/views/links/_link.html.erb
|
1149
|
+
- linkser/app/views/links/_link_preview.html.erb
|
1150
|
+
- linkser/app/views/links/_link_with_details.html.erb
|
1151
|
+
- linkser/app/views/links/create.js.erb
|
1152
|
+
- linkser/app/views/links/destroy.js.erb
|
1153
|
+
- linkser/app/views/links/show.html.erb
|
1154
|
+
- linkser/app/views/posts/_new_activity_fields.erb
|
1129
1155
|
- linkser/config/locales/en.yml
|
1130
1156
|
- linkser/config/locales/es.yml
|
1131
1157
|
- linkser/config/routes.rb
|
1158
|
+
- linkser/db/migrate/20111129100618_create_social_stream_linkser.rb
|
1132
1159
|
- linkser/lib/generators/social_stream/linkser/install_generator.rb
|
1133
1160
|
- linkser/lib/social_stream-linkser.rb
|
1134
1161
|
- linkser/lib/social_stream/linkser/engine.rb
|
@@ -1270,6 +1297,7 @@ files:
|
|
1270
1297
|
- presence/db/migrate/20111116194112_add_chat_enabled_column_to_user.rb
|
1271
1298
|
- presence/ejabberd/conf/ejabberd_example.cfg
|
1272
1299
|
- presence/ejabberd/conf/ssconfig_example.cfg
|
1300
|
+
- presence/ejabberd/ejabberd_files.zip
|
1273
1301
|
- presence/ejabberd/ejabberd_scripts/authentication_script
|
1274
1302
|
- presence/ejabberd/ejabberd_scripts/development_scripts/compile_module
|
1275
1303
|
- presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
|
@@ -1284,6 +1312,7 @@ files:
|
|
1284
1312
|
- presence/ejabberd/ejabberd_scripts/set_presence_script
|
1285
1313
|
- presence/ejabberd/ejabberd_scripts/synchronize_presence_script
|
1286
1314
|
- presence/ejabberd/ejabberd_scripts/unset_connection_script
|
1315
|
+
- presence/ejabberd/ejabberd_scripts/unset_presence_script
|
1287
1316
|
- presence/ejabberd/mod_admin_extra/mod_admin_extra.beam
|
1288
1317
|
- presence/ejabberd/mod_admin_extra/mod_admin_extra.erl
|
1289
1318
|
- presence/ejabberd/mod_sspresence/mod_sspresence.beam
|