Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
464 commits
Select commit Hold shift + click to select a range
6efa008
WhenAdminAddCountry.countryNameEnWithAllowedCharactersShouldBeAccepte…
php-coder Jan 17, 2017
250593b
WhenAdminAddCountry.countryNameRuWithAllowedCharactersShouldBeAccepte…
php-coder Jan 17, 2017
a2ff973
Integration tests: remove checkServerResponseCode() check.
php-coder Jan 17, 2017
ee0466c
WhenAnonymousUserAddCategory: port to Robot Framework.
php-coder Jan 17, 2017
ea48eb2
category/creation/logic.robot: improve documentation for a keyword.
php-coder Jan 17, 2017
e4e5cc7
country/creation/logic.robot: improve documentation for a keyword.
php-coder Jan 17, 2017
60fcd20
WhenAnonymousUserAddCountry: port to Robot Framework.
php-coder Jan 17, 2017
d5cb07d
WhenAnonymousUserOpenNotExistingCategoryPage: port to Robot Framework.
php-coder Jan 17, 2017
0998ce6
WhenAnonymousUserOpenNotExistingCountryPage: port to Robot Framework.
php-coder Jan 17, 2017
9a42deb
Add integration test for testing that it's impossible to create categ…
php-coder Jan 18, 2017
29313e2
Add integration test for testing that it's impossible to create count…
php-coder Jan 18, 2017
8c60d9c
MailServiceImpl.sendMail(): add comment.
php-coder Jan 24, 2017
c65ec7b
MailServiceImpl.sendMail(): add personal to the From header.
php-coder Jan 24, 2017
63ced85
MailServiceImpl.sendMail(): enable e-mail addresses validation.
php-coder Jan 24, 2017
33d0414
Add integration test for validation of unique category slug.
php-coder Jan 25, 2017
32382c3
Add integration test for validation of unique country slug.
php-coder Jan 25, 2017
b1a077f
shouldCreateSeriesWithOnlyRequiredFieldsFilled: port to Robot Framework.
php-coder Jan 26, 2017
a59af7f
shouldCreateSeriesWithAllFieldsFilled: port to Robot Framework.
php-coder Jan 27, 2017
7779c45
quantityShouldBeANumber: port to Robot Framework.
php-coder Jan 27, 2017
960c183
quantityShouldBeNotLessThanLimit: port to Robot Framework.
php-coder Jan 27, 2017
a6fb0bd
quantityShouldNotBeGreaterThanLimit: port to Robot Framework.
php-coder Jan 27, 2017
6333501
/series/add: skip links for adding category/country when keyboard nav…
php-coder Feb 9, 2017
8478cf7
WhenAdminAddSeries.commentShouldNotBeTooLong: port to Robot Framework.
php-coder Feb 9, 2017
688be9e
WhenAdminAddSeries.imageSizeMustBeGreaterThanZero: port to Robot Fram…
php-coder Feb 9, 2017
b4f5450
pom.xml: update Lombok to 1.16.14
php-coder Feb 10, 2017
a47daf6
pom.xml: update thymeleaf-extras-springsecurity4 to 3.0.2.RELEASE
php-coder Feb 10, 2017
1c9ee5d
pom.xml: update thymeleaf and thymeleaf-spring4 to 3.0.3.RELEASE
php-coder Feb 10, 2017
698a6a0
pom.xml(minify-maven-plugin): update to 1.7.6
php-coder Feb 10, 2017
86529e7
pom.xml(maven-compiler-plugin): update to 3.6.1
php-coder Feb 10, 2017
cba41ce
WhenAnonymousUserAddSeries: port to Robot Framework.
php-coder Feb 12, 2017
a0e620b
WhenAnonymousUserOpenNotExistingSeriesPage: port to Robot Framework.
php-coder Feb 12, 2017
a069699
series/access.robot: update documentation.
php-coder Feb 12, 2017
0392762
WhenAnyUserAtAnyPage(shouldHaveTitle): remove check.
php-coder Feb 12, 2017
608d1b2
WhenAnyUserAtAnyPage(shouldHaveUserBar): remove check.
php-coder Feb 12, 2017
9f766f4
WhenAnyUserAtAnyPage(shouldHaveContentArea): remove check.
php-coder Feb 12, 2017
f6ddad3
WhenAnyUserAtAnyPage(shouldHaveFooter): remove check.
php-coder Feb 12, 2017
05b36b8
WhenAnyUserAtAnyPage(shouldHaveLogo): remove check.
php-coder Feb 12, 2017
0f6c13e
WhenAnyUserAtAnyPage(mayHaveHeader): remove check.
php-coder Feb 12, 2017
d52d4f0
WhenAnyUserAtAnyPage(checkStandardStructure): remove empty method.
php-coder Feb 12, 2017
cc22ce9
Update the collections.updated_at/by fields when series added/removed.
Shkarin Jan 31, 2017
a16fa14
2016-09-28--add_creator_data_to_series_sales.xml: mark existing colle…
php-coder Feb 13, 2017
9997739
2016-09-28--add_creator_data_to_series_sales.xml: reduce indentation.
php-coder Feb 13, 2017
dab5368
CollectionServiceImplTest: fix imports ordering.
php-coder Feb 13, 2017
3cfb265
CollectionDao.markAsModified(): rename argument.
php-coder Feb 13, 2017
9d5531d
JdbcCollectionDao.markAsModified(): split out userId and updatedBy.
php-coder Feb 13, 2017
1decd01
CollectionService.createCollection(): add unit test for setting updat…
php-coder Feb 13, 2017
a909ab9
Daily report: include stat with updated collections.
php-coder Feb 13, 2017
b3526a6
CollectionServiceImplTest: use single quotes.
php-coder Feb 13, 2017
4d18a5b
ValidationMessages: improve message a bit.
php-coder Feb 16, 2017
84a54df
check-build-and-verify.sh: remove pom.log file.
php-coder Feb 16, 2017
0befab8
pom.xml(maven-enforcer-plugin): move configuration out of the <execut…
php-coder Feb 21, 2017
3bce6cd
check-build-and-verify.sh: run maven-enforcer-plugin.
php-coder Feb 21, 2017
b0457b6
check-build-and-verify.sh: suppress htmlunit log messages in the robo…
php-coder Feb 24, 2017
4683e84
check-build-and-verify.sh: rewrite sed script on Perl.
php-coder Feb 24, 2017
5590652
common.sh: remove forgotten part of code with sed -z.
php-coder Feb 24, 2017
5e6aa24
logback-test.xml: don't output messages into the $TMPDIR/spring.log f…
php-coder Feb 25, 2017
8ef3dcf
WhenAdminAddSeries.catalogNumbersShouldAcceptValidValues: port to Rob…
php-coder Feb 25, 2017
3cdea61
WhenAdminAddSeries.catalogNumbersShouldRejectInvalidValues: port to R…
php-coder Feb 25, 2017
cacb7b1
series/creation/misc.robot: rename argument.
php-coder Feb 25, 2017
b83e3f7
WhenAdminAddSeries.catalogPricesShouldRejectInvalidValues: port to Ro…
php-coder Feb 25, 2017
7138589
pom.xml: update slf4j to 1.7.24
php-coder Feb 25, 2017
d01284b
pom.xml: update Robot Framework to 3.0.2
php-coder Feb 25, 2017
103c809
WhenAdminAddSeries.issueYearFieldShouldHaveOptionsForRangeFrom1840ToC…
php-coder Feb 26, 2017
4250042
series/creation/validation.robot: wait until element will be visible.
php-coder Feb 27, 2017
8c7fa02
series/creation/validation.robot: wait until element will be visible …
php-coder Feb 27, 2017
b2f6834
check-build-and-verify.sh: fail the build when any warnings is found.
php-coder Feb 28, 2017
4dae865
check-build-and-verify.sh: fix order of the rflint options.
php-coder Feb 28, 2017
abfa838
check-build-and-verify.sh: adjust rflint rules to not fail a build.
php-coder Feb 28, 2017
7ed25af
series/creation/logic.robot: remove debug statement.
php-coder Feb 28, 2017
f26a1da
FilesystemImagePersistenceStrategy.init(): improve warning message.
php-coder Feb 28, 2017
b10caee
FilesystemImagePersistenceStrategy.init(): don't check for writabilit…
php-coder Feb 28, 2017
8fefe4d
FilesystemImagePersistenceStrategy: rename constructor argument.
php-coder Feb 28, 2017
8a1142f
FilesystemImagePersistenceStrategy.createFile(): rename to generateFi…
php-coder Feb 28, 2017
7f35c32
FilesystemImagePersistenceStrategy.generateFilePath(): allow to pass …
php-coder Feb 28, 2017
46f522c
FilesystemImagePersistenceStrategy.get(): extract method.
php-coder Feb 28, 2017
b034e57
FilesystemImagePersistenceStrategy.init(): ignore PMD warning.
php-coder Mar 1, 2017
3c9b878
series/creation/validation.robot: fix the test flake.
php-coder Mar 1, 2017
e1937d1
CatlogUtilsSpec.js: fix typo in test name.
php-coder Mar 9, 2017
d3cafe6
Run danger in Travis CI.
php-coder Feb 14, 2017
d45ae4e
Dangerfile: handle maven-checkstyle-plugin and maven-pmd-plugin reports.
php-coder Feb 15, 2017
6bc56a4
Dangerfile: handle codenarc-maven-plugin report.
php-coder Feb 15, 2017
fc6c4d1
Dangerfile: handle findbugs-maven-plugin report.
php-coder Mar 4, 2017
0a51d8e
Dangerfile: handle license-maven-plugin and sortpom-maven-plugin outp…
php-coder Mar 4, 2017
e2c04b8
Dangerfile: handle rflint output.
php-coder Feb 16, 2017
fb8f02e
Dangerfile: handle maven-enforcer-plugin output.
php-coder Feb 22, 2017
5082bc4
Dangerfile: handle bootlint output.
php-coder Feb 25, 2017
356a3fe
Dangerfile: handle maven-compiler-plugin:compile output.
php-coder Feb 27, 2017
5ce9594
Dangerfile: handle robotframework-maven-plugin report.
php-coder Mar 1, 2017
a499d60
Dangerfile: handle maven-compiler-plugin:testCompile output.
php-coder Mar 1, 2017
8a41baf
Dangerfile: handle gmaven-plugin:testCompile output.
php-coder Mar 1, 2017
3330644
Dangerfile: handle maven-surefire-plugin reports.
php-coder Mar 2, 2017
e450f10
Dangerfile: handle html5validator output.
php-coder Mar 4, 2017
6041ba4
Dangerfile: handle maven-failsafe-plugin report.
php-coder Mar 5, 2017
4d3412c
Dangerfile: handle jasmine-maven-plugin report.
php-coder Mar 9, 2017
9dc8299
/account/activate: add check for maximum password length.
246810ben Mar 13, 2017
ad943f1
pom.xml: update Spring Boot to 1.4.5.RELEASE
php-coder Mar 14, 2017
34e9c8c
SessionLocaleResolverAwareFilter: simplify code a bit.
php-coder Mar 14, 2017
b0f7455
series/creation/validation.robot: fix test flake by waiting when all …
php-coder Mar 14, 2017
1a35c5f
series/creation/validation.robot: fix test flake by waiting when all …
php-coder Mar 14, 2017
bc22ec7
Dangerfile: show message about success when all tests passed.
php-coder Mar 14, 2017
82b36b7
Dangerfile: warn about too many commits.
php-coder Mar 14, 2017
71b0cd5
Dangerfile: error about merge commits.
php-coder Mar 14, 2017
2c980ce
Dangerfile: add check for branch naming.
php-coder Mar 14, 2017
78e0e25
check-build-and-verify.sh: encode robot framework report and print to…
php-coder Mar 15, 2017
dbbff9e
CategoryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
51ab20a
CategoryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
e8248bd
CategoryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
8b358b6
CategoryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
afafe7e
CategoryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
bbd4e7a
CountryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
21bcf80
CountryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
89f1395
CountryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
af3b32f
CountryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
bb15355
CountryServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
3e6e69d
SeriesServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
0788b51
SeriesServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
88a35f6
SeriesServiceImplTest: fix typo in test name.
php-coder Mar 15, 2017
2edbaae
SeriesServiceImplTest: merge 2 tests into one.
php-coder Mar 15, 2017
031f507
Add basic docker image.
php-coder Mar 16, 2017
8510710
.editorconfig: add settings for *.robot files.
php-coder Mar 18, 2017
e460e16
Explicitly set thread stack size to 256k.
php-coder Mar 18, 2017
1746496
series/creation/validation.robot: open page before each test for cata…
php-coder Mar 21, 2017
3a5c492
series/creation/validation.robot: open page before each test for cata…
php-coder Mar 21, 2017
8b3680f
docker: massive changes.
php-coder Mar 21, 2017
d5fe76b
Dangerfile: improve message about branch naming.
php-coder Mar 22, 2017
36ed024
Add integration test for maximum password length.
246810ben Mar 21, 2017
524688d
Dangerfile: improve message about branch rebasing.
php-coder Mar 22, 2017
4e0cf85
SeriesService.findFullInfoById(): add unit tests.
php-coder Mar 23, 2017
bdeaf5e
Revert "README.md: added badge for waffle.io service."
php-coder Mar 23, 2017
4942f37
README.md: mention RobotFramework.
php-coder Mar 23, 2017
07adf41
pom.xml: add link to hibernate-validator-annotation-processor docs.
php-coder Mar 23, 2017
a92b292
WhenAnonymousUserRegisterAccount.emailWithActivationKeyShouldBeSentAf…
246810ben Mar 23, 2017
ba525d1
SeriesServiceImplTest: fix or ignore CodeNarc warnings.
php-coder Mar 23, 2017
ed8db22
Fix generation of code coverage by JaCoCo.
php-coder Mar 24, 2017
ffeca2e
pom.xml(jacoco-maven-plugin): update to 0.7.9
php-coder Mar 24, 2017
3c93877
SeriesServiceImpl.addImageToSeries(): add unit tests.
php-coder Mar 24, 2017
2f410b3
Register error pages in a consistent way regardless of the use of an …
php-coder Mar 26, 2017
a898b1e
SeriesSalesService.add(): add unit tests.
php-coder Mar 26, 2017
e98927c
SeriesSalesServiceImpl.add(): add more checks for non-nullable fields.
php-coder Mar 26, 2017
8bbf855
StampsCatalogService.add(): add unit tests.
php-coder Mar 26, 2017
b522a6b
StampsCatalogService.addToSeries(): add unit tests.
php-coder Mar 26, 2017
0dcc870
pom.xml: update h2 to 1.4.194
php-coder Mar 26, 2017
4e617ec
pom.xml: update slf4j to 1.7.25
php-coder Mar 26, 2017
91afe67
pom.xml: update mysql-connector-java to 5.1.41
php-coder Mar 26, 2017
e1e6584
pom.xml: update Lombok to 1.16.16
php-coder Mar 26, 2017
1a36ace
checkstyle-suppressions.xml: fix typo in comment.
php-coder Mar 27, 2017
45fdef1
CronServiceImpl.purgeUsersActivations(): improve log message.
php-coder Mar 29, 2017
15c701c
.travis.yml: use danger 4.3.1 to fix "Cannot find a merge base betwee…
php-coder Apr 5, 2017
b15a557
check-build-and-verify.sh: show result of running danger.
php-coder Apr 5, 2017
8c62c69
.travis.yml: fix specifying version of danger.
php-coder Apr 6, 2017
16d943a
RobotFramework: allow flaky tests to fail by marking them as non-crit…
php-coder Apr 8, 2017
da8e7aa
src/main/scripts: activate errexit, nounset and pipefail options.
php-coder Apr 8, 2017
7c47f0e
src/main/scripts: use /bin/bash to fix "set: Illegal option -o pipefa…
php-coder Apr 8, 2017
88a6b74
src/main/scripts: fix displaying of colors.
php-coder Apr 8, 2017
638e36c
src/main/scripts/ci/common.sh(print_log): don't fail when file doesn'…
php-coder Apr 8, 2017
17e9591
series/creation/validation.robot: mark "Catalog price should reject i…
php-coder Apr 8, 2017
2dc708a
src/main/scripts/ci/deploy.sh: fix activation of errexit option.
php-coder Apr 8, 2017
68876b8
src/main/scripts: fix activation of errexit option.
php-coder Apr 8, 2017
1982baf
Dangerfile: don't fail on parsing html5validator warnings.
php-coder Apr 15, 2017
f2cef81
common.sh(print_status): fix color of error messages.
php-coder Apr 15, 2017
13ddf4f
UsersActivationService.findOlderThan(): add unit tests.
Shagbark Apr 16, 2017
8fa1611
check-build-and-verify.sh: ignore html5validator error about document…
php-coder Apr 16, 2017
66a00f3
check-build-and-verify.sh: ignore another html5validator error about …
php-coder Apr 16, 2017
d18afe8
pom.xml: don't execute gmaven-plugin:compile goal that is always skip…
php-coder Apr 21, 2017
f3b1939
pom.xml: replace gmaven-plugin by gmavenplus-plugin.
php-coder Apr 21, 2017
9ce1301
/category/add: deny "add" and "list" as category names
246810ben Apr 14, 2017
de1e337
Add integration test to ensure that "add" and "list" cannot be used a…
php-coder Apr 23, 2017
4a70a78
category/creation/validation.robot: fix the test by making a state cl…
php-coder Apr 23, 2017
efdf828
ImageService.save(): rename local variable (image -> imageInfo).
php-coder Apr 23, 2017
b97cd2b
ImageService.save(): rename local variable (id -> imageId).
php-coder Apr 23, 2017
0b97f53
FilesystemImagePersistenceStrategy.save(): improve logging message.
php-coder Apr 23, 2017
cda5ac3
travis: upload images into /tmp/uploads directory.
php-coder Apr 21, 2017
5870b28
Dangerfile: improve danger message.
php-coder Apr 25, 2017
25b0624
DatabaseImagePersistenceStrategy.save(): improve logging message.
php-coder Apr 26, 2017
0b6c09e
DatabaseImagePersistenceStrategy: improve log messages.
php-coder Apr 27, 2017
98353b9
pom.xml: update Spring Boot to 1.4.6.RELEASE
php-coder May 5, 2017
e87db5c
pom.xml: update thymeleaf and thymeleaf-spring4 to 3.0.5.RELEASE
php-coder May 5, 2017
6dc01e3
pom.xml: update h2 to 1.4.195
php-coder May 5, 2017
9e46f43
pom.xml: update hibernate-validator to 5.2.5.Final
php-coder May 5, 2017
edb8727
pom.xml: update CodeNarc to 0.27.0
php-coder May 9, 2017
9d424ea
pom.xml: update Thymeleaf to 3.0.6.RELEASE
php-coder May 9, 2017
b7abb7a
ImageServiceImpl.save(): use English locale instead of US.
php-coder May 10, 2017
98b727c
pom.xml(maven-pmd-plugin): update to 3.8
php-coder May 10, 2017
dcc36a6
UsersActivationServiceImpl: fix compilation.
php-coder May 10, 2017
0c3d2d3
Add support for generating image previews.
php-coder Feb 28, 2017
cc51669
pmd: configure UnnecessaryLocalBeforeReturn rule to catch more cases.
php-coder May 12, 2017
2475585
DatabaseImagePersistenceStrategyTest: merge 2 tests into one.
php-coder May 13, 2017
81b0c50
DatabaseImagePersistenceStrategyTest: update test for save().
php-coder May 13, 2017
f1a23cb
DatabaseImagePersistenceStrategyTest: rename variable.
php-coder May 13, 2017
205591d
DatabaseImagePersistenceStrategy.savePreview(): add unit test.
php-coder May 13, 2017
c818a6e
Simplify data source configuration.
php-coder May 13, 2017
d1997d2
Enable mail connection validation for the prod environment.
php-coder May 13, 2017
c851105
Set maximum sizes for HTTP headers and HTTP POSTs.
php-coder May 13, 2017
061c69e
SeriesService.add(): log about success at the end of a method.
php-coder May 13, 2017
c7bbd5c
SeriesService.addImageToSeries(): improve log message.
php-coder May 13, 2017
6ed4cc2
SeriesService.addImageToSeries(): reduce a risk of having an orphaned…
php-coder May 13, 2017
a30fcc3
SeriesService.add(): reduce a risk of having an orphaned file when ex…
php-coder May 13, 2017
a746ee9
SeriesServiceImplTest: remove 4 tests.
php-coder May 13, 2017
4df182c
ImageServiceImplTest: remove useless test.
php-coder May 15, 2017
15f4d3a
ImageService.save(): modify return value to return full info about im…
php-coder May 15, 2017
6e44675
Fix errors from CodeNarc in unit tests.
php-coder May 15, 2017
37a118e
SeriesService.addImageToSeries(): remove uploaded file when exception…
php-coder May 16, 2017
f25d927
SeriesService.add(): remove uploaded file when exception occurs.
php-coder May 16, 2017
317b16c
SeriesServiceImplTest: fix test.
php-coder May 16, 2017
b03d88f
Dangerfile: filter out component versions from a robotframework report.
php-coder Mar 22, 2017
4c8e628
Dangerfile: warn about absent link to an original issue.
php-coder Mar 22, 2017
65837c7
Dangerfile: warn when Url.RESOURCES_VERSION constant wasn't updated.
php-coder Mar 22, 2017
f77d72b
CollectionService.isSeriesInCollection(): remove superfluous log mess…
php-coder May 20, 2017
8cd8b53
Use non-minified JS scripts in prototype.
php-coder May 20, 2017
6e5af2b
CollectionService.isSeriesInCollection(): fix error from PMD about us…
php-coder May 20, 2017
1618d9a
/country/add: deny "add" and "list" as country names.
n583wxdh0j May 22, 2017
6fc2b05
MvcConfig: extract method.
php-coder May 22, 2017
49b20c3
series/add.js(initPage): add name to a function.
php-coder May 23, 2017
1fdca8a
SeriesServiceImplTest: correct test name.
php-coder May 27, 2017
c508841
/site/index: paraphrase summary statistic to use shorter words.
php-coder May 27, 2017
4b5c47b
application-travis.properties: make liquibase less verbose.
php-coder May 29, 2017
5ddeea6
check-build-and-verify.sh: format commands for readability and copyin…
php-coder May 29, 2017
0782989
common.sh(print_status): modify behavior of reporting about failures.
php-coder May 29, 2017
df2b6c1
check-build-and-verify.sh: rename variables to reflect their meaning.
php-coder May 29, 2017
707e772
/series/1: add an image.
php-coder May 29, 2017
c27551f
ImageFileValidator: remove ignoring of CyclomaticComplexity check tha…
php-coder Jun 1, 2017
188e711
Modify image related validators to skip validation when image wasn't …
php-coder Jun 1, 2017
5e861a5
.travis.yml: don't do deploy on pull requests to the prod branch.
php-coder Jun 1, 2017
ee2019f
NEWS.txt: typos and grammar fixes.
php-coder Jun 11, 2017
5fceddf
Revert ".travis.yml: don't do deploy on pull requests to the prod bra…
php-coder Jun 13, 2017
e3f6c66
Enable logging of all requests on prod.
php-coder Jun 19, 2017
d4aeba3
Revert "Enable logging of all requests on prod."
php-coder Jun 20, 2017
8ef5bcb
FilesystemImagePersistenceStrategy: don't truncate and rewrite a file…
php-coder Jun 20, 2017
6667f70
test-series-with-catalogs-numbers.sql: use a proper value for represe…
php-coder Jun 23, 2017
0e49a86
Add Strict-Transport-Security header.
php-coder Jul 9, 2017
5f6c8d5
.travis.yml: don't try to do deploy on pull requests to the prod branch.
php-coder Jul 11, 2017
17b0a90
.travis.yml: fail build when code in before_script or script blocks f…
php-coder Jul 17, 2017
548d5d4
.travis.yml: fix build by using the correct operator for logical OR.
php-coder Jul 17, 2017
fa02a93
WhenAnyUserAtAnyPageWithForm(shouldHaveForm): remove check.
php-coder Jul 17, 2017
85cc772
Add missing XML namespace for Thymeleaf Togglz dialect.
php-coder Jul 20, 2017
7c589fc
Revert ".travis.yml: clone repository with a depth of 1 commit."
php-coder Jul 21, 2017
eefce98
Revert ".travis.yml: fix specifying version of danger."
php-coder Jul 21, 2017
7f9d99d
Revert ".travis.yml: use danger 4.3.1 to fix "Cannot find a merge bas…
php-coder Jul 21, 2017
21f9d76
check-build-and-verify.sh: skip some checks when related files weren'…
php-coder May 29, 2017
3425b70
check-build-and-verify.sh: simplify conditions for checking by danger.
php-coder Jul 21, 2017
341c9e4
pom.xml: update Lombok to 1.16.18
php-coder Jul 30, 2017
40ade24
pom.xml: update H2 to 1.4.196
php-coder Jul 30, 2017
996466e
Dangerfile: don't warn about missing reports because now they're opti…
php-coder Jul 30, 2017
256ed5d
Dangerfile: messages improvements.
php-coder Jul 30, 2017
96734df
Rename package ru.mystamps.web.validation.jsr303 to ru.mystamps.web.s…
GiBg1aN Jul 31, 2017
2032e4b
ExistingActivationKey: replace spaces by tab.
php-coder Jul 31, 2017
feffd4f
ActivateAccountForm: remove blank line.
php-coder Jul 31, 2017
8637327
pom.xml: update Spring Boot to 1.4.7.RELEASE
php-coder Jul 31, 2017
a1a615c
fix_minor_bugs
bodom91 Aug 1, 2017
87ae25e
admin_daily_report fix minor remarks
bodom91 Aug 2, 2017
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
12 changes: 12 additions & 0 deletions src/main/config/findbugs-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
</Match>
<Match>
<!--
<<<<<<< HEAD
Our DTO classes expose it's internal representation.
Most of the time because they're using Date class and
storing data in byte[].
-->
<Class name="~.*\.model\..*" />
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" />
</Match>
<Match>
<!--
=======
>>>>>>> upstream/master
It's ok, that we're don't override parent's equals() method.
-->
<Class name="ru.mystamps.web.support.spring.security.CustomUserDetails" />
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/ru/mystamps/web/Url.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public final class Url {
public static final String INDEX_PAGE = "/";
public static final String ROBOTS_TXT = "/robots.txt";
public static final String SITEMAP_XML = "/sitemap.xml";

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid white-space only changes where it's possible.


public static final String DAILY_STATISTICS = "/report/daily";
public static final String SITE_EVENTS_PAGE = "/site/events";

public static final String REGISTRATION_PAGE = "/account/register";
Expand Down Expand Up @@ -141,6 +142,7 @@ public static Map<String, String> asMap(boolean serveContentFromSingleHost) {
map.put("INFO_COLLECTION_PAGE", INFO_COLLECTION_PAGE);
map.put("SITE_EVENTS_PAGE", SITE_EVENTS_PAGE);
map.put("BOOTSTRAP_LANGUAGE", BOOTSTRAP_LANGUAGE);
map.put("DAILY_STATISTICS", DAILY_STATISTICS);

if (serveContentFromSingleHost) {
map.put("BOOTSTRAP_CSS", BOOTSTRAP_CSS);
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/ru/mystamps/web/config/ControllersConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ public RobotsTxtController getRobotsTxtController() {
return new RobotsTxtController();
}

@Bean
public ReportController getReportController() {
return new ReportController(
servicesConfig.getMailService(),
servicesConfig.getCronService()
);
}

@Bean
public SeriesController getSeriesController() {
return new SeriesController(
Expand Down
49 changes: 49 additions & 0 deletions src/main/java/ru/mystamps/web/controller/ReportController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (C) 2009-2016 Slava Semushin <slava.semushin@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package ru.mystamps.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import lombok.RequiredArgsConstructor;

import ru.mystamps.web.Url;
import ru.mystamps.web.service.CronService;
import ru.mystamps.web.service.MailService;

/**
* @author Maxim Shestakov
*/
@Controller
@RequiredArgsConstructor
public class ReportController {

private final MailService mailService;
private final CronService cronService;

@GetMapping(path = Url.DAILY_STATISTICS, produces = "text/plain; charset=UTF-8")
@ResponseBody
public String showDailyReport() {
return mailService.getTextOfDailyStatisticsMail(
cronService.getDailyStatistics()
);
}

}
57 changes: 57 additions & 0 deletions src/main/java/ru/mystamps/web/model/AddSeriesSalesForm.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (C) 2009-2017 Slava Semushin <slava.semushin@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package ru.mystamps.web.model;

import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;

import lombok.Getter;
import lombok.Setter;

import ru.mystamps.web.dao.dto.Currency;
import ru.mystamps.web.service.dto.AddSeriesSalesDto;

@Getter
@Setter
public class AddSeriesSalesForm implements AddSeriesSalesDto {

@DateTimeFormat(pattern = "dd.MM.yyyy")
private Date date;

@NotNull
private Integer sellerId;

private String url;

@NotNull
private BigDecimal price;

@NotNull
private Currency currency;

private BigDecimal altPrice;

private Currency altCurrency;

private Integer buyerId;

}
6 changes: 6 additions & 0 deletions src/main/java/ru/mystamps/web/model/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* <a href="https://en.wikipedia.org/wiki/Data_transfer_object" target="_blank">DTO</a>
* classes that are representing values from site forms and being used by
* controllers as input values.
*/
package ru.mystamps.web.model;
3 changes: 3 additions & 0 deletions src/main/java/ru/mystamps/web/service/CronService.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
*/
package ru.mystamps.web.service;

import ru.mystamps.web.service.dto.AdminDailyReport;

public interface CronService {
int PURGE_AFTER_DAYS = 3;

void sendDailyStatistics();
AdminDailyReport getDailyStatistics();
void purgeUsersActivations();
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public class CronServiceImpl implements CronService {
@Scheduled(cron = EVERY_DAY_AT_00_00)
@Transactional(readOnly = true)
public void sendDailyStatistics() {
mailService.sendDailyStatisticsToAdmin(getDailyStatistics());
}

@Override
public AdminDailyReport getDailyStatistics() {
Date today = DateUtils.truncate(new Date(), Calendar.DAY_OF_MONTH);
Date yesterday = DateUtils.addDays(today, -1);

Expand Down Expand Up @@ -100,7 +105,7 @@ public void sendDailyStatistics() {
);
report.setInvalidCsrfCounter(invalidCsrfCounter);

mailService.sendDailyStatisticsToAdmin(report);
return report;
}

@Override
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ru/mystamps/web/service/MailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
public interface MailService {
void sendActivationKeyToUser(SendUsersActivationDto activation);
void sendDailyStatisticsToAdmin(AdminDailyReport report);
String getTextOfDailyStatisticsMail(AdminDailyReport report);
}
57 changes: 29 additions & 28 deletions src/main/java/ru/mystamps/web/service/MailServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,36 @@ public void sendDailyStatisticsToAdmin(AdminDailyReport report) {
adminLang
);
}

@Override
public String getTextOfDailyStatisticsMail(AdminDailyReport report) {
String template = messageSource.getMessage("daily_stat.text", null, adminLang);
String fromDate = shortDatePrinter.format(report.getStartDate());
String tillDate = shortDatePrinter.format(report.getEndDate());

Map<String, String> ctx = new HashMap<>();
ctx.put("from_date", fromDate);
ctx.put("to_date", tillDate);

put(ctx, "added_countries_cnt", report.getAddedCountriesCounter());
put(ctx, "untranslated_countries_cnt", report.getUntranslatedCountriesCounter());
put(ctx, "added_categories_cnt", report.getAddedCategoriesCounter());
put(ctx, "untranslated_categories_cnt", report.getUntranslatedCategoriesCounter());
put(ctx, "added_series_cnt", report.getAddedSeriesCounter());
put(ctx, "updated_series_cnt", report.getUpdatedSeriesCounter());
put(ctx, "updated_collections_cnt", report.getUpdatedCollectionsCounter());
put(ctx, "registration_requests_cnt", report.getRegistrationRequestsCounter());
put(ctx, "registered_users_cnt", report.getRegisteredUsersCounter());
put(ctx, "events_cnt", report.countEvents());
put(ctx, "not_found_cnt", report.getNotFoundCounter());
put(ctx, "failed_auth_cnt", report.getFailedAuthCounter());
put(ctx, "missing_csrf_cnt", report.getMissingCsrfCounter());
put(ctx, "invalid_csrf_cnt", report.getInvalidCsrfCounter());
put(ctx, "bad_request_cnt", -1L); // TODO: #122

return new StrSubstitutor(ctx).replace(template);
}

@SuppressWarnings("PMD.UseObjectForClearerAPI")
private void sendMail(
final String email,
Expand Down Expand Up @@ -183,34 +212,6 @@ private String getSubjectOfDailyStatisticsMail(AdminDailyReport report) {
StrSubstitutor substitutor = new StrSubstitutor(ctx);
return substitutor.replace(template);
}

private String getTextOfDailyStatisticsMail(AdminDailyReport report) {
String template = messageSource.getMessage("daily_stat.text", null, adminLang);
String fromDate = shortDatePrinter.format(report.getStartDate());
String tillDate = shortDatePrinter.format(report.getEndDate());

Map<String, String> ctx = new HashMap<>();
ctx.put("from_date", fromDate);
ctx.put("to_date", tillDate);

put(ctx, "added_countries_cnt", report.getAddedCountriesCounter());
put(ctx, "untranslated_countries_cnt", report.getUntranslatedCountriesCounter());
put(ctx, "added_categories_cnt", report.getAddedCategoriesCounter());
put(ctx, "untranslated_categories_cnt", report.getUntranslatedCategoriesCounter());
put(ctx, "added_series_cnt", report.getAddedSeriesCounter());
put(ctx, "updated_series_cnt", report.getUpdatedSeriesCounter());
put(ctx, "updated_collections_cnt", report.getUpdatedCollectionsCounter());
put(ctx, "registration_requests_cnt", report.getRegistrationRequestsCounter());
put(ctx, "registered_users_cnt", report.getRegisteredUsersCounter());
put(ctx, "events_cnt", report.countEvents());
put(ctx, "not_found_cnt", report.getNotFoundCounter());
put(ctx, "failed_auth_cnt", report.getFailedAuthCounter());
put(ctx, "missing_csrf_cnt", report.getMissingCsrfCounter());
put(ctx, "invalid_csrf_cnt", report.getInvalidCsrfCounter());
put(ctx, "bad_request_cnt", -1L); // TODO: #122

return new StrSubstitutor(ctx).replace(template);
}

private static void put(Map<String, String> ctx, String key, long value) {
ctx.put(key, String.valueOf(value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public final class Authority {
public static final GrantedAuthority UPDATE_COLLECTION = new SimpleGrantedAuthority(StringAuthority.UPDATE_COLLECTION);
public static final GrantedAuthority VIEW_SITE_EVENTS = new SimpleGrantedAuthority(StringAuthority.VIEW_SITE_EVENTS);
public static final GrantedAuthority VIEW_SERIES_SALES = new SimpleGrantedAuthority(StringAuthority.VIEW_SERIES_SALES);
public static final GrantedAuthority VIEW_DAILY_STATS = new SimpleGrantedAuthority(StringAuthority.VIEW_DAILY_STATS);

private Authority() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private static Collection<? extends GrantedAuthority> getAuthorities(UserDetails
authorities.add(Authority.ADD_SERIES_SALES);
authorities.add(Authority.VIEW_SERIES_SALES);
authorities.add(Authority.MANAGE_TOGGLZ);
authorities.add(Authority.VIEW_DAILY_STATS);
}

return authorities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public final class HasAuthority {
public static final String CREATE_SERIES = "hasAuthority('" + StringAuthority.CREATE_SERIES + "')";
public static final String CREATE_CATEGORY = "hasAuthority('" + StringAuthority.CREATE_CATEGORY + "')";
public static final String CREATE_COUNTRY = "hasAuthority('" + StringAuthority.CREATE_COUNTRY + "')";
public static final String VIEW_DAILY_STATS = "hasAuthority('" + StringAuthority.VIEW_DAILY_STATS + "')";
public static final String UPDATE_COLLECTION = "hasAuthority('" + StringAuthority.UPDATE_COLLECTION + "')";
public static final String VIEW_SITE_EVENTS = "hasAuthority('" + StringAuthority.VIEW_SITE_EVENTS + "')";
public static final String VIEW_SERIES_SALES = "hasAuthority('" + StringAuthority.VIEW_SERIES_SALES + "')";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected void configure(HttpSecurity http) throws Exception {
.mvcMatchers(Url.ADD_SERIES_PAGE).hasAuthority(StringAuthority.CREATE_SERIES)
.mvcMatchers(Url.SITE_EVENTS_PAGE).hasAuthority(StringAuthority.VIEW_SITE_EVENTS)
.mvcMatchers(Url.SUGGEST_SERIES_COUNTRY).hasAuthority(StringAuthority.CREATE_SERIES)
.mvcMatchers(Url.DAILY_STATISTICS).hasAuthority(StringAuthority.VIEW_DAILY_STATS)
.regexMatchers(HttpMethod.POST, "/series/[0-9]+")
.hasAnyAuthority(
StringAuthority.UPDATE_COLLECTION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public final class StringAuthority {
public static final String UPDATE_COLLECTION = "UPDATE_COLLECTION";
public static final String VIEW_SITE_EVENTS = "VIEW_SITE_EVENTS";
public static final String VIEW_SERIES_SALES = "VIEW_SERIES_SALES";
public static final String VIEW_DAILY_STATS = "VIEW_DAILY_STATS";

private StringAuthority() {
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/ru/mystamps/i18n/Messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ t_example = Example
t_catalog = Catalog
t_search = Search
t_view_suspicious_activities = view suspicious activities
t_daily_statistics = view daily statistics

# account/register.html
t_registration_on_site = Register on site
Expand Down Expand Up @@ -146,6 +147,7 @@ t_price = Price
t_alternative_price = Alternative price
t_buyer = Buyer
t_add_buyer_hint = You can also <a tabindex="-1" href="{0}">add a new buyer</a>
>>>>>>> upstream/master
t_add_info = Add info
t_was_selling_for = was selling for
t_sold_to = sold to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ t_example = Пример
t_catalog = Каталог
t_search = Найти
t_view_suspicious_activities = посмотреть подозрительные события
t_daily_statistics = посмотреть дневную статистику

# account/register.html
t_registration_on_site = Регистрация на сайте
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VALUES \
( :name \
, :url \
)

transaction_participants.find_all = \
SELECT id \
, name \
Expand Down
3 changes: 3 additions & 0 deletions src/main/webapp/WEB-INF/views/site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<li togglz:active="VIEW_SITE_EVENTS" sec:authorize="hasAuthority('VIEW_SITE_EVENTS')">
<a th:href="@{${SITE_EVENTS_PAGE}}" th:text="#{t_view_suspicious_activities}" href="events.html">view suspicious activities</a>
</li>
<li sec:authorize="hasAuthority('VIEW_DAILY_STATS')">
<a th:href="@{${DAILY_STATISTICS}}" th:text="#{t_daily_statistics}" href="javascript:void(0)">view daily statistics</a>
</li>
</ul>
</nav>
</div>
Expand Down