social_stream 0.16.3 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.rdoc +1 -0
- data/base/LICENSE +1 -1
- data/base/README.rdoc +1 -1
- data/base/app/assets/stylesheets/header.css.scss +9 -7
- data/base/app/controllers/groups_controller.rb +3 -4
- data/base/app/controllers/settings_controller.rb +14 -3
- data/base/app/controllers/users_controller.rb +3 -4
- data/base/app/helpers/permissions_helper.rb +2 -1
- data/base/app/models/activity_object.rb +29 -28
- data/base/app/models/actor.rb +27 -19
- data/base/app/models/channel.rb +48 -0
- data/base/app/views/contacts/_pendings.html.erb +1 -1
- data/base/app/views/devise/registrations/_edit_user.html.erb +0 -25
- data/base/app/views/devise/registrations/edit.html.erb +1 -0
- data/base/app/views/layouts/_footer.html.erb +1 -1
- data/base/app/views/layouts/_header_dropdown_menu_sessions.html.erb +5 -2
- data/base/app/views/settings/_language.html.erb +32 -0
- data/base/app/views/settings/_notifications.html.erb +1 -1
- data/base/config/locales/en.yml +5 -0
- data/base/config/locales/es.yml +7 -0
- data/base/db/migrate/20120103103125_add_channels.rb +88 -0
- data/base/db/migrate/20120109081509_update_notify_permissions.rb +15 -0
- data/base/lib/social_stream-base.rb +7 -4
- data/base/lib/social_stream/base/engine.rb +10 -2
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/lib/social_stream/controllers/i18n_integration.rb +29 -0
- data/base/lib/social_stream/controllers/subjects.rb +19 -0
- data/base/lib/social_stream/models/object.rb +12 -26
- data/base/lib/social_stream/models/subject.rb +2 -24
- data/base/lib/social_stream/models/subtype.rb +80 -0
- data/base/lib/social_stream/models/supertype.rb +16 -3
- data/base/lib/social_stream/views/settings/base.rb +5 -0
- data/base/lib/tasks/db/populate.rake +1 -0
- data/base/spec/controllers/settings_controller_spec.rb +1 -1
- data/base/spec/spec_helper.rb +3 -0
- data/documents/app/assets/stylesheets/documents.css.scss +9 -0
- data/documents/app/controllers/documents_controller.rb +3 -2
- data/documents/app/models/document.rb +1 -1
- data/documents/app/views/documents/_new_activity_fields.html.erb +14 -0
- data/documents/app/views/videos/_video_show.html.erb +23 -19
- data/documents/config/locales/en.yml +6 -2
- data/documents/config/locales/es.yml +6 -2
- data/documents/db/migrate/20120109155431_document_object_type.rb +16 -0
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +2 -2
- data/documents/spec/dummy/Rakefile +1 -1
- data/documents/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/documents/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/documents/spec/dummy/app/views/layouts/application.html.erb +3 -3
- data/documents/spec/dummy/config/application.rb +8 -8
- data/documents/spec/dummy/config/database.yml +3 -0
- data/documents/spec/dummy/config/environments/development.rb +7 -2
- data/documents/spec/dummy/config/environments/production.rb +23 -12
- data/documents/spec/dummy/config/environments/test.rb +5 -3
- data/documents/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/documents/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/documents/spec/dummy/config/locales/en.yml +1 -1
- data/documents/spec/dummy/config/routes.rb +1 -1
- data/documents/spec/dummy/db/schema.rb +6 -0
- data/events/app/assets/stylesheets/events.css.scss +3 -0
- data/events/app/helpers/events_helper.rb +11 -1
- data/events/app/models/event.rb +12 -1
- data/events/lib/social_stream/events/models/actor.rb +6 -0
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/lib/social_stream/views/sidebar/events.rb +4 -2
- data/events/social_stream-events.gemspec +2 -2
- 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/lib/tasks/migrations.rake +14 -0
- data/linkser/app/assets/javascripts/linkser.js.erb +3 -3
- data/linkser/lib/social_stream/linkser/version.rb +1 -1
- data/linkser/social_stream-linkser.gemspec +2 -2
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/presence/social_stream-presence.gemspec +1 -1
- data/social_stream.gemspec +9 -6
- data/spec/dummy/config/application.rb +5 -5
- data/spec/dummy/config/environments/development.rb +3 -0
- data/spec/dummy/config/environments/production.rb +10 -4
- data/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +5 -3
- data/spec/dummy/db/schema.rb +2 -8
- data/spec/dummy/script/rails +0 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/db.rb +1 -1
- metadata +51 -31
- data/base/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
@@ -2,9 +2,10 @@ require 'active_support/concern'
|
|
2
2
|
|
3
3
|
module SocialStream #:nodoc:
|
4
4
|
module Models
|
5
|
-
# Common methods for models
|
6
|
-
#
|
7
|
-
# *
|
5
|
+
# Common methods for models having many {SocialStream::Models::Subtype subtypes}.
|
6
|
+
# Currently, there are two {SocialStream::Models::Supertype supertypes}:
|
7
|
+
# * {Actor}: participates in the social network and has {Tie Ties} with other actors. Its subtypes are {SocialStream::Models::Subject subjects}, such as {User} or {Group}
|
8
|
+
# * {ActivityObject}: created and managed by {Actor Actors} in {Activity Activities}. Its subtypes are {SocialStream::Models::Object objects}, like {Post} or {Comment}
|
8
9
|
module Supertype
|
9
10
|
extend ActiveSupport::Concern
|
10
11
|
|
@@ -32,6 +33,18 @@ module SocialStream #:nodoc:
|
|
32
33
|
end # end
|
33
34
|
end
|
34
35
|
end
|
36
|
+
|
37
|
+
module ActiveRecord
|
38
|
+
extend ActiveSupport::Concern
|
39
|
+
|
40
|
+
module ClassMethods
|
41
|
+
# This class is a supertype. Subtype classes are known as name
|
42
|
+
def supertype_of name
|
43
|
+
@subtypes_name = name
|
44
|
+
include SocialStream::Models::Supertype
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
35
48
|
end
|
36
49
|
end
|
37
50
|
end
|
data/base/spec/spec_helper.rb
CHANGED
@@ -39,8 +39,9 @@ class DocumentsController < ApplicationController
|
|
39
39
|
path = resource.file.path(params[:style] || params[:format])
|
40
40
|
|
41
41
|
send_file path,
|
42
|
-
|
43
|
-
|
42
|
+
:filename => resource.file_file_name,
|
43
|
+
:disposition => "inline",
|
44
|
+
:type => request.format
|
44
45
|
}
|
45
46
|
end
|
46
47
|
end
|
@@ -1 +1,15 @@
|
|
1
1
|
<%= f.file_field :file %>
|
2
|
+
|
3
|
+
<div id="new_document_title_wrapper">
|
4
|
+
<%= f.label :title %> <%= f.text_field :title %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<%= javascript_tag do %>
|
8
|
+
$(function() {
|
9
|
+
$('#new_document_title_wrapper').hide();
|
10
|
+
$('#document_file').change(function(){
|
11
|
+
$('#new_document_title_wrapper').show();
|
12
|
+
$("#document_title").val($(this).val().replace(/C:\\fakepath\\/i, ''));
|
13
|
+
});
|
14
|
+
});
|
15
|
+
<% end %>
|
@@ -1,21 +1,3 @@
|
|
1
|
-
<% content_for :javascript do %>
|
2
|
-
|
3
|
-
$("#jpId<%=video.id%>").jPlayer( {
|
4
|
-
ready: function () {
|
5
|
-
$(this).jPlayer("setMedia", {
|
6
|
-
webmv: "<%= video_url(video, :format => 'webm' ) %>", // Defines the webm url
|
7
|
-
flv: "<%= video_url(video, :format => 'flv') %>"
|
8
|
-
});
|
9
|
-
},
|
10
|
-
solution:"flash, html",
|
11
|
-
preload: "none",
|
12
|
-
supplied: "webmv, flv",
|
13
|
-
swfPath: "assets",
|
14
|
-
cssSelectorAncestor: "#jp_interface_<%=video.id%>"
|
15
|
-
});
|
16
|
-
|
17
|
-
<% end %>
|
18
|
-
|
19
1
|
<%= div_for video, :class => 'content_size' do %>
|
20
2
|
<div class="video_show">
|
21
3
|
<% if video.file_processing %>
|
@@ -58,7 +40,29 @@
|
|
58
40
|
</div>
|
59
41
|
<div id="jp_playlist_<%= video.id%>" class="jp-playlist"></div>
|
60
42
|
</div>
|
43
|
+
<div id="inspector"></div>
|
61
44
|
</div>
|
62
45
|
<% end %>
|
63
46
|
</div>
|
64
|
-
<% end %>
|
47
|
+
<% end %>
|
48
|
+
|
49
|
+
<%= javascript_tag do %>
|
50
|
+
$(function() {
|
51
|
+
<% unless video.file_processing %>
|
52
|
+
$("#jpId<%=video.id%>").jPlayer( {
|
53
|
+
ready: function () {
|
54
|
+
$(this).jPlayer("setMedia", {
|
55
|
+
webmv: "<%= video_url(video, :format => 'webm' ) %>", // Defines the webm url
|
56
|
+
flv: "<%= video_url(video, :format => 'flv') %>"
|
57
|
+
});
|
58
|
+
},
|
59
|
+
solution:"flash, html",
|
60
|
+
preload: "none",
|
61
|
+
supplied: "webmv, flv",
|
62
|
+
swfPath: "assets",
|
63
|
+
cssSelectorAncestor: "#jp_interface_<%=video.id%>"
|
64
|
+
});
|
65
|
+
<% end %>
|
66
|
+
});
|
67
|
+
<% end %>
|
68
|
+
|
@@ -1,4 +1,8 @@
|
|
1
1
|
en:
|
2
|
+
activerecord:
|
3
|
+
attributes:
|
4
|
+
document:
|
5
|
+
title: "Title"
|
2
6
|
audio:
|
3
7
|
confirm_delete: "Delete audio?"
|
4
8
|
title: "Audios"
|
@@ -7,7 +11,7 @@ en:
|
|
7
11
|
name: "audio"
|
8
12
|
not_mine: "Audios"
|
9
13
|
one: "an audio"
|
10
|
-
processing: "Processing audio clip"
|
14
|
+
processing: "Processing audio clip. Please wait..."
|
11
15
|
document:
|
12
16
|
actions:
|
13
17
|
delete: "Delete"
|
@@ -64,4 +68,4 @@ en:
|
|
64
68
|
name: "video"
|
65
69
|
not_mine: "Videos"
|
66
70
|
one: "a video"
|
67
|
-
processing: "Processing video"
|
71
|
+
processing: "Processing video. Please, wait..."
|
@@ -1,4 +1,8 @@
|
|
1
1
|
es:
|
2
|
+
activerecord:
|
3
|
+
attributes:
|
4
|
+
document:
|
5
|
+
title: "Título"
|
2
6
|
audio:
|
3
7
|
confirm_delete: "¿Borrar audios?"
|
4
8
|
title: "Audios"
|
@@ -7,7 +11,7 @@ es:
|
|
7
11
|
name: "archivo de audio"
|
8
12
|
not_mine: "Audios"
|
9
13
|
one: "un archivo de audio"
|
10
|
-
processing: "Procesando fichero de audio..."
|
14
|
+
processing: "Procesando fichero de audio. Espere, por favor..."
|
11
15
|
document:
|
12
16
|
actions:
|
13
17
|
delete: "Borrar"
|
@@ -64,4 +68,4 @@ es:
|
|
64
68
|
name: "vídeo"
|
65
69
|
not_mine: "Vídeos"
|
66
70
|
one: "un vídeo"
|
67
|
-
processing: "Procesando vídeo..."
|
71
|
+
processing: "Procesando vídeo. Espere, por favor..."
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class DocumentObjectType < ActiveRecord::Migration
|
2
|
+
class ActivityObjectMigration < ActiveRecord::Base
|
3
|
+
self.record_timestamps = false
|
4
|
+
set_table_name "activity_objects"
|
5
|
+
end
|
6
|
+
|
7
|
+
def up
|
8
|
+
ActivityObjectMigration.where(:object_type => %w( Picture Audio Video )).each do |a|
|
9
|
+
a.object_type = "Document"
|
10
|
+
a.save!
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def down
|
15
|
+
end
|
16
|
+
end
|
@@ -12,7 +12,7 @@ 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.
|
15
|
+
s.add_runtime_dependency('social_stream-base', '~> 0.12.0')
|
16
16
|
s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
|
17
17
|
# Waiting for version > 2.4.5, which fixes:
|
18
18
|
# https://github.com/thoughtbot/paperclip/issues/293
|
@@ -25,6 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
end
|
26
26
|
s.add_development_dependency('rspec-rails', '~> 2.6.0')
|
27
27
|
s.add_development_dependency('factory_girl', '~> 1.3.2')
|
28
|
-
s.add_development_dependency('forgery', '~> 0.
|
28
|
+
s.add_development_dependency('forgery', '~> 0.4.2')
|
29
29
|
s.add_development_dependency('capybara', '~> 0.3.9')
|
30
30
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
1
2
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
3
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
4
|
|
4
5
|
require File.expand_path('../config/application', __FILE__)
|
5
|
-
require 'rake'
|
6
6
|
|
7
7
|
Dummy::Application.load_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
@@ -2,9 +2,9 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag
|
6
|
-
<%= javascript_include_tag
|
7
|
-
<%=
|
5
|
+
<%= stylesheet_link_tag "application" %>
|
6
|
+
<%= javascript_include_tag "application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
8
|
</head>
|
9
9
|
<body>
|
10
10
|
|
@@ -1,10 +1,6 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
-
require
|
4
|
-
require "active_record/railtie"
|
5
|
-
require "action_controller/railtie"
|
6
|
-
require "action_view/railtie"
|
7
|
-
require "action_mailer/railtie"
|
3
|
+
require 'rails/all'
|
8
4
|
|
9
5
|
Bundler.require
|
10
6
|
require "social_stream-documents"
|
@@ -33,13 +29,17 @@ module Dummy
|
|
33
29
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
30
|
# config.i18n.default_locale = :de
|
35
31
|
|
36
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
37
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
38
|
-
|
39
32
|
# Configure the default encoding used in templates for Ruby 1.9.
|
40
33
|
config.encoding = "utf-8"
|
41
34
|
|
42
35
|
# Configure sensitive parameters which will be filtered from the log file.
|
43
36
|
config.filter_parameters += [:password]
|
37
|
+
|
38
|
+
# Enable the asset pipeline
|
39
|
+
config.assets.enabled = true
|
40
|
+
|
41
|
+
# Version of your assets, change this if you want to expire all your assets
|
42
|
+
config.assets.version = '1.0'
|
44
43
|
end
|
45
44
|
end
|
45
|
+
|
@@ -3,7 +3,7 @@ Dummy::Application.configure do
|
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
5
|
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
9
|
# Log error messages when you accidentally call methods on nil.
|
@@ -21,5 +21,10 @@ Dummy::Application.configure do
|
|
21
21
|
|
22
22
|
# Only use best-standards-support built into browsers
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
end
|
25
24
|
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
|
-
# The production environment is meant for finished, "live" apps.
|
5
4
|
# Code is not reloaded between requests
|
6
5
|
config.cache_classes = true
|
7
6
|
|
@@ -9,14 +8,27 @@ Dummy::Application.configure do
|
|
9
8
|
config.consider_all_requests_local = false
|
10
9
|
config.action_controller.perform_caching = true
|
11
10
|
|
12
|
-
#
|
13
|
-
config.
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
14
22
|
|
15
|
-
#
|
16
|
-
# config.
|
23
|
+
# Defaults to Rails.root.join("public/assets")
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
17
25
|
|
18
|
-
#
|
19
|
-
#
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
20
32
|
|
21
33
|
# See everything in the log (default is :info)
|
22
34
|
# config.log_level = :debug
|
@@ -27,13 +39,12 @@ Dummy::Application.configure do
|
|
27
39
|
# Use a different cache store in production
|
28
40
|
# config.cache_store = :mem_cache_store
|
29
41
|
|
30
|
-
#
|
31
|
-
# In production, Apache or nginx will already do this
|
32
|
-
config.serve_static_assets = false
|
33
|
-
|
34
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
42
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
35
43
|
# config.action_controller.asset_host = "http://assets.example.com"
|
36
44
|
|
45
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
46
|
+
# config.assets.precompile += %w( search.js )
|
47
|
+
|
37
48
|
# Disable delivery errors, bad email addresses will be ignored
|
38
49
|
# config.action_mailer.raise_delivery_errors = false
|
39
50
|
|