forked from Marisayem/social_stream-base
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugin and Engine support, hook_for devise:install generator
- Loading branch information
Showing
12 changed files
with
89 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
pkg/*gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,5 +1,3 @@ | |||
ActiveSupport::Inflector.inflections do |inflect| | |||
inflect.singular /^([Tt]ie)s$/, '\1' | |||
end | |||
|
|||
require 'social_stream' | require 'social_stream' | ||
|
|||
SocialStream::Rails::Common.inflections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
require 'social_stream/rails/common' | |||
File.expand_path(__FILE__) =~ /#{ File.join('vendor', 'plugins') }/ ? | |||
require('social_stream/rails/railtie') : | |||
require('social_stream/rails/engine') | |||
|
|||
module SocialStream | |||
# Common methods for Railtie and Engine | |||
module Rails #:nodoc: | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
module SocialStream | |||
module Rails | |||
# Common methods for Rails::Railtie and Rails::Engine | |||
module Common #:nodoc: | |||
class << self | |||
def inflections | |||
ActiveSupport::Inflector.inflections do |inflect| | |||
inflect.singular /^([Tt]ie)s$/, '\1' | |||
end | |||
end | |||
|
|||
def included(base) | |||
base.class_eval do | |||
config.generators.authentication :devise | |||
|
|||
config.to_prepare do | |||
%w( actor activity_object ).each do |supertype| | |||
supertype.classify.constantize.load_subtype_features | |||
end | |||
|
|||
# https://rails.lighthouseapp.com/projects/8994/tickets/1905-apphelpers-within-plugin-not-being-mixed-in | |||
ApplicationController.helper ActivitiesHelper | |||
end | |||
|
|||
initializer "social_stream.inflections" do | |||
Common.inflections | |||
end | |||
end | |||
end | |||
end | |||
end | |||
end | |||
end | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
module SocialStream | |||
module Rails | |||
class Engine < ::Rails::Engine #:nodoc: | |||
include Common | |||
end | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
module SocialStream | |||
module Rails | |||
class Railtie < ::Rails::Railtie #:nodoc: | |||
include Common | |||
end | |||
end | |||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
module SocialStream | |||
VERSION = "0.0.1".freeze | |||
end |