From 8ea3ed5dbef3a35bf508c14f9102664ca502f8a8 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 10:15:14 +0100 Subject: [PATCH 01/10] Add IDEA project files Using this .gitignore file to decide what to commit: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitigno re --- services/git-bridge/.gitignore | 45 ++++++++++- services/git-bridge/.idea/compiler.xml | 32 ++++++++ .../.idea/copyright/profiles_settings.xml | 3 + services/git-bridge/.idea/encodings.xml | 6 ++ services/git-bridge/.idea/misc.xml | 14 ++++ services/git-bridge/.idea/modules.xml | 8 ++ services/git-bridge/writelatex-git-bridge.iml | 81 +++++++++++++++++++ 7 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 services/git-bridge/.idea/compiler.xml create mode 100644 services/git-bridge/.idea/copyright/profiles_settings.xml create mode 100644 services/git-bridge/.idea/encodings.xml create mode 100644 services/git-bridge/.idea/misc.xml create mode 100644 services/git-bridge/.idea/modules.xml create mode 100644 services/git-bridge/writelatex-git-bridge.iml diff --git a/services/git-bridge/.gitignore b/services/git-bridge/.gitignore index e90f3aaf1a..aae52c24d4 100644 --- a/services/git-bridge/.gitignore +++ b/services/git-bridge/.gitignore @@ -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/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 \ No newline at end of file diff --git a/services/git-bridge/.idea/compiler.xml b/services/git-bridge/.idea/compiler.xml new file mode 100644 index 0000000000..ca4e0c0cae --- /dev/null +++ b/services/git-bridge/.idea/compiler.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/git-bridge/.idea/copyright/profiles_settings.xml b/services/git-bridge/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000000..e7bedf3377 --- /dev/null +++ b/services/git-bridge/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/services/git-bridge/.idea/encodings.xml b/services/git-bridge/.idea/encodings.xml new file mode 100644 index 0000000000..b26911bd02 --- /dev/null +++ b/services/git-bridge/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/services/git-bridge/.idea/misc.xml b/services/git-bridge/.idea/misc.xml new file mode 100644 index 0000000000..e04d97a9fa --- /dev/null +++ b/services/git-bridge/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/services/git-bridge/.idea/modules.xml b/services/git-bridge/.idea/modules.xml new file mode 100644 index 0000000000..4cebdcf6c0 --- /dev/null +++ b/services/git-bridge/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml new file mode 100644 index 0000000000..a95c551acc --- /dev/null +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 465db49a22b6161747ba8a9f8104269c4de46ed3 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 10:39:21 +0100 Subject: [PATCH 02/10] Remove installation scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now handle production deployment using some ansible playbooks based on these scripts, so rather than having slightly different versions in two places, I think it’s safer to remove them for now. --- services/git-bridge/README.md | 20 ++-- services/git-bridge/bin/config.json | 14 --- services/git-bridge/bin/wlgb | 159 ---------------------------- services/git-bridge/install | 19 ---- services/git-bridge/reinstall | 3 - services/git-bridge/uninstall | 4 - 6 files changed, 11 insertions(+), 208 deletions(-) delete mode 100644 services/git-bridge/bin/config.json delete mode 100755 services/git-bridge/bin/wlgb delete mode 100755 services/git-bridge/install delete mode 100755 services/git-bridge/reinstall delete mode 100755 services/git-bridge/uninstall diff --git a/services/git-bridge/README.md b/services/git-bridge/README.md index ec276381e2..fa8c76f7db 100644 --- a/services/git-bridge/README.md +++ b/services/git-bridge/README.md @@ -4,21 +4,23 @@ writelatex-git-bridge Required -------- * `maven` (for building) - * `jdk-7` (for compiling and running) + * `jdk-8` (for compiling and running) 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`. Use `java -jar ` to run the server. @@ -26,7 +28,7 @@ Use `java -jar ` to run the server. 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, diff --git a/services/git-bridge/bin/config.json b/services/git-bridge/bin/config.json deleted file mode 100644 index 20b41c0025..0000000000 --- a/services/git-bridge/bin/config.json +++ /dev/null @@ -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" - } -} diff --git a/services/git-bridge/bin/wlgb b/services/git-bridge/bin/wlgb deleted file mode 100755 index 963a528b38..0000000000 --- a/services/git-bridge/bin/wlgb +++ /dev/null @@ -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 -# -# 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 - -: diff --git a/services/git-bridge/install b/services/git-bridge/install deleted file mode 100755 index a041997170..0000000000 --- a/services/git-bridge/install +++ /dev/null @@ -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 diff --git a/services/git-bridge/reinstall b/services/git-bridge/reinstall deleted file mode 100755 index a0e0afc677..0000000000 --- a/services/git-bridge/reinstall +++ /dev/null @@ -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 diff --git a/services/git-bridge/uninstall b/services/git-bridge/uninstall deleted file mode 100755 index 8ada2b0f99..0000000000 --- a/services/git-bridge/uninstall +++ /dev/null @@ -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 From 1edaf5fe776a6e0439f04a14208844f6189de28c Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 11:57:04 +0100 Subject: [PATCH 03/10] Upgrade to jetty 9.3.9 --- services/git-bridge/pom.xml | 11 ++++++++--- .../java/uk/ac/ic/wlgitbridge/server/FileServlet.java | 2 +- .../uk/ac/ic/wlgitbridge/server/PostbackHandler.java | 2 +- services/git-bridge/writelatex-git-bridge.iml | 8 ++++++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index 89b4ff3a9a..f03a161d3c 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -59,9 +59,14 @@ test - org.eclipse.jetty.aggregate - jetty-all - 9.2.6.v20141205 + org.eclipse.jetty + jetty-servlet + 9.3.9.v20160517 + + + org.eclipse.jetty + jetty-server + 9.3.9.v20160517 com.google.code.gson diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/FileServlet.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/FileServlet.java index bd2e0f9744..ff27def93d 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/FileServlet.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/FileServlet.java @@ -28,7 +28,7 @@ public class FileServlet extends ResourceHandler { public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String method = baseRequest.getMethod(); if (method.equals("GET")) { - HttpURI uri = baseRequest.getUri(); + HttpURI uri = baseRequest.getHttpURI(); Log.info(method + " <- " + uri); MultiMap multimap = new MultiMap(); uri.decodeQueryTo(multimap); diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/PostbackHandler.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/PostbackHandler.java index d684a2932f..6949df193f 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/PostbackHandler.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/server/PostbackHandler.java @@ -38,7 +38,7 @@ public class PostbackHandler extends AbstractHandler { } String projectName = parts[1]; String postbackKey = parts[2]; - Log.info(baseRequest.getMethod() + " <- " + baseRequest.getUri()); + Log.info(baseRequest.getMethod() + " <- " + baseRequest.getHttpURI()); PostbackContents postbackContents = new PostbackContents(bridgeAPI, projectName, postbackKey, contents); JsonObject body = new JsonObject(); diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index a95c551acc..52547c660c 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -17,9 +17,13 @@ - - + + + + + + From ad81e7a2eed1361c1c11a27958788224e4871809 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:01:35 +0100 Subject: [PATCH 04/10] Upgrade joda-time to 2.9.4 --- services/git-bridge/pom.xml | 2 +- services/git-bridge/writelatex-git-bridge.iml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index f03a161d3c..db2299d847 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -96,7 +96,7 @@ joda-time joda-time - 2.7 + 2.9.4 com.google.oauth-client diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index 52547c660c..ee0bab768d 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -36,7 +36,7 @@ - + From bbde2d31d84cbe362fab5cb944da0bc09a4eb929 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:07:06 +0100 Subject: [PATCH 05/10] Upgrade gson to 2.6.2 --- services/git-bridge/pom.xml | 2 +- services/git-bridge/writelatex-git-bridge.iml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index db2299d847..422ffda819 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -71,7 +71,7 @@ com.google.code.gson gson - 2.3.1 + 2.6.2 com.ning diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index ee0bab768d..b97492cd9a 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -24,7 +24,7 @@ - + From dbaa78928eb66105f995790a3abbbb4b6a937e68 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:12:39 +0100 Subject: [PATCH 06/10] Upgrade sqlite-jdbc to 3.8.11.2 --- services/git-bridge/pom.xml | 2 +- services/git-bridge/writelatex-git-bridge.iml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index 422ffda819..91e6a5d109 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -91,7 +91,7 @@ org.xerial sqlite-jdbc - 3.8.7 + 3.8.11.2 joda-time diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index b97492cd9a..fdc297f583 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -35,7 +35,7 @@ - + From c3725e3246d8bdd2926d761024c9aba91e83aa14 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:22:14 +0100 Subject: [PATCH 07/10] Upgrade async-http-client to 1.9.38 --- services/git-bridge/pom.xml | 2 +- services/git-bridge/writelatex-git-bridge.iml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index 91e6a5d109..e42f31659e 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -76,7 +76,7 @@ com.ning async-http-client - 1.9.3 + 1.9.38 org.eclipse.jgit diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index fdc297f583..264fbec9b2 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -25,8 +25,8 @@ - - + + From 13a75fdb95cf813ea69b005b14696f867ec8d2ca Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:26:58 +0100 Subject: [PATCH 08/10] Upgrade google http and oauth clients to 1.22.0 --- services/git-bridge/pom.xml | 6 +++--- services/git-bridge/writelatex-git-bridge.iml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index e42f31659e..20d5050688 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -101,17 +101,17 @@ com.google.oauth-client google-oauth-client - 1.20.0 + 1.22.0 com.google.http-client google-http-client - 1.20.0 + 1.22.0 com.google.http-client google-http-client-gson - 1.20.0 + 1.22.0 commons-lang diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index 264fbec9b2..f4986b0e48 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -37,10 +37,10 @@ - + - - + + From 9c63ea6c934560117a1bcf6577c15f56febe0e00 Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:41:24 +0100 Subject: [PATCH 09/10] Upgrade some testing dependencies --- services/git-bridge/pom.xml | 4 +- .../data/model/ResourceFetcherTest.java | 2 +- services/git-bridge/writelatex-git-bridge.iml | 56 ++++++++++++++----- 3 files changed, 44 insertions(+), 18 deletions(-) diff --git a/services/git-bridge/pom.xml b/services/git-bridge/pom.xml index 20d5050688..e2d4807083 100644 --- a/services/git-bridge/pom.xml +++ b/services/git-bridge/pom.xml @@ -55,7 +55,7 @@ org.jmock jmock-junit4 - 2.6.0 + 2.8.2 test @@ -137,7 +137,7 @@ org.mock-server mockserver-netty - 3.10.1 + 3.10.4 test diff --git a/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/data/model/ResourceFetcherTest.java b/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/data/model/ResourceFetcherTest.java index 2872755c2c..17cfcf8584 100644 --- a/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/data/model/ResourceFetcherTest.java +++ b/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/data/model/ResourceFetcherTest.java @@ -32,7 +32,7 @@ public class ResourceFetcherTest { @Test public void fetchesFilesThatAreMissingFromUrlStoreCache() throws IOException, SnapshotPostException { 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 newTestPath = "missingPath"; diff --git a/services/git-bridge/writelatex-git-bridge.iml b/services/git-bridge/writelatex-git-bridge.iml index f4986b0e48..1b57a57254 100644 --- a/services/git-bridge/writelatex-git-bridge.iml +++ b/services/git-bridge/writelatex-git-bridge.iml @@ -13,10 +13,15 @@ - - - - + + + + + + + + + @@ -45,11 +50,31 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + @@ -69,17 +94,18 @@ + - - - - - - + + + + + + - + \ No newline at end of file From 758bc3eb8c285819d948c0e0a08fc3e53ee22efb Mon Sep 17 00:00:00 2001 From: John Lees-Miller Date: Thu, 2 Jun 2016 12:59:23 +0100 Subject: [PATCH 10/10] Add missing newline at end of file --- services/git-bridge/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/git-bridge/.gitignore b/services/git-bridge/.gitignore index aae52c24d4..d198a6a13c 100644 --- a/services/git-bridge/.gitignore +++ b/services/git-bridge/.gitignore @@ -42,4 +42,4 @@ atlassian-ide-plugin.xml com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties -fabric.properties \ No newline at end of file +fabric.properties