Permalink
Browse files

bump gradle version, light refactors, doc fixes

  • Loading branch information...
fastily committed Jun 20, 2017
1 parent 7d356d7 commit 2bd50dde512a437aabeba32e83b5d02300134638
@@ -6,4 +6,7 @@ jdk:
addons:
apt:
packages:
- oracle-java8-installer
- oracle-java8-installer
notifications:
email: false
@@ -1,5 +1,6 @@
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
@@ -64,5 +65,5 @@ task genJavadoc(type: Javadoc) {
}
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
gradleVersion = '4.0'
}
BIN -77 Bytes (100%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,6 +1,6 @@
#Fri Apr 14 02:31:24 PDT 2017
#Thu Jun 15 19:15:52 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
warn () {
echo "$*"
}
die ( ) {
die () {
echo
echo "$*"
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
fi
# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
@@ -71,7 +71,7 @@
/**
* Constructor, takes an ASCII color value.
*/
private ColorLog(int v)
ColorLog(int v)
{
this.v = v;
}
@@ -48,8 +48,6 @@ private MQuery()
* @param qut The query template to use. Set this according to the fetching method being implemented
* @param pl Additional custom parameters to apply to each generated WQuery. Optional, set null to disable.
* @param elemArrKey The key for each JsonArray for each title the resulting set
* @param elemKey The key for each String of interest contained in each JsonObject of the JsonArray pointed to by
* {@code elemArrKey}
* @return A Map where the key is the title of the page, and the value is the List of properties fetched.
*/
private static MultiMap<String, JsonObject> getContProp(Wiki wiki, ArrayList<String> titles, QTemplate qut,
@@ -411,7 +409,8 @@ private MQuery()
public static HashMap<String, String> resolveRedirects(Wiki wiki, ArrayList<String> titles)
{
HashMap<String, String> l = new HashMap<>();
titles.stream().forEach(s -> l.put(s, s));
for(String s : titles)
l.put(s, s);
getNoContList(wiki, titles, WQuery.RESOLVEREDIRECT, null, "titles", "redirects")
.forEach(jo -> l.put(GSONP.gString(jo, "from"), GSONP.gString(jo, "to")));
@@ -160,12 +160,7 @@ private void refreshLoginStatus(String uname)
conf.isBot = listUserRights(conf.uname).contains("bot");
}
/**
*
*
* @return A Tuple where {@code x} is {@code csrftoken} and {@code y} is {@code logintoken}
*/
/**
* Fetch tokens
* @param wqt The {@code tokens} QTemplate to use
@@ -289,11 +284,11 @@ public String nss(String title)
}
/**
* Filters pages by namespace. Only pages with a namespace in <code>ns</code> are selected.
* Filters pages by namespace. Only pages with a namespace in {@code ns} are selected.
*
* @param pages Titles to filter
* @param ns Pages in this/these namespace(s) will be returned.
* @return Titles belonging to a NS in <code>ns</code>
* @return Titles belonging to a NS in {@code ns}
*/
public ArrayList<String> filterByNS(ArrayList<String> pages, NS... ns)
{
@@ -313,7 +308,7 @@ public String nss(String title)
*
* @param title The title to check
* @param ns The namespace to convert the title to.
* @return The same title if it is in <code>ns</code>, or the converted title.
* @return The same title if it is in {@code ns}, or the converted title.
*/
public String convertIfNotInNS(String title, NS ns)
{
@@ -339,7 +334,7 @@ public boolean edit(String title, String text, String reason)
}
/**
* Appends text to a page. If <code>title</code> does not exist, then create the page normally with <code>text</code>
* Appends text to a page. If {@code title} does not exist, then create the page normally with {@code text}
*
* @param title The title to edit.
* @param add The text to append
@@ -379,7 +374,7 @@ public boolean replaceText(String title, String regex, String reason)
public boolean replaceText(String title, String regex, String replacement, String reason)
{
String s = getPageText(title), rx = s.replaceAll(regex, replacement);
return rx.equals(s) ? true : edit(title, rx, reason);
return rx.equals(s) || edit(title, rx, reason);
}
/**
@@ -106,7 +106,7 @@ private FL()
public static HashMap<String, String> pMap(String... sl)
{
if (sl.length % 2 == 1)
return null;
throw new IllegalArgumentException("pMap() cannot work with an odd number of entries!");
HashMap<String, String> l = new HashMap<>();
for (int i = 0; i < sl.length; i += 2)
@@ -61,7 +61,7 @@ private WikiGen() throws Throwable
c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(Files.readAllBytes(findConfig(pf)), "AES"));
GSONP.jp.parse(new String(c.doFinal(Files.readAllBytes(findConfig(px))), "UTF-8")).getAsJsonObject()
.entrySet().stream().forEach(e -> master.put(e.getKey(), e.getValue().getAsString()));
.entrySet().forEach(e -> master.put(e.getKey(), e.getValue().getAsString()));
}
/**

0 comments on commit 2bd50dd

Please sign in to comment.