social_stream 0.5.2 → 0.6.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/Gemfile +6 -3
- data/README.rdoc +3 -1
- data/lib/generators/social_stream/install_generator.rb +1 -0
- data/lib/social_stream/version.rb +1 -1
- data/lib/social_stream.rb +2 -0
- data/social_stream.gemspec +3 -2
- data/spec/dummy/.gitignore +1 -0
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/config/application.rb +3 -3
- data/spec/dummy/config/database.yml +4 -1
- data/spec/dummy/config/environments/development.rb +5 -4
- data/spec/dummy/config/environments/production.rb +18 -13
- data/spec/dummy/config/environments/test.rb +6 -2
- data/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
- data/spec/dummy/config/locales/en.yml +1 -1
- data/spec/dummy/config/navigation.rb +4 -0
- data/spec/dummy/config/relations.yml +8 -12
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/schema.rb +1 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/script/rails +1 -1
- data/spec/support/db.rb +1 -0
- data/spec/support/migrations.rb +4 -1
- metadata +24 -17
- data/spec/dummy/config/initializers/social_stream.rb +0 -17
data/Gemfile
CHANGED
@@ -7,10 +7,13 @@ source "http://rubygems.org"
|
|
7
7
|
# gem 'mailboxer', :path => '../mailboxer'
|
8
8
|
# gem 'avatars_for_rails', :path => '../avatars_for_rails'
|
9
9
|
|
10
|
-
# social_stream
|
11
|
-
|
10
|
+
# social_stream gems
|
11
|
+
%w(social_stream-base social_stream-documents).each do |g|
|
12
|
+
if File.exists?(File.join(File.dirname(__FILE__), '..', g))
|
13
|
+
gem g, :path => File.join('..', g)
|
14
|
+
end
|
15
|
+
end
|
12
16
|
|
13
|
-
# gem 'social_stream-files', :path => '../social_stream-files'
|
14
17
|
# gem 'social2social', :path => '../social2social'
|
15
18
|
|
16
19
|
gemspec
|
data/README.rdoc
CHANGED
@@ -52,7 +52,9 @@ Current Social Stream distribution includes:
|
|
52
52
|
|
53
53
|
* {Social Stream Base}[https://github.com/ging/social_stream-base], basic functionalities
|
54
54
|
along with users, group, post and comments
|
55
|
-
|
55
|
+
* {Social Stream Attachments}[https://github.com/ging/social_stream-attachments], support for
|
56
|
+
activities on files
|
57
|
+
|
56
58
|
= Documentation
|
57
59
|
|
58
60
|
{Social Stream documentation is available at rdoc.info}[http://rubydoc.info/gems/social_stream/frames]
|
data/lib/social_stream.rb
CHANGED
data/social_stream.gemspec
CHANGED
@@ -11,10 +11,11 @@ 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.
|
14
|
+
s.add_runtime_dependency('social_stream-base', '0.6.0')
|
15
|
+
s.add_runtime_dependency('social_stream-documents', '0.1.0')
|
15
16
|
|
16
17
|
# Development Gem dependencies
|
17
|
-
|
18
|
+
#
|
18
19
|
# Integration testing
|
19
20
|
s.add_development_dependency('capybara', '~> 0.3.9')
|
20
21
|
# Testing database
|
data/spec/dummy/.gitignore
CHANGED
Binary file
|
@@ -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
|
+
*/
|
File without changes
|
File without changes
|
@@ -33,13 +33,13 @@ module Dummy
|
|
33
33
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
34
|
# config.i18n.default_locale = :de
|
35
35
|
|
36
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
37
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
38
|
-
|
39
36
|
# Configure the default encoding used in templates for Ruby 1.9.
|
40
37
|
config.encoding = "utf-8"
|
41
38
|
|
42
39
|
# Configure sensitive parameters which will be filtered from the log file.
|
43
40
|
config.filter_parameters += [:password]
|
41
|
+
|
42
|
+
# Enable the asset pipeline
|
43
|
+
config.assets.enabled = true
|
44
44
|
end
|
45
45
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
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.
|
@@ -11,7 +11,6 @@ Dummy::Application.configure do
|
|
11
11
|
|
12
12
|
# Show full error reports and disable caching
|
13
13
|
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
15
14
|
config.action_controller.perform_caching = false
|
16
15
|
|
17
16
|
# Don't care if the mailer can't send
|
@@ -22,5 +21,7 @@ Dummy::Application.configure do
|
|
22
21
|
|
23
22
|
# Only use best-standards-support built into browsers
|
24
23
|
config.action_dispatch.best_standards_support = :builtin
|
25
|
-
end
|
26
24
|
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
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,21 @@ 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
|
+
# Specify the default JavaScript compressor
|
18
|
+
config.assets.js_compressor = :uglifier
|
14
19
|
|
15
|
-
#
|
16
|
-
#
|
20
|
+
# Specifies the header that your server uses for sending files
|
21
|
+
# (comment out if your front-end server doesn't support this)
|
22
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
|
17
23
|
|
18
|
-
#
|
19
|
-
#
|
24
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
25
|
+
# config.force_ssl = true
|
20
26
|
|
21
27
|
# See everything in the log (default is :info)
|
22
28
|
# config.log_level = :debug
|
@@ -27,13 +33,12 @@ Dummy::Application.configure do
|
|
27
33
|
# Use a different cache store in production
|
28
34
|
# config.cache_store = :mem_cache_store
|
29
35
|
|
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
|
36
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
35
37
|
# config.action_controller.asset_host = "http://assets.example.com"
|
36
38
|
|
39
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
40
|
+
# config.assets.precompile += %w( search.js )
|
41
|
+
|
37
42
|
# Disable delivery errors, bad email addresses will be ignored
|
38
43
|
# config.action_mailer.raise_delivery_errors = false
|
39
44
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
5
|
# test suite. You never need to work with it otherwise. Remember that
|
@@ -7,7 +7,11 @@ Dummy::Application.configure do
|
|
7
7
|
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
11
15
|
config.whiny_nils = true
|
12
16
|
|
13
17
|
# Show full error reports and disable caching
|
@@ -4,4 +4,4 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Dummy::Application.config.secret_token = '
|
7
|
+
Dummy::Application.config.secret_token = '6b2e621f2d394ff60baf61b1a514c5768287b1ba6bea8b39c962de3415c27b3c6c3cac409f8fbe708b2fbbbf833bf421a3691387fefcc47d6933107e4703fe8d'
|
@@ -4,5 +4,5 @@ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
8
|
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActionController::Base.wrap_parameters :format => [:json]
|
8
|
+
|
9
|
+
# Disable root element in JSON by default.
|
10
|
+
if defined?(ActiveRecord)
|
11
|
+
ActiveRecord::Base.include_root_in_json = false
|
12
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
-
# See
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
3
|
|
4
4
|
en:
|
5
5
|
hello: "Hello world"
|
@@ -12,21 +12,19 @@ user:
|
|
12
12
|
name: friend
|
13
13
|
permissions:
|
14
14
|
- [ follow ] # follow the activities of the friend
|
15
|
-
- [ create, activity ]
|
16
|
-
- [ read, activity,
|
17
|
-
- [ update, activity ] # update her activities
|
18
|
-
- [ destroy, activity ] # delete her activities
|
15
|
+
- [ create, activity, same_level ] # let the friend create activities
|
16
|
+
- [ read, activity, same_and_lower_levels ] # friend can read activities from the other friends and below
|
19
17
|
sphere: personal
|
20
18
|
acquaintance:
|
21
19
|
name: acquaintance
|
22
20
|
parent: friend # friend relation is stronger than acquaintance
|
23
21
|
permissions:
|
24
|
-
- [ read, activity,
|
22
|
+
- [ read, activity, same_and_lower_levels ]
|
25
23
|
sphere: personal
|
26
24
|
partner:
|
27
25
|
name: partner
|
28
26
|
permissions:
|
29
|
-
- [ read, activity,
|
27
|
+
- [ read, activity, same_and_lower_levels ]
|
30
28
|
sphere: work
|
31
29
|
|
32
30
|
group:
|
@@ -34,16 +32,14 @@ group:
|
|
34
32
|
name: member
|
35
33
|
permissions:
|
36
34
|
- [ represent ] # let the member act as the group
|
37
|
-
- [ create, activity ]
|
38
|
-
- [ read, activity,
|
39
|
-
- [
|
40
|
-
- [ destroy, activity ] # delete her activities
|
41
|
-
- [ read, tie, weak_star_ties ]
|
35
|
+
- [ create, activity, same_and_lower_levels ] # let them member create activities
|
36
|
+
- [ read, activity, same_and_lower_levels ] # read activities from other members
|
37
|
+
- [ read, tie, same_and_lower_levels ]
|
42
38
|
sphere: organization
|
43
39
|
partner:
|
44
40
|
name: partner
|
45
41
|
parent: member # member is stronger than partner
|
46
42
|
permissions:
|
47
|
-
- [ read, activity,
|
43
|
+
- [ read, activity, same_and_lower_levels ]
|
48
44
|
sphere: external_relations
|
49
45
|
|
data/spec/dummy/config/routes.rb
CHANGED
@@ -50,7 +50,7 @@ Dummy::Application.routes.draw do
|
|
50
50
|
|
51
51
|
# You can have the root of your site routed with "root"
|
52
52
|
# just remember to delete public/index.html.
|
53
|
-
# root :to =>
|
53
|
+
# root :to => 'welcome#index'
|
54
54
|
|
55
55
|
# See how all your routes lay out with "rake routes"
|
56
56
|
|
data/spec/dummy/db/schema.rb
CHANGED
data/spec/dummy/script/rails
CHANGED
data/spec/support/db.rb
CHANGED
data/spec/support/migrations.rb
CHANGED
@@ -11,7 +11,7 @@ end
|
|
11
11
|
|
12
12
|
# Social Stream Base
|
13
13
|
MigrationFinder.new 'social_stream-base',
|
14
|
-
['
|
14
|
+
['..', 'db', 'migrate', '20110610112023_create_social_stream']
|
15
15
|
|
16
16
|
# acts-as-taggable-on
|
17
17
|
MigrationFinder.new 'acts-as-taggable-on',
|
@@ -21,3 +21,6 @@ MigrationFinder.new 'acts-as-taggable-on',
|
|
21
21
|
MigrationFinder.new 'mailboxer',
|
22
22
|
['generators', 'mailboxer', 'templates', 'migration']
|
23
23
|
|
24
|
+
# Social Stream Documents
|
25
|
+
MigrationFinder.new 'social_stream-documents',
|
26
|
+
['..', 'db', 'migrate', '20110615143707_create_social_stream_documents.rb']
|
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: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.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-
|
19
|
+
date: 2011-07-04 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -27,29 +27,29 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - "="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 7
|
31
31
|
segments:
|
32
32
|
- 0
|
33
|
-
-
|
34
|
-
-
|
35
|
-
version: 0.
|
33
|
+
- 6
|
34
|
+
- 0
|
35
|
+
version: 0.6.0
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id001
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: social_stream-documents
|
40
40
|
prerelease: false
|
41
41
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - "="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
hash:
|
46
|
+
hash: 27
|
47
47
|
segments:
|
48
|
-
- 3
|
49
48
|
- 0
|
50
|
-
-
|
51
|
-
|
52
|
-
|
49
|
+
- 1
|
50
|
+
- 0
|
51
|
+
version: 0.1.0
|
52
|
+
type: :runtime
|
53
53
|
version_requirements: *id002
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: capybara
|
@@ -187,8 +187,13 @@ files:
|
|
187
187
|
- spec/controllers/frontpage_controller_spec.rb
|
188
188
|
- spec/dummy/.gitignore
|
189
189
|
- spec/dummy/Rakefile
|
190
|
+
- spec/dummy/app/assets/images/rails.png
|
191
|
+
- spec/dummy/app/assets/javascripts/application.js
|
192
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
190
193
|
- spec/dummy/app/controllers/application_controller.rb
|
191
194
|
- spec/dummy/app/helpers/application_helper.rb
|
195
|
+
- spec/dummy/app/mailers/.gitkeep
|
196
|
+
- spec/dummy/app/models/.gitkeep
|
192
197
|
- spec/dummy/config.ru
|
193
198
|
- spec/dummy/config/application.rb
|
194
199
|
- spec/dummy/config/boot.rb
|
@@ -205,8 +210,9 @@ files:
|
|
205
210
|
- spec/dummy/config/initializers/mime_types.rb
|
206
211
|
- spec/dummy/config/initializers/secret_token.rb
|
207
212
|
- spec/dummy/config/initializers/session_store.rb
|
208
|
-
- spec/dummy/config/initializers/
|
213
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
209
214
|
- spec/dummy/config/locales/en.yml
|
215
|
+
- spec/dummy/config/navigation.rb
|
210
216
|
- spec/dummy/config/relations.yml
|
211
217
|
- spec/dummy/config/routes.rb
|
212
218
|
- spec/dummy/db/migrate/.gitkeep
|
@@ -216,6 +222,7 @@ files:
|
|
216
222
|
- spec/dummy/public/422.html
|
217
223
|
- spec/dummy/public/500.html
|
218
224
|
- spec/dummy/public/favicon.ico
|
225
|
+
- spec/dummy/public/robots.txt
|
219
226
|
- spec/dummy/script/rails
|
220
227
|
- spec/integration/navigation_spec.rb
|
221
228
|
- spec/social_stream_spec.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
SocialStream.setup do |config|
|
2
|
-
# List the models that are social entities. These will have ties between them.
|
3
|
-
# Remember you must add an "actor_id" foreign key column to your migration!
|
4
|
-
#
|
5
|
-
# config.subjects = [:user, :group ]
|
6
|
-
|
7
|
-
# Include devise modules in User. See devise documentation for details.
|
8
|
-
# Others available are:
|
9
|
-
# :token_authenticatable, :confirmable, :lockable, :timeoutable, :validatable
|
10
|
-
# config.devise_modules :database_authenticatable, :registerable,
|
11
|
-
# :recoverable, :rememberable, :trackable, :omniauthable
|
12
|
-
|
13
|
-
# Type of activities managed by actors
|
14
|
-
# Remember you must add an "activity_object_id" foreign key column to your migration!
|
15
|
-
#
|
16
|
-
# config.objects = [ :post, :comment ]
|
17
|
-
end
|