From f76fee63ed9cb3a30d3c0c092d860b1cb93a481b Mon Sep 17 00:00:00 2001 From: Gerard Smyth <gerard.smyth@gmail.com> Date: Thu, 08 May 2014 13:09:30 -0400 Subject: [PATCH] Updated the SyndicationServlet to provide an additional option to return details of the tags in the repository instead of the commits. This uses a new 'ot' request parameter to indicate the object type of the content to return, which can be ither TAG or COMMIT. If this is not provided, then COMMIT is assumed to maintain backwards compatability. If tags are returned, then the paging parameters, 'l' and 'pg' are still supported, but searching options are currently ignored. --- src/test/java/com/gitblit/tests/mock/MemorySettings.java | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/gitblit/tests/mock/MemorySettings.java b/src/test/java/com/gitblit/tests/mock/MemorySettings.java index 1b3e238..673d3f2 100644 --- a/src/test/java/com/gitblit/tests/mock/MemorySettings.java +++ b/src/test/java/com/gitblit/tests/mock/MemorySettings.java @@ -16,15 +16,20 @@ */ package com.gitblit.tests.mock; +import java.util.HashMap; import java.util.Map; import java.util.Properties; import com.gitblit.IStoredSettings; public class MemorySettings extends IStoredSettings { - + private Map<String, Object> backingMap; - + + public MemorySettings() { + this(new HashMap<String, Object>()); + } + public MemorySettings(Map<String, Object> backingMap) { super(MemorySettings.class); this.backingMap = backingMap; @@ -34,12 +39,17 @@ protected Properties read() { Properties props = new Properties(); props.putAll(backingMap); - + return props; } - - public void put(Object key, Object value) { - backingMap.put(key.toString(), value); + + public void put(String key, Object value) { + backingMap.put(key, value); + } + + @Override + public boolean saveSettings() { + return false; } @Override -- Gitblit v1.9.1