Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавлены мультиплеерные очки #2

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3bf29e9
added division into single and multi scores
batrSens May 2, 2018
474f7cb
+travis
batrSens May 3, 2018
4991d2e
+crossorigin
batrSens May 3, 2018
f24f194
Update SessionController.java
batrSens May 4, 2018
52dcfac
Update SessionController.java
batrSens May 4, 2018
7b0dddc
Update SessionController.java
batrSens May 4, 2018
7e82462
added mechanics
batrSens May 31, 2018
b5e8dc0
Revert "added mechanics"
batrSens May 31, 2018
d1f30fe
Revert "Revert "added mechanics"" qq
batrSens May 31, 2018
baff806
Revert "Revert "Revert "added mechanics"" qq"
batrSens May 31, 2018
7cc635c
added mechanics again
batrSens May 31, 2018
a58a2fb
deleted mechanics
batrSens May 31, 2018
417fe50
again
batrSens May 31, 2018
840aaa7
added mechanics2
batrSens May 31, 2018
fc79b6a
...
batrSens May 31, 2018
5815368
...
batrSens May 31, 2018
1325e17
mechanics!!!
batrSens May 31, 2018
a22c055
Tests
batrSens May 31, 2018
8d3db18
Revert "Tests"
batrSens May 31, 2018
6126b6c
Revert "Revert "Tests""
batrSens May 31, 2018
dfeb2e3
.
batrSens May 31, 2018
7b8c393
..
batrSens May 31, 2018
9446fa9
...
batrSens May 31, 2018
79cd000
,,
batrSens May 31, 2018
c7ead6b
app
batrSens May 31, 2018
a645f10
++
batrSens May 31, 2018
781780b
deleted imports
batrSens May 31, 2018
8356b4d
fixed
batrSens Jun 1, 2018
381328d
"target" removed
batrSens Jun 1, 2018
73d3041
delete...
batrSens Jun 1, 2018
f21e73e
delete[3]
batrSens Jun 1, 2018
d9a1550
...
batrSens Jun 1, 2018
f5c5bd8
...
batrSens Jun 2, 2018
311deaa
...
batrSens Jun 2, 2018
6cd5899
..
batrSens Jun 5, 2018
9e7ab98
..
batrSens Jun 5, 2018
be3078c
//
batrSens Jun 5, 2018
57d1551
..
batrSens Jun 5, 2018
c12065b
mech
batrSens Jun 5, 2018
3d15a09
fixed ci
batrSens Jun 5, 2018
d3335c0
..
batrSens Jun 5, 2018
296b914
..
batrSens Jun 5, 2018
415e520
travis??
batrSens Jun 5, 2018
8e9ed67
tr
batrSens Jun 5, 2018
145bb0b
TRAVIIIS
batrSens Jun 5, 2018
aa91537
trav
batrSens Jun 5, 2018
60a270f
CI!!!
batrSens Jun 5, 2018
89db467
tests
batrSens Jun 6, 2018
af729a7
?
batrSens Jun 6, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
language: java
language: java
jdk: oraclejdk9
spring:
datasource:
url: ${JDBC_DATABASE_URL}
username: ${JDBC_DATABASE_USERNAME}
password: ${JDBC_DATABASE_PASSWORD}

addons:
postgresql: "9.6"

services:
- postgresql

before_install:
- psql -c "create user vitalya with password '1324qwer';" -U postgres
- psql -c "create database brodb;" -U postgres
- psql -c "grant all on database brodb to vitalya;" -U postgres

#deploy:
# provider: heroku
# api_key:
# secure: $HEROKU_API_KEY
# app: BroForce-02-2018
# on:
# repo: BatrSens/BroForce-02-2018
# branch: master
# skip_cleanup: true
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: java -jar ./target/BroForce-02-2018-1.0-SNAPSHOT.jar
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,4 @@
- Масягин Михаил АПО-22
- Мельников Владислав АПО-22
- Полещук Виталий АПО-22
- Саркисян Артур АПО-21


