|
1 | | -import gitbucket.core.service.SystemSettingsService |
| 1 | +import gitbucket.core.service.SystemSettingsService.SystemSettings |
2 | 2 | import gitbucket.gist.controller.GistController |
3 | 3 | import gitbucket.core.plugin.PluginRegistry |
4 | 4 | import gitbucket.core.util.Version |
5 | 5 | import java.io.File |
6 | 6 | import javax.servlet.ServletContext |
7 | 7 | import gitbucket.gist.util.Configurations._ |
8 | 8 |
|
9 | | -class Plugin extends gitbucket.core.plugin.Plugin with SystemSettingsService { |
| 9 | +class Plugin extends gitbucket.core.plugin.Plugin { |
10 | 10 | override val pluginId: String = "gist" |
11 | 11 | override val pluginName: String = "Gist Plugin" |
12 | 12 | override val description: String = "Provides Gist feature on GitBucket." |
13 | | - override val versions: List[Version] = List(Version(1, 0)) |
| 13 | + override val versions: List[Version] = List(Version(1, 2)) |
14 | 14 |
|
15 | | - override def initialize(registry: PluginRegistry, context: ServletContext): Unit = { |
| 15 | + override def initialize(registry: PluginRegistry, context: ServletContext, settings: SystemSettings): Unit = { |
16 | 16 | // Add Snippet link to the header |
17 | | - val settings = loadSystemSettings() |
18 | 17 | val path = settings.baseUrl.getOrElse(context.getContextPath) |
19 | 18 | registry.addJavaScript(".*", |
20 | 19 | s""" |
@@ -43,6 +42,6 @@ class Plugin extends gitbucket.core.plugin.Plugin with SystemSettingsService { |
43 | 42 | println("-- Gist plug-in initialized --") |
44 | 43 | } |
45 | 44 |
|
46 | | - override def shutdown(registry: PluginRegistry, context: ServletContext): Unit = { |
| 45 | + override def shutdown(registry: PluginRegistry, context: ServletContext, settings: SystemSettings): Unit = { |
47 | 46 | } |
48 | 47 | } |
0 commit comments