Merge pull request #78 from Parabot/cleanup/remove-bugsnag

[CLEANUP] Removed Bugsnag and deployment files
This commit is contained in:
Jeroen Ketelaar
2016-05-24 15:33:08 +02:00
10 changed files with 122 additions and 182 deletions
-1
View File
@@ -1 +0,0 @@
mvn clean
-5
View File
@@ -1,5 +0,0 @@
mvn install:install-file -DgroupId=${project.groupId} -DartifactId=${project.artifactId} -Dversion=${project.version} -Dpackaging=jar -Dfile=../target/final/${project.build.finalName}-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
:: mvn install:install-file -DgroupId=org.parabot -DartifactId=client -Dversion=2.4.1.1 -Dpackaging=jar -Dfile=../target/Parabot-V2.4.1.1-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
:: mvn install:install-file -DgroupId=org.parabot -DartifactId=client -Dversion=2.4.3 -Dpackaging=jar -Dfile=../target/Parabot-V2.4.3-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
:: mvn install:install-file -DgroupId=org.parabot -DartifactId=client -Dversion=2.5 -Dpackaging=jar -Dfile=../target/final/Parabot-V2.5-jar-with-dependencies.jar -DlocalRepositoryPath=../../Maven-Repository
-1
View File
@@ -1 +0,0 @@
mvn package
+4 -19
View File
@@ -59,24 +59,16 @@
<version>1.1.1</version> <version>1.1.1</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>junit</groupId> <groupId>*</groupId>
<artifactId>junit</artifactId> <artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>com.bugsnag</groupId>
<artifactId>bugsnag</artifactId>
<version>1.2.8</version>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.11</version> <version>4.11</version>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@@ -90,14 +82,6 @@
<resource> <resource>
<directory>deploy</directory> <directory>deploy</directory>
<filtering>true</filtering> <filtering>true</filtering>
<excludes>
<exclude>deploy.bat</exclude>
<exclude>package.bat</exclude>
<exclude>clean.bat</exclude>
</excludes>
<!--<includes>-->
<!--<include>deploy.bat</include>-->
<!--</includes>-->
</resource> </resource>
</resources> </resources>
@@ -139,6 +123,7 @@
<outputDirectory>${project.build.directory}/final/</outputDirectory> <outputDirectory>${project.build.directory}/final/</outputDirectory>
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<id>make-assembly</id> <id>make-assembly</id>
+1 -3
View File
@@ -1,6 +1,5 @@
package org.parabot; package org.parabot;
import com.bugsnag.Client;
import org.parabot.core.Configuration; import org.parabot.core.Configuration;
import org.parabot.core.Core; import org.parabot.core.Core;
import org.parabot.core.Directories; import org.parabot.core.Directories;
@@ -11,7 +10,6 @@ import org.parabot.core.network.proxy.ProxyType;
import org.parabot.core.ui.BotUI; import org.parabot.core.ui.BotUI;
import org.parabot.core.ui.ServerSelector; import org.parabot.core.ui.ServerSelector;
import org.parabot.core.ui.utils.UILog; import org.parabot.core.ui.utils.UILog;
import org.parabot.environment.api.utils.JavaUtil;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@@ -29,8 +27,8 @@ import java.net.URI;
public final class Landing { public final class Landing {
private static String username; private static String username;
private static String password; private static String password;
public static void main(String... args) throws IOException { public static void main(String... args) throws IOException {
Core.initiateBugsnagInstance();
parseArgs(args); parseArgs(args);
-30
View File
@@ -1,8 +1,5 @@
package org.parabot.core; package org.parabot.core;
import com.bugsnag.BeforeNotify;
import com.bugsnag.Client;
import com.bugsnag.Error;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
import org.json.simple.parser.ParseException; import org.json.simple.parser.ParseException;
import org.parabot.Landing; import org.parabot.Landing;
@@ -39,8 +36,6 @@ public class Core {
private static Version currentVersion = Configuration.BOT_VERSION; private static Version currentVersion = Configuration.BOT_VERSION;
private static Version latestVersion; private static Version latestVersion;
private static Client bugsnagInstance;
public static void disableValidation() { public static void disableValidation() {
Core.validate = false; Core.validate = false;
} }
@@ -286,8 +281,6 @@ public class Core {
Core.verbose("Checking for updates..."); Core.verbose("Checking for updates...");
validateCache(); validateCache();
setBugsnagVersion();
if ((validVersion() && checksumValid()) || (!checksumValid() && currentVersion.compareTo(latestVersion) >= 0)){ if ((validVersion() && checksumValid()) || (!checksumValid() && currentVersion.compareTo(latestVersion) >= 0)){
Core.verbose("No updates available."); Core.verbose("No updates available.");
return true; return true;
@@ -297,29 +290,6 @@ public class Core {
} }
} }
public static void initiateBugsnagInstance() {
bugsnagInstance = new Client(Configuration.BUGSNAG_API);
bugsnagInstance.setSendThreads(true);
}
public static void setBugsnagVersion(){
Core.bugsnagInstance.setReleaseStage(currentVersion != latestVersion ? "development" : "production");
}
public static void setBugsnagUser(String id, String email, String username){
// TODO Check order of parameters
Core.bugsnagInstance.setUser(username, email, id);
}
public static void setBugsnagServer(String server){
Core.setBugsnagInformation("Server", "Server", server);
}
public static void setBugsnagInformation(String tab, String key, String value){
// TODO Should be checked if correct
Core.bugsnagInstance.addToTab(tab, key, value);
}
public static void debug(int i) { public static void debug(int i) {
if(mDebug) { if(mDebug) {
System.out.println("DEBUG: " + i); System.out.println("DEBUG: " + i);
@@ -33,8 +33,6 @@ public class Account {
this.username = username; this.username = username;
this.password = password; this.password = password;
this.api = api; this.api = api;
Core.setBugsnagUser("Null", this.username, "Null");
} }
/** /**
@@ -156,7 +156,6 @@ public class Script implements Runnable {
if(state < 0 || state > 2) { if(state < 0 || state > 2) {
throw new IllegalArgumentException("Illegal state"); throw new IllegalArgumentException("Illegal state");
} }
Core.setBugsnagInformation("Script", "State", String.valueOf(state));
this.state = state; this.state = state;
} }
@@ -181,6 +180,5 @@ public class Script implements Runnable {
public void setScriptID(int scriptID){ public void setScriptID(int scriptID){
this.scriptID = scriptID; this.scriptID = scriptID;
Core.setBugsnagInformation("Script", "State", String.valueOf(scriptID));
} }
} }
@@ -24,8 +24,6 @@ public abstract class ServerExecuter {
@Override @Override
public void run() { public void run() {
try { try {
Core.setBugsnagServer(serverName);
Context context = Context.getInstance(provider); Context context = Context.getInstance(provider);
context.load(); context.load();
PaintComponent.getInstance().startPainting(context); PaintComponent.getInstance().startPainting(context);
+1 -1
View File
@@ -1 +1 @@
application.version=${project.version} application.version=${project.version}${build.version}