social_stream 0.12.14 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/base/app/controllers/groups_controller.rb +3 -2
- data/base/app/controllers/posts_controller.rb +2 -10
- data/base/app/helpers/activities_helper.rb +2 -1
- data/base/app/models/activity_object.rb +28 -0
- data/base/app/models/actor.rb +10 -0
- data/base/app/models/group.rb +7 -3
- data/base/app/models/user.rb +7 -2
- data/base/app/views/activities/_new.html.erb +0 -1
- data/base/app/views/activity_objects/_activity_object.html.erb +3 -3
- data/base/app/views/comments/_new.html.erb +2 -3
- data/base/app/views/groups/_new.html.erb +0 -3
- data/base/app/views/notifications/activities/_like.text.erb +1 -1
- data/base/app/views/objects/_new_activity.html.erb +2 -2
- data/base/app/views/objects/_show.html.erb +1 -1
- data/base/db/migrate/20111124100618_object_actors.rb +50 -0
- data/base/lib/social_stream-base.rb +2 -1
- data/base/lib/social_stream/ability/base.rb +1 -1
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/lib/social_stream/controllers/objects.rb +33 -0
- data/base/lib/social_stream/models/object.rb +33 -28
- data/base/lib/social_stream/test_helpers/controllers.rb +3 -1
- data/base/lib/tasks/db/populate.rake +9 -2
- data/base/spec/controllers/comments_controller_spec.rb +9 -6
- data/base/spec/controllers/groups_controller_spec.rb +7 -5
- data/base/spec/controllers/posts_controller_spec.rb +45 -9
- data/base/spec/controllers/users_controller_spec.rb +3 -1
- data/base/spec/factories/activity.rb +3 -2
- data/base/spec/factories/comment.rb +3 -2
- data/base/spec/factories/group.rb +2 -1
- data/base/spec/factories/post.rb +5 -4
- data/base/spec/models/activity_authorization_spec.rb +5 -4
- data/base/spec/models/group_spec.rb +5 -2
- data/base/spec/models/post_spec.rb +6 -2
- data/documents/app/assets/stylesheets/show.css.scss +4 -0
- data/documents/app/controllers/documents_controller.rb +2 -10
- data/documents/app/views/audios/_audio_processed.html.erb +1 -1
- data/documents/app/views/audios/_audio_processing.html.erb +1 -1
- data/documents/app/views/common_documents/_document_info.html.erb +5 -0
- data/documents/app/views/documents/_document.html.erb +1 -1
- data/documents/app/views/pictures/_picture.html.erb +4 -4
- data/documents/app/views/videos/_video_processed.html.erb +1 -1
- data/documents/app/views/videos/_video_processing.html.erb +1 -1
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +1 -1
- data/documents/spec/factories/document.rb +7 -6
- data/documents/spec/factories/picture.rb +7 -6
- data/documents/spec/spec_helper.rb +6 -1
- data/events/db/migrate/20111102145626_add_more_fields_to_events.rb +0 -4
- data/events/db/migrate/20111104182420_add_details_to_events.rb +0 -26
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/social_stream-events.gemspec +1 -1
- data/lib/social_stream/version.rb +1 -1
- data/linkser/.gitignore +14 -0
- data/linkser/.rspec +1 -0
- data/linkser/Gemfile +5 -0
- data/linkser/MIT-LICENSE +20 -0
- data/linkser/README.rdoc +6 -0
- data/linkser/Rakefile +26 -0
- data/{documents/app/views/audios/_mediapreviews.html.erb → linkser/app/assets/javascripts/linkser.js.erb} +0 -0
- data/linkser/app/assets/javascripts/social_stream-linkser.js +1 -0
- data/linkser/app/assets/stylesheets/linkser.css.scss +1 -0
- data/linkser/app/assets/stylesheets/social_stream-linkser.css +3 -0
- data/linkser/config/locales/en.yml +3 -0
- data/linkser/config/locales/es.yml +3 -0
- data/linkser/config/routes.rb +3 -0
- data/linkser/lib/generators/social_stream/linkser/install_generator.rb +24 -0
- data/linkser/lib/social_stream-linkser.rb +9 -0
- data/linkser/lib/social_stream/linkser/engine.rb +7 -0
- data/linkser/lib/social_stream/linkser/version.rb +5 -0
- data/linkser/lib/social_stream/migrations/linkser.rb +9 -0
- data/linkser/social_stream-linkser.gemspec +26 -0
- data/linkser/spec/dummy/Rakefile +7 -0
- data/linkser/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/linkser/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/linkser/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/linkser/spec/dummy/config.ru +4 -0
- data/linkser/spec/dummy/config/application.rb +45 -0
- data/linkser/spec/dummy/config/boot.rb +10 -0
- data/linkser/spec/dummy/config/database.yml +22 -0
- data/linkser/spec/dummy/config/environment.rb +5 -0
- data/linkser/spec/dummy/config/environments/development.rb +25 -0
- data/linkser/spec/dummy/config/environments/production.rb +49 -0
- data/linkser/spec/dummy/config/environments/test.rb +37 -0
- data/linkser/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/linkser/spec/dummy/config/initializers/devise.rb +176 -0
- data/linkser/spec/dummy/config/initializers/inflections.rb +10 -0
- data/linkser/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/linkser/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/linkser/spec/dummy/config/initializers/session_store.rb +8 -0
- data/linkser/spec/dummy/config/locales/en.yml +5 -0
- data/linkser/spec/dummy/config/navigation.rb +0 -0
- data/linkser/spec/dummy/config/relations.yml +39 -0
- data/linkser/spec/dummy/config/routes.rb +60 -0
- data/linkser/spec/dummy/db/.gitkeep +0 -0
- data/linkser/spec/dummy/documents/documents/000/000/001/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/002/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/003/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/004/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/005/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/006/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/007/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/008/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/009/original.pdf +157 -0
- data/linkser/spec/dummy/documents/documents/000/000/010/original.pdf +157 -0
- data/linkser/spec/dummy/documents/pictures/000/000/011/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/011/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/011/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/012/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/012/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/012/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/013/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/013/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/013/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/014/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/014/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/014/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/015/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/015/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/015/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/016/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/016/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/016/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/017/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/017/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/017/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/018/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/018/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/018/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/019/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/019/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/019/thumb0.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/020/original.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/020/thumb.png +0 -0
- data/linkser/spec/dummy/documents/pictures/000/000/020/thumb0.png +0 -0
- data/linkser/spec/dummy/public/404.html +26 -0
- data/linkser/spec/dummy/public/422.html +26 -0
- data/linkser/spec/dummy/public/500.html +26 -0
- data/linkser/spec/dummy/public/favicon.ico +0 -0
- data/linkser/spec/dummy/public/javascripts/application.js +2 -0
- data/linkser/spec/dummy/public/javascripts/controls.js +965 -0
- data/linkser/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/linkser/spec/dummy/public/javascripts/effects.js +1123 -0
- data/linkser/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/linkser/spec/dummy/public/javascripts/rails.js +191 -0
- data/linkser/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/linkser/spec/dummy/script/rails +6 -0
- data/linkser/spec/integration/navigation_spec.rb +9 -0
- data/linkser/spec/socialstream_linkser_spec.rb +7 -0
- data/linkser/spec/spec_helper.rb +48 -0
- data/linkser/spec/support/cancan.rb +1 -0
- data/linkser/spec/support/db.rb +8 -0
- data/linkser/spec/support/devise.rb +4 -0
- data/linkser/spec/support/mock.rb +4 -0
- data/linkser/vendor/assets/javascripts/jquery.jplayer.js +78 -0
- data/linkser/vendor/assets/stylesheets/jplayer.blue.monday.css +448 -0
- data/linkser/vendor/assets/stylesheets/jplayer.blue.monday.jpg +0 -0
- data/linkser/vendor/assets/stylesheets/jplayer.blue.monday.video.play.hover.png +0 -0
- data/linkser/vendor/assets/stylesheets/jplayer.blue.monday.video.play.png +0 -0
- data/linkser/vendor/assets/stylesheets/jquery.lightbox.css +101 -0
- data/linkser/vendor/assets/stylesheets/pbar-ani.gif +0 -0
- data/presence/app/assets/images/status/offline.png +0 -0
- data/presence/app/assets/javascripts/chat_interface_manager.js.erb +65 -16
- data/presence/app/assets/javascripts/xmpp_client_management.js.erb +13 -3
- data/presence/app/controllers/xmpp_controller.rb +2 -5
- data/presence/app/views/chat/_contacts.html.erb +10 -9
- data/presence/app/views/chat/_settings.html.erb +4 -4
- data/presence/app/views/xmpp/active_users.html.erb +10 -10
- data/presence/config/locales/en.yml +6 -1
- data/presence/config/locales/es.yml +7 -1
- data/presence/config/routes.rb +1 -4
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/social_stream.gemspec +3 -3
- metadata +127 -23
- data/documents/app/views/audios/index.js.erb +0 -1
- data/documents/app/views/documents/index.js.erb +0 -1
- data/documents/app/views/pictures/_mediapreviews.html.erb +0 -8
- data/documents/app/views/pictures/index.js.erb +0 -1
- data/presence/app/views/xmpp/index.html +0 -18
- data/presence/app/views/xmpp/test.html.erb +0 -11
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The production environment is meant for finished, "live" apps.
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Specifies the header that your server uses for sending files
|
13
|
+
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
+
|
15
|
+
# For nginx:
|
16
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
+
|
18
|
+
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
+
# just comment this out and Rails will serve the files
|
20
|
+
|
21
|
+
# See everything in the log (default is :info)
|
22
|
+
# config.log_level = :debug
|
23
|
+
|
24
|
+
# Use a different logger for distributed setups
|
25
|
+
# config.logger = SyslogLogger.new
|
26
|
+
|
27
|
+
# Use a different cache store in production
|
28
|
+
# config.cache_store = :mem_cache_store
|
29
|
+
|
30
|
+
# Disable Rails's static asset server
|
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
|
35
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
+
|
37
|
+
# Disable delivery errors, bad email addresses will be ignored
|
38
|
+
# config.action_mailer.raise_delivery_errors = false
|
39
|
+
|
40
|
+
# Enable threaded mode
|
41
|
+
# config.threadsafe!
|
42
|
+
|
43
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
44
|
+
# the I18n.default_locale when a translation can not be found)
|
45
|
+
config.i18n.fallbacks = true
|
46
|
+
|
47
|
+
# Send deprecation notices to registered listeners
|
48
|
+
config.active_support.deprecation = :notify
|
49
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
|
36
|
+
config.assets.enabled = true
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,176 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
2
|
+
# four configuration values can also be set straight in your models.
|
3
|
+
Devise.setup do |config|
|
4
|
+
# ==> Mailer Configuration
|
5
|
+
# Configure the e-mail address which will be shown in DeviseMailer.
|
6
|
+
config.mailer_sender = "please-change-me@config-initializers-devise.com"
|
7
|
+
|
8
|
+
# Configure the class responsible to send e-mails.
|
9
|
+
# config.mailer = "Devise::Mailer"
|
10
|
+
|
11
|
+
# ==> ORM configuration
|
12
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
13
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
14
|
+
# available as additional gems.
|
15
|
+
require 'devise/orm/active_record'
|
16
|
+
|
17
|
+
# ==> Configuration for any authentication mechanism
|
18
|
+
# Configure which keys are used when authenticating a user. The default is
|
19
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
20
|
+
# authenticating a user, both parameters are required. Remember that those
|
21
|
+
# parameters are used only when authenticating and not when retrieving from
|
22
|
+
# session. If you need permissions, you should implement that in a before filter.
|
23
|
+
# You can also supply a hash where the value is a boolean determining whether
|
24
|
+
# or not authentication should be aborted when the value is not present.
|
25
|
+
# config.authentication_keys = [ :email ]
|
26
|
+
|
27
|
+
# Configure parameters from the request object used for authentication. Each entry
|
28
|
+
# given should be a request method and it will automatically be passed to the
|
29
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
30
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
31
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
32
|
+
# config.request_keys = []
|
33
|
+
|
34
|
+
# Configure which authentication keys should be case-insensitive.
|
35
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
36
|
+
# to authenticate or find a user. Default is :email.
|
37
|
+
# config.case_insensitive_keys = [ :email ]
|
38
|
+
|
39
|
+
# Tell if authentication through request.params is enabled. True by default.
|
40
|
+
# config.params_authenticatable = true
|
41
|
+
|
42
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
43
|
+
# config.http_authenticatable = false
|
44
|
+
|
45
|
+
# If http headers should be returned for AJAX requests. True by default.
|
46
|
+
# config.http_authenticatable_on_xhr = true
|
47
|
+
|
48
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
49
|
+
# config.http_authentication_realm = "Application"
|
50
|
+
|
51
|
+
# ==> Configuration for :database_authenticatable
|
52
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
53
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
54
|
+
config.stretches = 10
|
55
|
+
|
56
|
+
# ==> Configuration for :confirmable
|
57
|
+
# The time you want to give your user to confirm his account. During this time
|
58
|
+
# he will be able to access your application without confirming. Default is 0.days
|
59
|
+
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
60
|
+
# You can use this to let your user access some features of your application
|
61
|
+
# without confirming the account, but blocking it after a certain period
|
62
|
+
# (ie 2 days).
|
63
|
+
# config.confirm_within = 2.days
|
64
|
+
|
65
|
+
# ==> Configuration for :rememberable
|
66
|
+
# The time the user will be remembered without asking for credentials again.
|
67
|
+
# config.remember_for = 2.weeks
|
68
|
+
|
69
|
+
# If true, a valid remember token can be re-used between multiple browsers.
|
70
|
+
# config.remember_across_browsers = true
|
71
|
+
|
72
|
+
# If true, extends the user's remember period when remembered via cookie.
|
73
|
+
# config.extend_remember_period = false
|
74
|
+
|
75
|
+
# If true, uses the password salt as remember token. This should be turned
|
76
|
+
# to false if you are not using database authenticatable.
|
77
|
+
config.use_salt_as_remember_token = true
|
78
|
+
|
79
|
+
# ==> Configuration for :validatable
|
80
|
+
# Range for password length. Default is 6..20.
|
81
|
+
# config.password_length = 6..20
|
82
|
+
|
83
|
+
# Regex to use to validate the email address
|
84
|
+
# config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
|
85
|
+
|
86
|
+
# ==> Configuration for :timeoutable
|
87
|
+
# The time you want to timeout the user session without activity. After this
|
88
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
89
|
+
# config.timeout_in = 30.minutes
|
90
|
+
|
91
|
+
# ==> Configuration for :lockable
|
92
|
+
# Defines which strategy will be used to lock an account.
|
93
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
94
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
95
|
+
# config.lock_strategy = :failed_attempts
|
96
|
+
|
97
|
+
# Defines which strategy will be used to unlock an account.
|
98
|
+
# :email = Sends an unlock link to the user email
|
99
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
100
|
+
# :both = Enables both strategies
|
101
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
102
|
+
# config.unlock_strategy = :both
|
103
|
+
|
104
|
+
# Number of authentication tries before locking an account if lock_strategy
|
105
|
+
# is failed attempts.
|
106
|
+
# config.maximum_attempts = 20
|
107
|
+
|
108
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
109
|
+
# config.unlock_in = 1.hour
|
110
|
+
|
111
|
+
# ==> Configuration for :encryptable
|
112
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
113
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
114
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
115
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
116
|
+
# REST_AUTH_SITE_KEY to pepper)
|
117
|
+
# config.encryptor = :sha512
|
118
|
+
|
119
|
+
# Setup a pepper to generate the encrypted password.
|
120
|
+
# config.pepper = "6efecaefd488a07abded679d45be30dc97935d74c44825b647149a6fa30ee8cd5e05bb3a426ce8a87fcd75b04079b1bac68a079acdcc175800c4131dde7961f0"
|
121
|
+
|
122
|
+
# ==> Configuration for :token_authenticatable
|
123
|
+
# Defines name of the authentication token params key
|
124
|
+
# config.token_authentication_key = :auth_token
|
125
|
+
|
126
|
+
# If true, authentication through token does not store user in session and needs
|
127
|
+
# to be supplied on each request. Useful if you are using the token as API token.
|
128
|
+
# config.stateless_token = false
|
129
|
+
|
130
|
+
# ==> Scopes configuration
|
131
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
132
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
133
|
+
# are using only default views.
|
134
|
+
# config.scoped_views = false
|
135
|
+
|
136
|
+
# Configure the default scope given to Warden. By default it's the first
|
137
|
+
# devise role declared in your routes (usually :user).
|
138
|
+
# config.default_scope = :user
|
139
|
+
|
140
|
+
# Configure sign_out behavior.
|
141
|
+
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
|
142
|
+
# The default is true, which means any logout action will sign out all active scopes.
|
143
|
+
# config.sign_out_all_scopes = true
|
144
|
+
|
145
|
+
# ==> Navigation configuration
|
146
|
+
# Lists the formats that should be treated as navigational. Formats like
|
147
|
+
# :html, should redirect to the sign in page when the user does not have
|
148
|
+
# access, but formats like :xml or :json, should return 401.
|
149
|
+
#
|
150
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
151
|
+
# should add them to the navigational formats lists.
|
152
|
+
#
|
153
|
+
# The :"*/*" format below is required to match Internet Explorer requests.
|
154
|
+
# config.navigational_formats = [:"*/*", :html]
|
155
|
+
|
156
|
+
# The default HTTP method used to sign out a resource. Default is :get.
|
157
|
+
# config.sign_out_via = :get
|
158
|
+
|
159
|
+
# ==> OmniAuth
|
160
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
161
|
+
# up on your models and hooks.
|
162
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
163
|
+
config.omniauth :linked_in, "ekxfXU8nueVSMQ9fc5KJAryBkyztUlCBYMW3DoQPzbE79WhivvzhQloRNHCHgPeB", "WYiHFT-KKFgjd45W3-pEAficmXRHmN6_6DGwj1C_ZILJlSO1gBvv6VNYXU9tybGY"
|
164
|
+
|
165
|
+
config.omniauth :facebook, "129571360447856","eef39dce5e20e76f77495c59623bdb38"
|
166
|
+
|
167
|
+
# ==> Warden configuration
|
168
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
169
|
+
# change the failure app, you can configure them inside the config.warden block.
|
170
|
+
#
|
171
|
+
# config.warden do |manager|
|
172
|
+
# manager.failure_app = AnotherApp
|
173
|
+
# manager.intercept_401 = false
|
174
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
175
|
+
# end
|
176
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'a85ff3866549e818069e088bed435487038449bae9d3a31ca266f7b2670751908ea358d3120c787b2b86d9de39bb833b10a108b7b3d3460c4469e75f58be0259'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
File without changes
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Default relations for Social Stream
|
2
|
+
#
|
3
|
+
# Define the default relations and permissions supported by your application
|
4
|
+
# Though subjects can customize their own relations, these are the defaults
|
5
|
+
# to start up
|
6
|
+
#
|
7
|
+
# Detailed information on permissions is available at:
|
8
|
+
# http://rdoc.info/gems/social_stream/Permission
|
9
|
+
#
|
10
|
+
user:
|
11
|
+
friend:
|
12
|
+
name: friend
|
13
|
+
permissions:
|
14
|
+
- [ follow ]
|
15
|
+
- [ create, activity ]
|
16
|
+
- [ read, activity ]
|
17
|
+
acquaintance:
|
18
|
+
name: acquaintance
|
19
|
+
permissions:
|
20
|
+
- [ read, activity ]
|
21
|
+
colleague:
|
22
|
+
name: colleague
|
23
|
+
permissions:
|
24
|
+
- [ follow ]
|
25
|
+
- [ create, activity ]
|
26
|
+
- [ read, activity ]
|
27
|
+
|
28
|
+
group:
|
29
|
+
member:
|
30
|
+
name: member
|
31
|
+
permissions:
|
32
|
+
- [ represent ]
|
33
|
+
- [ create, activity ]
|
34
|
+
- [ read, activity ]
|
35
|
+
- [ read, tie ]
|
36
|
+
partner:
|
37
|
+
name: partner
|
38
|
+
permissions:
|
39
|
+
- [ read, activity ]
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Dummy::Application.routes.draw do
|
2
|
+
devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}
|
3
|
+
|
4
|
+
# The priority is based upon order of creation:
|
5
|
+
# first created -> highest priority.
|
6
|
+
|
7
|
+
# Sample of regular route:
|
8
|
+
# match 'products/:id' => 'catalog#view'
|
9
|
+
# Keep in mind you can assign values other than :controller and :action
|
10
|
+
|
11
|
+
# Sample of named route:
|
12
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
13
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
14
|
+
|
15
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
16
|
+
# resources :products
|
17
|
+
|
18
|
+
# Sample resource route with options:
|
19
|
+
# resources :products do
|
20
|
+
# member do
|
21
|
+
# get 'short'
|
22
|
+
# post 'toggle'
|
23
|
+
# end
|
24
|
+
#
|
25
|
+
# collection do
|
26
|
+
# get 'sold'
|
27
|
+
# end
|
28
|
+
# end
|
29
|
+
|
30
|
+
# Sample resource route with sub-resources:
|
31
|
+
# resources :products do
|
32
|
+
# resources :comments, :sales
|
33
|
+
# resource :seller
|
34
|
+
# end
|
35
|
+
|
36
|
+
# Sample resource route with more complex sub-resources
|
37
|
+
# resources :products do
|
38
|
+
# resources :comments
|
39
|
+
# resources :sales do
|
40
|
+
# get 'recent', :on => :collection
|
41
|
+
# end
|
42
|
+
# end
|
43
|
+
|
44
|
+
# Sample resource route within a namespace:
|
45
|
+
# namespace :admin do
|
46
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
47
|
+
# # (app/controllers/admin/products_controller.rb)
|
48
|
+
# resources :products
|
49
|
+
# end
|
50
|
+
|
51
|
+
# You can have the root of your site routed with "root"
|
52
|
+
# just remember to delete public/index.html.
|
53
|
+
# root :to => "welcome#index"
|
54
|
+
|
55
|
+
# See how all your routes lay out with "rake routes"
|
56
|
+
|
57
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
58
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
59
|
+
# match ':controller(/:action(/:id(.:format)))'
|
60
|
+
end
|