Sha256: 7dac03a31e7b57943d10467c3c98d80bb31ca17de5fc655f772b76dc5c93e061

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

module SocialStream
  # {SocialStream::Base} provides with the minimal functionality for a web-based
  # social network: {User users }, {Group groups } and the {Tie ties } between them,
  # as well as basic activities: {Post posts } and {Comment comments}
  module Base
    class Engine < ::Rails::Engine #:nodoc:
      config.app_generators.authentication :devise
      config.app_generators.messages :mailboxer
      config.app_generators.taggings :acts_as_taggable_on

      config.to_prepare do
        %w( actor activity_object ).each do |supertype|
          supertype.classify.constantize.load_subtype_features
        end
      end

      initializer "social_stream-base.inflections" do
        ActiveSupport::Inflector.inflections do |inflect|
          inflect.singular /^([Tt]ie)s$/, '\1'
        end
      end

     initializer "social_stream-base.mime_types" do
        Mime::Type.register 'application/xrd+xml', :xrd
      end

      initializer "social_stream-base.controller_helpers" do
        ActiveSupport.on_load(:action_controller) do
          include SocialStream::Controllers::Helpers
        end
      end

      initializer "social_stream-base.avatars_for_rails" do
        AvatarsForRails.setup do |config|
          config.avatarable_model = :actor
          config.current_avatarable_object = :current_actor
          config.avatarable_filters = [:authenticate_user!]
          config.avatarable_styles = { :representation => "20x20>",
                                       :contact        => "30x30>",
                                       :actor          => '35x35>',
                                       :profile        => '119x119'}
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
social_stream-base-0.6.0 lib/social_stream/base.rb