Skip to content

Commit

Permalink
automatic project update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Nov 20, 2015
1 parent 7a601e3 commit 653e4d3
Show file tree
Hide file tree
Showing 30 changed files with 117 additions and 68 deletions.
19 changes: 18 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated on 2015-11-10 using generator-jhipster 2.23.1
// Generated on 2015-11-20 using generator-jhipster 2.24.0
'use strict';
var fs = require('fs');

Expand Down Expand Up @@ -269,6 +269,22 @@ module.exports = function (grunt) {
singleRun: true
}
},
protractor: {
options: {
configFile: 'src/test/javascript/protractor.conf.js'
},
e2e: {
options: {
// Stops Grunt process if a test fails
keepAlive: false
}
},
continuous: {
options: {
keepAlive: true
}
}
},
ngAnnotate: {
dist: {
files: [{
Expand Down Expand Up @@ -374,5 +390,6 @@ module.exports = function (grunt) {
'buildcontrol:openshift'
]);

grunt.registerTask('itest', ['protractor:continuous']);
grunt.registerTask('default', ['serve']);
};
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Developing sampleApplication
# sampleApplication

This application was generated using JHipster, you can find documentation and help at [https://jhipster.github.io](https://jhipster.github.io).

Expand Down Expand Up @@ -46,6 +46,9 @@ Then navigate to [http://localhost:8080](http://localhost:8080) in your browser.
Unit tests are run by [Karma][] and written with [Jasmine][]. They're located in `src/test/javascript` and can be run with:

grunt test

UI end-to-end tests are powered by [Protractor][], which is built on top of WebDriverJS. They're located in `src/test/javascript/e2e`
and can be run by starting Spring Boot in one terminal (`mvn spring-boot:run`) and running the tests (`grunt itest`) in a second one.

# Continuous Integration

Expand All @@ -60,8 +63,16 @@ To setup this project in Jenkins, use the following configuration:
* Poll SCM / Schedule: `H/5 * * * *`
* Build
* Invoke Maven / Tasks: `-Pprod clean package`
* Execute Shell / Command:
````
mvn spring-boot:run &
bootPid=$!
sleep 30s
grunt itest
kill $bootPid
````
* Post-build Actions
* Publish JUnit test result report / Test Report XMLs: `build/test-results/*.xml`
* Publish JUnit test result report / Test Report XMLs: `build/test-results/*.xml,build/reports/e2e/*.xml`
[JHipster]: https://jhipster.github.io/
[Node.js]: https://nodejs.org/
Expand Down
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"version": "0.0.0",
"description": "Description for sampleApplication",
"private": true,
"cacheDirectories": [
"node_modules",
"src/main/webapp/bower_components"
],
"dependencies": {
"bower": "^1.6.3",
"protractor": "^2.5.1"
},
"devDependencies": {
"grunt": "0.4.5",
Expand All @@ -30,7 +36,10 @@
"grunt-usemin": "3.1.1",
"grunt-angular-templates":"0.5.7",
"load-grunt-tasks": "3.3.0",
"grunt-karma": "0.11.0",
"grunt-karma": "0.12.1",
"grunt-protractor-runner": "2.1.0",
"jasmine-reporters": "^2.0.6",
"protractor-jasmine2-screenshot-reporter": "0.1.7",
"time-grunt": "1.2.2",
"event-stream": "3.3.2",
"jshint-stylish": "2.0.1",
Expand All @@ -41,10 +50,10 @@
"karma-requirejs": "0.2.2",
"karma-phantomjs-launcher": "0.2.1",
"phantomjs": "1.9.18",
"karma": "0.12.35",
"karma": "0.13.15",
"karma-coverage": "0.4.2",
"karma-jenkins-reporter": "0.0.2",
"generator-jhipster": "2.23.1",
"generator-jhipster": "2.24.0",
"lodash": "3.10.1",
"xml2js": "0.4.15",
"yo": ">=1.3.0",
Expand All @@ -57,6 +66,7 @@
"node": "^0.12 || ^4.2"
},
"scripts": {
"test": "grunt test"
"test": "grunt test",
"postinstall": "webdriver-manager update"
}
}
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.3.0.RC1</version>
<version>1.3.0.RELEASE</version>
<relativePath/>
</parent>

Expand Down Expand Up @@ -739,4 +739,15 @@
</properties>
</profile>
</profiles>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19</version>
</plugin>
</plugins>
</reporting>

</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.mycompany.myapp.domain;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.envers.Audited;
import org.springframework.data.annotation.CreatedBy;
Expand All @@ -21,7 +23,9 @@
@MappedSuperclass
@Audited
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity {
public abstract class AbstractAuditingEntity implements Serializable {

private static final long serialVersionUID = 1L;

@CreatedBy
@NotNull
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/com/mycompany/myapp/domain/BankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class BankAccount implements Serializable {
private BigDecimal balance;

@ManyToOne
@JoinColumn(name = "user_id")
private User user;

@OneToMany(mappedBy = "bankAccount")
Expand Down Expand Up @@ -88,12 +89,8 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}

BankAccount bankAccount = (BankAccount) o;

if ( ! Objects.equals(id, bankAccount.id)) return false;

return true;
return Objects.equals(id, bankAccount.id);
}

@Override
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/com/mycompany/myapp/domain/Label.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,8 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}

Label label = (Label) o;

if ( ! Objects.equals(id, label.id)) return false;

return true;
return Objects.equals(id, label.id);
}

@Override
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/com/mycompany/myapp/domain/Operation.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ public class Operation implements Serializable {
private BigDecimal amount;

@ManyToOne
@JoinColumn(name = "bank_account_id")
private BankAccount bankAccount;

@ManyToMany @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@ManyToMany
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@JoinTable(name = "operation_label",
joinColumns = @JoinColumn(name="operations_id", referencedColumnName="ID"),
inverseJoinColumns = @JoinColumn(name="labels_id", referencedColumnName="ID"))
Expand Down Expand Up @@ -100,12 +102,8 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}

Operation operation = (Operation) o;

if ( ! Objects.equals(id, operation.id)) return false;

return true;
return Objects.equals(id, operation.id);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/mycompany/myapp/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class User extends AbstractAuditingEntity implements Serializable {
@JsonIgnore
@NotNull
@Size(min = 60, max = 60)
@Column(length = 60)
@Column(name = "password_hash",length = 60)
private String password;

@Size(max = 50)
Expand Down
15 changes: 8 additions & 7 deletions src/main/resources/banner.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
__ __ __ __ .______ _______.___________. _______ .______
| | | | | | | | | _ \ / | || ____|| _ \
| | | |__| | | | | |_) | | (----`---| |----`| |__ | |_) |
.--. | | | __ | | | | ___/ \ \ | | | __| | /
| `--' | | | | | | | | | .----) | | | | |____ | |\ \----.
\______/ |__| |__| |__| | _| |_______/ |__| |_______|| _| `._____|

http://jhipster.github.io
${AnsiColor.GREEN} ██ ${AnsiColor.RED} ██ ██ ████████ ███████ ██████ ████████ ████████ ███████
${AnsiColor.GREEN} ██ ${AnsiColor.RED} ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
${AnsiColor.GREEN} ██ ${AnsiColor.RED} ████████ ██ ███████ █████ ██ ██████ ███████
${AnsiColor.GREEN}██ ██ ${AnsiColor.RED} ██ ██ ██ ██ ██ ██ ██ ██ ██
${AnsiColor.GREEN} ██████ ${AnsiColor.RED} ██ ██ ████████ ██ ██████ ██ ████████ ██ ██

${AnsiColor.BRIGHT_BLUE}:: JHipster 🤓 :: Running Spring Boot ${spring-boot.version} ::
:: http://jhipster.github.io ::${AnsiColor.DEFAULT}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<column name="login" type="varchar(50)">
<constraints unique="true" nullable="false"/>
</column>
<column name="PASSWORD" type="varchar(60)"/>
<column name="password_hash" type="varchar(60)"/>
<column name="first_name" type="varchar(50)"/>
<column name="last_name" type="varchar(50)"/>
<column name="email" type="varchar(100)">
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/liquibase/users.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id;login;PASSWORD;first_name;last_name;email;activated;lang_key;created_by
id;login;password_hash;first_name;last_name;email;activated;lang_key;created_by
1;system;$2a$10$mE.qmcV0mFU5NcKh73TZx.z4ueI/.bDWbj0T1BYyqP481kGGarKLG;System;System;system@localhost;true;en;system
2;anonymousUser;$2a$10$j8S5d7Sr7.8VTOYNviDPOeWX8KcYILUVJBsYV83Y5NtECayypx9lO;Anonymous;User;anonymous@localhost;true;en;system
3;admin;$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC;Administrator;Administrator;admin@localhost;true;en;system
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/i18n/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ email.reset.title=sampleApplication password reset
email.reset.greeting=Dear {0}
email.reset.text1=For your sampleApplication account a password reset was requested, please click on the URL below to reset it:
email.reset.text2=Regards,

1 change: 1 addition & 0 deletions src/main/resources/i18n/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ email.reset.title=sampleApplication Réinitialisation de mot de passe
email.reset.greeting=Cher {0}
email.reset.text1=Un nouveau mot de passe pour votre compte sampleApplication a été demandé, veuillez cliquer sur le lien ci-dessous pour le réinitialiser:
email.reset.text2=Cordialement,

4 changes: 2 additions & 2 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</appender>
-->

<logger name="com.mycompany.myapp" level="${logback.loglevel}"/>
<logger name="com.mycompany.myapp" level="@logback.loglevel@"/>

<logger name="javax.activation" level="WARN"/>
<logger name="javax.mail" level="WARN"/>
Expand Down Expand Up @@ -60,7 +60,7 @@
<resetJUL>true</resetJUL>
</contextListener>

<root level="${logback.loglevel}">
<root level="@logback.loglevel@">
<appender-ref ref="CONSOLE"/>
</root>

Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<script src="scripts/components/alert/alert.directive.js"></script>
<script src="scripts/components/util/parse-links.service.js"></script>
<script src="scripts/components/util/dateutil.service.js"></script>
<script src="scripts/components/util/data-util.service.js"></script>
<script src="scripts/app/account/account.js"></script>
<script src="scripts/app/account/activate/activate.js"></script>
<script src="scripts/app/account/activate/activate.controller.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/scripts/app/account/password/password.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2 translate="password.title" translate-values="{username: '{{account.login}}'}
<form name="form" role="form" novalidate ng-submit="changePassword()" show-validation>

<div class="form-group">
<label for="password" translate="global.form.newpassword">New password</label>
<label class="control-label" for="password" translate="global.form.newpassword">New password</label>
<input type="password" class="form-control" id="password" name="password" placeholder="{{'global.form.newpassword.placeholder' | translate}}"
ng-model="password" ng-minlength=5 ng-maxlength=50 required>
<div ng-show="form.password.$dirty && form.password.$invalid">
Expand All @@ -37,7 +37,7 @@ <h2 translate="password.title" translate-values="{username: '{{account.login}}'}
<password-strength-bar password-to-check="password"></password-strength-bar>
</div>
<div class="form-group">
<label for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
<label class="control-label" for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
<input type="password" class="form-control" id="confirmPassword" name="confirmPassword" placeholder="{{'global.form.confirmpassword.placeholder' | translate}}"
ng-model="confirmPassword" ng-minlength=5 ng-maxlength=50 required>
<div ng-show="form.confirmPassword.$dirty && form.confirmPassword.$invalid">
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/scripts/app/account/register/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 translate="register.title">Registration</h1>
<form ng-show="!success" name="form" role="form" novalidate ng-submit="register()" show-validation>

<div class="form-group">
<label for="login" translate="global.form.username">Username</label>
<label class="control-label" for="login" translate="global.form.username">Username</label>
<input type="text" class="form-control" id="login" name="login" placeholder="{{'global.form.username.placeholder' | translate}}"
ng-model="registerAccount.login" ng-minlength=1 ng-maxlength=50 ng-pattern="/^[a-z0-9]*$/" required>
<div ng-show="form.login.$dirty && form.login.$invalid">
Expand All @@ -50,7 +50,7 @@ <h1 translate="register.title">Registration</h1>
</div>
</div>
<div class="form-group">
<label for="email" translate="global.form.email">E-mail</label>
<label class="control-label" for="email" translate="global.form.email">E-mail</label>
<input type="email" class="form-control" id="email" name="email" placeholder="{{'global.form.email.placeholder' | translate}}"
ng-model="registerAccount.email" ng-minlength=5 ng-maxlength=100 required>
<div ng-show="form.email.$dirty && form.email.$invalid">
Expand All @@ -73,7 +73,7 @@ <h1 translate="register.title">Registration</h1>
</div>
</div>
<div class="form-group">
<label for="password" translate="global.form.newpassword">New password</label>
<label class="control-label" for="password" translate="global.form.newpassword">New password</label>
<input type="password" class="form-control" id="password" name="password" placeholder="{{'global.form.newpassword.placeholder' | translate}}"
ng-model="registerAccount.password" ng-minlength=5 ng-maxlength=50 required>
<div ng-show="form.password.$dirty && form.password.$invalid">
Expand All @@ -93,7 +93,7 @@ <h1 translate="register.title">Registration</h1>
<password-strength-bar password-to-check="registerAccount.password"></password-strength-bar>
</div>
<div class="form-group">
<label for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
<label class="control-label" for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
<input type="password" class="form-control" id="confirmPassword" name="confirmPassword" placeholder="{{'global.form.confirmpassword.placeholder' | translate}}"
ng-model="confirmPassword" ng-minlength=5 ng-maxlength=50 required>
<div ng-show="form.confirmPassword.$dirty && form.confirmPassword.$invalid">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 translate="reset.finish.title">Reset password</h1>
<div ng-hide="keyMissing">
<form ng-show="!success" name="form" role="form" novalidate ng-submit="finishReset()" show-validation>
<div class="form-group">
<label for="password" translate="global.form.newpassword">New password</label>
<label class="control-label" for="password" translate="global.form.newpassword">New password</label>
<input type="password" class="form-control" id="password" name="password" placeholder="{{'global.form.newpassword.placeholder' | translate}}"
ng-model="resetAccount.password" ng-minlength=5 ng-maxlength=50 required>
<div ng-show="form.password.$dirty && form.password.$invalid">
Expand All @@ -47,7 +47,7 @@ <h1 translate="reset.finish.title">Reset password</h1>
</div>

<div class="form-group">
<label for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
<label class="control-label" for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
<input type="password" class="form-control" id="confirmPassword" name="confirmPassword" placeholder="{{'global.form.confirmpassword.placeholder' | translate}}"
ng-model="confirmPassword" ng-minlength=5 ng-maxlength=50 required>
<div ng-show="form.confirmPassword.$dirty && form.confirmPassword.$invalid">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 translate="reset.request.title">Reset your password</h1>

<form ng-show="!success" name="form" role="form" novalidate ng-submit="requestReset()" show-validation>
<div class="form-group">
<label for="email" translate="global.form.email">E-mail</label>
<label class="control-label" for="email" translate="global.form.email">E-mail</label>
<input type="email" class="form-control" id="email" name="email" placeholder="{{'global.form.email.placeholder' | translate}}"
ng-model="resetAccount.email" ng-minlength=5 ng-maxlength=100 required>
<div ng-show="form.email.$dirty && form.email.$invalid">
Expand Down
Loading

0 comments on commit 653e4d3

Please sign in to comment.