Cleanup.
This commit is contained in:
parent
8f35d050df
commit
52c5e2dba7
2 changed files with 9 additions and 8 deletions
|
@ -40,7 +40,7 @@ import org.jetbrains.annotations.NotNull;
|
|||
import java.util.List;
|
||||
|
||||
public class Versions extends AbstractCommand {
|
||||
private final List<String> versions =
|
||||
private final List<String> verList =
|
||||
List.of("Version: " + ReleaseInfo.VERSION + " (" + Utils.isoLocalDate(ReleaseInfo.BUILDDATE) + ')',
|
||||
"Platform: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ", "
|
||||
+ System.getProperty("os.arch") + ", " + System.getProperty("user.country") + ')',
|
||||
|
@ -64,8 +64,7 @@ public class Versions extends AbstractCommand {
|
|||
@NotNull
|
||||
@Override
|
||||
public List<String> getHelp() {
|
||||
return List.of("To view the versions data (bot, java, etc.):",
|
||||
Utils.helpIndent("%s " + getName()));
|
||||
return List.of("To view the versions data (bot, platform, java, etc.):", Utils.helpIndent("%c " + getName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,7 +89,7 @@ public class Versions extends AbstractCommand {
|
|||
final boolean isOp,
|
||||
final boolean isPrivate) {
|
||||
if (isOp) {
|
||||
for (final String v : versions) {
|
||||
for (final String v : verList) {
|
||||
getBot().send(sender, v, isPrivate);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -37,8 +37,6 @@ import net.thauvin.erik.pinboard.PinboardPoster
|
|||
import org.testng.Assert
|
||||
import org.testng.annotations.Test
|
||||
import java.net.URL
|
||||
import java.net.URLEncoder
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
class PinboardUtilsTest : LocalProperties() {
|
||||
@Test
|
||||
|
@ -61,8 +59,12 @@ class PinboardUtilsTest : LocalProperties() {
|
|||
}
|
||||
|
||||
private fun validatePin(apiToken: String, ircServer: String = "", url: String): Boolean {
|
||||
val response = Utils.urlReader(URL("https://api.pinboard.in/v1/posts/get?auth_token=${apiToken}&tag=test&"
|
||||
+ Utils.encodeUrl(url)))
|
||||
val response = Utils.urlReader(
|
||||
URL(
|
||||
"https://api.pinboard.in/v1/posts/get?auth_token=${apiToken}&tag=test&"
|
||||
+ Utils.encodeUrl(url)
|
||||
)
|
||||
)
|
||||
|
||||
return response.contains(url) && response.contains(ircServer)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue