Skip to content

Commit db8e397

Browse files
committed
Merge pull request #4 from hayasshi/update-to-gitbucket3.2
Update to GitBucket3.2
2 parents 21c6d8b + b997fc0 commit db8e397

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ This is an example of GitBucket plug-in. This plug-in provides code snippet repo
55
## Instllation
66

77
1. Hit `./sbt.sh package` in the root directory of this repository.
8-
2. Copy `target/scala-2.11/gitbucket-gist-plugin_2.11-1.1.jar` into `GITBUCKET_HOME/plugins`.
8+
2. Copy `target/scala-2.11/gitbucket-gist-plugin_2.11-1.2.jar` into `GITBUCKET_HOME/plugins`.
99
3. Restart GitBucket.

project/build.scala

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ object MyBuild extends Build {
77

88
val Organization = "jp.sf.amateras"
99
val Name = "gitbucket-gist-plugin"
10-
val Version = "1.1"
11-
val ScalaVersion = "2.11.2"
10+
val Version = "1.2"
11+
val ScalaVersion = "2.11.6"
1212

1313
lazy val project = Project (
1414
"gitbucket-gist-plugin",
@@ -25,8 +25,8 @@ object MyBuild extends Build {
2525
"amateras-repo" at "http://amateras.sourceforge.jp/mvn/"
2626
),
2727
libraryDependencies ++= Seq(
28-
"gitbucket" % "gitbucket-assembly" % "3.1.1" % "provided",
29-
"com.typesafe.play" %% "twirl-compiler" % "1.0.2" % "provided",
28+
"gitbucket" % "gitbucket-assembly" % "3.2.0" % "provided",
29+
"com.typesafe.play" %% "twirl-compiler" % "1.0.4" % "provided",
3030
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
3131
),
3232
javacOptions in compile ++= Seq("-target", "7", "-source", "7")

src/main/scala/Plugin.scala

100644100755
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
import gitbucket.core.service.SystemSettingsService
1+
import gitbucket.core.service.SystemSettingsService.SystemSettings
22
import gitbucket.gist.controller.GistController
33
import gitbucket.core.plugin.PluginRegistry
44
import gitbucket.core.util.Version
55
import java.io.File
66
import javax.servlet.ServletContext
77
import gitbucket.gist.util.Configurations._
88

9-
class Plugin extends gitbucket.core.plugin.Plugin with SystemSettingsService {
9+
class Plugin extends gitbucket.core.plugin.Plugin {
1010
override val pluginId: String = "gist"
1111
override val pluginName: String = "Gist Plugin"
1212
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))
1414

15-
override def initialize(registry: PluginRegistry, context: ServletContext): Unit = {
15+
override def initialize(registry: PluginRegistry, context: ServletContext, settings: SystemSettings): Unit = {
1616
// Add Snippet link to the header
17-
val settings = loadSystemSettings()
1817
val path = settings.baseUrl.getOrElse(context.getContextPath)
1918
registry.addJavaScript(".*",
2019
s"""
@@ -43,6 +42,6 @@ class Plugin extends gitbucket.core.plugin.Plugin with SystemSettingsService {
4342
println("-- Gist plug-in initialized --")
4443
}
4544

46-
override def shutdown(registry: PluginRegistry, context: ServletContext): Unit = {
45+
override def shutdown(registry: PluginRegistry, context: ServletContext, settings: SystemSettings): Unit = {
4746
}
4847
}

0 commit comments

Comments
 (0)