| | url | Тело запроса |
| ------ | ------ | ------ |
| Зарегистрироваться | /api/signup | ```{"login":"vitalya", "password":"1324qwer", "email":"[email protected]"}```
| Авторизоваться | /api/signin | ```{"login":"vitalya", "password":"1324qwer"}```
| Запросить пользователя текущей сессии | /api/loginfo | -
| Изменить пароль | /api/newpassword | ```{"password":"1324qwer", "change":"1234"}```
| Изменить логин | /api/newlogin | ```{"password":"1324qwer", "change":"vitalik"}```
| Изменить email | /api/newemail | ```{"password":"1324qwer", "change":"[email protected]"}```
| Изменить аватар | /api/newavatar | ```{"password":"1324qwer", "change":"_NEW_AVATAR_"}```
| Разлогиниться | /api/logout | -
- Саркисян Артур АПО-21
730 changes: 730 additions & 0 deletions inspection_profile.xml

Large diffs are not rendered by default.

64 changes: 30 additions & 34 deletions park_checks.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--

Checkstyle configuration that checks the Google coding conventions from:

- Google Java Style
https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html

Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).

Most Checks are configurable, be sure to consult the documentation.

To completely disable a check, just comment it out or delete it from the file.

Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.

-->

<module name = "Checker">
Expand All @@ -29,12 +22,11 @@
<property name="fileExtensions" value="java, properties, xml"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>

<module name="TreeWalker">
<module name="SuppressionCommentFilter"/>
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
Expand All @@ -58,7 +50,9 @@
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly"/>
<module name="LeftCurly">
<property name="maxLineLength" value="140"/>
</module>
<module name="RightCurly"/>
<module name="RightCurly">
<property name="option" value="alone"/>
Expand All @@ -70,9 +64,9 @@
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
Expand All @@ -95,49 +89,49 @@
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<property name="allowOneCharVarInForLoop" value="true"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<message key="ws.followed"
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>

<module name="OverloadMethodsDeclarationOrder"/>
Expand Down Expand Up @@ -167,7 +161,7 @@
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
Expand Down Expand Up @@ -227,6 +221,7 @@

<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!--<module name="AvoidInlineConditionals"/>-->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField">
Expand All @@ -235,6 +230,7 @@
</module>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<!--<module name="MagicNumber"/>-->
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
Expand All @@ -243,7 +239,7 @@
<!-- See http://checkstyle.sf.net/config_design.html -->
<module name="FinalClass"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<!--<module name="VisibilityModifier"/>-->

<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
Expand All @@ -252,4 +248,4 @@
<module name="UpperEll"/>

</module>
</module>
</module>
57 changes: 16 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
<modelVersion>4.0.0</modelVersion>

<groupId>BroForce</groupId>
<artifactId>BroForce</artifactId>
<artifactId>BroForce-02-2018</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<relativePath />
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>1.9</java.version>
</properties>

<dependencies>
Expand All @@ -35,13 +31,13 @@

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
</dependency>

<dependency>
Expand All @@ -60,9 +56,9 @@
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
Expand All @@ -82,13 +78,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.8</version>
</dependency>
</dependencies>
<configuration>
<configLocation>park_checks.xml</configLocation>
<consoleOutput>true</consoleOutput>
Expand All @@ -106,28 +95,14 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>4.1.2</version>
</plugin>

</plugins>
</build>

<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
11 changes: 7 additions & 4 deletions src/main/java/application/Application.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package application;

import application.database.DAOi;
import application.database.DbDAO;
import application.db.UserDao;
import application.db.UserDaoImpl;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
Expand All @@ -10,17 +11,19 @@

@SpringBootApplication
public class Application {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

@Bean
public DAOi database() {
return new DbDAO();
public UserDao database() {
return new UserDaoImpl();
}

@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}

}
Loading