Skip to content

Commit e93a340

Browse files
authored
V1.3.1 dev (#14)
* Removed exclude range * Bumped version * Updated pom version extract * Added missing merchandise items * Encyclopedia Eorzea * Both Heavensward Lore books * Both new carbuncle plushes * Updated changelog and readme to reflect changes added * Added Moogle Beast Tribe Mount * Added Vanu Vanu beast tribe mount * Added Vath beast tribe mount * Update pom.xml * [Bugfix] 180 days and 90 day subscriptions were returing wrong value * [Bugfix] missing comma was causing db inserts to fail * Added option to supress SSL verification warnings * Updated changelog
1 parent 8be1a43 commit e93a340

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
v1.3.1
2+
======
3+
* Resolved bug with mismatching number of column headers and values in SQL inserts
4+
* Added option to suppress SSL verification warnings - `-s`
5+
16
v1.3.0
27
======
38
* Completely removed 30 second exclude range from image reader - it was excluding players that are active, and none of the players being excluded are inactive.

src/main/java/com/ffxivcensus/gatherer/Console.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static GathererController run(String [] args){
2626
Options options = setupOptions();
2727

2828
//Declare usage string
29-
String usage = "java -jar XIVStats-Gatherer-Java.jar [-abmqvxDFPS] -s startid -f finishid [-d database-name] [-u database-user] [-p database-user-password] [-U database-url] [-T table] [-t threads]";
29+
String usage = "java -jar XIVStats-Gatherer-Java.jar [-abimqvxDFPS] -s startid -f finishid [-d database-name] [-u database-user] [-p database-user-password] [-U database-url] [-T table] [-t threads]";
3030
HelpFormatter formatter = new HelpFormatter();
3131

3232
try{
@@ -85,6 +85,8 @@ public static GathererController run(String [] args){
8585
gatherer.setDbPassword(cmd.getOptionValue("p"));
8686
}
8787

88+
gatherer.setDbIgnoreSSLWarn(cmd.hasOption("i"));
89+
8890
//Program threads
8991
if(cmd.hasOption("t")){
9092
gatherer.setThreadLimit(Integer.parseInt(cmd.getOptionValue("t")));
@@ -151,6 +153,7 @@ public static Options setupOptions(){
151153
Option optSuffix = Option.builder("x").longOpt("suffix").hasArg().numberOfArgs(1).argName("table-suffix").desc("suffix to append to all tables").build();
152154
Option optStoreActive = Option.builder("a").longOpt("do-not-store-activity").desc("do not store boolean data indicating player activity in last 30 days").build();
153155
Option optStoreDate = Option.builder("D").longOpt("do-not-store-date").desc("do not store Date of last player activity").build();
156+
Option optIgnoreSSLVerify = Option.builder("i").longOpt("ignore-ssl-verification").desc("Supress/ignore MySQL SSL verification warnings").build();
154157

155158
//Add each option to the options object
156159
options.addOption(optStart);
@@ -172,6 +175,7 @@ public static Options setupOptions(){
172175
options.addOption(optSuffix);
173176
options.addOption(optStoreActive);
174177
options.addOption(optStoreDate);
178+
options.addOption(optIgnoreSSLVerify);
175179

176180
return options;
177181
}

src/main/java/com/ffxivcensus/gatherer/GathererController.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public class GathererController {
3939
* The password for the user, to use.
4040
*/
4141
private String dbPassword;
42+
/**
43+
* Whether to ignore database SSL verification warnings
44+
*/
45+
private boolean dbIgnoreSSLWarn;
4246
/**
4347
* The character ID to start the gatherer at.
4448
*/
@@ -183,6 +187,9 @@ public GathererController(int startId, int endId, boolean quiet, boolean verbose
183187

184188
//Parameters specified should outweigh config
185189
this.dbUrl = "jdbc:" + dbUrl + "/" + dbName;
190+
if (this.dbIgnoreSSLWarn) {
191+
this.dbUrl += "?useSSL=false";
192+
}
186193
this.dbUser = dbUser;
187194
this.dbPassword = dbPassword;
188195
this.threadLimit = threads;
@@ -347,7 +354,7 @@ private void createTable(String tableName) {
347354
sbSQL.append("soundtrack BIT,saweternalbond BIT,sightseeing BIT,comm50 BIT,moogleplush BIT,");
348355
sbSQL.append("topazcarubuncleplush BIT,emeraldcarbuncleplush BIT,");
349356
sbSQL.append("hildibrand BIT, dideternalbond BIT, arrcollector BIT,");
350-
sbSQL.append("kobold BIT, sahagin BIT, amaljaa BIT, sylph BIT, moogle BIT, vanuvanu BIT, vath BIT, ");
357+
sbSQL.append("kobold BIT, sahagin BIT, amaljaa BIT, sylph BIT,");
351358
sbSQL.append("arr_25_complete BIT,hw_complete BIT, hw_31_complete BIT, hw_33_complete BIT, legacy_player BIT");
352359
}
353360
if (this.storeMounts) {
@@ -497,7 +504,7 @@ protected String writeToDB(Player player) {
497504
+ player.getBitHas960DaysSub() + ",");
498505

499506
sbFields.append("prearr, prehw, arrartbook, hwartbookone, hwartbooktwo, hasencyclopedia, beforemeteor, beforethefall, soundtrack, saweternalbond, "
500-
+ "sightseeing, arr_25_complete, comm50, moogleplush, topazcarubuncleplush, emeraldcarbuncleplush");
507+
+ "sightseeing, arr_25_complete, comm50, moogleplush, topazcarubuncleplush, emeraldcarbuncleplush,");
501508
sbValues.append(player.getBitHasPreOrderArr() + "," + player.getBitHasPreOrderHW() + ","
502509
+ player.getBitHasArrArtbook() + "," + player.getBitHasHWArtbookOne() + ","
503510
+ player.getBitHasHWArtbookTwo() + "," + player.getBitHasEncyclopediaEorzea() + ","
@@ -846,4 +853,12 @@ public void setStoreActiveDate(boolean storeActiveDate) {
846853
public void setStorePlayerActive(boolean storePlayerActive) {
847854
this.storePlayerActive = storePlayerActive;
848855
}
856+
857+
/**
858+
* Set whether to ignore database ssl verification warnings
859+
* @param dbIgnoreSSLWarn whether to ignore database ssl verification warnings
860+
*/
861+
public void setDbIgnoreSSLWarn(boolean dbIgnoreSSLWarn) {
862+
this.dbIgnoreSSLWarn = dbIgnoreSSLWarn;
863+
}
849864
}

src/test/java/com/ffxivcensus/gatherer/ConsoleTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void cleanUpStreams() {
119119
@Test
120120
public void testConsole() throws Exception {
121121

122-
String[] args = {"-s", "0", "-f", "100", "-t", "10", "-T", "tblplayers_test", "-d", dbName,"-U",dbHost, "-bPq"};
122+
String[] args = {"-is", "0", "-f", "100", "-t", "10", "-T", "tblplayers_test", "-d", dbName,"-U",dbHost, "-bPq"};
123123

124124
GathererController gc = Console.run(args);
125125
//Test that options have set attributes correctly
@@ -168,7 +168,7 @@ public void testConsoleFullOptions() throws Exception {
168168
@Test
169169
public void TestConsoleHelpDefault() throws Exception {
170170

171-
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-abmqvxDFPS] -s startid -f";
171+
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-abimqvxDFPS] -s startid -f";
172172

173173
//Test for a help dialog displayed upon failure
174174
String[] args = {""};
@@ -180,7 +180,7 @@ public void TestConsoleHelpDefault() throws Exception {
180180
@Test
181181
public void TestConsoleHelpOnFail() throws Exception {
182182

183-
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-abmqvxDFPS] -s startid -f";
183+
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-abimqvxDFPS] -s startid -f";
184184
//Test for a help dialog displayed upon failure
185185
String[] args = {"-s 0"};
186186
GathererController gc = Console.run(args);
@@ -192,7 +192,7 @@ public void TestConsoleHelpOnFail() throws Exception {
192192
@Test
193193
public void TestConsoleHelp() throws Exception {
194194

195-
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-abmqvxDFPS] -s startid -f";
195+
String strHelp = "usage: java -jar XIVStats-Gatherer-Java.jar [-abimqvxDFPS] -s startid -f";
196196

197197
//First test for a user requested help dialog
198198
String[] args = {"--help"};

0 commit comments

Comments
 (0)