Module: Kublog
- Defined in:
- lib/kublog/author.rb,
lib/kublog.rb,
lib/kublog/engine.rb,
lib/kublog/version.rb,
lib/kublog/processor.rb,
lib/kublog/notifiable.rb,
app/models/kublog/post.rb,
app/models/kublog/image.rb,
lib/kublog/network/email.rb,
app/models/kublog/comment.rb,
app/models/kublog/category.rb,
lib/kublog/network/twitter.rb,
lib/kublog/network/facebook.rb,
app/mailers/kublog/post_mailer.rb,
app/models/kublog/notification.rb,
app/helpers/kublog/posts_helper.rb,
app/jobs/kublog/deliver_comment.rb,
app/mailers/kublog/comment_mailer.rb,
lib/kublog/xhr_upload/file_helper.rb,
app/uploaders/kublog/file_uploader.rb,
lib/kublog/user_integration/common.rb,
lib/kublog/user_integration/devise.rb,
app/presenters/kublog/post_presenter.rb,
app/helpers/kublog/application_helper.rb,
app/presenters/kublog/posts_presenter.rb,
app/controllers/kublog/posts_controller.rb,
app/helpers/kublog/notifications_helper.rb,
app/controllers/kublog/images_controller.rb,
app/presenters/kublog/post_form_presenter.rb,
app/controllers/kublog/comments_controller.rb,
app/controllers/kublog/categories_controller.rb,
app/controllers/kublog/application_controller.rb,
app/controllers/kublog/notifications_controller.rb,
lib/generators/kublog/install/install_generator.rb
Overview
Non mandatory single category for a post implements friendly_id search and json defaults for ajax editing
Defined Under Namespace
Modules: ApplicationHelper, Author, Generators, Network, Notifiable, NotificationsHelper, PostsHelper, Processor, UserIntegration, XhrUpload
Classes: ApplicationController, CategoriesController, Category, Comment, CommentMailer, CommentsController, DeliverComment, Engine, FileUploader, Image, ImagesController, Notification, NotificationsController, Post, PostFormPresenter, PostMailer, PostPresenter, PostsController, PostsPresenter
Constant Summary
collapse
.clone
- VERSION =
"0.9.0"
- @@default_url_options =
{:host => 'www.example.com'}
- @@user_kinds =
[]
- @@notification_processing =
:immediate
- @@image_storage =
:file
- @@author_class =
'User'
- @@notify_class =
'User'
::Client.new
- @@blog_name =
'Kublog::Blog'
- @@blog_description =
'Some blog'
Class Method Summary
collapse
Class Method Details
.author_email(email = '', &block) ⇒ Object
73
74
75
76
77
78
79
|
# File 'lib/kublog.rb', line 73
def self.author_email(email='', &block)
if block_given?
@@from_action = block
else
@@from_string = email
end
end
|
.email? ⇒ Boolean
114
115
116
|
# File 'lib/kublog.rb', line 114
def self.email?
Kublog.notify_class.present?
end
|
.email_from(post) ⇒ Object
63
64
65
66
67
68
69
70
71
|
# File 'lib/kublog.rb', line 63
def self.email_from(post)
if defined?(@@from_action)
@@from_action.yield(post)
elsif defined?(@@from_string)
@@from_string
else
'Change Me Now Kublog<[email protected]>'
end
end
|
.facebook? ⇒ Boolean
106
107
108
|
# File 'lib/kublog.rb', line 106
def self.facebook?
@@facebook_client.present?
end
|
.facebook_page_token=(token) ⇒ Object
93
94
95
|
# File 'lib/kublog.rb', line 93
def self.facebook_page_token=(token)
@@facebook_client = FbGraph::User.me(token)
end
|
.notification_processing=(method = '') ⇒ Object
54
55
56
57
58
59
60
61
|
# File 'lib/kublog.rb', line 54
def self.notification_processing=(method='')
@@notification_processing = method.to_sym
if @@notification_processing == :delayed_job
unless defined? Delayed::Job
raise 'You must require delayed_job in your Gemfile to use this feature'
end
end
end
|
.root_path ⇒ Object
118
119
120
|
# File 'lib/kublog.rb', line 118
def self.root_path
Engine.routes.url_helpers.root_path
end
|
.setup {|_self| ... } ⇒ Object
97
98
99
|
# File 'lib/kublog.rb', line 97
def self.setup
yield self
end
|
101
102
103
104
|
# File 'lib/kublog.rb', line 101
def self.
= true
yield
end
|
110
111
112
|
# File 'lib/kublog.rb', line 110
def self.
defined?
end
|