mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 21:13:43 -05:00
Merge pull request #12 from overleaf/dependency-updates
Dependency updates and general housekeeping
This commit is contained in:
commit
4bd4ef47af
17 changed files with 249 additions and 224 deletions
45
services/git-bridge/.gitignore
vendored
45
services/git-bridge/.gitignore
vendored
|
@ -1,2 +1,45 @@
|
||||||
target/
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff:
|
||||||
.idea/workspace.xml
|
.idea/workspace.xml
|
||||||
|
.idea/tasks.xml
|
||||||
|
.idea/dictionaries
|
||||||
|
.idea/vcs.xml
|
||||||
|
.idea/jsLibraryMappings.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files:
|
||||||
|
.idea/dataSources.ids
|
||||||
|
.idea/dataSources.xml
|
||||||
|
.idea/dataSources.local.xml
|
||||||
|
.idea/sqlDataSources.xml
|
||||||
|
.idea/dynamic.xml
|
||||||
|
.idea/uiDesigner.xml
|
||||||
|
|
||||||
|
# Gradle:
|
||||||
|
.idea/gradle.xml
|
||||||
|
.idea/libraries
|
||||||
|
|
||||||
|
# Mongo Explorer plugin:
|
||||||
|
.idea/mongoSettings.xml
|
||||||
|
|
||||||
|
## File-based project format:
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
## Plugin-specific files:
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
/out/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
32
services/git-bridge/.idea/compiler.xml
Normal file
32
services/git-bridge/.idea/compiler.xml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<resourceExtensions />
|
||||||
|
<wildcardResourcePatterns>
|
||||||
|
<entry name="!?*.java" />
|
||||||
|
<entry name="!?*.form" />
|
||||||
|
<entry name="!?*.class" />
|
||||||
|
<entry name="!?*.groovy" />
|
||||||
|
<entry name="!?*.scala" />
|
||||||
|
<entry name="!?*.flex" />
|
||||||
|
<entry name="!?*.kt" />
|
||||||
|
<entry name="!?*.clj" />
|
||||||
|
<entry name="!?*.aj" />
|
||||||
|
</wildcardResourcePatterns>
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile default="true" name="Default" enabled="false">
|
||||||
|
<processorPath useClasspath="true" />
|
||||||
|
</profile>
|
||||||
|
<profile default="false" name="Maven default annotation processors profile" enabled="true">
|
||||||
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<processorPath useClasspath="true" />
|
||||||
|
<module name="writelatex-git-bridge" />
|
||||||
|
</profile>
|
||||||
|
</annotationProcessing>
|
||||||
|
<bytecodeTargetLevel>
|
||||||
|
<module name="writelatex-git-bridge" target="1.7" />
|
||||||
|
</bytecodeTargetLevel>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<component name="CopyrightManager">
|
||||||
|
<settings default="" />
|
||||||
|
</component>
|
6
services/git-bridge/.idea/encodings.xml
Normal file
6
services/git-bridge/.idea/encodings.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
14
services/git-bridge/.idea/misc.xml
Normal file
14
services/git-bridge/.idea/misc.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="EntryPointsManager">
|
||||||
|
<entry_points version="2.0" />
|
||||||
|
</component>
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
8
services/git-bridge/.idea/modules.xml
Normal file
8
services/git-bridge/.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/writelatex-git-bridge.iml" filepath="$PROJECT_DIR$/writelatex-git-bridge.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -4,21 +4,23 @@ writelatex-git-bridge
|
||||||
Required
|
Required
|
||||||
--------
|
--------
|
||||||
* `maven` (for building)
|
* `maven` (for building)
|
||||||
* `jdk-7` (for compiling and running)
|
* `jdk-8` (for compiling and running)
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
### Ubuntu ###
|
|
||||||
Run `./install` to get dependencies, build, test, package, and make it a service.
|
|
||||||
|
|
||||||
Use `sudo service wlgb start` and `sudo service wlgb stop` to start and stop the server.
|
Install dependencies:
|
||||||
|
|
||||||
The configuration file will be at `/etc/wlgb/config.json`.
|
```
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y maven
|
||||||
|
sudo apt-get install -y openjdk-8-jdk
|
||||||
|
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
|
||||||
|
sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javac
|
||||||
|
```
|
||||||
|
|
||||||
Run `./reinstall` to test, package and install the current version if `./install` has already been run.
|
Create a config file according to the format below.
|
||||||
|
|
||||||
Run `./uninstall` to undo what `./install` did.
|
|
||||||
### Manually ###
|
|
||||||
Run `mvn package` to build, test, and package it into a jar at `target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar`.
|
Run `mvn package` to build, test, and package it into a jar at `target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar`.
|
||||||
|
|
||||||
Use `java -jar <path_to_jar> <path_to_config_file>` to run the server.
|
Use `java -jar <path_to_jar> <path_to_config_file>` to run the server.
|
||||||
|
@ -26,7 +28,7 @@ Use `java -jar <path_to_jar> <path_to_config_file>` to run the server.
|
||||||
Runtime Configuration
|
Runtime Configuration
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
The configuration file is in `.json` format. There is an example at `bin/config.json`.
|
The configuration file is in `.json` format.
|
||||||
|
|
||||||
{
|
{
|
||||||
"port" (int): the port number,
|
"port" (int): the port number,
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"port": 80,
|
|
||||||
"rootGitDirectory": "/var/wlgb/git",
|
|
||||||
"apiBaseUrl": "http://127.0.0.1:60000/api/v0",
|
|
||||||
"username": "REDACTED",
|
|
||||||
"password": "REDACTED",
|
|
||||||
"postbackBaseUrl": "http://127.0.0.1",
|
|
||||||
"serviceName": "Overleaf",
|
|
||||||
"oauth2": {
|
|
||||||
"oauth2ClientID": "clientID",
|
|
||||||
"oauth2ClientSecret": "oauth2 client secret",
|
|
||||||
"oauth2Server": "https://www.overleaf.com"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,159 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: wlgb
|
|
||||||
# Required-Start: $remote_fs $syslog
|
|
||||||
# Required-Stop: $remote_fs $syslog
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: writelatex-git-bridge
|
|
||||||
# Description: Init script for writelatex-git-bridge service
|
|
||||||
# placed in /etc/init.d.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Author: Winston Li <winston.li12@imperial.ac.uk>
|
|
||||||
#
|
|
||||||
# Please remove the "Author" lines above and replace them
|
|
||||||
# with your own name if you copy and modify this script.
|
|
||||||
|
|
||||||
# Do NOT "set -e"
|
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
DESC="Writelatex-Git Bridge startup and stop script"
|
|
||||||
NAME=wlgb
|
|
||||||
DAEMON=/usr/bin/java
|
|
||||||
DAEMON_ARGS="-jar /usr/local/sbin/writelatex-git-bridge.jar /etc/wlgb/config.json"
|
|
||||||
PIDFILE=/var/run/$NAME.pid
|
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x "$DAEMON" ] || exit 0
|
|
||||||
|
|
||||||
# Read configuration variable file if it is present
|
|
||||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
|
||||||
|
|
||||||
# Load the VERBOSE setting and other rcS variables
|
|
||||||
. /lib/init/vars.sh
|
|
||||||
|
|
||||||
# Define LSB log_* functions.
|
|
||||||
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
|
|
||||||
# and status_of_proc is working.
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that starts the daemon/service
|
|
||||||
#
|
|
||||||
do_start()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been started
|
|
||||||
# 1 if daemon was already running
|
|
||||||
# 2 if daemon could not be started
|
|
||||||
if [ -f "$PIDFILE" ]; then
|
|
||||||
echo "WriteLatex-Git Bridge is already started: use service wlgb stop to stop."
|
|
||||||
return 1;
|
|
||||||
fi
|
|
||||||
echo "Starting WriteLatex-Git Bridge..."
|
|
||||||
start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE \
|
|
||||||
--exec /usr/bin/env LANG="C.UTF-8" $DAEMON -- \
|
|
||||||
$DAEMON_ARGS >> /var/log/wlgb/out.log 2>> /var/log/wlgb/err.log &
|
|
||||||
echo "WriteLatex-Git Bridge started."
|
|
||||||
echo "Config file at /etc/wlgb/config.json"
|
|
||||||
echo "Log file at /var/log/wlgb/out.log"
|
|
||||||
echo "Error file at /var/log/wlgb/err.log"
|
|
||||||
echo
|
|
||||||
return 0
|
|
||||||
# Add code here, if necessary, that waits for the process to be ready
|
|
||||||
# to handle requests from services started subsequently which depend
|
|
||||||
# on this one. As a last resort, sleep for some time.
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that stops the daemon/service
|
|
||||||
#
|
|
||||||
do_stop()
|
|
||||||
{
|
|
||||||
if [ -f "$PIDFILE" ]; then
|
|
||||||
echo "Stopping Writelatex-Git Bridge..."
|
|
||||||
start-stop-daemon --stop --quiet --retry=TERM/60/KILL/5 --pidfile $PIDFILE
|
|
||||||
# Many daemons don't delete their pidfiles when they exit.
|
|
||||||
rm -f $PIDFILE
|
|
||||||
echo "WriteLatex-Git Bridge stopped."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
echo "WriteLatex-Git Bridge is not started: use service wlgb start to start."
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that sends a SIGHUP to the daemon/service
|
|
||||||
#
|
|
||||||
do_reload() {
|
|
||||||
#
|
|
||||||
# If the daemon can reload its configuration without
|
|
||||||
# restarting (for example, when it is sent a SIGHUP),
|
|
||||||
# then implement that here.
|
|
||||||
#
|
|
||||||
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
||||||
;;
|
|
||||||
#reload|force-reload)
|
|
||||||
#
|
|
||||||
# If do_reload() is not implemented then leave this commented out
|
|
||||||
# and leave 'force-reload' as an alias for 'restart'.
|
|
||||||
#
|
|
||||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
|
||||||
#do_reload
|
|
||||||
#log_end_msg $?
|
|
||||||
#;;
|
|
||||||
restart|force-reload)
|
|
||||||
#
|
|
||||||
# If the "reload" option is implemented then remove the
|
|
||||||
# 'force-reload' alias
|
|
||||||
#
|
|
||||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1)
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0) log_end_msg 0 ;;
|
|
||||||
1) log_end_msg 1 ;; # Old process is still running
|
|
||||||
*) log_end_msg 1 ;; # Failed to start
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Failed to stop
|
|
||||||
log_end_msg 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
:
|
|
|
@ -1,19 +0,0 @@
|
||||||
installDeps() {
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y maven
|
|
||||||
sudo apt-get install -y openjdk-7-jdk
|
|
||||||
sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
|
|
||||||
sudo update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javac
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
command -v mvn >/dev/null 2>&1 && command -v /usr/lib/jvm/java-7-openjdk-amd64/bin/javac >/dev/null 2>&1 || installDeps
|
|
||||||
mvn package &&\
|
|
||||||
sudo cp ./target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/local/sbin/writelatex-git-bridge.jar &&\
|
|
||||||
sudo cp ./bin/wlgb /etc/init.d/ &&\
|
|
||||||
sudo mkdir -p /var/log/wlgb &&\
|
|
||||||
sudo mkdir -p /etc/wlgb &&\
|
|
||||||
if [ ! -f /etc/wlgb/config.json ]; then
|
|
||||||
sudo cp ./bin/config.json /etc/wlgb/
|
|
||||||
fi &&\
|
|
||||||
sudo /usr/sbin/update-rc.d -f wlgb defaults
|
|
|
@ -55,23 +55,28 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jmock</groupId>
|
<groupId>org.jmock</groupId>
|
||||||
<artifactId>jmock-junit4</artifactId>
|
<artifactId>jmock-junit4</artifactId>
|
||||||
<version>2.6.0</version>
|
<version>2.8.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-all</artifactId>
|
<artifactId>jetty-servlet</artifactId>
|
||||||
<version>9.2.6.v20141205</version>
|
<version>9.3.9.v20160517</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-server</artifactId>
|
||||||
|
<version>9.3.9.v20160517</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.3.1</version>
|
<version>2.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ning</groupId>
|
<groupId>com.ning</groupId>
|
||||||
<artifactId>async-http-client</artifactId>
|
<artifactId>async-http-client</artifactId>
|
||||||
<version>1.9.3</version>
|
<version>1.9.38</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jgit</groupId>
|
<groupId>org.eclipse.jgit</groupId>
|
||||||
|
@ -86,27 +91,27 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.8.7</version>
|
<version>3.8.11.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>joda-time</groupId>
|
<groupId>joda-time</groupId>
|
||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.9.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.oauth-client</groupId>
|
<groupId>com.google.oauth-client</groupId>
|
||||||
<artifactId>google-oauth-client</artifactId>
|
<artifactId>google-oauth-client</artifactId>
|
||||||
<version>1.20.0</version>
|
<version>1.22.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.http-client</groupId>
|
<groupId>com.google.http-client</groupId>
|
||||||
<artifactId>google-http-client</artifactId>
|
<artifactId>google-http-client</artifactId>
|
||||||
<version>1.20.0</version>
|
<version>1.22.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.http-client</groupId>
|
<groupId>com.google.http-client</groupId>
|
||||||
<artifactId>google-http-client-gson</artifactId>
|
<artifactId>google-http-client-gson</artifactId>
|
||||||
<version>1.20.0</version>
|
<version>1.22.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-lang</groupId>
|
<groupId>commons-lang</groupId>
|
||||||
|
@ -132,7 +137,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mock-server</groupId>
|
<groupId>org.mock-server</groupId>
|
||||||
<artifactId>mockserver-netty</artifactId>
|
<artifactId>mockserver-netty</artifactId>
|
||||||
<version>3.10.1</version>
|
<version>3.10.4</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
command -v mvn >/dev/null 2>&1 || sudo apt-get install maven
|
|
||||||
mvn package &&\
|
|
||||||
sudo mv ./target/writelatex-git-bridge-1.0-SNAPSHOT-jar-with-dependencies.jar /usr/local/sbin/writelatex-git-bridge.jar
|
|
|
@ -28,7 +28,7 @@ public class FileServlet extends ResourceHandler {
|
||||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
|
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
|
||||||
String method = baseRequest.getMethod();
|
String method = baseRequest.getMethod();
|
||||||
if (method.equals("GET")) {
|
if (method.equals("GET")) {
|
||||||
HttpURI uri = baseRequest.getUri();
|
HttpURI uri = baseRequest.getHttpURI();
|
||||||
Log.info(method + " <- " + uri);
|
Log.info(method + " <- " + uri);
|
||||||
MultiMap<String> multimap = new MultiMap<String>();
|
MultiMap<String> multimap = new MultiMap<String>();
|
||||||
uri.decodeQueryTo(multimap);
|
uri.decodeQueryTo(multimap);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class PostbackHandler extends AbstractHandler {
|
||||||
}
|
}
|
||||||
String projectName = parts[1];
|
String projectName = parts[1];
|
||||||
String postbackKey = parts[2];
|
String postbackKey = parts[2];
|
||||||
Log.info(baseRequest.getMethod() + " <- " + baseRequest.getUri());
|
Log.info(baseRequest.getMethod() + " <- " + baseRequest.getHttpURI());
|
||||||
PostbackContents postbackContents = new PostbackContents(bridgeAPI, projectName, postbackKey, contents);
|
PostbackContents postbackContents = new PostbackContents(bridgeAPI, projectName, postbackKey, contents);
|
||||||
JsonObject body = new JsonObject();
|
JsonObject body = new JsonObject();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class ResourceFetcherTest {
|
||||||
@Test
|
@Test
|
||||||
public void fetchesFilesThatAreMissingFromUrlStoreCache() throws IOException, SnapshotPostException {
|
public void fetchesFilesThatAreMissingFromUrlStoreCache() throws IOException, SnapshotPostException {
|
||||||
final String testProjectName = "123abc";
|
final String testProjectName = "123abc";
|
||||||
final String testUrl = "http://localhost:" + mockServerRule.getHttpPort() + "/123abc";
|
final String testUrl = "http://localhost:" + mockServerRule.getPort() + "/123abc";
|
||||||
final String oldTestPath = "testPath";
|
final String oldTestPath = "testPath";
|
||||||
final String newTestPath = "missingPath";
|
final String newTestPath = "missingPath";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
sudo rm -f /usr/local/sbin/writelatex-git-bridge.jar &&\
|
|
||||||
sudo rm -f /etc/init.d/wlgb &&\
|
|
||||||
sudo rm -rf /etc/wlgb
|
|
||||||
sudo /usr/sbin/update-rc.d -f wlgb remove
|
|
111
services/git-bridge/writelatex-git-bridge.iml
Normal file
111
services/git-bridge/writelatex-git-bridge.iml
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||||
|
<output url="file://$MODULE_DIR$/target/classes" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.jmock:jmock-junit4:2.8.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.jmock:jmock:2.8.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.jmock:jmock-testjar:2.8.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: cglib:cglib:3.2.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.9.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.9.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:1.3.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.9.v20160517" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.9.v20160517" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.9.v20160517" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.9.v20160517" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.9.v20160517" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.9.v20160517" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.6.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.ning:async-http-client:1.9.38" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.netty:netty:3.10.5.Final" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jgit:org.eclipse.jgit:3.6.0.201412230720-r" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.50" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.googlecode.javaewah:JavaEWAH:0.7.9" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.1.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.1.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.eclipse.jgit:org.eclipse.jgit.http.server:3.6.0.201412230720-r" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.8.11.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: joda-time:joda-time:2.9.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.oauth-client:google-oauth-client:1.22.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.http-client:google-http-client:1.22.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.http-client:google-http-client-gson:1.22.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.guava:guava:19.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-netty:3.10.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-client-java:3.10.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-core:3.10.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-codec-socks:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:finagle-native_2.11:6.33.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.scala-lang:scala-library:2.11.7" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:finagle-core_2.11:6.33.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-app_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-cache_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-codec_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-collection_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-core_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-function_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-hashing_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-jvm_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-lint_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-logging_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-registry_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:util-stats_2.11:6.32.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:jsr166e:1.0.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.twitter:finagle-http_2.11:6.33.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.jcraft:jzlib:1.1.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.bouncycastle:bcmail-jdk15on:1.52" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.52" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.2.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.json:json:20090211" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:json-schema-validator:2.2.6" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.googlecode.libphonenumber:libphonenumber:6.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:json-schema-core:1.2.5" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:uri-template:0.9" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:msg-simple:1.1" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:btf:1.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:jackson-coreutils:1.8" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.mozilla:rhino:1.7R4" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: javax.mail:mailapi:1.4.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:activation:1.1" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: net.sf.jopt-simple:jopt-simple:4.6" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: xerces:xercesImpl:2.4.0" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: commons-io:commons-io:1.3.2" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-buffer:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-codec:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-codec-http:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-common:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-handler:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-transport:4.0.34.Final" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.bouncycastle:bcprov-jdk15on:1.52" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: janino:janino:2.5.10" level="project" />
|
||||||
|
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-logging:3.10.4" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
Loading…
Reference in a new issue