2018-08-29 19:32:41 +08:00
|
|
|
# name: <%= name %>
|
2018-08-30 18:03:30 +08:00
|
|
|
# about:
|
2018-08-29 19:32:41 +08:00
|
|
|
# version: 0.1
|
2018-08-30 18:03:30 +08:00
|
|
|
# authors: <%= @github_username %>
|
|
|
|
# url: https://github.com/<%= @github_username %>
|
2018-08-29 19:32:41 +08:00
|
|
|
|
|
|
|
<% if @options["stylesheet"] %>
|
|
|
|
register_asset "stylesheets/common/<%= dasherized_name %>.scss"
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
enabled_site_setting :<%= underscored_name %>_enabled
|
|
|
|
|
|
|
|
PLUGIN_NAME ||= "<%= name %>".freeze
|
|
|
|
|
|
|
|
after_initialize do
|
2018-08-30 18:16:37 +08:00
|
|
|
<% if @options['help'] %>
|
|
|
|
# see lib/plugin/instance.rb for the methods available in this context
|
|
|
|
<% end %>
|
|
|
|
|
2018-08-29 19:32:41 +08:00
|
|
|
module ::<%= classified_name %>
|
|
|
|
class Engine < ::Rails::Engine
|
|
|
|
engine_name PLUGIN_NAME
|
|
|
|
isolate_namespace <%= classified_name %>
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
<% if @options["scheduled_job"] %>
|
|
|
|
require File.expand_path("../jobs/scheduled/check_<%= underscored_name %>.rb", __FILE__)
|
|
|
|
<% end %>
|
|
|
|
end
|