-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1927 from devinbileck/add-gitattributes
Add gitattributes
- Loading branch information
Showing
5 changed files
with
188 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Auto detect text files and normalize line endings to LF | ||
# This will handle all files NOT found below | ||
* text=auto | ||
|
||
# These text files should retain Windows line endings (CRLF) | ||
*.bat text eol=crlf | ||
|
||
# These binary files should be left untouched | ||
# (binary is a macro for -text -diff) | ||
*.bmp binary | ||
*.gif binary | ||
*.ico binary | ||
*.jar binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.png binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.asset.coins; | ||
|
||
import bisq.asset.AddressValidationResult; | ||
import bisq.asset.AddressValidator; | ||
import bisq.asset.Coin; | ||
|
||
public class Zero extends Coin { | ||
|
||
public Zero() { | ||
super("Zero", "ZER", new ZeroAddressValidator()); | ||
} | ||
|
||
|
||
public static class ZeroAddressValidator implements AddressValidator { | ||
|
||
@Override | ||
public AddressValidationResult validate(String address) { | ||
// We only support t addresses (transparent transactions) | ||
if (!address.startsWith("t1")) | ||
return AddressValidationResult.invalidAddress("", "validation.altcoin.zAddressesNotSupported"); | ||
|
||
return AddressValidationResult.validAddress(); | ||
} | ||
} | ||
} | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.asset.coins; | ||
|
||
import bisq.asset.AddressValidationResult; | ||
import bisq.asset.AddressValidator; | ||
import bisq.asset.Coin; | ||
|
||
public class Zero extends Coin { | ||
|
||
public Zero() { | ||
super("Zero", "ZER", new ZeroAddressValidator()); | ||
} | ||
|
||
|
||
public static class ZeroAddressValidator implements AddressValidator { | ||
|
||
@Override | ||
public AddressValidationResult validate(String address) { | ||
// We only support t addresses (transparent transactions) | ||
if (!address.startsWith("t1")) | ||
return AddressValidationResult.invalidAddress("", "validation.altcoin.zAddressesNotSupported"); | ||
|
||
return AddressValidationResult.validAddress(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.asset.coins; | ||
|
||
import bisq.asset.AbstractAssetTest; | ||
|
||
import org.junit.Test; | ||
|
||
public class ZeroTest extends AbstractAssetTest { | ||
|
||
public ZeroTest() { | ||
super(new Zero()); | ||
} | ||
|
||
@Test | ||
public void testValidAddresses() { | ||
assertValidAddress("t1cZTNaKS6juH6tGEhCUZmZhtbYGeYeuTrK"); | ||
assertValidAddress("t1ZBPYJwK2UPbshwcYWRiCq7vw8VPDYumWu"); | ||
} | ||
|
||
@Test | ||
public void testInvalidAddresses() { | ||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem"); | ||
assertInvalidAddress("38NwrYsD1HxQW5zfLT0QcUUXGMPvQgzTSn"); | ||
assertInvalidAddress("8tP9rh3SH6n9cSLmV22vnSNNw56LKGpLrB"); | ||
assertInvalidAddress("8Zbvjr"); | ||
} | ||
} | ||
/* | ||
* This file is part of Bisq. | ||
* | ||
* Bisq is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* Bisq is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package bisq.asset.coins; | ||
|
||
import bisq.asset.AbstractAssetTest; | ||
|
||
import org.junit.Test; | ||
|
||
public class ZeroTest extends AbstractAssetTest { | ||
|
||
public ZeroTest() { | ||
super(new Zero()); | ||
} | ||
|
||
@Test | ||
public void testValidAddresses() { | ||
assertValidAddress("t1cZTNaKS6juH6tGEhCUZmZhtbYGeYeuTrK"); | ||
assertValidAddress("t1ZBPYJwK2UPbshwcYWRiCq7vw8VPDYumWu"); | ||
} | ||
|
||
@Test | ||
public void testInvalidAddresses() { | ||
assertInvalidAddress("17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem"); | ||
assertInvalidAddress("38NwrYsD1HxQW5zfLT0QcUUXGMPvQgzTSn"); | ||
assertInvalidAddress("8tP9rh3SH6n9cSLmV22vnSNNw56LKGpLrB"); | ||
assertInvalidAddress("8Zbvjr"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
@if "%DEBUG%" == "" @echo off | ||
@rem ########################################################################## | ||
@rem | ||
@rem Gradle startup script for Windows | ||
@rem | ||
@rem ########################################################################## | ||
|
||
@rem Set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" setlocal | ||
|
||
set DIRNAME=%~dp0 | ||
if "%DIRNAME%" == "" set DIRNAME=. | ||
set APP_BASE_NAME=%~n0 | ||
set APP_HOME=%DIRNAME% | ||
|
||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
set DEFAULT_JVM_OPTS= | ||
|
||
@rem Find java.exe | ||
if defined JAVA_HOME goto findJavaFromJavaHome | ||
|
||
set JAVA_EXE=java.exe | ||
%JAVA_EXE% -version >NUL 2>&1 | ||
if "%ERRORLEVEL%" == "0" goto init | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:findJavaFromJavaHome | ||
set JAVA_HOME=%JAVA_HOME:"=% | ||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
|
||
if exist "%JAVA_EXE%" goto init | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:init | ||
@rem Get command-line arguments, handling Windows variants | ||
|
||
if not "%OS%" == "Windows_NT" goto win9xME_args | ||
|
||
:win9xME_args | ||
@rem Slurp the command line arguments. | ||
set CMD_LINE_ARGS= | ||
set _SKIP=2 | ||
|
||
:win9xME_args_slurp | ||
if "x%~1" == "x" goto execute | ||
|
||
set CMD_LINE_ARGS=%* | ||
|
||
:execute | ||
@rem Setup the command line | ||
|
||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
|
||
@rem Execute Gradle | ||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||
|
||
:end | ||
@rem End local scope for the variables with windows NT shell | ||
if "%ERRORLEVEL%"=="0" goto mainEnd | ||
|
||
:fail | ||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||
rem the _cmd.exe /c_ return code! | ||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||
exit /b 1 | ||
|
||
:mainEnd | ||
if "%OS%"=="Windows_NT" endlocal | ||
|
||
:omega | ||
@if "%DEBUG%" == "" @echo off | ||
@rem ########################################################################## | ||
@rem | ||
@rem Gradle startup script for Windows | ||
@rem | ||
@rem ########################################################################## | ||
|
||
@rem Set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" setlocal | ||
|
||
set DIRNAME=%~dp0 | ||
if "%DIRNAME%" == "" set DIRNAME=. | ||
set APP_BASE_NAME=%~n0 | ||
set APP_HOME=%DIRNAME% | ||
|
||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
set DEFAULT_JVM_OPTS= | ||
|
||
@rem Find java.exe | ||
if defined JAVA_HOME goto findJavaFromJavaHome | ||
|
||
set JAVA_EXE=java.exe | ||
%JAVA_EXE% -version >NUL 2>&1 | ||
if "%ERRORLEVEL%" == "0" goto init | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:findJavaFromJavaHome | ||
set JAVA_HOME=%JAVA_HOME:"=% | ||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
|
||
if exist "%JAVA_EXE%" goto init | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:init | ||
@rem Get command-line arguments, handling Windows variants | ||
|
||
if not "%OS%" == "Windows_NT" goto win9xME_args | ||
|
||
:win9xME_args | ||
@rem Slurp the command line arguments. | ||
set CMD_LINE_ARGS= | ||
set _SKIP=2 | ||
|
||
:win9xME_args_slurp | ||
if "x%~1" == "x" goto execute | ||
|
||
set CMD_LINE_ARGS=%* | ||
|
||
:execute | ||
@rem Setup the command line | ||
|
||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
|
||
@rem Execute Gradle | ||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||
|
||
:end | ||
@rem End local scope for the variables with windows NT shell | ||
if "%ERRORLEVEL%"=="0" goto mainEnd | ||
|
||
:fail | ||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||
rem the _cmd.exe /c_ return code! | ||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||
exit /b 1 | ||
|
||
:mainEnd | ||
if "%OS%"=="Windows_NT" endlocal | ||
|
||
:omega |