Skip to content

Commit

Permalink
Version 0.2.0 (#8)
Browse files Browse the repository at this point in the history
* java8 is now the minimum supported version since java7 is post-LTS

* bump to 0.2.0-SNAPSHOT

* Merge branch 'develop' into java8

* improved handling of multi-dimensional arrays and circular references in DefaultArrayFormatter

* Support different locales (#11)

* added initial support for multiple locales

* attempting to fix broken build

* added initial support for multiple verification reporters (#14)

* added assignableFromAll and assignableFromAny methods to ClassVerifier (#15)

* Rename ClassVerifier#interfacing to ClassVerifier#interfaced (#16)

* renamed interfacing method in ClassVerifier to interfaced

* corrected error message for interfaced method on ClassVerifier

* renamed defaulting method in LocaleVerifier to defaulted (#17)

* added matchAll and matchAny methods to StringVerifier (#18)

* added causedByAll and causedByAny methods to ThrowableVerifier (#19)

* updated copyright year throughout

* Update Crowdin configuration file

* added more Formatters and simplified Verification API (#21)

* added and & andComparable methods to CustomVerifier to compliment verify & verifyComparable methods on Verifier while using a partial copy of the current Verification (#22)

* added crowdin badge to README

* added JavaDoc badge to README

* configured Codecov and added badge to README

* added changelog

* roll 0.2.0
  • Loading branch information
neocotic authored Feb 11, 2017
1 parent f5a86df commit 83e60aa
Show file tree
Hide file tree
Showing 177 changed files with 13,743 additions and 2,994 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
sudo: false
language: java
jdk:
- oraclejdk7
- oraclejdk8
addons:
apt:
packages:
- oracle-java8-installer
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
webhooks:
urls:
Expand Down
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Version 0.2.0, 2017.02.11

* Drop support for Java 7 [#9](https://github.com/Skelp/verifier/issues/9) (**breaking change**)
* Support nested arrays and circular references in `DefaultArrayFormatter` [#10](https://github.com/Skelp/verifier/issues/10)
* Support different locales [#11](https://github.com/Skelp/verifier/issues/11) (**breaking change**)
* Support multiple verification reporters [#14](https://github.com/Skelp/verifier/issues/14) (**breaking change**)
* Add `ClassVerifier#assignableFromAll` & `ClassVerifier#assignableFromAny` [#15](https://github.com/Skelp/verifier/issues/15)
* Rename `ClassVerifier#interfacing` to `ClassVerifier#interfaced` [#16](https://github.com/Skelp/verifier/issues/16) (**breaking change**)
* Rename `LocaleVerifier#defaulting` to `LocaleVerifier#defaulted` [#17](https://github.com/Skelp/verifier/issues/17) (**breaking change**)
* Add `StringVerifier#matchAll` & `StringVerifier#matchAny` [#18](https://github.com/Skelp/verifier/issues/18)
* Add `ThrowableVerifier#causedByAll` & `ThrowableVerifier#causedByAny` [#19](https://github.com/Skelp/verifier/issues/19)
* Add more formatters [#21](https://github.com/Skelp/verifier/issues/21)
* Add CustomVerifier#and & CustomVerifier#andComparable methods to allow even more fluid chaining [#22](https://github.com/Skelp/verifier/issues/22)
* Add translations badge to README via [Crowdin](https://crowdin.com)
* Add JavaDoc badge to README via [JavaDoc](https://www.javadoc.io)
* Add code coverage badge to README via [Codecov](https://codecov.io)
* Add changelog
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2016 Alasdair Mercer, Skelp
Copyright (C) 2017 Alasdair Mercer, Skelp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
API with useful (and readable!) error messages, all while being highly configurable so that it's useful in your
application code.

[![Chat](https://img.shields.io/gitter/room/skelpuk/verifier.svg?style=flat-square)](https://gitter.im/skelpuk/verifier)
[![Build](https://img.shields.io/travis/Skelp/verifier/develop.svg?style=flat-square)](https://travis-ci.org/Skelp/verifier)
[![License](https://img.shields.io/github/license/Skelp/verifier.svg?style=flat-square)](https://github.com/Skelp/verifier/blob/master/LICENSE.md)
[![Maven Central](https://img.shields.io/maven-central/v/io.skelp/verifier.svg?style=flat-square)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.skelp%22%20AND%20a%3A%22verifier%22)
[![Chat](https://img.shields.io/gitter/room/skelpuk/verifier.svg)](https://gitter.im/skelpuk/verifier)
[![Build](https://img.shields.io/travis/Skelp/verifier/develop.svg)](https://travis-ci.org/Skelp/verifier)
[![Coverage](https://img.shields.io/codecov/c/github/Skelp/verifier/develop.svg)](https://codecov.io/gh/Skelp/verifier)
[![Translations](https://d322cqt584bo4o.cloudfront.net/verifier/localized.svg)](https://crowdin.com/project/verifier)
[![JavaDoc](https://www.javadoc.io/badge/io.skelp/verifier.svg)](https://www.javadoc.io/doc/io.skelp/verifier)
[![License](https://img.shields.io/github/license/Skelp/verifier.svg)](https://github.com/Skelp/verifier/blob/master/LICENSE.md)
[![Maven Central](https://img.shields.io/maven-central/v/io.skelp/verifier.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.skelp%22%20AND%20a%3A%22verifier%22)

* [Install](#install)
* [API](#api)
Expand All @@ -19,15 +22,21 @@ application code.

To install Verifier, simply add it as a dependency to your project:

**Maven:**
``` xml
<dependency>
<groupId>io.skelp</groupId>
<artifactId>verifier</artifactId>
<version>0.1.0</version>
<version>0.2.0</version>
</dependency>
```

That's it!
**Grails:**
``` groovy
compile 'io.skelp:verifier:0.2.0'
```

That's it! You'll need to have Java 8 or above though.

## API

Expand All @@ -46,11 +55,11 @@ public class LoginForm implements Form {
public void handle(Map<String, String> data) {
Verifier.verify(data)
.containAllKeys("username", "password");
Verifier.verify(data.get("username"), "username")
.not().blank();
Verifier.verify(data.get("password"), "password")
.not().empty()
.alphanumeric();
.and(data.get("username"), "username")
.not().blank();
.and(data.get("password"), "password")
.not().empty()
.alphanumeric();

userService.login(data);
}
Expand All @@ -75,12 +84,12 @@ public class RegistrationForm implements Form {
public void handle(Map<String, String> data) {
Verifier.verify(data)
.containAllKeys("username", "password");
Verifier.verify(data.get("username"), "username")
.not().blank()
.that((value) -> userService.isAvailable(value));
Verifier.verify(data.get("password"), "password", PasswordVerifier.class)
.not().nulled()
.strong();
.and(data.get("username"), "username")
.not().blank()
.that((value) -> userService.isAvailable(value));
.and(data.get("password"), "password", PasswordVerifier.class)
.not().nulled()
.strong();

userService.register(data);
}
Expand Down Expand Up @@ -134,5 +143,5 @@ A list of Verifier contributors can be found in [AUTHORS.md](https://github.com/

See [LICENSE.md](https://github.com/Skelp/verifier/raw/master/LICENSE.md) for more information on our MIT license.

© 2016 [Skelp](https://skelp.io)
© 2017 [Skelp](https://skelp.io)
<img align="right" width="16" height="16" src="https://cdn.rawgit.com/Skelp/skelp-branding/master/assets/logo/base/skelp-logo-16x16.png">
3 changes: 3 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
files:
- source: /src/main/resources/Verifier.properties
translation: /src/main/resources/Verifier_%locale_with_underscore%.properties
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016 Alasdair Mercer, Skelp
Copyright (C) 2017 Alasdair Mercer, Skelp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -29,7 +29,7 @@

<groupId>io.skelp</groupId>
<artifactId>verifier</artifactId>
<version>0.1.0</version>
<version>0.2.0</version>
<name>Verifier</name>
<description>
Verifier is a Java library for validation.
Expand Down Expand Up @@ -81,8 +81,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
Expand Down
Loading

0 comments on commit 83e60aa

Please sign in to comment.