Sha256: 2b1b41e58295bc5b7591c476849f8325540aca538376e0031f5d9ab16b73f8dc

Contents?: true

Size: 1.42 KB

Versions: 4

Compression:

Stored size: 1.42 KB

Contents

Redmine::Plugin.register :<%= plugin_name_underscored %> do
  name :<%= plugin_name_underscored %>_plugin_name
  author :<%= plugin_name_underscored %>_plugin_author
  author_url :<%= plugin_name_underscored %>_plugin_author_url
  description :<%= plugin_name_underscored %>_plugin_description
  version '2014'

  #into easy_settings goes available setting as a symbol key, default value as a value
  settings easy_settings: {  }
end


Dir[File.dirname(__FILE__) + '/lib/<%= plugin_name_underscored %>/redmine_patch/*/*.rb'].each {|file| require file }

# this block is runed once just after easyproject is started
# means after all plugins(easy) are initialized
# it is place for plain requires, not require_dependency
# it should contain hooks, permissions - base class in redmine is required thus is not reloaded
ActiveSupport.on_load(:easyproject, yield: true) do

  require '<%= plugin_name_underscored %>/internals'
  require '<%= plugin_name_underscored %>/hooks'

end

# this block is called every time rails are reloading code
# in development it means after each change in observed file
# in production it means once just after server has started
# in this block should be used require_dependency, but only if necessary.
# better is to place a class in file named by rails naming convency and let it be loaded automatically
# Here goes query registering, custom fields registering and so on
# ActionDispatch::Reloader.to_prepare do
#
# end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redmine_extensions-0.0.13 lib/generators/easy_redmine_plugin/templates/init.rb.erb
redmine_extensions-0.0.12 lib/generators/easy_redmine_plugin/templates/init.rb.erb
redmine_extensions-0.0.10 lib/generators/easy_redmine_plugin/templates/init.rb.erb
redmine_extensions-0.0.8 lib/generators/easy_redmine_plugin/templates/init.rb.erb