Compare commits
171 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa1735a6b5 | |||
| 469f007d6d | |||
| 31db0ab659 | |||
| 563e0c79df | |||
| c0f8d153fe | |||
| d1749e793c | |||
| d5ee26d713 | |||
| 602b8d2ef7 | |||
| d6e647bfd5 | |||
| a8a1c2687b | |||
| 598b00fe7a | |||
| 506d072988 | |||
| 5e7c7c0246 | |||
| bdd923612a | |||
| 043ad3edc6 | |||
| e6d0aa4a5b | |||
| d42f386555 | |||
| a568d925cc | |||
| 0eba56018b | |||
| aa64edf17c | |||
| 6a2123b3d7 | |||
| 81e1f86db2 | |||
| 23fd6e63f9 | |||
| 06ece70248 | |||
| 056e67f5d7 | |||
| 381501666c | |||
| 381879331f | |||
| 85a3464e71 | |||
| 357d0c4333 | |||
| 154335e4a9 | |||
| 8b34ad5983 | |||
| 6440b082ec | |||
| 45a5315cd4 | |||
| 4296a648a4 | |||
| e2eec2f552 | |||
| b18526f360 | |||
| 99bcbd4e74 | |||
| 0da6663c1e | |||
| 8013b21745 | |||
| 1f75676a77 | |||
| d10a91628c | |||
| f377b486e3 | |||
| 1031135026 | |||
| 6e06c52b7a | |||
| 5264f3c8a9 | |||
| 5aacf67554 | |||
| eb693c37cc | |||
| 78c43e3037 | |||
| 3127b80b00 | |||
| eb66eb9385 | |||
| df8c46da88 | |||
| 8684b65838 | |||
| 364126bf65 | |||
| 370d956289 | |||
| f4c3fff71b | |||
| 6986a53d9f | |||
| e0963d6bbc | |||
| 4e78791a53 | |||
| d78b7d029c | |||
| 13a30260af | |||
| c175aabd16 | |||
| 3aaef1b527 | |||
| 7d5c263d8e | |||
| ac6d4cdf6f | |||
| 9ff4d1647a | |||
| 4c8b7406f1 | |||
| 9ee036cf25 | |||
| b15bf3e6ae | |||
| 18eba0fb14 | |||
| 69eb4d8c6b | |||
| eb84ebe79a | |||
| 1fae9ce05e | |||
| 0de32872b6 | |||
| 7583150090 | |||
| a84c128029 | |||
| 2024176a48 | |||
| c1425cc65c | |||
| 0098bd7656 | |||
| 578c13f135 | |||
| e5f444ec4c | |||
| 1116c73788 | |||
| 5471419039 | |||
| 0a8d0d1868 | |||
| 5ffcfd82b6 | |||
| 741bd2b1d3 | |||
| a27167061f | |||
| f973acb33f | |||
| c55c6416f0 | |||
| f024d82908 | |||
| f73dd19086 | |||
| 6fc2a3b0a5 | |||
| 23e2e34c17 | |||
| 18af4ed98b | |||
| 56076c0f64 | |||
| c2714b3c95 | |||
| cc17b0a115 | |||
| 807d5ec0bf | |||
| b0006419bf | |||
| 669165926b | |||
| c1d3e80091 | |||
| 33a1aa0801 | |||
| 02d831d56c | |||
| d7409c8375 | |||
| 84efab1290 | |||
| 97f044126f | |||
| 45c476376e | |||
| 0b7fe0dfaa | |||
| e32e1a3598 | |||
| ef939c94fa | |||
| 335ce58585 | |||
| c07f01f063 | |||
| 2c19fb1bd0 | |||
| ea60ee3cbf | |||
| 96c62f8f0c | |||
| 857778a69d | |||
| be0504e992 | |||
| 09b8d57746 | |||
| 44cc4ec091 | |||
| 164144bc08 | |||
| c3c38488e4 | |||
| 54919f5baa | |||
| 838c1fe2d7 | |||
| 644fda206d | |||
| 5434db823e | |||
| 0f86316101 | |||
| 568095894c | |||
| 4da5dd4f9f | |||
| c0582f1fec | |||
| e7a0bc338a | |||
| 98ab465114 | |||
| 86162157a8 | |||
| 297b8b9df5 | |||
| f698e1da11 | |||
| 13cba3aadc | |||
| f862707e7a | |||
| fbf94b1290 | |||
| 010730ac1f | |||
| 6dd2c088b7 | |||
| 48a35bb3d9 | |||
| 1dc464d098 | |||
| fa5b4da233 | |||
| 37e702c97d | |||
| a7768e23f4 | |||
| c8b6823b33 | |||
| d3db25d4bd | |||
| 4b7f018d84 | |||
| a38088dafa | |||
| f5159d7655 | |||
| be5b957082 | |||
| 44e3f42093 | |||
| 34ee92a828 | |||
| 3c932b95c6 | |||
| f8fa4af927 | |||
| 81d9e7635a | |||
| 511a273341 | |||
| 14ba9a05bc | |||
| dac3d3fb06 | |||
| 675753a4dd | |||
| dc631bc3dd | |||
| 13841611e6 | |||
| 4e88e032b5 | |||
| abec123e83 | |||
| 694ea43e2b | |||
| 3179b206b7 | |||
| 97bc261e29 | |||
| 1f8c8b2457 | |||
| fab9e4b32f | |||
| bff9eee757 | |||
| fba5c198ab | |||
| c3144e48d3 | |||
| 24749a63bf |
+5
-1
@@ -1,8 +1,11 @@
|
||||
language: java
|
||||
dist: trusty
|
||||
jdk:
|
||||
- oraclejdk7
|
||||
- oraclejdk8
|
||||
- openjdk7
|
||||
- openjdk10
|
||||
- oraclejdk11
|
||||
sudo: true
|
||||
script: "mvn verify failsafe:integration-test failsafe:verify"
|
||||
branches:
|
||||
except:
|
||||
@@ -11,3 +14,4 @@ notifications:
|
||||
email: false
|
||||
after_success:
|
||||
- mvn clean cobertura:cobertura coveralls:cobertura
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
First and foremost thanks to anyone who contributes, very much appreciated.
|
||||
|
||||
|
||||
## Guidelines
|
||||
- Need to maintain compatibility with Java 1.6 (and Android). Therefore any attempt to migrate to 1.6 JDKs and above will not be merged back in.
|
||||
|
||||
- If you add new faker classes like `Address`, `Country`, and `Number` they should be accompanied by a unit test. Where relevant please add more assertions to the `com.github.javafaker.integration.FakerIT` class.
|
||||
- If you add a new faker class, update the `README.md`.
|
||||
- Submit a PR with your change and if there are no comments, changes will be merged in
|
||||
- If you're not sure about the change, raise an issue and have a discussion before spending time coding it up
|
||||
- Try and make one logical change per PR. That is not make many changes in one PR. Submit multiple PRs instead
|
||||
|
||||
## Building
|
||||
|
||||
- Should be as easy as running `mvn clean install` on the root directory
|
||||
@@ -4,10 +4,9 @@ Java Faker
|
||||
[](http://mvnrepository.com/artifact/com.github.javafaker/javafaker)
|
||||
[](https://travis-ci.org/DiUS/java-faker)
|
||||
[](https://coveralls.io/r/DiUS/java-faker)
|
||||
[](https://www.versioneye.com/user/projects/572c2f11a0ca35004baf861a)
|
||||
[](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
|
||||
This library is a port of Ruby's stympy/faker gem (as well as Perl's Data::Faker library) that generates fake data.
|
||||
This library is a port of Ruby's [faker](https://github.com/stympy/faker) gem (as well as Perl's Data::Faker library) that generates fake data.
|
||||
It's useful when you're developing a new project and need some pretty data for showcase.
|
||||
|
||||
Usage
|
||||
@@ -18,20 +17,15 @@ In pom.xml, add the following xml stanza between `<dependencies> ... </dependenc
|
||||
<dependency>
|
||||
<groupId>com.github.javafaker</groupId>
|
||||
<artifactId>javafaker</artifactId>
|
||||
<version>0.12</version>
|
||||
<version>0.18</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
||||
For gradle users, add the following to your build.gradle file.
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'com.github.javafaker', name: 'javafaker', version: '0.12'
|
||||
implementation 'com.github.javafaker:javafaker:0.18'
|
||||
}
|
||||
|
||||
```
|
||||
@@ -53,12 +47,19 @@ Javadoc
|
||||
http://dius.github.io/java-faker/apidocs/index.html
|
||||
|
||||
|
||||
Contributions
|
||||
-------------
|
||||
See [CONTRIBUTING.md](https://github.com/DiUS/java-faker/blob/master/CONTRIBUTING.md)
|
||||
|
||||
|
||||
Fakers
|
||||
-----
|
||||
* Ancient
|
||||
* Address
|
||||
* App
|
||||
* Artist
|
||||
* Avatar
|
||||
* Aviation
|
||||
* Beer
|
||||
* Book
|
||||
* Bool
|
||||
@@ -72,38 +73,64 @@ Fakers
|
||||
* Crypto
|
||||
* DateAndTime
|
||||
* Demographic
|
||||
* Dog
|
||||
* DragonBall
|
||||
* Educator
|
||||
* Esports
|
||||
* File
|
||||
* Finance
|
||||
* Food
|
||||
* Friends
|
||||
* FunnyName
|
||||
* GameOfThrones
|
||||
* Hacker
|
||||
* HarryPotter
|
||||
* Hipster
|
||||
* HitchhikersGuideToTheGalaxy
|
||||
* Hobbit
|
||||
* HowIMetYourMother
|
||||
* IdNumber
|
||||
* Internet
|
||||
* Job
|
||||
* LeagueOfLegends
|
||||
* Lebowski
|
||||
* LordOfTheRings
|
||||
* Lorem
|
||||
* Matz
|
||||
* Music
|
||||
* Name
|
||||
* Number
|
||||
* Options
|
||||
* Overwatch
|
||||
* PhoneNumber
|
||||
* Pokemon
|
||||
* RickAndMorty
|
||||
* Robin
|
||||
* RockBand
|
||||
* Shakespeare
|
||||
* SlackEmoji
|
||||
* Space
|
||||
* StarTrek
|
||||
* Stock
|
||||
* Superhero
|
||||
* Team
|
||||
* TwinPeaks
|
||||
* University
|
||||
* Weather
|
||||
* Witcher
|
||||
* Yoda
|
||||
* Zelda
|
||||
|
||||
Usage with Locales
|
||||
-----
|
||||
|
||||
```java
|
||||
Faker faker = new Faker(new Locale("{YOUR_LOCALE}"));
|
||||
Faker faker = new Faker(new Locale("YOUR_LOCALE"));
|
||||
```
|
||||
|
||||
Supported Locales
|
||||
-----
|
||||
* bg
|
||||
* ca
|
||||
* ca-CAT
|
||||
* da-DK
|
||||
@@ -117,16 +144,22 @@ Supported Locales
|
||||
* en-CA
|
||||
* en-GB
|
||||
* en-IND
|
||||
* en-MS
|
||||
* en-NEP
|
||||
* en-NG
|
||||
* en-NZ
|
||||
* en-PAK
|
||||
* en-SG
|
||||
* en-UG
|
||||
* en-US
|
||||
* en-ZA
|
||||
* es
|
||||
* es-MX
|
||||
* fa
|
||||
* fi-FI
|
||||
* fr
|
||||
* he
|
||||
* in-ID
|
||||
* it
|
||||
* ja
|
||||
* ko
|
||||
@@ -138,6 +171,8 @@ Supported Locales
|
||||
* ru
|
||||
* sk
|
||||
* sv
|
||||
* sv-SE
|
||||
* tr
|
||||
* uk
|
||||
* vi
|
||||
* zh-CN
|
||||
@@ -149,4 +184,4 @@ TODO
|
||||
|
||||
LICENSE
|
||||
-------
|
||||
Copyright (c) 2014 DiUS Computing Pty Ltd. See the LICENSE file for license rights and limitations.
|
||||
Copyright (c) 2019 DiUS Computing Pty Ltd. See the LICENSE file for license rights and limitations.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<groupId>com.github.javafaker</groupId>
|
||||
<artifactId>javafaker</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.13</version>
|
||||
<version>0.19-SNAPSHOT</version>
|
||||
<name>Java Faker</name>
|
||||
<description>
|
||||
This library is a port of Ruby's stympy/faker gem (as well as Perl's Data::Faker library) that generates fake data.
|
||||
@@ -43,12 +43,6 @@
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>7</version>
|
||||
</parent>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
@@ -56,9 +50,10 @@
|
||||
<version>3.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.bmoliveira</groupId>
|
||||
<artifactId>snake-yaml</artifactId>
|
||||
<version>v1.18-android</version>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.23</version>
|
||||
<classifier>android</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.mifmif</groupId>
|
||||
@@ -68,13 +63,13 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.24</version>
|
||||
<version>1.7.25</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>1.7.24</version>
|
||||
<version>1.7.25</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -98,7 +93,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>2.7.16</version>
|
||||
<version>2.23.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -114,7 +109,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<version>3.7.0</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
@@ -152,37 +147,5 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<!-- Shade com.github.bmoliveira:snake-yaml because it is not available in maven central
|
||||
and therefore forces (gradle) users to add https://jitpack.io as a repo. This workaround
|
||||
is not possible for companies with strict policies regarding maven repos. -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.3</version>
|
||||
<configuration>
|
||||
<artifactSet>
|
||||
<includes>
|
||||
<include>com.github.bmoliveira:snake-yaml</include>
|
||||
</includes>
|
||||
</artifactSet>
|
||||
<!-- use package rewriting to prevent conflicts with different snakeyaml versions -->
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>org.yaml.snakeyaml</pattern>
|
||||
<shadedPattern>com.github.javafaker.shaded.snakeyaml</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Address {
|
||||
private final Faker faker;
|
||||
|
||||
Address(Faker faker) {
|
||||
protected Address(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,14 @@ public class Address {
|
||||
return faker.bothify(faker.fakeValuesService().resolve("address.postcode", this,faker));
|
||||
}
|
||||
|
||||
public String zipCodeByState(String stateAbbr) {
|
||||
return faker.fakeValuesService().resolve("address.postcode_by_state." + stateAbbr, this, faker);
|
||||
}
|
||||
|
||||
public String countyByZipCode(String postCode) {
|
||||
return faker.fakeValuesService().resolve("address.county_by_postcode." + postCode, this, faker);
|
||||
}
|
||||
|
||||
public String streetSuffix() {
|
||||
return faker.fakeValuesService().resolve("address.street_suffix", this, faker);
|
||||
}
|
||||
@@ -100,6 +108,6 @@ public class Address {
|
||||
}
|
||||
|
||||
public String fullAddress() {
|
||||
return faker.fakeValuesService().resolve("address.full_address", this, faker);
|
||||
return faker.fakeValuesService().resolve("address.full_address", this, faker);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Ancient {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Ancient(Faker faker) {
|
||||
protected Ancient(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class App {
|
||||
private final Faker faker;
|
||||
|
||||
App(Faker faker) {
|
||||
protected App(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Artist {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Artist(Faker faker) {
|
||||
protected Artist(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Avatar {
|
||||
private final Faker faker;
|
||||
private final String baseUrl;
|
||||
|
||||
protected Avatar(Faker faker) {
|
||||
this.faker = faker;
|
||||
this.baseUrl = "https://s3.amazonaws.com/uifaces/faces/twitter/";
|
||||
}
|
||||
|
||||
public String image() {
|
||||
return baseUrl + faker.fakeValuesService().resolve("internet.avatar", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
/**
|
||||
* Generates aviation related strings.
|
||||
*/
|
||||
public class Aviation {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
protected Aviation(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return some aircraft name/model/make e.g. "An-2".
|
||||
*/
|
||||
public String aircraft() {
|
||||
return faker.fakeValuesService().fetchString("aviation.aircraft");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an airport ICAO code.
|
||||
* See also: https://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code:_A
|
||||
*/
|
||||
public String airport() {
|
||||
return faker.fakeValuesService().fetchString("aviation.airport");
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a METAR weather report.
|
||||
* Have a look at https://en.wikipedia.org/wiki/METAR
|
||||
*/
|
||||
public String METAR() {
|
||||
return faker.fakeValuesService().fetchString("aviation.metar");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class BackToTheFuture {
|
||||
private final Faker faker;
|
||||
|
||||
protected BackToTheFuture(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("back_to_the_future.characters");
|
||||
}
|
||||
|
||||
public String date() {
|
||||
return faker.resolve("back_to_the_future.dates");
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("back_to_the_future.quotes");
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Beer {
|
||||
private final Faker faker;
|
||||
|
||||
Beer(Faker faker) {
|
||||
protected Beer(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Book {
|
||||
private final Faker faker;
|
||||
|
||||
Book(Faker faker) {
|
||||
protected Book(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Bool {
|
||||
private final Faker faker;
|
||||
|
||||
Bool(Faker faker) {
|
||||
protected Bool(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Business {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Business(Faker faker) {
|
||||
protected Business(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@ public class Cat {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Cat(Faker faker) {
|
||||
protected Cat(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.fakeValuesService().resolve("cat.name", this, faker);
|
||||
return faker.fakeValuesService().resolve("creature.cat.name", this, faker);
|
||||
}
|
||||
|
||||
public String breed() {
|
||||
return faker.fakeValuesService().resolve("cat.breed", this, faker);
|
||||
return faker.fakeValuesService().resolve("creature.cat.breed", this, faker);
|
||||
}
|
||||
|
||||
public String registry() {
|
||||
return faker.fakeValuesService().resolve("cat.registry", this, faker);
|
||||
return faker.fakeValuesService().resolve("creature.cat.registry", this, faker);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class ChuckNorris {
|
||||
private final Faker faker;
|
||||
|
||||
ChuckNorris(Faker faker) {
|
||||
protected ChuckNorris(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Code {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Code(Faker faker) {
|
||||
protected Code(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,22 @@ package com.github.javafaker;
|
||||
public class Color {
|
||||
private final Faker faker;
|
||||
|
||||
Color(Faker faker) {
|
||||
protected Color(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.fakeValuesService().resolve("color.name", this, faker);
|
||||
}
|
||||
|
||||
public String hex() {
|
||||
return hex(true);
|
||||
}
|
||||
|
||||
public String hex(boolean includeHashSign) {
|
||||
String hexString = faker.random().hex(6);
|
||||
if(includeHashSign)
|
||||
return "#" + hexString;
|
||||
return hexString;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.TreeSet;
|
||||
public class Commerce {
|
||||
private final Faker faker;
|
||||
|
||||
Commerce(Faker faker) {
|
||||
protected Commerce(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class Company {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Company(Faker faker) {
|
||||
protected Company(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Country {
|
||||
private final Faker faker;
|
||||
private final String flagUrl;
|
||||
|
||||
protected Country(Faker faker) {
|
||||
this.faker = faker;
|
||||
this.flagUrl = "http://flags.fmcdn.net/data/flags/w580/";
|
||||
}
|
||||
|
||||
public String flag() {
|
||||
return flagUrl + faker.fakeValuesService().resolve("country.code2", this, faker) + ".png";
|
||||
}
|
||||
|
||||
public String countryCode2() {
|
||||
return faker.fakeValuesService().resolve("country.code2", this, faker);
|
||||
}
|
||||
|
||||
public String countryCode3() {
|
||||
return faker.fakeValuesService().resolve("country.code3", this, faker);
|
||||
}
|
||||
|
||||
public String capital() {
|
||||
return faker.fakeValuesService().resolve("country.capital", this, faker);
|
||||
}
|
||||
|
||||
public String currency() {
|
||||
return faker.fakeValuesService().resolve("country.currency", this, faker);
|
||||
}
|
||||
|
||||
public String currencyCode() {
|
||||
return faker.fakeValuesService().resolve("country.currency_code", this, faker);
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.fakeValuesService().resolve("country.name", this, faker);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
public class Crypto {
|
||||
private final Faker faker;
|
||||
|
||||
Crypto(Faker faker) {
|
||||
protected Crypto(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Currency {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
public Currency(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.fakeValuesService().resolve("currency.name", this, faker);
|
||||
}
|
||||
|
||||
public String code() {
|
||||
return faker.fakeValuesService().resolve("currency.code", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,32 @@
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
package com.github.javafaker;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* A generator of random dates.
|
||||
*
|
||||
*
|
||||
* @author pmiklos
|
||||
*
|
||||
*/
|
||||
public class DateAndTime {
|
||||
private static final int DEFAULT_MIN_AGE = 18;
|
||||
private static final int DEFAULT_MAX_AGE = 65;
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
DateAndTime(Faker faker) {
|
||||
protected DateAndTime(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates a future date from now. Note that there is a 1 second slack to avoid generating a past date.
|
||||
*
|
||||
*
|
||||
* @param atMost
|
||||
* at most this amount of time ahead from now exclusive.
|
||||
* @param unit
|
||||
@@ -35,9 +39,26 @@ public class DateAndTime {
|
||||
return future(atMost, unit, aBitLaterThanNow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a future date from now, with a minimum time.
|
||||
*
|
||||
* @param atMost
|
||||
* at most this amount of time ahead from now exclusive.
|
||||
* @param minimum
|
||||
* the minimum amount of time in the future from now.
|
||||
* @param unit
|
||||
* the time unit.
|
||||
* @return a future date from now.
|
||||
*/
|
||||
public Date future(int atMost, int minimum, TimeUnit unit) {
|
||||
Date now = new Date();
|
||||
Date minimumDate = new Date(now.getTime() + unit.toMillis(minimum));
|
||||
return future(atMost - minimum, unit, minimumDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a future date relative to the {@code referenceDate}.
|
||||
*
|
||||
*
|
||||
* @param atMost
|
||||
* at most this amount of time ahead to the {@code referenceDate} exclusive.
|
||||
* @param unit
|
||||
@@ -57,7 +78,7 @@ public class DateAndTime {
|
||||
|
||||
/**
|
||||
* Generates a past date from now. Note that there is a 1 second slack added.
|
||||
*
|
||||
*
|
||||
* @param atMost
|
||||
* at most this amount of time earlier from now exclusive.
|
||||
* @param unit
|
||||
@@ -70,9 +91,26 @@ public class DateAndTime {
|
||||
return past(atMost, unit, aBitEarlierThanNow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a past date from now, with a minimum time.
|
||||
*
|
||||
* @param atMost
|
||||
* at most this amount of time earlier from now exclusive.
|
||||
* @param minimum
|
||||
* the minimum amount of time in the past from now.
|
||||
* @param unit
|
||||
* the time unit.
|
||||
* @return a past date from now.
|
||||
*/
|
||||
public Date past(int atMost, int minimum, TimeUnit unit) {
|
||||
Date now = new Date();
|
||||
Date minimumDate = new Date(now.getTime() - unit.toMillis(minimum));
|
||||
return past(atMost - minimum, unit, minimumDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a past date relative to the {@code referenceDate}.
|
||||
*
|
||||
*
|
||||
* @param atMost
|
||||
* at most this amount of time past to the {@code referenceDate} exclusive.
|
||||
* @param unit
|
||||
@@ -92,7 +130,7 @@ public class DateAndTime {
|
||||
|
||||
/**
|
||||
* Generates a random date between two dates.
|
||||
*
|
||||
*
|
||||
* @param from
|
||||
* the lower bound inclusive
|
||||
* @param to
|
||||
@@ -110,4 +148,32 @@ public class DateAndTime {
|
||||
return new Date(from.getTime() + offsetMillis);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random birthday between 65 and 18 years ago.
|
||||
*
|
||||
* @return a random birthday between 65 and 18 years ago.
|
||||
*/
|
||||
public Date birthday() {
|
||||
return birthday(DEFAULT_MIN_AGE, DEFAULT_MAX_AGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random birthday between two ages.
|
||||
*
|
||||
* @param minAge
|
||||
* the minimal age
|
||||
* @param maxAge
|
||||
* the maximal age
|
||||
* @return a random birthday between {@code minAge} and {@code maxAge} years ago.
|
||||
* @throws IllegalArgumentException
|
||||
* if the {@code maxAge} is lower than {@code minAge}.
|
||||
*/
|
||||
public Date birthday(int minAge, int maxAge) {
|
||||
int currentYear = Calendar.getInstance().get(Calendar.YEAR);
|
||||
Calendar from = new GregorianCalendar(currentYear - maxAge, 0, 1);
|
||||
Calendar to = new GregorianCalendar(currentYear - minAge, 11, 31);
|
||||
|
||||
return between(from.getTime(), to.getTime());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Demographic {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Demographic(Faker faker) {
|
||||
protected Demographic(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Dog {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
protected Dog(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.name", this, faker);
|
||||
}
|
||||
|
||||
public String breed() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.breed", this, faker);
|
||||
}
|
||||
|
||||
public String sound() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.sound", this, faker);
|
||||
}
|
||||
|
||||
public String memePhrase() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.meme_phrase", this, faker);
|
||||
}
|
||||
|
||||
public String age() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.age", this, faker);
|
||||
}
|
||||
|
||||
public String coatLength() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.coat_length", this, faker);
|
||||
}
|
||||
|
||||
public String gender() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.gender", this, faker);
|
||||
}
|
||||
|
||||
public String size() {
|
||||
return faker.fakeValuesService().resolve("creature.dog.size", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class DragonBall {
|
||||
private final Faker faker;
|
||||
|
||||
protected DragonBall(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("dragon_ball.characters", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Educator {
|
||||
private final Faker faker;
|
||||
|
||||
Educator(Faker faker) {
|
||||
protected Educator(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ public class Educator {
|
||||
}
|
||||
|
||||
public String course() {
|
||||
return faker.fakeValuesService().resolve("educator.tertiary.course.type", this, faker)
|
||||
return faker.fakeValuesService().resolve("educator.tertiary.degree.type", this, faker)
|
||||
+ " "
|
||||
+ faker.fakeValuesService().resolve("educator.tertiary.course.subject", this, faker);
|
||||
+ faker.fakeValuesService().resolve("educator.tertiary.degree.subject", this, faker);
|
||||
}
|
||||
|
||||
public String secondarySchool() {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Esports {
|
||||
private final Faker faker;
|
||||
|
||||
protected Esports(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String player() {
|
||||
return faker.resolve("esport.players");
|
||||
}
|
||||
|
||||
public String team() {
|
||||
return faker.resolve("esport.teams");
|
||||
}
|
||||
|
||||
public String event() {
|
||||
return faker.resolve("esport.events");
|
||||
}
|
||||
|
||||
public String league() {
|
||||
return faker.resolve("esport.leagues");
|
||||
}
|
||||
|
||||
public String game() {
|
||||
return faker.resolve("esport.games");
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,8 @@ public class Faker {
|
||||
private final Ancient ancient;
|
||||
private final App app;
|
||||
private final Artist artist;
|
||||
private final Avatar avatar;
|
||||
private final Aviation aviation;
|
||||
private final Lorem lorem;
|
||||
private final Music music;
|
||||
private final Name name;
|
||||
@@ -32,6 +34,8 @@ public class Faker {
|
||||
private final ChuckNorris chuckNorris;
|
||||
private final Color color;
|
||||
private final Commerce commerce;
|
||||
private final Country country;
|
||||
private final Currency currency;
|
||||
private final Company company;
|
||||
private final Crypto crypto;
|
||||
private final IdNumber idNumber;
|
||||
@@ -43,6 +47,7 @@ public class Faker {
|
||||
private final GameOfThrones gameOfThrones;
|
||||
private final DateAndTime dateAndTime;
|
||||
private final Demographic demographic;
|
||||
private final Dog dog;
|
||||
private final Educator educator;
|
||||
private final Shakespeare shakespeare;
|
||||
private final SlackEmoji slackEmoji;
|
||||
@@ -55,6 +60,32 @@ public class Faker {
|
||||
private final Cat cat;
|
||||
private final File file;
|
||||
private final Stock stock;
|
||||
private final LordOfTheRings lordOfTheRings;
|
||||
private final Zelda zelda;
|
||||
private final HarryPotter harryPotter;
|
||||
private final RockBand rockBand;
|
||||
private final Esports esports;
|
||||
private final Friends friends;
|
||||
private final Hipster hipster;
|
||||
private final Job job;
|
||||
private final TwinPeaks twinPeaks;
|
||||
private final RickAndMorty rickAndMorty;
|
||||
private final Yoda yoda;
|
||||
private final Matz matz;
|
||||
private final Witcher witcher;
|
||||
private final DragonBall dragonBall;
|
||||
private final FunnyName funnyName;
|
||||
private final HitchhikersGuideToTheGalaxy hitchhikersGuideToTheGalaxy;
|
||||
private final Hobbit hobbit;
|
||||
private final HowIMetYourMother howIMetYourMother;
|
||||
private final LeagueOfLegends leagueOfLegends;
|
||||
private final Overwatch overwatch;
|
||||
private final Robin robin;
|
||||
private final StarTrek starTrek;
|
||||
private final Weather weather;
|
||||
private final Lebowski lebowski;
|
||||
private final Medical medical;
|
||||
private final BackToTheFuture backToTheFuture;
|
||||
|
||||
public Faker() {
|
||||
this(Locale.ENGLISH);
|
||||
@@ -75,6 +106,8 @@ public class Faker {
|
||||
this.ancient = new Ancient(this);
|
||||
this.app = new App(this);
|
||||
this.artist = new Artist(this);
|
||||
this.avatar = new Avatar(this);
|
||||
this.aviation = new Aviation(this);
|
||||
this.lorem = new Lorem(this);
|
||||
this.music = new Music(this);
|
||||
this.name = new Name(this);
|
||||
@@ -92,6 +125,7 @@ public class Faker {
|
||||
this.company = new Company(this);
|
||||
this.crypto = new Crypto(this);
|
||||
this.commerce = new Commerce(this);
|
||||
this.currency = new Currency(this);
|
||||
this.options = new Options(this);
|
||||
this.code = new Code(this);
|
||||
this.file = new File(this);
|
||||
@@ -100,6 +134,7 @@ public class Faker {
|
||||
this.gameOfThrones = new GameOfThrones(this);
|
||||
this.dateAndTime = new DateAndTime(this);
|
||||
this.demographic = new Demographic(this);
|
||||
this.dog = new Dog(this);
|
||||
this.educator = new Educator(this);
|
||||
this.shakespeare = new Shakespeare(this);
|
||||
this.slackEmoji = new SlackEmoji(this);
|
||||
@@ -111,6 +146,73 @@ public class Faker {
|
||||
this.university = new University(this);
|
||||
this.cat = new Cat(this);
|
||||
this.stock = new Stock(this);
|
||||
this.lordOfTheRings = new LordOfTheRings(this);
|
||||
this.zelda = new Zelda(this);
|
||||
this.harryPotter = new HarryPotter(this);
|
||||
this.rockBand = new RockBand(this);
|
||||
this.esports = new Esports(this);
|
||||
this.friends = new Friends(this);
|
||||
this.hipster = new Hipster(this);
|
||||
this.job = new Job(this);
|
||||
this.twinPeaks = new TwinPeaks(this);
|
||||
this.rickAndMorty = new RickAndMorty(this);
|
||||
this.yoda = new Yoda(this);
|
||||
this.matz = new Matz(this);
|
||||
this.witcher = new Witcher(this);
|
||||
this.dragonBall = new DragonBall(this);
|
||||
this.funnyName = new FunnyName(this);
|
||||
this.hitchhikersGuideToTheGalaxy = new HitchhikersGuideToTheGalaxy(this);
|
||||
this.hobbit = new Hobbit(this);
|
||||
this.howIMetYourMother = new HowIMetYourMother(this);
|
||||
this.leagueOfLegends = new LeagueOfLegends(this);
|
||||
this.overwatch = new Overwatch(this);
|
||||
this.robin = new Robin(this);
|
||||
this.starTrek = new StarTrek(this);
|
||||
this.weather = new Weather(this);
|
||||
this.lebowski = new Lebowski(this);
|
||||
this.medical = new Medical(this);
|
||||
this.country = new Country(this);
|
||||
this.backToTheFuture = new BackToTheFuture(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs Faker instance with default argument.
|
||||
*
|
||||
* @return {@link Faker#Faker()}
|
||||
*/
|
||||
public static Faker instance() {
|
||||
return new Faker();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs Faker instance with provided {@link Locale}.
|
||||
*
|
||||
* @param locale - {@link Locale}
|
||||
* @return {@link Faker#Faker(Locale)}
|
||||
*/
|
||||
public static Faker instance(Locale locale) {
|
||||
return new Faker(locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs Faker instance with provided {@link Random}.
|
||||
*
|
||||
* @param random - {@link Random}
|
||||
* @return {@link Faker#Faker(Random)}
|
||||
*/
|
||||
public static Faker instance(Random random) {
|
||||
return new Faker(random);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs Faker instance with provided {@link Locale} and {@link Random}.
|
||||
*
|
||||
* @param locale - {@link Locale}
|
||||
* @param random - {@link Random}
|
||||
* @return {@link Faker#Faker(Locale, Random)}
|
||||
*/
|
||||
public static Faker instance(Locale locale, Random random) {
|
||||
return new Faker(locale, random);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,6 +288,11 @@ public class Faker {
|
||||
return this.randomService;
|
||||
}
|
||||
|
||||
public Currency currency() {
|
||||
return currency;
|
||||
|
||||
}
|
||||
|
||||
FakeValuesService fakeValuesService() {
|
||||
return this.fakeValuesService;
|
||||
}
|
||||
@@ -202,6 +309,14 @@ public class Faker {
|
||||
return artist;
|
||||
}
|
||||
|
||||
public Avatar avatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public Aviation aviation() {
|
||||
return aviation;
|
||||
}
|
||||
|
||||
public Music music() {
|
||||
return music;
|
||||
}
|
||||
@@ -302,6 +417,10 @@ public class Faker {
|
||||
return demographic;
|
||||
}
|
||||
|
||||
public Dog dog() {
|
||||
return dog;
|
||||
}
|
||||
|
||||
public Educator educator() {
|
||||
return educator;
|
||||
}
|
||||
@@ -346,21 +465,126 @@ public class Faker {
|
||||
return stock;
|
||||
}
|
||||
|
||||
public LordOfTheRings lordOfTheRings() {
|
||||
return lordOfTheRings;
|
||||
}
|
||||
|
||||
public Zelda zelda() {
|
||||
return zelda;
|
||||
}
|
||||
|
||||
public HarryPotter harryPotter() {
|
||||
return harryPotter;
|
||||
}
|
||||
|
||||
public RockBand rockBand() {
|
||||
return rockBand;
|
||||
}
|
||||
|
||||
public Esports esports() {
|
||||
return esports;
|
||||
}
|
||||
|
||||
public Friends friends() {
|
||||
return friends;
|
||||
}
|
||||
|
||||
public Hipster hipster() {
|
||||
return hipster;
|
||||
}
|
||||
|
||||
public Job job() {
|
||||
return job;
|
||||
}
|
||||
|
||||
public TwinPeaks twinPeaks() {
|
||||
return twinPeaks;
|
||||
}
|
||||
|
||||
public RickAndMorty rickAndMorty() {
|
||||
return rickAndMorty;
|
||||
}
|
||||
|
||||
public Yoda yoda() {
|
||||
return yoda;
|
||||
}
|
||||
|
||||
public Matz matz() {
|
||||
return matz;
|
||||
}
|
||||
|
||||
public Witcher witcher() {
|
||||
return witcher;
|
||||
}
|
||||
|
||||
public DragonBall dragonBall() {
|
||||
return dragonBall;
|
||||
}
|
||||
|
||||
public FunnyName funnyName() {
|
||||
return funnyName;
|
||||
}
|
||||
|
||||
public HitchhikersGuideToTheGalaxy hitchhikersGuideToTheGalaxy() {
|
||||
return hitchhikersGuideToTheGalaxy;
|
||||
}
|
||||
|
||||
public Hobbit hobbit() {
|
||||
return hobbit;
|
||||
}
|
||||
|
||||
public HowIMetYourMother howIMetYourMother() {
|
||||
return howIMetYourMother;
|
||||
}
|
||||
|
||||
public LeagueOfLegends leagueOfLegends() {
|
||||
return leagueOfLegends;
|
||||
}
|
||||
|
||||
public Overwatch overwatch() {
|
||||
return overwatch;
|
||||
}
|
||||
|
||||
public Robin robin() {
|
||||
return robin;
|
||||
}
|
||||
|
||||
public StarTrek starTrek() {
|
||||
return starTrek;
|
||||
}
|
||||
|
||||
public Weather weather() {
|
||||
return weather;
|
||||
}
|
||||
|
||||
public Lebowski lebowski() {
|
||||
return lebowski;
|
||||
}
|
||||
|
||||
public Medical medical(){return medical;}
|
||||
|
||||
public Country country(){ return country;}
|
||||
|
||||
public BackToTheFuture backToTheFuture() {
|
||||
return backToTheFuture;
|
||||
}
|
||||
|
||||
public String resolve(String key) {
|
||||
return this.fakeValuesService.resolve(key, this, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the evaluation of native YML expressions to allow you to build your own.
|
||||
*
|
||||
* <p>
|
||||
* The following are valid expressions:
|
||||
* <ul>
|
||||
* <li>#{regexify '(a|b){2,3}'}</li>
|
||||
* <li>#{regexify '\\.\\*\\?\\+'}</li>
|
||||
* <li>#{bothify '????','false'}</li>
|
||||
* <li>#{Name.first_name} #{Name.first_name} #{Name.last_name}</li>
|
||||
* <li>#{number.number_between '1','10'}</li>
|
||||
* <li>#{regexify '(a|b){2,3}'}</li>
|
||||
* <li>#{regexify '\\.\\*\\?\\+'}</li>
|
||||
* <li>#{bothify '????','false'}</li>
|
||||
* <li>#{Name.first_name} #{Name.first_name} #{Name.last_name}</li>
|
||||
* <li>#{number.number_between '1','10'}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param expression (see examples above)
|
||||
* @return the evaluated string expression
|
||||
* @throws RuntimeException if unable to evaluate the expression
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class File {
|
||||
private final Faker faker;
|
||||
|
||||
File(Faker faker) {
|
||||
protected File(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,17 +11,16 @@ import java.util.Map;
|
||||
public class Finance {
|
||||
private final Faker faker;
|
||||
|
||||
Finance(Faker faker) {
|
||||
protected Finance(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
private static final Map<String, String> countryCodeToBasicBankAccountNumberPattern =
|
||||
createCountryCodeToBasicBankAccountNumberPatternMap();
|
||||
//
|
||||
public String creditCard() {
|
||||
CreditCardType type = randomCreditCardType();
|
||||
final String key = String.format("credit_card.%s", type.toString().toLowerCase());
|
||||
|
||||
public String creditCard(CreditCardType creditCardType) {
|
||||
final String key = String.format("finance.credit_card.%s", creditCardType.toString().toLowerCase());
|
||||
String value = faker.fakeValuesService().resolve(key, this, faker);
|
||||
final String template = faker.numerify(value);
|
||||
|
||||
@@ -43,6 +42,11 @@ public class Finance {
|
||||
return template.replace('\\', ' ').replace('/', ' ').trim().replace('L', String.valueOf(luhnDigit).charAt(0));
|
||||
}
|
||||
|
||||
public String creditCard() {
|
||||
CreditCardType type = randomCreditCardType();
|
||||
return creditCard(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random Business Identifier Code
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Food {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Food(Faker faker) {
|
||||
protected Food(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Friends {
|
||||
private final Faker faker;
|
||||
|
||||
protected Friends(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("friends.characters");
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.resolve("friends.locations");
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("friends.quotes");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class FunnyName {
|
||||
private final Faker faker;
|
||||
|
||||
protected FunnyName(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.fakeValuesService().resolve("funny_name.name", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ public class GameOfThrones {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
GameOfThrones(Faker faker) {
|
||||
protected GameOfThrones(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Hacker {
|
||||
private final Faker faker;
|
||||
|
||||
Hacker(Faker faker) {
|
||||
protected Hacker(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class HarryPotter {
|
||||
private final Faker faker;
|
||||
|
||||
protected HarryPotter(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("harry_potter.characters");
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.resolve("harry_potter.locations");
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("harry_potter.quotes");
|
||||
}
|
||||
|
||||
public String book() {
|
||||
return faker.resolve("harry_potter.books");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Hipster {
|
||||
private final Faker faker;
|
||||
|
||||
protected Hipster(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String word() {
|
||||
return faker.resolve("hipster.words");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class HitchhikersGuideToTheGalaxy {
|
||||
private final Faker faker;
|
||||
|
||||
protected HitchhikersGuideToTheGalaxy(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.characters", this, faker);
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.locations", this, faker);
|
||||
}
|
||||
|
||||
public String marvinQuote() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.marvin_quote", this, faker);
|
||||
}
|
||||
|
||||
public String planet() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.planets", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.quotes", this, faker);
|
||||
}
|
||||
|
||||
public String specie() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.species", this, faker);
|
||||
}
|
||||
|
||||
public String starship() {
|
||||
return faker.fakeValuesService().resolve("hitchhikers_guide_to_the_galaxy.starships", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Hobbit {
|
||||
private final Faker faker;
|
||||
|
||||
protected Hobbit(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("hobbit.character", this, faker);
|
||||
}
|
||||
|
||||
public String thorinsCompany() {
|
||||
return faker.fakeValuesService().resolve("hobbit.thorins_company", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("hobbit.quote", this, faker);
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.fakeValuesService().resolve("hobbit.location", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class HowIMetYourMother {
|
||||
private final Faker faker;
|
||||
|
||||
protected HowIMetYourMother(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("how_i_met_your_mother.character", this, faker);
|
||||
}
|
||||
|
||||
public String catchPhrase() {
|
||||
return faker.fakeValuesService().resolve("how_i_met_your_mother.catch_phrase", this, faker);
|
||||
}
|
||||
|
||||
public String highFive() {
|
||||
return faker.fakeValuesService().resolve("how_i_met_your_mother.high_five", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("how_i_met_your_mother.quote", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import com.github.javafaker.idnumbers.SvSEIdNumber;
|
||||
public class IdNumber {
|
||||
private final Faker faker;
|
||||
|
||||
IdNumber(Faker faker) {
|
||||
protected IdNumber(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,13 +6,15 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.join;
|
||||
import static org.apache.commons.lang3.StringUtils.stripAccents;
|
||||
|
||||
public class Internet {
|
||||
private final Faker faker;
|
||||
|
||||
Internet(Faker faker) {
|
||||
|
||||
protected Internet(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -21,9 +23,7 @@ public class Internet {
|
||||
}
|
||||
|
||||
public String emailAddress(String localPart) {
|
||||
return join(localPart,
|
||||
"@",
|
||||
FakerIDN.toASCII(faker.fakeValuesService().resolve("internet.free_email", this, faker)));
|
||||
return emailAddress(localPart, FakerIDN.toASCII(faker.fakeValuesService().resolve("internet.free_email", this, faker)));
|
||||
}
|
||||
|
||||
public String safeEmailAddress() {
|
||||
@@ -31,9 +31,11 @@ public class Internet {
|
||||
}
|
||||
|
||||
public String safeEmailAddress(String localPart) {
|
||||
return join(localPart,
|
||||
"@",
|
||||
FakerIDN.toASCII(faker.fakeValuesService().resolve("internet.safe_email", this, faker)));
|
||||
return emailAddress(localPart, FakerIDN.toASCII(faker.fakeValuesService().resolve("internet.safe_email", this, faker)));
|
||||
}
|
||||
|
||||
private String emailAddress(String localPart, String domain) {
|
||||
return join(stripAccents(localPart), "@", domain);
|
||||
}
|
||||
|
||||
public String domainName() {
|
||||
@@ -108,6 +110,10 @@ public class Internet {
|
||||
return password(8, 16);
|
||||
}
|
||||
|
||||
public String password(boolean includeDigit) {
|
||||
return password(8, 16, false, false, includeDigit);
|
||||
}
|
||||
|
||||
public String password(int minimumLength, int maximumLength) {
|
||||
return password(minimumLength, maximumLength, false);
|
||||
}
|
||||
@@ -117,15 +123,19 @@ public class Internet {
|
||||
}
|
||||
|
||||
public String password(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeSpecial) {
|
||||
return password(minimumLength, maximumLength, includeUppercase, includeSpecial, true);
|
||||
}
|
||||
|
||||
public String password(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeSpecial, boolean includeDigit) {
|
||||
if (includeSpecial) {
|
||||
char[] password = faker.lorem().characters(minimumLength, maximumLength, includeUppercase).toCharArray();
|
||||
char[] password = faker.lorem().characters(minimumLength, maximumLength, includeUppercase, includeDigit).toCharArray();
|
||||
char[] special = new char[]{'!', '@', '#', '$', '%', '^', '&', '*'};
|
||||
for (int i = 0; i < faker.random().nextInt(minimumLength); i++) {
|
||||
password[faker.random().nextInt(password.length)] = special[faker.random().nextInt(special.length)];
|
||||
}
|
||||
return new String(password);
|
||||
} else {
|
||||
return faker.lorem().characters(minimumLength, maximumLength, includeUppercase);
|
||||
return faker.lorem().characters(minimumLength, maximumLength, includeUppercase, includeDigit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,8 +293,59 @@ public class Internet {
|
||||
}
|
||||
return slug.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a UUID (type 4) as String.
|
||||
* @return A UUID as String.
|
||||
*/
|
||||
public String uuid() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
private <T> T random(T[] src) {
|
||||
return src[faker.random().nextInt(src.length)];
|
||||
}
|
||||
|
||||
public String userAgent(UserAgent userAgent) {
|
||||
UserAgent agent = userAgent;
|
||||
|
||||
if(agent == null) {
|
||||
agent = UserAgent.any();
|
||||
}
|
||||
|
||||
String userAgentKey = "internet.user_agent." + agent.toString();
|
||||
return faker.fakeValuesService().resolve(userAgentKey, this, faker);
|
||||
}
|
||||
|
||||
public String userAgentAny() {
|
||||
return userAgent(null);
|
||||
}
|
||||
|
||||
public enum UserAgent {
|
||||
AOL("aol"),
|
||||
CHROME("chrome"),
|
||||
FIREFOX("firefox"),
|
||||
INTERNET_EXPLORER("internet_explorer"),
|
||||
NETSCAPE("netscape"),
|
||||
OPERA("opera"),
|
||||
SAFARI("safari");
|
||||
|
||||
//Browser's name in corresponding yaml (internet.yml) file.
|
||||
private String browserName;
|
||||
|
||||
UserAgent(String browserName) {
|
||||
this.browserName = browserName;
|
||||
}
|
||||
|
||||
private static UserAgent any() {
|
||||
UserAgent[] agents = UserAgent.values();
|
||||
int randomIndex = (int)(Math.random() * agents.length);
|
||||
return agents[randomIndex];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return browserName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Job {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
public Job(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String field() {
|
||||
return faker.fakeValuesService().resolve("job.field", this, faker);
|
||||
}
|
||||
|
||||
public String seniority() {
|
||||
return faker.fakeValuesService().resolve("job.seniority", this, faker);
|
||||
}
|
||||
|
||||
public String position() {
|
||||
return faker.fakeValuesService().resolve("job.position", this, faker);
|
||||
}
|
||||
|
||||
public String keySkills() {
|
||||
return faker.fakeValuesService().resolve("job.key_skills", this, faker);
|
||||
}
|
||||
|
||||
public String title() {
|
||||
return faker.fakeValuesService().resolve("job.title", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class LeagueOfLegends {
|
||||
private final Faker faker;
|
||||
|
||||
protected LeagueOfLegends(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String champion() {
|
||||
return faker.fakeValuesService().resolve("games.league_of_legends.champion", this, faker);
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.fakeValuesService().resolve("games.league_of_legends.location", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("games.league_of_legends.quote", this, faker);
|
||||
}
|
||||
|
||||
public String summonerSpell() {
|
||||
return faker.fakeValuesService().resolve("games.league_of_legends.summoner_spell", this, faker);
|
||||
}
|
||||
|
||||
public String masteries() {
|
||||
return faker.fakeValuesService().resolve("games.league_of_legends.masteries", this, faker);
|
||||
}
|
||||
|
||||
public String rank() {
|
||||
return faker.fakeValuesService().resolve("games.league_of_legends.rank", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Lebowski {
|
||||
private final Faker faker;
|
||||
|
||||
public Lebowski(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String actor() {
|
||||
return faker.fakeValuesService().resolve("lebowski.actors", this, faker);
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("lebowski.characters", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("lebowski.quotes", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class LordOfTheRings {
|
||||
private final Faker faker;
|
||||
|
||||
protected LordOfTheRings(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("lord_of_the_rings.characters");
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.resolve("lord_of_the_rings.locations");
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import static org.apache.commons.lang3.StringUtils.join;
|
||||
public class Lorem {
|
||||
private final Faker faker;
|
||||
|
||||
Lorem(Faker faker) {
|
||||
protected Lorem(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -39,17 +39,32 @@ public class Lorem {
|
||||
return characters(faker.random().nextInt(maximumLength - minimumLength) + minimumLength, includeUppercase);
|
||||
}
|
||||
|
||||
public String characters(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeDigit) {
|
||||
return characters(faker.random().nextInt(maximumLength - minimumLength) + minimumLength, includeUppercase, includeDigit);
|
||||
}
|
||||
|
||||
public String characters(int fixedNumberOfCharacters) {
|
||||
return characters(fixedNumberOfCharacters, false);
|
||||
}
|
||||
|
||||
public String characters(int fixedNumberOfCharacters, boolean includeUppercase) {
|
||||
return characters(fixedNumberOfCharacters, includeUppercase, true);
|
||||
}
|
||||
|
||||
public String characters(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeDigit) {
|
||||
if (fixedNumberOfCharacters < 1) {
|
||||
return "";
|
||||
}
|
||||
char[] buffer = new char[fixedNumberOfCharacters];
|
||||
for (int i = 0; i < buffer.length; i++) {
|
||||
char randomCharacter = characters[faker.random().nextInt(characters.length)];
|
||||
char randomCharacter;
|
||||
|
||||
if (includeDigit) {
|
||||
randomCharacter = characters[faker.random().nextInt(characters.length)];
|
||||
} else {
|
||||
randomCharacter = letters[faker.random().nextInt(letters.length)];
|
||||
}
|
||||
|
||||
if (includeUppercase && faker.bool().bool()) {
|
||||
randomCharacter = Character.toUpperCase(randomCharacter);
|
||||
}
|
||||
@@ -145,15 +160,17 @@ public class Lorem {
|
||||
|
||||
static {
|
||||
StringBuilder builder = new StringBuilder(36);
|
||||
for (char number = '0'; number <= '9'; number++) {
|
||||
builder.append(number);
|
||||
}
|
||||
for (char character = 'a'; character <= 'z'; character++) {
|
||||
builder.append(character);
|
||||
}
|
||||
letters = builder.toString().toCharArray();
|
||||
for (char number = '0'; number <= '9'; number++) {
|
||||
builder.append(number);
|
||||
}
|
||||
characters = builder.toString().toCharArray();
|
||||
}
|
||||
|
||||
private static final char[] letters;
|
||||
private static final char[] characters;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Matz {
|
||||
private final Faker faker;
|
||||
|
||||
protected Matz(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("matz.quotes");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Medical {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
protected Medical(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String medicineName() {
|
||||
return faker.fakeValuesService().resolve("medical.medicine_name", this, faker);
|
||||
}
|
||||
|
||||
public String diseaseName() {
|
||||
return faker.fakeValuesService().resolve("medical.disease_name", this, faker);
|
||||
}
|
||||
|
||||
public String hospitalName() {
|
||||
return faker.fakeValuesService().resolve("medical.hospital_name", this, faker);
|
||||
}
|
||||
|
||||
public String symptoms() {
|
||||
return faker.fakeValuesService().resolve("medical.symptoms", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ public class Music {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Music(Faker faker) {
|
||||
protected Music(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -23,4 +23,8 @@ public class Music {
|
||||
public String chord() {
|
||||
return key() + faker.options().option(CHORD_TYPES);
|
||||
}
|
||||
|
||||
public String genre() {
|
||||
return faker.resolve("music.genres");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Name {
|
||||
* Internal constructor, not to be used by clients. Instances of {@link Name} should be accessed via
|
||||
* {@link Faker#name()}.
|
||||
*/
|
||||
Name(Faker faker) {
|
||||
protected Name(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -120,10 +120,13 @@ public class Name {
|
||||
* @see Name#lastName()
|
||||
*/
|
||||
public String username() {
|
||||
return StringUtils.join(new String[]{
|
||||
|
||||
String username = StringUtils.join(new String[]{
|
||||
firstName().replaceAll("'", "").toLowerCase(),
|
||||
".",
|
||||
lastName().replaceAll("'", "").toLowerCase()}
|
||||
);
|
||||
|
||||
return StringUtils.deleteWhitespace(username);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.math.BigDecimal;
|
||||
public class Number {
|
||||
private final Faker faker;
|
||||
|
||||
Number(Faker faker) {
|
||||
protected Number(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Number {
|
||||
* @see Number#numberBetween(long, long)
|
||||
*/
|
||||
public int numberBetween(int min, int max) {
|
||||
return decimalBetween(min,max).intValue();
|
||||
return decimalBetween(min,max).setScale(0, BigDecimal.ROUND_HALF_DOWN).intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,19 +1,55 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Options {
|
||||
private final Faker faker;
|
||||
|
||||
Options(Faker faker) {
|
||||
protected Options(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
public String option(String... options) {
|
||||
/**
|
||||
* Returns a random element from an varargs.
|
||||
*
|
||||
* @param options The varargs to take a random element from.
|
||||
* @param <E> The type of the elements in the varargs.
|
||||
* @return A randomly selected element from the varargs.
|
||||
*/
|
||||
public <E> E option(E... options) {
|
||||
return options[faker.random().nextInt(options.length)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a random element from Enum.
|
||||
*
|
||||
* @param enumeration The Enum to take a random element from.
|
||||
* @return A randomly selected element from the enum.
|
||||
*/
|
||||
public <E extends Enum<E>> E option(Class<E> enumeration) {
|
||||
E[] enumConstants = enumeration.getEnumConstants();
|
||||
return enumConstants[faker.random().nextInt(enumConstants.length)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a random element from an array.
|
||||
*
|
||||
* @param array The array to take a random element from.
|
||||
* @param <E> The type of the elements in the array.
|
||||
* @return A randomly selected element from the array.
|
||||
*/
|
||||
public <E> E nextElement(E[] array) {
|
||||
return array[faker.random().nextInt(array.length)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a random element from a list.
|
||||
*
|
||||
* @param list The list to take a random element from.
|
||||
* @param <E> The type of the elements in the list.
|
||||
* @return A randomly selected element from the list.
|
||||
*/
|
||||
public <E> E nextElement(List<E> list) {
|
||||
return list.get(faker.random().nextInt(list.size()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Overwatch {
|
||||
private final Faker faker;
|
||||
|
||||
protected Overwatch(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String hero() {
|
||||
return faker.fakeValuesService().resolve("games.overwatch.heroes", this, faker);
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.fakeValuesService().resolve("games.overwatch.locations", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("games.overwatch.quotes", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class PhoneNumber {
|
||||
private final Faker faker;
|
||||
|
||||
PhoneNumber(Faker faker) {
|
||||
protected PhoneNumber(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@ public class Pokemon {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Pokemon(Faker faker) {
|
||||
protected Pokemon(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.resolve("pokemon.names");
|
||||
return faker.resolve("games.pokemon.names");
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.resolve("pokemon.locations");
|
||||
return faker.resolve("games.pokemon.locations");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class RickAndMorty {
|
||||
private final Faker faker;
|
||||
|
||||
protected RickAndMorty(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("rick_and_morty.characters");
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.resolve("rick_and_morty.locations");
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("rick_and_morty.quotes");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Robin {
|
||||
private final Faker faker;
|
||||
|
||||
protected Robin(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("robin.quotes", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class RockBand {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
protected RockBand(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String name() {
|
||||
return faker.resolve("rock_band.name");
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class Shakespeare {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Shakespeare(Faker faker) {
|
||||
protected Shakespeare(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ public class SlackEmoji {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
SlackEmoji(Faker faker) {
|
||||
protected SlackEmoji(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ public class Space {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Space(Faker faker) {
|
||||
protected Space(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class StarTrek {
|
||||
private final Faker faker;
|
||||
|
||||
protected StarTrek(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("star_trek.character", this, faker);
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.fakeValuesService().resolve("star_trek.location", this, faker);
|
||||
}
|
||||
|
||||
public String specie() {
|
||||
return faker.fakeValuesService().resolve("star_trek.specie", this, faker);
|
||||
}
|
||||
|
||||
public String villain() {
|
||||
return faker.fakeValuesService().resolve("star_trek.villain", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ public class Stock {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
Stock(Faker faker) {
|
||||
protected Stock(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Superhero {
|
||||
private final Faker faker;
|
||||
|
||||
Superhero(Faker faker) {
|
||||
protected Superhero(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class Team {
|
||||
private final Faker faker;
|
||||
|
||||
Team(Faker faker) {
|
||||
protected Team(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class TwinPeaks {
|
||||
private final Faker faker;
|
||||
|
||||
protected TwinPeaks(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("twin_peaks.characters");
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.resolve("twin_peaks.locations");
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("twin_peaks.quotes");
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.github.javafaker;
|
||||
public class University {
|
||||
private final Faker faker;
|
||||
|
||||
University(Faker faker) {
|
||||
protected University(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
/**
|
||||
* A generator for Weather data.
|
||||
*/
|
||||
public class Weather {
|
||||
|
||||
private static final int DEFAULT_MIN_TEMP_C = -30;
|
||||
private static final int DEFAULT_MAX_TEMP_C = 38;
|
||||
private static final int DEFAULT_MIN_TEMP_F = -22;
|
||||
private static final int DEFAULT_MAX_TEMP_F = 100;
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
protected Weather(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a short weather description.
|
||||
*/
|
||||
public String description() {
|
||||
return faker.resolve("weather.description");
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random temperature celsius between -30 and 38 degrees.
|
||||
* @return String that represents temperature in format 5°C
|
||||
*/
|
||||
public String temperatureCelsius() {
|
||||
return temperature(DEFAULT_MIN_TEMP_C, DEFAULT_MAX_TEMP_C, "weather.temperature.celsius");
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random temperature fahrenheit between -22 and 100 degrees.
|
||||
* @return String that represents temperature in format 5°F
|
||||
*/
|
||||
public String temperatureFahrenheit() {
|
||||
return temperature(DEFAULT_MIN_TEMP_F, DEFAULT_MAX_TEMP_F, "weather.temperature.fahrenheit");
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random temperature celsius between two temperatures.
|
||||
* @param minTemperature the minimal temperature
|
||||
* @param maxTemperature the maximal temperature
|
||||
* @return String that represents temperature in format 5°C
|
||||
*/
|
||||
public String temperatureCelsius(int minTemperature, int maxTemperature) {
|
||||
return temperature(minTemperature, maxTemperature, "weather.temperature.celsius");
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random temperature fahrenheit between two temperatures.
|
||||
* @param minTemperature the minimal temperature
|
||||
* @param maxTemperature the maximal temperature
|
||||
* @return String that represents temperature in format 5°F
|
||||
*/
|
||||
public String temperatureFahrenheit(int minTemperature, int maxTemperature) {
|
||||
return temperature(minTemperature, maxTemperature, "weather.temperature.fahrenheit");
|
||||
}
|
||||
|
||||
private String temperature(int minTemperature, int maxTemperature, String degreeKey) {
|
||||
return faker.random().nextInt(minTemperature, maxTemperature) + faker.resolve(degreeKey);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Witcher {
|
||||
private final Faker faker;
|
||||
|
||||
protected Witcher(Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("games.witcher.characters", this, faker);
|
||||
}
|
||||
|
||||
public String witcher() {
|
||||
return faker.fakeValuesService().resolve("games.witcher.witchers", this, faker);
|
||||
}
|
||||
|
||||
public String school() {
|
||||
return faker.fakeValuesService().resolve("games.witcher.schools", this, faker);
|
||||
}
|
||||
|
||||
public String location() {
|
||||
return faker.fakeValuesService().resolve("games.witcher.locations", this, faker);
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.fakeValuesService().resolve("games.witcher.quotes", this, faker);
|
||||
}
|
||||
|
||||
public String monster() {
|
||||
return faker.fakeValuesService().resolve("games.witcher.monsters", this, faker);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Yoda {
|
||||
private final Faker faker;
|
||||
|
||||
protected Yoda(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String quote() {
|
||||
return faker.resolve("yoda.quotes");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class Zelda {
|
||||
private final Faker faker;
|
||||
|
||||
protected Zelda(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String game() {
|
||||
return faker.resolve("games.zelda.games");
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.resolve("games.zelda.characters");
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.github.javafaker.idnumbers;
|
||||
|
||||
import com.github.javafaker.Faker;
|
||||
import com.github.javafaker.service.RandomService;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.github.javafaker.service;
|
||||
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
public class FakeValues implements FakeValuesInterface {
|
||||
private final Locale locale;
|
||||
private final String filename;
|
||||
private final String path;
|
||||
private Map values;
|
||||
|
||||
FakeValues(Locale locale) {
|
||||
this(locale, getFilename(locale), getFilename(locale));
|
||||
}
|
||||
|
||||
private static String getFilename(Locale locale) {
|
||||
final StringBuilder filename = new StringBuilder(language(locale));
|
||||
if (!"".equals(locale.getCountry())) {
|
||||
filename.append("-").append(locale.getCountry());
|
||||
}
|
||||
return filename.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* If you new up a locale with "he", it gets converted to "iw" which is old.
|
||||
* This addresses that unfortunate condition.
|
||||
*/
|
||||
private static String language(Locale l) {
|
||||
if (l.getLanguage().equals("iw")) {
|
||||
return "he";
|
||||
}
|
||||
return l.getLanguage();
|
||||
}
|
||||
|
||||
FakeValues(Locale locale, String filename, String path) {
|
||||
this.locale = locale;
|
||||
this.filename = filename;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map get(String key) {
|
||||
if (values == null) {
|
||||
values = loadValues();
|
||||
}
|
||||
|
||||
return values == null ? null : (Map) values.get(key);
|
||||
}
|
||||
|
||||
private Map loadValues() {
|
||||
String pathWithLocaleAndFilename = "/" + locale.getLanguage() + "/" + this.filename;
|
||||
String pathWithFilename = "/" + filename + ".yml";
|
||||
String pathWithLocale = "/" + locale.getLanguage() + ".yml";
|
||||
|
||||
List<String> paths = Arrays.asList(pathWithLocaleAndFilename, pathWithFilename, pathWithLocale);
|
||||
InputStream stream = null;
|
||||
for (String path : paths) {
|
||||
stream = findStream(path);
|
||||
if (stream != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (stream == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final Map valuesMap = new Yaml().loadAs(stream, Map.class);
|
||||
Map localeBased = (Map) valuesMap.get(locale.getLanguage());
|
||||
if (localeBased == null) {
|
||||
localeBased = (Map) valuesMap.get(filename);
|
||||
}
|
||||
return (Map) localeBased.get("faker");
|
||||
}
|
||||
|
||||
private InputStream findStream(String filename) {
|
||||
InputStream streamOnClass = getClass().getResourceAsStream(filename);
|
||||
if (streamOnClass != null) {
|
||||
return streamOnClass;
|
||||
}
|
||||
return getClass().getClassLoader().getResourceAsStream(filename);
|
||||
}
|
||||
|
||||
boolean supportsPath(String path) {
|
||||
return this.path.equals(path);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.github.javafaker.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FakeValuesGrouping implements FakeValuesInterface {
|
||||
|
||||
private List<FakeValues> fakeValuesList = new ArrayList<FakeValues>();
|
||||
|
||||
public void add(FakeValues fakeValues) {
|
||||
fakeValuesList.add(fakeValues);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public Map get(String key) {
|
||||
Map result = null;
|
||||
for (FakeValues fakeValues : fakeValuesList) {
|
||||
if (fakeValues.supportsPath(key)) {
|
||||
if (result != null) {
|
||||
final Map newResult = fakeValues.get(key);
|
||||
result.putAll(newResult);
|
||||
} else {
|
||||
result = fakeValues.get(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.github.javafaker.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface FakeValuesInterface {
|
||||
Map get(String key);
|
||||
}
|
||||
@@ -3,15 +3,21 @@ package com.github.javafaker.service;
|
||||
import com.github.javafaker.Address;
|
||||
import com.github.javafaker.Faker;
|
||||
import com.github.javafaker.Name;
|
||||
import com.github.javafaker.service.files.EnFile;
|
||||
import com.mifmif.common.regex.Generex;
|
||||
import org.apache.commons.lang3.ClassUtils;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -21,28 +27,28 @@ public class FakeValuesService {
|
||||
private static final Pattern EXPRESSION_PATTERN = Pattern.compile("#\\{([a-z0-9A-Z_.]+)\\s?(?:'([^']+)')?(?:,'([^']+)')*\\}");
|
||||
|
||||
private final Logger log = Logger.getLogger("faker");
|
||||
|
||||
private final List<Map<String, Object>> fakeValuesMaps;
|
||||
|
||||
|
||||
private final List<FakeValuesInterface> fakeValuesList;
|
||||
private final RandomService randomService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Resolves YAML file using the most specific path first based on language and country code.
|
||||
* 'en_US' would resolve in the following order:
|
||||
* <ol>
|
||||
* <li>/en-US.yml</li>
|
||||
* <li>/en.yml</li>
|
||||
* </ol>
|
||||
* The search is case-insensitive, so the following will all resolve correctly. Also, either a hyphen or
|
||||
* an underscore can be used when constructing a {@link Locale} instance. This is legacy behavior and not
|
||||
* condoned, but it will work.
|
||||
* <ul>
|
||||
* <li>EN_US</li>
|
||||
* <li>En-Us</li>
|
||||
* <li>eN_uS</li>
|
||||
* </ul>
|
||||
* Resolves YAML file using the most specific path first based on language and country code.
|
||||
* 'en_US' would resolve in the following order:
|
||||
* <ol>
|
||||
* <li>/en-US.yml</li>
|
||||
* <li>/en.yml</li>
|
||||
* </ol>
|
||||
* The search is case-insensitive, so the following will all resolve correctly. Also, either a hyphen or
|
||||
* an underscore can be used when constructing a {@link Locale} instance. This is legacy behavior and not
|
||||
* condoned, but it will work.
|
||||
* <ul>
|
||||
* <li>EN_US</li>
|
||||
* <li>En-Us</li>
|
||||
* <li>eN_uS</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @param locale
|
||||
* @param randomService
|
||||
*/
|
||||
@@ -55,57 +61,29 @@ public class FakeValuesService {
|
||||
locale = normalizeLocale(locale);
|
||||
|
||||
final List<Locale> locales = localeChain(locale);
|
||||
final List<Map<String,Object>> all = new ArrayList(locales.size());
|
||||
final List<FakeValuesInterface> all = new ArrayList(locales.size());
|
||||
|
||||
for (final Locale l : locales) {
|
||||
final StringBuilder filename = new StringBuilder(language(l));
|
||||
if (!"".equals(l.getCountry())) {
|
||||
filename.append("-").append(l.getCountry());
|
||||
}
|
||||
|
||||
final InputStream stream = findStream(filename.toString());
|
||||
if (stream != null) {
|
||||
all.add(fakerFromStream(stream, filename.toString()));
|
||||
boolean isEnglish = l.equals(Locale.ENGLISH);
|
||||
if (isEnglish) {
|
||||
FakeValuesGrouping fakeValuesGrouping = new FakeValuesGrouping();
|
||||
for (EnFile file : EnFile.getFiles()) {
|
||||
fakeValuesGrouping.add(new FakeValues(l, file.getFile(), file.getPath()));
|
||||
}
|
||||
all.add(fakeValuesGrouping);
|
||||
} else {
|
||||
all.add(new FakeValues(locale));
|
||||
}
|
||||
}
|
||||
|
||||
if (all.size() == 1 && !locale.equals(Locale.ENGLISH)) {
|
||||
// if we have only successfully loaded ENGLISH and the requested locale
|
||||
// wasn't english that means we were unable to load the requested locale
|
||||
// in that case we vomit.
|
||||
// If someone requests FRANCE ("fr","FR") and we can't load fr_FR but we
|
||||
// load "fr", then that's ok. we picked up a variant. only if we ONLY pick up
|
||||
// the default do we throw that exception.
|
||||
throw new LocaleDoesNotExistException(locale.toString() + " does not exist");
|
||||
}
|
||||
|
||||
this.fakeValuesMaps = Collections.unmodifiableList(all);
|
||||
}
|
||||
|
||||
/**
|
||||
* If you new up a locale with "he", it gets converted to "iw" which is old.
|
||||
* This addresses that unfortunate condition.
|
||||
*/
|
||||
private String language(Locale l) {
|
||||
if (l.getLanguage().equals("iw")) {
|
||||
return "he";
|
||||
}
|
||||
return l.getLanguage();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the embedded faker: clause from the loaded Yml by the localeName, so .yml > en-us: > faker:
|
||||
*/
|
||||
protected Map fakerFromStream(InputStream stream, String localeName) {
|
||||
final Map valuesMap = new Yaml().loadAs(stream, Map.class);
|
||||
final Map localeBased = (Map) valuesMap.get(localeName);
|
||||
return (Map) localeBased.get("faker");
|
||||
this.fakeValuesList = Collections.unmodifiableList(all);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the specified locale into a chain of locales used for message resolution. For example:
|
||||
*
|
||||
* {@link Locale#FRANCE} (fr_FR) -> [ fr_FR, fr, en ]
|
||||
*
|
||||
* <p>
|
||||
* {@link Locale#FRANCE} (fr_FR) -> [ fr_FR, anotherTest, en ]
|
||||
*
|
||||
* @return a list of {@link Locale} instances
|
||||
*/
|
||||
protected List<Locale> localeChain(Locale from) {
|
||||
@@ -123,31 +101,22 @@ public class FakeValuesService {
|
||||
chain.add(Locale.ENGLISH); // default
|
||||
return chain;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return a proper {@link Locale} instance with language and country code set regardless of how
|
||||
* it was instantiated. new Locale("pt-br") will be normalized to a locale constructed
|
||||
* with new Locale("pt","BR").
|
||||
* it was instantiated. new Locale("pt-br") will be normalized to a locale constructed
|
||||
* with new Locale("pt","BR").
|
||||
*/
|
||||
private Locale normalizeLocale(Locale locale) {
|
||||
final String[] parts = locale.toString().split("[-\\_]");
|
||||
|
||||
|
||||
if (parts.length == 1) {
|
||||
return new Locale(parts[0]);
|
||||
} else {
|
||||
return new Locale(parts[0],parts[1]);
|
||||
return new Locale(parts[0], parts[1]);
|
||||
}
|
||||
}
|
||||
|
||||
private InputStream findStream(String filename) {
|
||||
String filenameWithExtension = "/" + filename + ".yml";
|
||||
InputStream streamOnClass = getClass().getResourceAsStream(filenameWithExtension);
|
||||
if (streamOnClass != null) {
|
||||
return streamOnClass;
|
||||
}
|
||||
return getClass().getClassLoader().getResourceAsStream(filenameWithExtension);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a random value from an array item specified by the key
|
||||
*
|
||||
@@ -214,10 +183,15 @@ public class FakeValuesService {
|
||||
String[] path = key.split("\\.");
|
||||
|
||||
Object result = null;
|
||||
for (Map<String, Object> fakeValuesMap : fakeValuesMaps) {
|
||||
Object currentValue = fakeValuesMap;
|
||||
for (FakeValuesInterface fakeValuesInterface : fakeValuesList) {
|
||||
Object currentValue = fakeValuesInterface;
|
||||
for (int p = 0; currentValue != null && p < path.length; p++) {
|
||||
currentValue = ((Map<String, Object>) currentValue).get(path[p]);
|
||||
String currentPath = path[p];
|
||||
if (currentValue instanceof Map) {
|
||||
currentValue = ((Map) currentValue).get(currentPath);
|
||||
} else {
|
||||
currentValue = ((FakeValuesInterface) currentValue).get(currentPath);
|
||||
}
|
||||
}
|
||||
result = currentValue;
|
||||
if (result != null) {
|
||||
@@ -236,7 +210,7 @@ public class FakeValuesService {
|
||||
* @return
|
||||
*/
|
||||
public String numerify(String numberString) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < numberString.length(); i++) {
|
||||
if (numberString.charAt(i) == '#') {
|
||||
sb.append(randomService.nextInt(10));
|
||||
@@ -260,7 +234,7 @@ public class FakeValuesService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies both a {@link #numerify(String)} and a {@link #letterify(String,boolean)}
|
||||
* Applies both a {@link #numerify(String)} and a {@link #letterify(String, boolean)}
|
||||
* over the incoming string.
|
||||
*
|
||||
* @param string
|
||||
@@ -300,7 +274,7 @@ public class FakeValuesService {
|
||||
* For example, the string "12??34" could be replaced with a string like "12AB34".
|
||||
*
|
||||
* @param letterString
|
||||
* @param isUpper specifies whether or not letters should be upper case
|
||||
* @param isUpper specifies whether or not letters should be upper case
|
||||
* @return
|
||||
*/
|
||||
public String letterify(String letterString, boolean isUpper) {
|
||||
@@ -308,7 +282,7 @@ public class FakeValuesService {
|
||||
}
|
||||
|
||||
private String letterHelper(int baseChar, String letterString) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < letterString.length(); i++) {
|
||||
if (letterString.charAt(i) == '?') {
|
||||
sb.append((char) (baseChar + randomService.nextInt(26))); // a-z
|
||||
@@ -322,14 +296,14 @@ public class FakeValuesService {
|
||||
|
||||
/**
|
||||
* Resolves a key to a method on an object.
|
||||
*
|
||||
* <p>
|
||||
* #{hello} with result in a method call to current.hello();
|
||||
*
|
||||
* <p>
|
||||
* #{Person.hello_someone} will result in a method call to person.helloSomeone();
|
||||
*
|
||||
*/
|
||||
public String resolve(String key, Object current, Faker root) {
|
||||
final String expression = safeFetch(key, null);
|
||||
|
||||
if (expression == null) {
|
||||
throw new RuntimeException(key + " resulted in null expression");
|
||||
}
|
||||
@@ -339,6 +313,7 @@ public class FakeValuesService {
|
||||
|
||||
/**
|
||||
* resolves an expression using the current faker.
|
||||
*
|
||||
* @param expression
|
||||
* @param faker
|
||||
* @return
|
||||
@@ -346,22 +321,23 @@ public class FakeValuesService {
|
||||
public String expression(String expression, Faker faker) {
|
||||
return resolveExpression(expression, null, faker);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>processes a expression in the style #{X.y} using the current objects as the 'current' location
|
||||
* within the yml file (or the {@link Faker} object hierarchy as it were).
|
||||
* </p>
|
||||
* <p>
|
||||
* #{Address.streetName} would get resolved to {@link Faker#address()}'s {@link Address#streetName()}
|
||||
* #{Address.streetName} would get resolved to {@link Faker#address()}'s {@link Address#streetName()}
|
||||
* </p>
|
||||
* <p>
|
||||
* #{address.street} would get resolved to the YAML > locale: faker: address: street:
|
||||
* #{address.street} would get resolved to the YAML > locale: faker: address: street:
|
||||
* </p>
|
||||
* <p>
|
||||
* Combinations are supported as well: "#{x} #{y}"
|
||||
* Combinations are supported as well: "#{x} #{y}"
|
||||
* </p>
|
||||
* <p>
|
||||
* Recursive templates are supported. if "#{x}" resolves to "#{Address.streetName}" then "#{x}" resolves to
|
||||
* {@link Faker#address()}'s {@link Address#streetName()}.
|
||||
* Recursive templates are supported. if "#{x}" resolves to "#{Address.streetName}" then "#{x}" resolves to
|
||||
* {@link Faker#address()}'s {@link Address#streetName()}.
|
||||
* </p>
|
||||
*/
|
||||
protected String resolveExpression(String expression, Object current, Faker root) {
|
||||
@@ -372,10 +348,10 @@ public class FakeValuesService {
|
||||
final String escapedDirective = matcher.group(0);
|
||||
final String directive = matcher.group(1);
|
||||
List<String> args = new ArrayList<String>();
|
||||
for (int i=2;i < matcher.groupCount()+1 && matcher.group(i) != null;i++) {
|
||||
for (int i = 2; i < matcher.groupCount() + 1 && matcher.group(i) != null; i++) {
|
||||
args.add(matcher.group(i));
|
||||
}
|
||||
|
||||
|
||||
// resolve the expression and reprocess it to handle recursive templates
|
||||
String resolved = resolveExpression(directive, args, current, root);
|
||||
if (resolved == null) {
|
||||
@@ -383,7 +359,7 @@ public class FakeValuesService {
|
||||
}
|
||||
|
||||
resolved = resolveExpression(resolved, current, root);
|
||||
result = result.replace(escapedDirective, resolved);
|
||||
result = StringUtils.replaceOnce(result, escapedDirective, resolved);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -391,20 +367,21 @@ public class FakeValuesService {
|
||||
/**
|
||||
* <h1>Search Order</h1>
|
||||
* <ul>
|
||||
* <li>Search for methods on the current object</li>
|
||||
* <li>local keys in Yaml File</li>
|
||||
* <li>Search for methods on faker child objects</li>
|
||||
* <li>Search for keys in yaml file by transforming object reference to yaml reference</li>
|
||||
* <li>Search for methods on the current object</li>
|
||||
* <li>local keys in Yaml File</li>
|
||||
* <li>Search for methods on faker child objects</li>
|
||||
* <li>Search for keys in yaml file by transforming object reference to yaml reference</li>
|
||||
* </ul>
|
||||
*
|
||||
* @return null if unable to resolve
|
||||
*/
|
||||
private String resolveExpression(String directive, List<String> args, Object current, Faker root) {
|
||||
// name.name (resolve locally)
|
||||
// Name.first_name (resolve to faker.name().firstName())
|
||||
final String simpleDirective = (isDotDirective(directive) || current == null)
|
||||
? directive
|
||||
final String simpleDirective = (isDotDirective(directive) || current == null)
|
||||
? directive
|
||||
: classNameToYamlName(current) + "." + directive;
|
||||
|
||||
|
||||
String resolved = null;
|
||||
// resolve method references on CURRENT object like #{number_between '1','10'} on Number or
|
||||
// #{ssn_valid} on IdNumber
|
||||
@@ -413,7 +390,7 @@ public class FakeValuesService {
|
||||
}
|
||||
|
||||
// simple fetch of a value from the yaml file. the directive may have been mutated
|
||||
// such that if the current yml object is car: and directive is #{wheel} then
|
||||
// such that if the current yml object is car: and directive is #{wheel} then
|
||||
// car.wheel will be looked up in the YAML file.
|
||||
if (resolved == null) {
|
||||
resolved = safeFetch(simpleDirective, null);
|
||||
@@ -428,16 +405,16 @@ public class FakeValuesService {
|
||||
if (resolved == null && isDotDirective(directive)) {
|
||||
resolved = resolveFakerObjectAndMethod(root, directive, args);
|
||||
}
|
||||
|
||||
|
||||
// last ditch effort. Due to Ruby's dynamic nature, something like 'Address.street_title' will resolve
|
||||
// because 'street_title' is a dynamic method on the Address object. We can't do this in Java so we go
|
||||
// because 'street_title' is a dynamic method on the Address object. We can't do this in Java so we go
|
||||
// thru the normal resolution above, but if we will can't resolve it, we once again do a 'safeFetch' as we
|
||||
// did first but FIRST we change the Object reference Class.method_name with a yml style internal refernce ->
|
||||
// class.method_name (lowercase)
|
||||
if (resolved == null && isDotDirective(directive)) {
|
||||
resolved = safeFetch(javaNameToYamlName(simpleDirective), null);
|
||||
}
|
||||
|
||||
|
||||
return resolved;
|
||||
}
|
||||
|
||||
@@ -452,6 +429,7 @@ public class FakeValuesService {
|
||||
|
||||
/**
|
||||
* Given a {@code slashDelimitedRegex} such as {@code /[ab]/}, removes the slashes and returns only {@code [ab]}
|
||||
*
|
||||
* @param slashDelimitedRegex a non null slash delimited regex (ex. {@code /[ab]/})
|
||||
* @return the regex without the slashes (ex. {@code [ab]})
|
||||
*/
|
||||
@@ -464,14 +442,14 @@ public class FakeValuesService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a yaml style name from the classname of the supplied object (PhoneNumber => phone_number)
|
||||
* @return a yaml style name from the classname of the supplied object (PhoneNumber => phone_number)
|
||||
*/
|
||||
private String classNameToYamlName(Object current) {
|
||||
return javaNameToYamlName(current.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a yaml style name like 'phone_number' from a java style name like 'PhoneNumber'
|
||||
* @return a yaml style name like 'phone_number' from a java style name like 'PhoneNumber'
|
||||
*/
|
||||
private String javaNameToYamlName(String expression) {
|
||||
return expression.replaceAll("([A-Z])", "_$1")
|
||||
@@ -480,7 +458,6 @@ public class FakeValuesService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Given a directive like 'firstName', attempts to resolve it to a method. For example if obj is an instance of
|
||||
* {@link Name} then this method would return {@link Name#firstName()}. Returns null if the directive is nested
|
||||
@@ -500,15 +477,16 @@ public class FakeValuesService {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Accepts a {@link Faker} instance and a name.firstName style 'key' which is resolved to the return value of:
|
||||
* {@link Faker#name()}'s {@link Name#firstName()} method.
|
||||
*
|
||||
* @throws RuntimeException if there's a problem invoking the method or it doesn't exist.
|
||||
*/
|
||||
private String resolveFakerObjectAndMethod(Faker faker, String key, List<String> args) {
|
||||
final String[] classAndMethod = key.split("\\.", 2);
|
||||
|
||||
|
||||
try {
|
||||
String fakerMethodName = classAndMethod[0].replaceAll("_", "");
|
||||
MethodAndCoercedArgs fakerAccessor = accessor(faker, fakerMethodName, Collections.<String>emptyList());
|
||||
@@ -520,9 +498,9 @@ public class FakeValuesService {
|
||||
String nestedMethodName = classAndMethod[1].replaceAll("_", "");
|
||||
final MethodAndCoercedArgs accessor = accessor(objectWithMethodToInvoke, classAndMethod[1].replaceAll("_", ""), args);
|
||||
if (accessor == null) {
|
||||
log.fine("Can't find method on "
|
||||
+ objectWithMethodToInvoke.getClass().getSimpleName()
|
||||
+ " called " + nestedMethodName + ".");
|
||||
throw new Exception("Can't find method on "
|
||||
+ objectWithMethodToInvoke.getClass().getSimpleName()
|
||||
+ " called " + nestedMethodName + ".");
|
||||
}
|
||||
|
||||
return string(accessor.invoke(objectWithMethodToInvoke));
|
||||
@@ -532,15 +510,15 @@ public class FakeValuesService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Find an accessor by name ignoring case.
|
||||
*/
|
||||
private MethodAndCoercedArgs accessor(Object onObject, String name, List<String> args) {
|
||||
log.log(Level.FINE, "Find accessor named " + name + " on " + onObject.getClass().getSimpleName() + " with args " + args);
|
||||
|
||||
|
||||
for (Method m : onObject.getClass().getMethods()) {
|
||||
if (m.getName().equalsIgnoreCase(name)
|
||||
if (m.getName().equalsIgnoreCase(name)
|
||||
&& m.getParameterTypes().length == args.size()) {
|
||||
final List<Object> coercedArguments = coerceArguments(m, args);
|
||||
if (coercedArguments != null) {
|
||||
@@ -558,6 +536,7 @@ public class FakeValuesService {
|
||||
/**
|
||||
* Coerce arguments in <em>args</em> into the appropriate types (if possible) for the parameter arguments
|
||||
* to <em>accessor</em>.
|
||||
*
|
||||
* @return array of coerced values if successful, null otherwise
|
||||
* @throws Exception if unable to coerce
|
||||
*/
|
||||
@@ -567,10 +546,16 @@ public class FakeValuesService {
|
||||
|
||||
Class<?> toType = ClassUtils.primitiveToWrapper(accessor.getParameterTypes()[i]);
|
||||
try {
|
||||
final Constructor<?> ctor = toType.getConstructor(String.class);
|
||||
final Object coercedArgument = ctor.newInstance(args.get(i));
|
||||
|
||||
coerced.add(coercedArgument);
|
||||
if (toType.isEnum()) {
|
||||
Method method = toType.getMethod( "valueOf", String.class );
|
||||
String enumArg = args.get( i ).substring( args.get( i ).indexOf( "." ) + 1 );
|
||||
Object coercedArg = method.invoke( null, enumArg );
|
||||
coerced.add( coercedArg );
|
||||
} else {
|
||||
final Constructor<?> ctor = toType.getConstructor(String.class);
|
||||
final Object coercedArgument = ctor.newInstance(args.get(i));
|
||||
coerced.add(coercedArgument);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.fine("Unable to coerce " + args.get(i) + " to " + toType.getSimpleName() + " via " + toType.getSimpleName() + "(String) constructor.");
|
||||
return null;
|
||||
@@ -578,7 +563,7 @@ public class FakeValuesService {
|
||||
}
|
||||
return coerced;
|
||||
}
|
||||
|
||||
|
||||
private String string(Object obj) {
|
||||
return (obj == null) ? null : obj.toString();
|
||||
}
|
||||
@@ -591,14 +576,14 @@ public class FakeValuesService {
|
||||
private class MethodAndCoercedArgs {
|
||||
|
||||
private final Method method;
|
||||
|
||||
|
||||
private final List<Object> coerced;
|
||||
|
||||
private MethodAndCoercedArgs(Method m, List<Object> coerced) {
|
||||
this.method = requireNonNull(m, "method cannot be null");
|
||||
this.coerced = requireNonNull(coerced, "coerced arguments cannot be null");
|
||||
}
|
||||
|
||||
|
||||
private Object invoke(Object on) throws InvocationTargetException, IllegalAccessException {
|
||||
return method.invoke(on, coerced.toArray());
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.github.javafaker.service;
|
||||
|
||||
public class LocaleDoesNotExistException extends RuntimeException {
|
||||
public LocaleDoesNotExistException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -50,4 +50,21 @@ public class RandomService {
|
||||
public Boolean nextBoolean() {
|
||||
return random.nextBoolean();
|
||||
}
|
||||
|
||||
public Integer nextInt(int min, int max) {
|
||||
return random.nextInt((max - min) + 1) + min;
|
||||
}
|
||||
|
||||
public String hex() {
|
||||
return hex(8);
|
||||
}
|
||||
|
||||
public String hex(int length) {
|
||||
char[] hexValues = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||
StringBuilder hexString = new StringBuilder();
|
||||
for(int i = 0; i < length; i++) {
|
||||
hexString.append(hexValues[nextInt(hexValues.length)]);
|
||||
}
|
||||
return hexString.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.github.javafaker.service.files;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class EnFile {
|
||||
private final String file;
|
||||
private final String path;
|
||||
|
||||
private EnFile(String file) {
|
||||
this(file, file.replaceFirst(".yml", ""));
|
||||
}
|
||||
|
||||
private EnFile(String file, String path) {
|
||||
this.file = file;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
|
||||
public String getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
private static List<String> FILES = Arrays.asList("address.yml",
|
||||
"ancient.yml",
|
||||
"animal.yml",
|
||||
"app.yml",
|
||||
"appliance.yml",
|
||||
"aqua_teen_hunger_force.yml",
|
||||
"artist.yml",
|
||||
"aviation.yml",
|
||||
"back_to_the_future.yml",
|
||||
"bank.yml",
|
||||
"beer.yml",
|
||||
"bojack_horseman.yml",
|
||||
"book.yml",
|
||||
"bossa_nova.yml",
|
||||
"breaking_bad.yml",
|
||||
"buffy.yml",
|
||||
"business.yml",
|
||||
"cannabis.yml",
|
||||
"chuck_norris.yml",
|
||||
"code.yml",
|
||||
"coffee.yml",
|
||||
"coin.yml",
|
||||
"color.yml",
|
||||
"commerce.yml",
|
||||
"community.yml",
|
||||
"company.yml",
|
||||
"compass.yml",
|
||||
"construction.yml",
|
||||
"cosmere.yml",
|
||||
"country.yml",
|
||||
"crypto_coin.yml",
|
||||
"currency.yml",
|
||||
"dc_comics.yml",
|
||||
"demographic.yml",
|
||||
"dessert.yml",
|
||||
"device.yml",
|
||||
"dota.yml",
|
||||
"dr_who.yml",
|
||||
"dragon_ball.yml",
|
||||
"dumb_and_dumber.yml",
|
||||
"dune.yml",
|
||||
"educator.yml",
|
||||
"elder_scrolls.yml",
|
||||
"electrical_components.yml",
|
||||
"esport.yml",
|
||||
"fallout.yml",
|
||||
"family_guy.yml",
|
||||
"famous_last_words.yml",
|
||||
"file.yml",
|
||||
"finance.yml",
|
||||
"food.yml",
|
||||
"football.yml",
|
||||
"fresh_prince_of_bel_air.yml",
|
||||
"friends.yml",
|
||||
"funny_name.yml",
|
||||
"game_of_thrones.yml",
|
||||
"gender.yml",
|
||||
"ghostbusters.yml",
|
||||
"grateful_dead.yml",
|
||||
"greek_philosophers.yml",
|
||||
"hacker.yml",
|
||||
"half_life.yml",
|
||||
"harry_potter.yml",
|
||||
"heroes.yml",
|
||||
"heroes_of_the_storm.yml",
|
||||
"hey_arnold.yml",
|
||||
"hipster.yml",
|
||||
"hitchhikers_guide_to_the_galaxy.yml",
|
||||
"hobbit.yml",
|
||||
"house.yml",
|
||||
"how_i_met_your_mother.yml",
|
||||
"id_number.yml",
|
||||
"industry_segments.yml",
|
||||
"internet.yml",
|
||||
"invoice.yml",
|
||||
"job.yml",
|
||||
"kpop.yml",
|
||||
"lebowski.yml",
|
||||
"lord_of_the_rings.yml",
|
||||
"lorem.yml",
|
||||
"lovecraft.yml",
|
||||
"markdown.yml",
|
||||
"marketing.yml",
|
||||
"matz.yml",
|
||||
"measurement.yml",
|
||||
"medical.yml",
|
||||
"michael_scott.yml",
|
||||
"military.yml",
|
||||
"most_interesting_man_in_the_world.yml",
|
||||
"movie.yml",
|
||||
"music.yml",
|
||||
"myst.yml",
|
||||
"name.yml",
|
||||
"nation.yml",
|
||||
"nato_phonetic_alphabet.yml",
|
||||
"new_girl.yml",
|
||||
"one_piece.yml",
|
||||
"overwatch.yml",
|
||||
"parks_and_rec.yml",
|
||||
"phish.yml",
|
||||
"phone_number.yml",
|
||||
"pokemon.yml",
|
||||
"princess_bride.yml",
|
||||
"programming_language.yml",
|
||||
"relationship.yml",
|
||||
"restaurant.yml",
|
||||
"rick_and_morty.yml",
|
||||
"robin.yml",
|
||||
"rock_band.yml",
|
||||
"rupaul.yml",
|
||||
"science.yml",
|
||||
"seinfeld.yml",
|
||||
"shakespeare.yml",
|
||||
"silicon_valley.yml",
|
||||
"simpsons.yml",
|
||||
"singular_siegler.yml",
|
||||
"slack_emoji.yml",
|
||||
"sonic_the_hedgehog.yml",
|
||||
"source.yml",
|
||||
"south_park.yml",
|
||||
"space.yml",
|
||||
"star_trek.yml",
|
||||
"star_wars.yml",
|
||||
"stargate.yml",
|
||||
"stock.yml",
|
||||
"stranger_thing.yml",
|
||||
"stripe.yml",
|
||||
"subscription.yml",
|
||||
"super_smash_bros.yml",
|
||||
"superhero.yml",
|
||||
"sword_art_online.yml",
|
||||
"team.yml",
|
||||
"the_expanse.yml",
|
||||
"the_it_crowd.yml",
|
||||
"the_thick_of_it.yml",
|
||||
"twin_peaks.yml",
|
||||
"umphreys_mcgee.yml",
|
||||
"university.yml",
|
||||
"v_for_vendetta.yml",
|
||||
"vehicle.yml",
|
||||
"venture_bros.yml",
|
||||
"verbs.yml",
|
||||
"weather.yml",
|
||||
"witcher.yml",
|
||||
"world_cup.yml",
|
||||
"world_of_warcraft.yml",
|
||||
"yoda.yml",
|
||||
"zelda.yml");
|
||||
|
||||
// files where the search path can't be derived from the filename
|
||||
private static List<EnFile> FILES_WITH_A_DIFFERENT_PATH = Arrays.asList(
|
||||
new EnFile("cat.yml", "creature"),
|
||||
new EnFile("dog.yml", "creature"),
|
||||
new EnFile("league_of_legends.yml", "games"),
|
||||
new EnFile("overwatch.yml", "games"),
|
||||
new EnFile("pokemon.yml", "games"),
|
||||
new EnFile("witcher.yml", "games"),
|
||||
new EnFile("zelda.yml", "games"),
|
||||
new EnFile("phone_number.yml", "cell_phone")); // load phone number again with a differen path
|
||||
|
||||
|
||||
public static List<EnFile> getFiles() {
|
||||
List<EnFile> files = new ArrayList<EnFile>();
|
||||
for (String file : FILES) {
|
||||
files.add(new EnFile(file));
|
||||
}
|
||||
files.addAll(FILES_WITH_A_DIFFERENT_PATH);
|
||||
|
||||
return files;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,80 @@
|
||||
by:
|
||||
faker:
|
||||
separator: " і "
|
||||
address:
|
||||
country: [Аўстралія, Аўстрыя, Азербайджан, Албанія, Алжыр, Амерыканскае Самоа (не прызнаная), Ірландыя, Ісландыя, Іспанія, Антарктыка (не прызнаная), Антыгуа і Барбуда, Антыльскія Астравы (не прызнаная), Аомынь (не прызнаная), Аргенціна, Арменія, Афганістан, Багамскія Астравы, Бангладэш, Барбадас, Бахрэйн, Беларусь, Беліз, Бельгія, Бенін, Балгарыя, Балівія, Боснія і Герцагавіна, Батсвана, Бразілія, Бруней, Буркіна-Фасо, Бурундзі, Бутан, Вануату, Ватыкан, Вялікабрытанія, Венгрыя, Венесуэла, Усходні Тымор, В'етнам, Габон, Гаіці, Гаяна, Гамбія, Гана, Гвадэлупа (не прызнаная), Гватэмала, Гвіяна (не прызнаная), Гвінея, Гвінея-Бісаў, Германія, Гандурас, Грэнада, Грэцыя, Грузія, Данія, Джыбуці, Дамініка, Дамініканская Рэспубліка, Егіпет, Замбія, Зімбабвэ, Ізраіль, Індыя, Інданезія, Іарданія, Ірак, Іран, Ірландыя, Ісландыя, Іспанія, Італія, Емен, Каба-Вэрдэ, Казахстан, Камбоджа, Камерун, Канада, Катар, Кенія, Кіпр, Кірыбаці, Кітай, Калумбія, Каморскія Выспы, Конга, Дэмакратычная Рэспубліка, Карэя (Паўночная), Карэя (Паўднёвая), Косава, Коста-Рыка, Кот-Д'івуар, Куба, Кувейт, выспы Кука, Кыргызстан, Лаос, Латвія, Лесота, Ліберыя, Ліван, Лівія, Літва, Ліхтэнштэйн, Люксембург, Маўрыкій, Маўрытанія, Мадагаскар, Македонія, Малаві, Малайзія, Малі, Мальдывы, Мальта, Маршалавы Астравы, Мексіка, Мікранэзія, Мазамбік, Малдова, Манака, Манголія, Марока, М'янма, Намібія, Науру, Непал, Нігер, Нігерыя, Нідэрланды, Нікарагуа, Новая Зеландыя, Нарвегія, Аб'яднаныя Арабскія Эміраты, Аман, Пакістан, Палаў, Панама, Папуа — Новая Гвінея, Парагвай, Перу, Польшча, Партугалія, Рэспубліка Конга, Расея, Руанда, Румынія, Сальвадор, Самоа, Сан-Марына, Сан-Томе і Прынсэп, Саудаўская Аравія, Свазіленд, Сейшэльскія астравы, Сенегал, Сэнт-Вінсэнт і Грэнадыны, Сэнт-Кітс і Нэвіс, Сэнт-Люсія, Сербія, Сінгапур, Сірыя, Славакія, Славенія, Злучаныя Штаты Амерыкі, Саламонавы Выспы, Самалі, Судан, Сурынам, Сьера-Леонэ, Таджыкістан, Тайланд, Тайвань (не прызнаная), Таміл-Ілама (не прызнаная), Танзанія, Тэркс і Кайкас (не прызнаная), Таго, Такелаў (не прызнаная), Тангійская, Трынідад і Табага, Тувалу, Туніс, Турэцкая Рэспубліка Паўночнага Кіпра (не прызнаная), Туркменістан, Турцыя, Уганда, Узбекістан, Украіна, Уругвай, Фарэрскія Выспы (не прызнаная), Фіджы, Філіпіны, Фінляндыя, Францыя, Французская Палінезія (не прызнаная), Харватыя, Цэнтральнаафрыканская Рэспубліка, Чад, Чарнагорыя, Чэхія, Чылі, Швейцарыя, Швецыя, Шры-Ланка, Эквадор, Экватарыяльная Гвінея, Эрытрэя, Эстонія, Эфіопія, Паўднёва-Афрыканская Рэспубліка, Ямайка, Японія]
|
||||
building_number: ['###']
|
||||
street_suffix: ['вул', 'вуліца', 'праспект', 'плошча', 'пл.']
|
||||
secondary_address: ['кв. ###']
|
||||
postcode: ['######']
|
||||
state: [Брэсцкая вобласць Віцебская вобласць, Гомельская вобласць, Гродзенская вобласць, Мінская вобласць, Магілёўская вобласць]
|
||||
street_title: [Савецкая, Маладзёжная, Цэнтральная, Школьная, Новая, Садовая, Лясная, Набярэжная, Леніна, Кастрычніцкая, Зялёная, Камсамольская, Зарэчная, Першамайская, Гагарына, Палявая, Лугавая, Піянерская, Кірава, Юбілейная, Паўднёвая, Пралетарская, Стэпавая, Пушкіна, Калініна, Паўднёвая, Калгасная, Працоўная, Сонечная, Чыгуначная, Усходняя, Завадская, Чапаева, Нагорная, Будаўнікоў, Берагавая, Перамогі, Горкага, Кааператыўная, Чырвонаармейская, Саўгасная, Рачная, Заплечнік , Спартыўная, Азёрная, Будаўнічая, Паркавая, Чкалава, Мічурына, Падгорная, Дружбы, Паштовая, Партызанская, Вакзальная, Лермантава, Свабоды, Дарожная, Дачная, Маякоўскага, Заходняя, Фрунзэ, Дзяржынскага, Маскоўская, Свярдлова, Някрасава, Гогаля, Чырвоная, Працоўная, Шасейная, Чэхава, Камуністычная, Працы, Камарова, Матросава, Астроўскага, Сасновая, Клубная, Куйбышава, Крупскай, Бярозавая, Карла Маркса, 8 Сакавіка, Бальнічная, Садовы , Інтэрнацыянальная, Суворава, Кветкавая, Трактовая, Ламаносава, Горная, Касманаўтаў, Энергетыкаў, Шаўчэнка, Вясновая, Механізатараў, Камунальная, Лясной , 40 гадоў Перамогі, Майская]
|
||||
city_name: [г. Гродна, г. Мiнск, г. Магiлёў , г. Брэст , г. Вiцебск , г. Гомель , г. Баранавiчы , г. Бешанковiчы , г. Брагiн , г. Бяроза , г. Браслаў , г. Буда-Кашалёва , г. Ганцавiчы , г. Верхнядзвiнск , г. Ветка , г. Драгiчын , г. Глыбокае , г. Добруш , г. Жабiнка , г. Гарадок , г. Ельск , г. Iванава , г. Докшыцы , г. Жыткавiчы , г. Iвацэвiчы , г. Дуброўна , г. Жлобiн , г. Камянец , г. Лепель , г. Калiнкавiчы , г. Кобрын , г. Лёзна , г. Карма , г. Лунiнец , г. Мёры , г. Лельчыцы , г. Ляхавiчы , г. Наваполацк , г. Лоеў , г. Маларыта , г. Орша , г. Мазыр , г. Пiнск , г. Полацк , г. Нароўля , г. Пружаны , г. Паставы , г. Кастрычнiцкi , г. Столiн , г. Расоны , г. Петрыкаў , г. Сянно , г. Рэчыца , г. Талачын , г. Рагачоў , г. Ушачы , г. Светлагорск , г. Чашнiкi , г. Хойнiкi , г. Шаркаўшчына , г. Чачэрск , г. Шумiлiна , г. Бераставiца , г. Бялынiчы , г. Ваўкавыск , г. Беразiно , г. Бабруйск , г. Воранава , г. Барысаў , г. Быхаў , г. Дзятлава , г. Вiлейка , г. Глуск , г. Зэльва , г. Валожын , г. Горкi , г. Iўе , г. Дзяржынск , г. Дрыбiн , г. Карэлiчы , г. Жодзiна , г. Кiраўск , г. Лiда , г. Клецк , г. Клiмавiчы , г. Масты , г. Капыль , г. Клiчаў , г. Навагрудак , г. Крупкi , г. Касцюковiчы , г. Астравец , г. Лагойск , г. Краснаполле , г. Ашмяны , г. Любань , г. Крычаў , г. Слуцк , г. Чэрыкаў , г. Смалявiчы , г. Шклоў , г. Салiгорск , г. Стоўбцы , г. Узда , г. Чэрвень]
|
||||
city:
|
||||
- "#{Address.city_name}"
|
||||
street_name:
|
||||
- "#{street_suffix} #{Address.street_title}"
|
||||
- "#{Address.street_title} #{street_suffix}"
|
||||
street_address:
|
||||
- "#{street_name}, #{building_number}"
|
||||
default_country: [Беларусь]
|
||||
full_address:
|
||||
- "#{postcode} #{default_country}, #{city}, #{street_address}"
|
||||
- "#{postcode} #{default_country}, #{city}, #{street_address} #{secondary_address}"
|
||||
|
||||
internet:
|
||||
free_email: [yandex.ru, ya.ru, mail.ru, gmail.com, yahoo.com, hotmail.com]
|
||||
domain_suffix: [com, ru, info, бел, net, org, by]
|
||||
|
||||
name:
|
||||
male_first_name: [Аляксандр, Аляксей, Альберт, Анатоль, Андрэй, Антон, Аркадзь, Арсеній, Арцём, Барыс, Вадзім, Валянцін, Валерый, Васіль, Віктар, Віталь, Уладзімір, Уладзіслаў, Вячаслаў, Генадзь, Георгій, Герман, Рыгор, Данііл, Дзяніс, Дзмітрый, Яўген, Ягор, Іван, Ігнат, Ігар, Ілля, Канстанцін, Лаўрэнцій, Леанід, Лука, Макар, Максім, Мацвей, Міхаіл, Мікіта, Мікалай, Алег, Раман, Сямён, Сяргей, Станіслаў, Сцяпан, Фёдар, Эдуард, Юрый, Яраслаў]
|
||||
male_middle_name: [Аляксандравіч, Аляксеевіч, Альбертавіч, Анатольевіч, Андрэевіч, Антановіч, Аркадзевіч, Арсеньевіч, Арцёмавіч, Барысавіч, Вадзімавіч, Валянцінавіч, Валер'евіч, Васільевіч, Віктаравіч, Вітальевіч, Уладзіміравіч, Уладзіслававіч, Вячаслававіч, Генадзьевіч, Георгіевіч, Германовіч, Рыгоравіч, Данілавіч, Дзянісавіч, Дзмітрыевіч, Яўгеньевіч, Ягоравіч, Іванавіч, Ігнатавіч, Ігаравіч, Ільіча, Канстанцінавіч, Лаўрэнцьевіч, Леанідавіч, Лукіч, Макаравіч, Максімавіч, Мацвеевіч, Міхайлавіч, Нікіціч, Мікалаевіч, Алегавіч, Рамановіч, Сямёнавіч, Сяргеевіч, Станіслававіч, Сцяпанавіч, Фёдаравіч, Эдуардавіч, Юр'евіч, Яраслававіч]
|
||||
male_last_name: [Смірноў, Іваноў, І. Кузняцоў, Папоў, Сакалоў, Лебедзеў, Казлоў, Новікаў, Марозаў, Пятроў, Ваўкоў, Салаўёў, Васільеў, Зайцаў, Паўлаў, Сямёнаў, Голубеў, Вінаградаў, Багданаў, Вараб'ёў, Фёдараў, Міхайлаў, Бяляеў, Тарасаў, Бялоў, Камароў, Арлоў, Кісялёў, Макараў, Андрэеў, Кавалёў, Ільін, Гусеў, Цітоў, Кузьмін, Кудраўцаў, Баранаў, Кулікоў, Аляксееў, Сцяпанаў, Якаўлеў, Сарокін, Сяргееў, Раманаў, Захараў, Барысаў, Каралеў, Герасімаў, Панамароў, Грыгор'еў, Лазараў, Мядзведзеў, Яршоў, Нікіцін, Собалеў, Рабаў, Палякаў, Кветак, Данілаў, Жукоў, Фралоў, Жураўлёў, Нікалаеў, Крылоў, Максімаў, Сідараў, Осіпаў, Белавусаў, Фядотаў, Дарафееў, Ягораў, Мацвееў, Баброў, Дзмітрыеў, Калінін, Анісімаў, Пеўняў, Антонаў, Цімафееў, Нікіфараў, Весялоў, Філіпаў, Маркаў, Бальшакоў, Суханаў, Міронаў, Шыраеў, Аляксандраў, Канавалаў, Шастакоў, Казакоў, Яфімаў, Дзянісаў, Громаў, Фамін, Давыдаў, Мельнікаў, Шчарбакоў, Бліноў, Калеснікаў, Карпаў, Афанасьеў, Уласаў, Маслаў, Ісакаў, Ціханаў, Аксёнаў, Гаўрылаў, Радзівонаў, Катоў, Гарбуноў, Кудрашоў, Быкаў, Зуеў, Траццякоў, Савельеў, Паноў, Рыбакоў, Сувораў, Абрамаў, Воранаў, Мухін, Архіпаў, Трафімаў, Мартынаў, Емяльянаў, Гаршкоў, Чарноў, Аўчыннікаў, Селязнёў, Панфілаў, Капылоў, Міхееў, Галкін, Назараў, Лабанаў, Лукін, Белякоў, Патапаў, Някрасаў, Хахлоў, Жданаў, Навумаў, Шылаў, Варанцоў, Ермакоў, Драздоў, Ігнацьеў, Савін, Лагінаў, Сафонаў, Капусцін, Кірылаў, Маісееў, Елісееў, Кошалеў, Косцін, Гарбачоў, Арэхаў, Яфрэмаў, Ісаеў, Еўдакімаў, Калашнікаў, Дзікоў, Шкарпэтак, Юдзін, Кулагін, Лапін, Прохараў, Несцераў, Харытонаў, Агафонаў, Мурашак, Ларыёнаў, Федасееў, Зімін, Пахомаў, Шубін, Ігнатаў, Філатаў, Крукаў, Рагоў, Кулакоў, Цярэнцьеў, Малчанаў, Уладзіміраў, Арцем'еў, Гур'еў, Зіноўеў, Грышын, Конанаў, Дзяменцьеў, Сітнікаў, Сіманаў, Мішын, Фадзееў, Камісараў, Мамантаў, Носаў, Гуляеў, Шароў, Усцінаў, Вішнякоў, Яўсееў, Лаўрэнцьеў, Брагін, Канстанцінаў, Карнілаў, Аўдзееў, Зыкаў, Бірукоў, Шарапаў, Ніканаў, Шчукін, Дзячкоў, Адзінцоў, Сазонаў, Якушаў, Красільнікаў, Гардзееў, Самойлаў, Князеў, Бяспалаў, Увараў, Шашкоў, Бабылёў, Даронін, Белазёраў, Ражкоў, Самсонаў, Мяснікоў, Ліхачоў, Бураў, Сысоеў, Фамічоў, Русакоў, Стралкоў, Гушчын, Цяцерын, Колобов, Субоцін, Фокін, Блахін, Селіверстаў, Пестов, Кандрацьеў, Сілін, Меркушев, Лыткін, Тураў]
|
||||
female_first_name: [Ганна, Алёна, Аляўціна, Аляксандра, Аліна, Ала, Анастасія, Ангеліна, Анжэла, Анжаліка, Антонида, Антаніна, Анфіса, Арына, Валянціна, Валерыя, Варвара, Васіліса, Вера, Вераніка, Вікторыя, Галіна, Дар'я, Яўгенія, Кацярына, Алена, Лізавета, Жанна, Зінаіда, Зоя, Ірына, Кіра, Клаўдзія, Ксенія, Ларыса, Лідзія, Любоў, Людміла, Маргарыта, Марына, Марыя, Надзея, Наталля, Ніна, Аксана, Вольга, Раіса, Рэгіна, Рыма, Святлана, Сафія, Таісія, Тамара, Таццяна, Ульяна, Юлія]
|
||||
female_middle_name: [Аляксандраўна, Аляксееўна, Альбертаўна, Анатольеўна, Андрэеўна, Антонаўна, Аркадзьеўна, Арсеньеўна, Арцёмаўна, Барысаўна, Вадзімаўна, Валянцінаўна, Валер'еўна, Васільеўна, Віктараўна, Вітальеўна, Уладзіміраўна, Уладзіславаўна, Вячаславаўна, Генадзьеўна, Георгіеўна, Германовна, Рыгораўна, Данииловна, Дзянісаўна, Дзмітрыеўна, Яўгенаўна, Ягораўна, Іванаўна, Ігнацьеўна, Ігараўна, Ільінічна, Канстанцінаўна, Лаўрэнцьеўна, Леанідаўна, Макараўна, Максімаўна, Мацвееўна, Міхайлаўна, Мікітаўна, Мікалаеўна, Алегаўна, Раманаўна, Сямёнаўна, Іванаўна, Станіславаўна, Сцяпанаўна, Фёдараўна, Эдуардаўна, Юр'еўна, Ярославовна]
|
||||
female_last_name: [Смірнова, Іванова, Кузняцова, Папова, Сакалова, Лебедзева, Казлова, Новікава, Марозава, Пятрова, Волкава, Салаўёва, Васільева, Зайцава, Паўлава, Сямёнава, Голубева, Вінаградава, Багданава, Вараб'ёва, Фёдарава, Міхайлава, Бяляева, Тарасава, Бялова, Камарова, Арлова, Кісялёва, Макарава, Андрэева, Кавалёва, Ільіна, Гусева, Цітова, Кузьміна, Кудраўцава, Баранава, Кулікова, Аляксеева, Сцяпанава, Якаўлева, Сарокіна, Сяргеева, Раманава, Захарава, Барысава, Каралева, Герасімава, Панамарова, Грыгор'ева, Лазарава, Мядзведзева, Яршова, Нікіціна, Собалева, Рабава, Палякова, Цвяткова, Данілава, Жукава, Фралова, Жураўлёва, Мікалаева, Крылова, Максімава, Сідарава, Осіпава, Белавусава, Фядотава, Дарафеева, Ягорава, Матвеева, Баброва, Дзмітрыева, Калініна, Анісімава, Петухова, Антонава, Цімафеева, Нікіфарава, Весялова, Філіпава, Маркава, Бальшакова, Суханава, Міронава, Ширяева, Аляксандрава, Канавалава, Шастакова, Казакова, Яфімава, Дзянісава, Громава, Фаміна, Давыдава, Мельнікава, Шчарбакова, Блінова, Калеснікава, Карпава, Афанасьева, Уласава, Маслава, Ісакава, Ціханава, Аксёнава, Гаўрылава, Радзівонава, Котава, Гарбунова, Кудрашова, Быкава, Зуева, Траццякова, Савельева, Панова, Рыбакова, Суворава, Абрамава, Воранава, Мухіна, Архіпава, Трафімава, Мартынава, Емяльянава, Гаршкова, Чарнова, Аўчыннікава, Селязнёва, Панфілава, Копылова, Міхеева, Галкіна, Назарава, Лабанава, Лукіна, Белякова, Патапава, Някрасава, Хахлова, Жданава, Навумава, Шылава, Варанцова, Ермакова, Драздова, Ігнацьева, Савіна, Логінава, Сафонава, Капусціна, Кірылава, Маісеева, Елісеева, Кошалева, Косціна, Гарбачова, Арэхава, Яфрэмава, Ісаева, Еўдакімава, Калашнікава, Кабанава, Наскова, Юдзіна, Кулагіна, Лапіна, Прохарава, Несцерава, Харытонава, Агафонава, Мураўёва, Ларыёнава, Федасеева, Зіміна, Пахомава, Шубіна, Ігнатава, Філатава, Крукава, Рогава, Кулакова, Цярэнцьева, Малчанава, Уладзімірава, Арцем'ева, Гур'ева, Зіноўева, Грышына, Конанава, Дзяменцьева, Сітнікава, Сіманава, Мішына, Фадзеева, Камісарава, Мамантава, Носава, Гуляева, Шарова, Усцінава, Вішнякова, Яўсеева, Лаўрэнцьева, Брагіна, Канстанцінава, Карнілава, Аўдзеева, Зыкава, Бірукова, Шарапава, Ніканава, Шчукіна, Дзьячкова, Адзінцова, Сазонава, Якушава, Красільнікава, Гардзеева, Самойлава, Князева, Бяспалава, Уварава, Шашкова, Бобылева, Дароніна, Белазёрава, Ражкова, Самсонава, Мяснікова, Ліхачова, Бурава, Сысоева, Фамічова, Русакова, Стралкова, Гушчына, Цяцерына, Колабава, Субоціна, Фокіна, Блахіна, Селіверстава, Пестова, Кандрацьева, Сілін, Меркушева, Лыткіна, Турава]
|
||||
first_name:
|
||||
- "#{female_first_name}"
|
||||
- "#{male_first_name}"
|
||||
last_name:
|
||||
- "#{female_last_name}"
|
||||
- "#{male_last_name}"
|
||||
name:
|
||||
- "#{male_first_name} #{male_last_name}"
|
||||
- "#{male_last_name} #{male_first_name}"
|
||||
- "#{male_first_name} #{male_middle_name} #{male_last_name}"
|
||||
- "#{male_last_name} #{male_first_name} #{male_middle_name}"
|
||||
- "#{female_first_name} #{female_last_name}"
|
||||
- "#{female_last_name} #{female_first_name}"
|
||||
- "#{female_first_name} #{female_middle_name} #{female_last_name}"
|
||||
- "#{female_last_name} #{female_first_name} #{female_middle_name}"
|
||||
|
||||
phone_number:
|
||||
formats: ['+375(##)###-##-##']
|
||||
|
||||
commerce:
|
||||
color: [чырвоны, зялены, сіні, жоўты, барвовы, мятный, зелянява-блакітны, белы, чорны, аранжавы, ружовы, шэры, чырвона-карычневы, фіялетавы, бірузовы, жоўта-карычневы, нябесна блакітны, памяранцава-ружовы, цемна-фіялетавы, орхидный, аліўкавы, фіялетавы, цытрынавы, крэмавы, сіне-фіялетавы, залаты, чырвона-фіялетавы, блакітны, блакітны, ліловы, сярэбраны]
|
||||
department: ["Кнігі", "Фільмы", "музыка", "гульні", "Электроніка", "кампутары", "Дом", "сад інструмент", "Бакалея", "здароўе", "прыгажосць", "Цацкі", "дзіцячы", "для дзяцей", "Адзенне", "абутак", "ўпрыгожванні", "Спорт", "турызм", "Аўтамабільная", "прамысловая"]
|
||||
product_name:
|
||||
adjective: [Маленькі, Эрганамічны, Грубы, Інтэлектуальны, Цудоўны, Казачны, Фантастычны, Практычны, Лоснящийся, Надзвычайны, Велізарны, Здавальняючы, Сінэргетычны, Цяжкі, Лёгкі, Аэрадынамічнае, Трывалы]
|
||||
material: [Сталёвы, Драўляны, Бетонны, Пластыкавы, Баваўняны, Гранітны, Гумовы, Скураны, Шаўковы, Ваўнянай, Ільняны, Мармуровы, Жалезны, Бронзавы, Медны, Алюмініевы, Папяровы]
|
||||
product: [Крэсла, Аўтамабіль, Кампутар, Бярэ, Кулон, Стол, Швэдар, Рэмень, Чаравік, Талерка, Нож, Бутэлька, Паліто, Лямпа, Клавіятура, Сумка, Лава, Гадзіннік, Кашалек]
|
||||
|
||||
company:
|
||||
prefix: [ІП, ТАА, ЗАТ, ААТ, НКА, ТСЖ, ОП]
|
||||
suffix: [Снаб, Торг, Пром, Трейд, Сбыт]
|
||||
name:
|
||||
- "#{prefix} #{Name.female_first_name}"
|
||||
- "#{prefix} #{Name.male_first_name}"
|
||||
- "#{prefix} #{Name.male_last_name}"
|
||||
- "#{prefix} #{suffix}#{suffix}"
|
||||
- "#{prefix} #{suffix}#{suffix}#{suffix}"
|
||||
- "#{prefix} #{Address.city_name}#{suffix}"
|
||||
- "#{prefix} #{Address.city_name}#{suffix}#{suffix}"
|
||||
- "#{prefix} #{Address.city_name}#{suffix}#{suffix}#{suffix}"
|
||||
|
||||
weather:
|
||||
description: ["Ясна","Сонечна","Хмарно з проясненнями","Мінлива хмарність","Переважно хмарно","Пасмурно","Злива","Дощ","Мряка","Грози","Сніг","Мокрий сніг","Град"]
|
||||
temperature:
|
||||
celsius: °C
|
||||
fahrenheit: °F
|
||||
@@ -40,7 +40,7 @@ da-DK:
|
||||
prefix: ["Dr.", "Prof.", "Cand.mag.", "Cand.jur."]
|
||||
|
||||
title:
|
||||
descriptor: [Leder, Senior, Fremtid, Produkt, National, Regional, Distrikt, Central, Global, Investor, Dynamic, International, Legacy, Forward, Intern, HR, Direktør, Rektor]
|
||||
descriptor: [Leder, Senior, Fremtid, Produkt, National, Regional, Distrikt, Central, Global, Kunde, Investor, Dynamic, International, Legacy, Forward, Intern, HR, Direktør, Rektor]
|
||||
level: [Solutions, Program, Brand, Sikkerhed, Research, Marketing, Directives, Implementering, Integration, Funktionalitet, Respons, Paradigme, Taktik, Identitet, Markeder, Gruppe, Division, Applikationer, Optimering, Operationer, Infrastruktur, Intranet, Kommunikation, Web, Branding, Kvalitet, Kontrol, Mobilitet, Regnskab, Data, Kreativ, Konfiguration, Interaktioner, Faktorer, Anvendelighed, Metrik]
|
||||
job: [Supervisor, Officer, Manager, Ingeniør, Specialist, Direktør, Koordinator, Administrator, Arkitekt, Analytiker, Designer, Planner, Tekniker, Udvikler, Producer, Konsultant, Assistant, Agent, Tillidsrepræsentant, Strateg]
|
||||
name:
|
||||
|
||||
@@ -31,6 +31,39 @@ de:
|
||||
- "#{Name.last_name}-#{Name.last_name}"
|
||||
- "#{Name.last_name}, #{Name.last_name} und #{Name.last_name}"
|
||||
|
||||
compass:
|
||||
cardinal:
|
||||
word: ['Norden', 'Osten', 'Süden', 'Westen']
|
||||
abbreviation: ['N', 'O', 'S', 'W']
|
||||
azimuth: ['0', '90', '180', '270']
|
||||
ordinal:
|
||||
word: ['Nordosten', 'Südosten', 'Südwesten', 'Nordwesten']
|
||||
abbreviation: ['NO', 'SO', 'SW', 'NW']
|
||||
azimuth: ['45', '135', '225', '315']
|
||||
half-wind:
|
||||
word: ['Nord-Nordost', 'Ost-Nordost', 'Ost-Südost', 'Süd-Südost', 'Süd-Südwest', 'West-Südwest', 'West-Nordwest', 'Nord-Nordwest']
|
||||
abbreviation: ['NNO', 'ONO', 'OSO', 'SSO', 'SSW', 'WSW', 'WNW', 'NNW']
|
||||
azimuth: ['22.5', '67.5', '112.5', '157.5', '202.5', '247.5', '292.5', '337.5']
|
||||
quarter-wind:
|
||||
word: ['Norden von Osten', 'Nordosten von Norden', 'Nordosten von Osten', 'Osten von Norden', 'Osten von Süden', 'Südosten von Osten', 'Südosten von Süden', 'Süden von Osten', 'Süden von Westen', 'Südwesten von Süden', 'Südwesten von Westen', 'Westen von Süden', 'Westen von Norden', 'Nordwesten von Westen', 'Nordwesten von Norden', 'Norden von Westen']
|
||||
abbreviation: ['NvO', 'NOvN', 'NOvO', 'OvN', 'OvS', 'SOvO', 'SOvS', 'SvO', 'SvW', 'SWvS', 'SWvW', 'WvS', 'WvN', 'NWvW', 'NWvN', 'NvW']
|
||||
azimuth: ['11.25', '33.75', '56.25', '78.75', '101.25', '123.75', '146.25', '168.75', '191.25', '213.75', '236.25', '258.75', '281.25', '303.75', '326.25', '348.75']
|
||||
direction:
|
||||
- "#{cardinal}"
|
||||
- "#{ordinal}"
|
||||
- "#{half_wind}"
|
||||
- "#{quarter_wind}"
|
||||
abbreviation:
|
||||
- "#{cardinal_abbreviation}"
|
||||
- "#{ordinal_abbreviation}"
|
||||
- "#{half_wind_abbreviation}"
|
||||
- "#{quarter_wind_abbreviation}"
|
||||
azimuth:
|
||||
- "#{cardinal_azimuth}"
|
||||
- "#{ordinal_azimuth}"
|
||||
- "#{half_wind_azimuth}"
|
||||
- "#{quarter_wind_azimuth}"
|
||||
|
||||
internet:
|
||||
free_email: [gmail.com, yahoo.com, hotmail.com, gmx.de, web.de, mail.de, freenet.de]
|
||||
domain_suffix: [com, info, name, net, org, de, ch]
|
||||
@@ -65,13 +98,13 @@ de:
|
||||
product_name:
|
||||
adjective: [Kleine, Ergonomische, Rustikale, Intelligente, Wunderschöne, Unglaubliche, Fantastische, Praktische, Elegante, Tolle, Enorme, Mittelmäßige, Synergetische, Schwerlast, Leichte, Aerodynamische, Haltbare]
|
||||
material: [Stahl, Holz, Beton, Plastik, Baumwoll, Granit, Gummi, Leder, Seiden, Wolle, Leinen, Marmor, Eisen, Bronze, Kupfer, Aluminium, Papier]
|
||||
product: [Stühle, Autos, Computer, Handschue, Hosen, Hemden, Tische, Schuhe, Hüte, Teller, Messer, Flaschen, Jacke, Lampe, Tastatur, Tasche, Bank, Uhr, Armbanduhr, Geldbörse]
|
||||
product: [Stühle, Autos, Computer, Handschuhe, Hosen, Hemden, Tische, Schuhe, Hüte, Teller, Messer, Flaschen, Jacke, Lampe, Tastatur, Tasche, Bank, Uhr, Armbanduhr, Geldbörse]
|
||||
|
||||
phone_number:
|
||||
formats: ['(0###) #########', '(0####) #######', '+49-###-#######', '+49-####-########']
|
||||
|
||||
cell_phone:
|
||||
formats: ['+49-1##-#######', '+49-1###-########']
|
||||
formats: ['+49-15##-########', '+49-16#-#######', '+49-17#-#######']
|
||||
|
||||
book:
|
||||
title: ['Also sprach Zarathustra', 'Andorra', 'Ansichten Eines Clowns', 'Atemschaukel', 'Aus dem Leben eines Taugenichts', 'Bekenntnisse des Hochstaplers Felix Krull', 'Berlin Alexanderplatz', 'Biedermann und die Brandstifter', 'Billiard um halbzehn', 'Catharina von Georgien', 'Cleopatra', 'Damals war es Friedrich', 'Dantons Tod', 'Das Boot', 'Das Marmorbild', 'Das Parfum', 'Das Schiff Esperanza', 'Das Versprechen', 'Das kalte Herz', 'Das steinerne Herz', 'Der (kleine) Schatz im Kugelbauch', 'Der Augenblick der Liebe', 'Der Ausflug der toten Mädchen', 'Der Besuch der alten Dame', 'Der Brief des Lord Chandos', 'Der Goldene Topf', 'Der Hauptmann von Köpenick', 'Der Mann ohne Eigenschaften', 'Der Prozess', 'Der Richter und sein Henker', 'Der Sandmann', 'Der Schimmelreiter', 'Der Spaziergang', 'Der Stechlin', 'Der Stellvertreter', 'Der Steppenwolf', 'Der Tod in Venedig und andere Erzählungen', 'Der Tor und der Tod', 'Der Untertan', 'Der Verdacht', 'Der Vorleser', 'Der Vulkan', 'Der Zauberberg', 'Der abenteuerliche Simplicissimus', 'Der arme Spielmann', 'Der eiserne Gustav', 'Der geteilte Himmel', 'Der grüne Heinrich', 'Der gute Mensch von Sezuan', 'Der veruntreute Himmel', 'Der zerbrochene Krug', 'Des Teufels General', 'Deutschland. Ein Wintermärchen', 'Die Aufzeichnungen des Malte Laurids Brigge', 'Die Blechtrommel', 'Die Box', 'Die Buddenbrooks', 'Die Dreigroschenoper', 'Die Erschiessung des Landesverräters Ernst S.', 'Die Lehre der Sainte-Victoire', 'Die Leiden des jungen Werther', 'Die Leute von Seldwyla', 'Die Marquise von O...', 'Die Panne', 'Die Physiker', 'Die Rote', 'Die Räuber', 'Die Verwandlung/Erstes Leid', 'Die Waffen nieder!', 'Die Welt als Wille & Wahn', 'Die neuen Leiden des jungen Werthers', 'Die unendliche Geschichte', 'Die verlorene Ehre der Katharina Blum', 'Die zärtlichen Schwestern', 'Don Karlos', 'Effi Briest', 'Ehen in Philippsburg', 'Eiche und Angora', 'Ein fliehendes Pferd', 'Ende einer Dienstfahrt', 'Es geschah im Nachbarhaus', 'Fabian', 'Faserland', 'Faust, Part I', 'Franziska Linkerhand', 'Frühlings Erwachen', 'Ganz unten', 'Gehirne', 'Die Weber', 'Götz von Berlichingen', 'Haus ohne Hüter', 'Heidi', 'Heinrich von Ofterdingen', 'Helden wie wir', 'Homo faber', 'Hyperion oder der Eremit in Griechenland', 'Im Krebsgang', 'Im Westen nichts Neues', 'Iphigenie auf Tauris', 'Italienische Reise', 'Jahrestage', 'Jakob der Lügner', 'Jedermann', 'Kabale und Liebe', 'Katz und Maus', 'Leben des Galilei', 'Lenz', 'Lerne lachen ohne zu weinen', 'Emilia Galotti', 'Lieutenant Gustl', 'Maria Magdalene', 'Maria Stuart', 'Mario und der Zauberer', 'Mephisto', 'Minna von Barnhelm', 'Miss Sara Sampson', 'Mutter Courage und ihre Kinder', 'Narziss und Goldmund', 'Narziß und Goldmund', 'Nathan der Weise', 'Paare, Passanten', 'Panter, Tiger & Co.', 'Reigen', 'Romeo und Julia auf dem Dorfe', 'Romulus der Große', 'Sansibar oder der letzte Grund', 'Schachnovelle', 'Siddhartha', 'Sterbender Cato', 'Stolz und Vorurteil', 'Tauben im Gras', 'Till Eulenspiegel', 'Traumnovelle/Die Braut', 'Tödliche Versprechen/Das Imperium der Wölfe', 'Unterhaltungen deutscher Ausgewanderten', 'Unterm Rad', 'Vor Sonnenaufgang', 'Wer einmal aus dem Blechnapf frisst', 'Wilhelm Meisters Wanderjahre oder die Entsagenden', 'Wilhelm Tell', 'Winnetou', 'Winnetou II', 'Woyzeck', 'Über das Studium der griechischen Poesie']
|
||||
@@ -120,3 +153,11 @@ de:
|
||||
spices: ["Ajowan", "Anis", "Annatto", "Asant", "Bärlauch", "Bärwurz", "Basilikum", "Beifuß", "Berbere", "Bergkümmel", "Bertram", "Bockshornklee", "Bohnenkraut", "Borretsch", "Brunnenkresse", "Cardamom", "Cayennepfeffer", "Chili", "Cilantro", "Cumin", "Curcuma", "Curryblätter", "Currykraut", "Currypulver", "Dill", "Dost", "Eberraute", "Einlegegewürz", "Engelwurz", "Epazote", "Estragon", "Färberdistel", "Fenchel", "Fetthenne", "Gagel", "Galgant", "Galgant", "Gänseblümchen", "Garam", "Gelbwurz", "Gochujang", "Gomashio", "Gurkenkraut", "Harissa", "Herbes", "Honig", "gemeiner", "Ingwer", "Kaffernlimette", "Kakaopulver", "Kalmus", "Kapern", "Kapuzinerkresse", "Grüner", "Schwarzer", "Kerbel", "Kemirinuss", "Knoblauch", "Koriander", "Kren", "Kresse", "Große", "Kreuzkümmel", "Kubebenpfeffer", "Kümmel", "Kürbis", "Kurkuma", "Langer", "Lakritze", "Lavendel", "Liebstöckel", "Limette", "Lorbeer", "Lorbeer", "Löffelkraut", "Macis", "Mandel", "Majoran", "spreizende", "Meerrettich", "Melisse", "Minze", "Mitsuba", "Mohnsamen", "Muskat", "Myrrhenkerbel", "Nelkenpfeffer", "Ölkürbis", "Orangen", "Oregano", "Pandanus", "Paradieskörner", "Paprika", "Pastinake", "Peperoni", "Perilla", "Petersilie", "Pfeffer", "Pfefferminze", "Piment", "Pimpinelle", "Portulak", "Quendel", "Ras", "Rhabarber", "Rosmarin", "Rotwein", "Rouille", "Rucola", "Safran", "Salbei", "Salz", "Sambal", "Sassafras", "Sauerampfer", "Schabzigerklee", "Schalotte", "Schafgarbe", "Schnittknoblauch", "Schnittlauch", "Schwarzkümmel", "Sellerie", "Senf", "Soumbala", "Spitzwegerich", "Sternanis", "Stevia", "Sumach", "Süßdolde", "Süßholz", "Szechuanpfeffer", "Tamarinde", "Tanduri", "Tasmanischer", "Tonkabohne", "Thymian", "Tripmadam", "Trüffel", "Tschubritza", "Wasabi", "Wacholder", "Waldmeister", "Wald-Weidenröschen", "Wasserpfeffer", "Weinblätter", "Weinraute", "Ysop", "Zichorie", "Zimt", "Zitronengras", "Zitronenmelisse", "Zitronen", "Zitronenstrauch", "Zitronenthymian", "Zitwerwurzel", "Zucker", "Zwiebel"]
|
||||
measurements: ["Teelöffel", "Esslöffel", "Tasse", "Prise", "Messerspitze", "Packung"]
|
||||
measurement_sizes: ["1/4", "1/3", "1/2", "1", "2", "3"]
|
||||
|
||||
simpsons:
|
||||
characters: [ "Homer Simpson", "Marge Simpson", "Bart Simpson", "Lisa Simpson", "Maggie Simpson", "Grampa Simpson", "Abraham Jedediah \"Abe\" Simpson", "Patty Bouvier", "Selma Bouvier", "Mona Bouvier", "Charles Montgomery Burns", "Waylon Smithers", "Lenford \"Lenny\" Leonard", "Carl Carlson", "Charlie", "Ned Flanders", "Maude Flanders", "Rod Flanders", "Todd Flanders", "Janey Powell", "Ralph Wiggum", "Becky", "Alison Taylor", "Database", "Lewis", "Martin Prince", "Milhouse van Houten", "Nelson Muntz", "Richard", "Jaffee", "Melissa", "Sherri", "Terri", "Wendell Borton", "Dolphin Starbeam", "Jimbo Jones", "Kearney Zzyzwicz", "Uter Zörker", "Rektor Seymour Skinner", "Oberschulrat Chalmers", "Edna Krabappel", "Elizabeth Hoover", "Dewey Largo", "Sportlehrer Mr. Krupt", "Dr. J. Loren Pryor", "Hausmeister Willie", "Küchenhilfe Doris Peterson", "Otto Mann", "Krusty der Clown", "Herschel Krustofski", "Sideshow Raheem", "Tingeltangel-Bob", "Tingeltangel-Mel", "Mr. Teeny", "Bubbles", "Itchy", "Scratchy", "Bienenmann", "Scott Christian", "Kent Brockman", "Arnie Pye", "Rainier Wolfcastle", "Troy McClure", "Lurleen Lumpkin", "Duffman", "Chief Clancy Wiggum", "Lou", "Eddie", "Comicbuchverkäufer", "Roger Meyers Junior", "Artie Ziff", "Horatio McCallister", "Alter Kapitän", "Lothar Folkman", "Luigi Risotto", "Aristotle Amadopolis", "Herman", "Lindsay Naegle", "Cookie Kwan", "Dr. Julius Hibbert", "Dr. Nick Riviera", "Dr. Marvin Monroe", "Jasper Beardley", "Ralph Melish", "Hans Maulwurf", "Asa", "Mrs. Glick", "Sylvia Winfield", "Mr. Winfield", "Morris \"Moe\" Szyslak", "Barney Gumble", "Sam", "Larry", "Akira", "Joseph Quimby", "Freddy Quimby", "Mary Bailey", "Roy Snyder", "Constance Harm", "Lionel Hutz", "Blauhaariger Anwalt", "Gil Gunderson", "Der alte Gil", "In der Kirche", "Reverend Timothy Lovejoy", "Helen Lovejoy", "Jessica Lovejoy", "Anthony \"Fat Tony\" D'Amico", "Legs", "Louie", "Johnny", "Schmallippe", "Jacques Brunswick", "Disco Stu", "Eleanor Abernathy", "Katzenlady", "Prof. Frink", "Kirk van Houten", "Luann van Houten", "Shauna Tifton", "Prinzessin Kashmir", "Snake", "Jeremy Peterson", "Agnes Skinner", "Cletus Spuckler", "Brandine Spuckler", "Mary Spuckler", "Apu Nahasapeemapetilon", "Manjula Nahasapeemapetilon", "Zahnfleischbluter Murphy", "Reicher Texaner", "Hyman Krustofski", "Laura Powers", "Ruth Powers", "Drederick Tatum", "Kang", "Kodos" ]
|
||||
dr_who:
|
||||
the_doctors: [
|
||||
"Erster Doktor", "Zweiter Doktor", "Dritter Doktor", "Vierter Doktor", "Fünfter Doktor", "Sechster Doktor",
|
||||
"Siebenter Doktor", "Achter Doktor", "Neunter Doktor", "Zehnter Doktor", "Elfter Doktor", "Zwölfter Doktor"
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@ en-AU:
|
||||
faker:
|
||||
name:
|
||||
first_name: [William, Jack, Oliver, Joshua, Thomas, Lachlan, Cooper, Noah, Ethan, Lucas, James, Samuel, Jacob, Liam, Alexander, Benjamin, Max, Isaac, Daniel, Riley, Ryan, Charlie, Tyler, Jake, Matthew, Xavier, Harry, Jayden, Nicholas, Harrison, Levi, Luke, Adam, Henry, Aiden, Dylan, Oscar, Michael, Jackson, Logan, Joseph, Blake, Nathan, Connor, Elijah, Nate, Archie, Bailey, Marcus, Cameron, Jordan, Zachary, Caleb, Hunter, Ashton, Toby, Aidan, Hayden, Mason, Hamish, Edward, Angus, Eli, Sebastian, Christian, Patrick, Andrew, Anthony, Luca, Kai, Beau, Alex, George, Callum, Finn, Zac, Mitchell, Jett, Jesse, Gabriel, Leo, Declan, Charles, Jasper, Jonathan, Aaron, Hugo, David, Christopher, Chase, Owen, Justin, Ali, Darcy, Lincoln, Cody, Phoenix, Sam, John, Joel, Isabella, Ruby, Chloe, Olivia, Charlotte, Mia, Lily, Emily, Ella, Sienna, Sophie, Amelia, Grace, Ava, Zoe, Emma, Sophia, Matilda, Hannah, Jessica, Lucy, Georgia, Sarah, Abigail, Zara, Eva, Scarlett, Jasmine, Chelsea, Lilly, Ivy, Isla, Evie, Isabelle, Maddison, Layla, Summer, Annabelle, Alexis, Elizabeth, Bella, Holly, Lara, Madison, Alyssa, Maya, Tahlia, Claire, Hayley, Imogen, Jade, Ellie, Sofia, Addison, Molly, Phoebe, Alice, Savannah, Gabriella, Kayla, Mikayla, Abbey, Eliza, Willow, Alexandra, Poppy, Samantha, Stella, Amy, Amelie, Anna, Piper, Gemma, Isabel, Victoria, Stephanie, Caitlin, Heidi, Paige, Rose, Amber, Audrey, Claudia, Taylor, Madeline, Angelina, Natalie, Charli, Lauren, Ashley, Violet, Mackenzie, Abby, Skye, Lillian, Alana, Lola, Leah, Eve, Kiara]
|
||||
last_name: [Smith, Jones, Williams, Brown, Wilson, Taylor, Johnson, White, Martin, Anderson, Thompson, Nguyen, Thomas, Walker, Harris, Lee, Ryan, Robinson, Kelly, King, Davis, Wright, Evans, Roberts, Green, Hall, Wood, Jackson, Clarke, Patel, Khan, Lewis, James, Phillips, Mason, Mitchell, Rose, Davies, Rodriguez, Cox, Alexander, Garden, Campbell, Johnston, Moore, Smyth, O'neill, Doherty, Stewart, Quinn, Murphy, Graham, Mclaughlin, Hamilton, Murray, Hughes, Robertson, Thomson, Scott, Macdonald, Reid, Clark, Ross, Young, Watson, Paterson, Morrison, Morgan, Griffiths, Edwards, Rees, Jenkins, Owen, Price, Moss, Richards, Abbott, Adams, Armstrong, Bahringer, Bailey, Barrows, Bartell, Bartoletti, Barton, Bauch, Baumbach, Bayer, Beahan, Beatty, Becker, Beier, Berge, Bergstrom, Bode, Bogan, Borer, Bosco, Botsford, Boyer, Boyle, Braun, Bruen, Carroll, Carter, Cartwright, Casper, Cassin, Champlin, Christiansen, Cole, Collier, Collins, Connelly, Conroy, Corkery, Cormier, Corwin, Cronin, Crooks, Cruickshank, Cummings, D'amore, Daniel, Dare, Daugherty, Dickens, Dickinson, Dietrich, Donnelly, Dooley, Douglas, Doyle, Durgan, Ebert, Emard, Emmerich, Erdman, Ernser, Fadel, Fahey, Farrell, Fay, Feeney, Feil, Ferry, Fisher, Flatley, Gibson, Gleason, Glover, Goldner, Goodwin, Grady, Grant, Greenfelder, Greenholt, Grimes, Gutmann, Hackett, Hahn, Haley, Hammes, Hand, Hane, Hansen, Harber, Hartmann, Harvey, Hayes, Heaney, Heathcote, Heller, Hermann, Hermiston, Hessel, Hettinger, Hickle, Hill, Hills, Hoppe, Howe, Howell, Hudson, Huel, Hyatt, Jacobi, Jacobs, Jacobson, Jerde, Johns, Keeling, Kemmer, Kessler, Kiehn, Kirlin, Klein, Koch, Koelpin, Kohler, Koss, Kovacek, Kreiger, Kris, Kuhlman, Kuhn, Kulas, Kutch, Lakin, Lang, Langworth, Larkin, Larson, Leannon, Leffler, Little, Lockman, Lowe, Lynch, Mann, Marks, Marvin, Mayer, Mccullough, Mcdermott, Mckenzie, Miller, Mills, Monahan, Morissette, Mueller, Muller, Nader, Nicolas, Nolan, O'connell, O'conner, O'hara, O'keefe, Olson, O'reilly, Parisian, Parker, Quigley, Reilly, Reynolds, Rice, Ritchie, Rohan, Rolfson, Rowe, Russel, Rutherford, Sanford, Sauer, Schmidt, Schmitt, Schneider, Schroeder, Schultz, Shields, Smitham, Spencer, Stanton, Stark, Stokes, Swift, Tillman, Towne, Tremblay, Tromp, Turcotte, Turner, Walsh, Walter, Ward, Waters, Weber, Welch, West, Wilderman, Wilkinson, Williamson, Windler, Wolf]
|
||||
last_name: [Smith, Jones, Williams, Brown, Wilson, Taylor, Johnson, White, Martin, Anderson, Thompson, Nguyen, Thomas, Walker, Harris, Lee, Ryan, Robinson, Kelly, King, Davis, Wright, Evans, Roberts, Green, Hall, Wood, Jackson, Clarke, Patel, Khan, Lewis, James, Phillips, Mason, Mitchell, Rose, Davies, Rodriguez, Cox, Alexander, Garden, Campbell, Johnston, Moore, Smyth, O'neill, Doherty, Stewart, Quinn, Murphy, Graham, Mclaughlin, Hamilton, Murray, Hughes, Robertson, Thomson, Scott, Macdonald, Reid, Clark, Ross, Young, Watson, Paterson, Morrison, Morgan, Griffiths, Edwards, Rees, Jenkins, Owen, Price, Moss, Richards, Abbott, Adams, Armstrong, Bahringer, Bailey, Barrows, Bartell, Bartoletti, Barton, Bauch, Baumbach, Bayer, Beahan, Beatty, Becker, Beier, Berge, Bergstrom, Bode, Bogan, Borer, Bosco, Botsford, Boyer, Boyle, Braun, Bruen, Carroll, Carter, Cartwright, Casper, Cassin, Champlin, Christiansen, Cole, Collier, Collins, Connelly, Conroy, Corkery, Cormier, Corwin, Cronin, Crooks, Cruickshank, Cummings, D'amore, Daniel, Dare, Daugherty, Dickens, Dickinson, Dietrich, Donnelly, Dooley, Douglas, Doyle, Durgan, Ebert, Emard, Emmerich, Erdman, Ernser, Fadel, Fahey, Farrell, Fay, Feeney, Feil, Ferry, Fisher, Flatley, Gibson, Gleason, Glover, Goldner, Goodwin, Grady, Grant, Greenfelder, Greenholt, Grimes, Gutmann, Hackett, Hahn, Haley, Hammes, Hand, Hane, Hansen, Harber, Hartmann, Harvey, Hayes, Heaney, Heathcote, Heller, Hermann, Hermiston, Hessel, Hettinger, Hickle, Hill, Hills, Hoppe, Howe, Howell, Hudson, Huel, Hyatt, Jacobi, Jacobs, Jacobson, Jerde, Johns, Keeling, Kemmer, Kessler, Kiehn, Kirlin, Klein, Koch, Koelpin, Kohler, Koss, Kovacek, Kreiger, Kris, Kuhlman, Kuhn, Kulas, Kunde, Kutch, Lakin, Lang, Langworth, Larkin, Larson, Leannon, Leffler, Little, Lockman, Lowe, Lynch, Mann, Marks, Marvin, Mayer, Mccullough, Mcdermott, Mckenzie, Miller, Mills, Monahan, Morissette, Mueller, Muller, Nader, Nicolas, Nolan, O'connell, O'conner, O'hara, O'keefe, Olson, O'reilly, Parisian, Parker, Quigley, Reilly, Reynolds, Rice, Ritchie, Rohan, Rolfson, Rowe, Russel, Rutherford, Sanford, Sauer, Schmidt, Schmitt, Schneider, Schroeder, Schultz, Shields, Smitham, Spencer, Stanton, Stark, Stokes, Swift, Tillman, Towne, Tremblay, Tromp, Turcotte, Turner, Walsh, Walter, Ward, Waters, Weber, Welch, West, Wilderman, Wilkinson, Williamson, Windler, Wolf]
|
||||
company:
|
||||
suffix: [Pty Ltd, and Sons, Corp, Group, Brothers, Partners]
|
||||
internet:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
|
||||
en-MS:
|
||||
faker:
|
||||
name:
|
||||
prefix: [Dato, Datin]
|
||||
malay_male_first_name: [Abu, Ahmad, Malik, Osman, Abdullah, Abu Bakar, Azuan, Sulaiman, Daud, Azizi, Jaafar]
|
||||
malay_female_first_name: [Siti, Aminah, Aiza, Hajar, Sofia, Dahlia, Akma, Nur, Sariha, Syazana, Nuratika, Farah]
|
||||
chinese_male_first_name: [Jin Quan, Wen Jun, Jun Jie, Cheng Han, Tze-Kwang, Jin Leong, Zi Liang, Zhi Ren, Jin Quan, Wen Jun, Chee Hin, Guo Jun, Kai Jie, Kun Qiang,Jun Kiat, Yong Zheng, Yong Jun, Chit Boon, You Ren, Wen Zhong, Yang Shun, Qi Guang, Kang Soon, Wee Heng, Kah Yang, Siew Beng, Jia Woei, Chean Meng, Wai Kay, Keng Hua, Yew Meng, Cheng Wen, Jiun Wei, Yee Sian, Shao Hong, Bin Shen, Wing Yiu, Ee Hong, Yu Pyn, Yong Sheng, Jun Peng, Jia Jie, Guang Yi, Si Heng, Wei Hou, Kang Sheng, Hong Ern, Jia Liang, Wei Lip, Wee Chen, Wee Leng, Yu Xi, Ming Yang, Wen Hao, Siang Meng, Mong Li, Ghim Huat, Jun Yi, Jie Kai, Zhiming, Wei Jie, Teng Qing, Wei Jian, Wei Kwan, Chee Chin]
|
||||
chinese_male_last_name: [Tan, Lim, Lee, Ng, Ong, Wong, Goh, Chua, Chan, Koh, Teo, Ang, Yeo, Tay, Ho, Low]
|
||||
chinese_female_first_name: [Xiu Yi, Wai Teng, Sing Yee, Jing Yi, Jia Yee, Jia Xuan, Shu En, Pei Ying, Pei Yu, Pih Foung, Li-ann, Shi Xuan, Yi Xuan, Shu En, Yi Xin, Hui Juan, Yu En, Yihui, Xin Yi, Yun Xuan, Xuan Xuan]
|
||||
first_name:
|
||||
- "#{malay_male_first_name}"
|
||||
- "#{malay_female_first_name}"
|
||||
- "#{chinese_male_first_name}"
|
||||
- "#{chinese_female_first_name}"
|
||||
name:
|
||||
- "#{malay_male_first_name} bin #{malay_male_first_name}"
|
||||
- "#{malay_female_first_name} binti #{malay_male_first_name}"
|
||||
- "#{chinese_male_last_name} #{chinese_male_first_name}"
|
||||
- "#{chinese_female_first_name} #{chinese_male_first_name}"
|
||||
- "#{prefix} #{malay_male_first_name} bin #{malay_male_first_name}"
|
||||
- "#{prefix} #{malay_female_first_name} binti #{malay_male_first_name}"
|
||||
- "#{prefix} #{chinese_male_last_name} #{chinese_male_first_name}"
|
||||
- "#{prefix} #{chinese_female_first_name} #{chinese_male_first_name}"
|
||||
address:
|
||||
city_name: [Subang Jaya, Kuala Lumpur, Johor Bahru, Ipoh, Klang, Seberang Perai, Ampang, Georgetown, Gombak, Kuching, Shah Alam, Seremban, Petaling Jaya, Cheras, Bandaraya Melaka, Kota Bharu, Kota Kinabalu, Kuantan, Sungai Petani, Kajang, Batu Pahat, Tawau, Sandakan, Alor Setar, Kuala Terengganu, Taiping, Miri, Kluang, Kulim, Selayang, Kulai, Sibu, Muar, Manjung, Perlis, Kubang Pasu, Sepang, Teluk Intan, Lahad Datu, Kota Tinggi, Segamat, Pasir Mas, Bintulu, Alor Gajah, Kerian, Batang Padang, Keningau, Kemaman, Temerloh, Kuala Kangsar, Pontian, Dungun, Tumpat, Kinabatangan, Besut, Semporna, Ledang, Baling, Jasin, Bachok, Papar, Penampang, Tanah Merah, Bentong, Pasir Puteh, Jempol, Maran, Port Dickson, Rompin, Pekan, Kuala Krai, Beluran, Sabak Bernam, Tuaran, Perak Tengah, Bera, Marang, Ranau, Raub, Pendang, Langkawi, Kota Belud, Machang, Serian, Hulu Perak, Jerantut, Gua Musang, Lipis, Samarahan, Labuan, Kudat, Tampin, Putrajaya, Hulu Terengganu, Mersing, Yan, Kota Marudu, Sik, Sri Aman, Beaufort, Kuala Pilah, Marudi, Kuala Nerang, Kunak, Betong, Sarikei, Tenom, Kapit, Putatan, Setiu, Bau, Pokok Sena, Limbang, Saratok, Rembau, Mukah, Bandar Baharu, Jeli, Simunjan, Jelebu, Pitas, Cameron Highlands, Lawas, Tambunan, Tongod, Belaga, Sipitang, Lundu, Nabawan, Asajaya, Daro, Tatau, Maradong, Kanowit, Lubok Antu, Selangau, Song, Kuala Penyu, Dalat, Matu, Julau, Pakan, Padawan, Lojing, Kampa, Muallim]
|
||||
city:
|
||||
- "#{city_name}"
|
||||
province: [Johor, Kedah, Kelantan, Melaka, Negeri Sembilan, Pahang, Pulau Pinang, Perak, Perlis, Selangor, Terengganu, Sabah, Sarawak, WP Kuala Lumpur, WP Labuan, WP Putrajaya]
|
||||
postcode: ['#####']
|
||||
building_number: ['##']
|
||||
street_prefix: [Jalan, Lorong, Pinggiran, Medan, Persiaran, Selekoh, Persisiran, Perkarangan, Pengkalan, Lurah, Lintang, Lingkungan, Lingkaran, Lengkung, Lengkok, Lebuhraya, Lebuh, Langgak, Laman, Halaman, Gerbang, Dataran, Bulatan, Laluan]
|
||||
street_title: [Makmur, Bukit Bintang, Bangsar, Chow Kit, Hang Jebat, Hang Tuah, Kinabalu, Kuching, Maharajalela, Masjid India, Istana, Pudu]
|
||||
street_name:
|
||||
- "#{street_prefix} #{street_title}"
|
||||
street_address:
|
||||
- "No. #{building_number}, #{street_name}"
|
||||
default_country: [Malaysia]
|
||||
phone_number:
|
||||
formats: ['03#######', '+601########']
|
||||
bank:
|
||||
name: [Affin Bank Berhad, Agro Bank Berhad, Alliance Bank Malaysia Berhad, AmBank Berhad, Bank Islam Berhad, Bank Muamalat Berhad, Bank Rakyat Berhad, Bank Simpanan Nasional, CIMB Bank Berhad, Hong Leong Bank Berhad, Malayan Banking Berhad, Public Bank Berhad, RHB Bank Berhad, Tabung Haji]
|
||||
+41008
-52
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,575 @@
|
||||
en:
|
||||
faker:
|
||||
address:
|
||||
city_prefix: [North, East, West, South, New, Lake, Port]
|
||||
city_suffix: [town, ton, land, ville, berg, burgh, borough, bury, view, port, mouth, stad, furt, chester, mouth, fort, haven, side, shire]
|
||||
country: [Afghanistan, Albania, Algeria, American Samoa, Andorra, Angola, Anguilla, Antarctica (the territory South of 60 deg S), Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Bosnia and Herzegovina, Botswana, Bouvet Island (Bouvetoya), Brazil, British Indian Ocean Territory (Chagos Archipelago), Brunei Darussalam, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Cayman Islands, Central African Republic, Chad, Chile, China, Christmas Island, Cocos (Keeling) Islands, Colombia, Comoros, Congo, Congo, Cook Islands, Costa Rica, Cote d'Ivoire, Croatia, Cuba, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Faroe Islands, Falkland Islands (Malvinas), Fiji, Finland, France, French Guiana, French Polynesia, French Southern Territories, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Heard Island and McDonald Islands, Holy See (Vatican City State), Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Iraq, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, Democratic People's Republic of Korea, Republic of Korea, Kuwait, Kyrgyz Republic, Lao People's Democratic Republic, Latvia, Lebanon, Lesotho, Liberia, Libyan Arab Jamahiriya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Marshall Islands, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Moldova, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands Antilles, Netherlands, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Niue, Norfolk Island, Northern Mariana Islands, Norway, Oman, Pakistan, Palau, Palestinian Territory, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Pitcairn Islands, Poland, Portugal, Puerto Rico, Qatar, Reunion, Romania, Russian Federation, Rwanda, Saint Barthelemy, Saint Helena, Saint Kitts and Nevis, Saint Lucia, Saint Martin, Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Sao Tome and Principe, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Slovakia (Slovak Republic), Slovenia, Solomon Islands, Somalia, South Africa, South Georgia and the South Sandwich Islands, Spain, Sri Lanka, Sudan, Suriname, Svalbard & Jan Mayen Islands, Swaziland, Sweden, Switzerland, Syrian Arab Republic, Taiwan, Tajikistan, Tanzania, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Turks and Caicos Islands, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom, United States of America, United States Minor Outlying Islands, Uruguay, Uzbekistan, Vanuatu, Venezuela, Vietnam, 'Virgin Islands, British', 'Virgin Islands, U.S.', Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe]
|
||||
country_by_code:
|
||||
AF: "Afghanistan"
|
||||
AL: "Albania"
|
||||
DZ: "Algeria"
|
||||
AS: "American Samoa"
|
||||
AD: "Andorra"
|
||||
AO: "Angola"
|
||||
AI: "Anguilla"
|
||||
AQ: "Antarctica"
|
||||
AG: "Antigua And Barbuda"
|
||||
AR: "Argentina"
|
||||
AM: "Armenia"
|
||||
AW: "Aruba"
|
||||
AU: "Australia"
|
||||
AT: "Austria"
|
||||
AZ: "Azerbaijan"
|
||||
BS: "Bahamas"
|
||||
BH: "Bahrain"
|
||||
BD: "Bangladesh"
|
||||
BB: "Barbados"
|
||||
BY: "Belarus"
|
||||
BE: "Belgium"
|
||||
BZ: "Belize"
|
||||
BJ: "Benin"
|
||||
BM: "Bermuda"
|
||||
BT: "Bhutan"
|
||||
BO: "Bolivia"
|
||||
BA: "Bosnia And Herzegovina"
|
||||
BW: "Botswana"
|
||||
BV: "Bouvet Island"
|
||||
BR: "Brazil"
|
||||
IO: "British Indian Ocean Territory"
|
||||
BN: "Brunei Darussalam"
|
||||
BG: "Bulgaria"
|
||||
BF: "Burkina Faso"
|
||||
BI: "Burundi"
|
||||
KH: "Cambodia"
|
||||
CM: "Cameroon"
|
||||
CA: "Canada"
|
||||
CV: "Cape Verde"
|
||||
KY: "Cayman Islands"
|
||||
CF: "Central African Republic"
|
||||
TD: "Chad"
|
||||
CL: "Chile"
|
||||
CN: "China"
|
||||
CX: "Christmas Island"
|
||||
CC: "Cocos (keeling) Islands"
|
||||
CO: "Colombia"
|
||||
KM: "Comoros"
|
||||
CG: "Congo"
|
||||
CD: "Congo, The Democratic Republic Of The"
|
||||
CK: "Cook Islands"
|
||||
CR: "Costa Rica"
|
||||
CI: "Cote D'ivoire"
|
||||
HR: "Croatia"
|
||||
CU: "Cuba"
|
||||
CY: "Cyprus"
|
||||
CZ: "Czech Republic"
|
||||
DK: "Denmark"
|
||||
DJ: "Djibouti"
|
||||
DM: "Dominica"
|
||||
DO: "Dominican Republic"
|
||||
TP: "East Timor"
|
||||
EC: "Ecuador"
|
||||
EG: "Egypt"
|
||||
SV: "El Salvador"
|
||||
GQ: "Equatorial Guinea"
|
||||
ER: "Eritrea"
|
||||
EE: "Estonia"
|
||||
ET: "Ethiopia"
|
||||
FK: "Falkland Islands (malvinas)"
|
||||
FO: "Faroe Islands"
|
||||
FJ: "Fiji"
|
||||
FI: "Finland"
|
||||
FR: "France"
|
||||
GF: "French Guiana"
|
||||
PF: "French Polynesia"
|
||||
TF: "French Southern Territories"
|
||||
GA: "Gabon"
|
||||
GM: "Gambia"
|
||||
GE: "Georgia"
|
||||
DE: "Germany"
|
||||
GH: "Ghana"
|
||||
GI: "Gibraltar"
|
||||
GR: "Greece"
|
||||
GL: "Greenland"
|
||||
GD: "Grenada"
|
||||
GP: "Guadeloupe"
|
||||
GU: "Guam"
|
||||
GT: "Guatemala"
|
||||
GN: "Guinea"
|
||||
GW: "Guinea-bissau"
|
||||
GY: "Guyana"
|
||||
HT: "Haiti"
|
||||
HM: "Heard Island And Mcdonald Islands"
|
||||
VA: "Holy See (vatican City State)"
|
||||
HN: "Honduras"
|
||||
HK: "Hong Kong"
|
||||
HU: "Hungary"
|
||||
IS: "Iceland"
|
||||
IN: "India"
|
||||
ID: "Indonesia"
|
||||
IR: "Iran, Islamic Republic Of"
|
||||
IQ: "Iraq"
|
||||
IE: "Ireland"
|
||||
IL: "Israel"
|
||||
IT: "Italy"
|
||||
JM: "Jamaica"
|
||||
JP: "Japan"
|
||||
JO: "Jordan"
|
||||
KZ: "Kazakstan"
|
||||
KE: "Kenya"
|
||||
KI: "Kiribati"
|
||||
KP: "Korea, Democratic People's Republic Of"
|
||||
KR: "Korea, Republic Of"
|
||||
KV: "Kosovo"
|
||||
KW: "Kuwait"
|
||||
KG: "Kyrgyzstan"
|
||||
LA: "Lao People's Democratic Republic"
|
||||
LV: "Latvia"
|
||||
LB: "Lebanon"
|
||||
LS: "Lesotho"
|
||||
LR: "Liberia"
|
||||
LY: "Libyan Arab Jamahiriya"
|
||||
LI: "Liechtenstein"
|
||||
LT: "Lithuania"
|
||||
LU: "Luxembourg"
|
||||
MO: "Macau"
|
||||
MK: "Macedonia, The Former Yugoslav Republic Of"
|
||||
MG: "Madagascar"
|
||||
MW: "Malawi"
|
||||
MY: "Malaysia"
|
||||
MV: "Maldives"
|
||||
ML: "Mali"
|
||||
MT: "Malta"
|
||||
MH: "Marshall Islands"
|
||||
MQ: "Martinique"
|
||||
MR: "Mauritania"
|
||||
MU: "Mauritius"
|
||||
YT: "Mayotte"
|
||||
MX: "Mexico"
|
||||
FM: "Micronesia, Federated States Of"
|
||||
MD: "Moldova, Republic Of"
|
||||
MC: "Monaco"
|
||||
MN: "Mongolia"
|
||||
MS: "Montserrat"
|
||||
ME: "Montenegro"
|
||||
MA: "Morocco"
|
||||
MZ: "Mozambique"
|
||||
MM: "Myanmar"
|
||||
NA: "Namibia"
|
||||
NR: "Nauru"
|
||||
NP: "Nepal"
|
||||
NL: "Netherlands"
|
||||
AN: "Netherlands Antilles"
|
||||
NC: "New Caledonia"
|
||||
NZ: "New Zealand"
|
||||
NI: "Nicaragua"
|
||||
NE: "Niger"
|
||||
NG: "Nigeria"
|
||||
NU: "Niue"
|
||||
NF: "Norfolk Island"
|
||||
MP: "Northern Mariana Islands"
|
||||
NO: "Norway"
|
||||
OM: "Oman"
|
||||
PK: "Pakistan"
|
||||
PW: "Palau"
|
||||
PS: "Palestinian Territory, Occupied"
|
||||
PA: "Panama"
|
||||
PG: "Papua New Guinea"
|
||||
PY: "Paraguay"
|
||||
PE: "Peru"
|
||||
PH: "Philippines"
|
||||
PN: "Pitcairn"
|
||||
PL: "Poland"
|
||||
PT: "Portugal"
|
||||
PR: "Puerto Rico"
|
||||
QA: "Qatar"
|
||||
RE: "Reunion"
|
||||
RO: "Romania"
|
||||
RU: "Russian Federation"
|
||||
RW: "Rwanda"
|
||||
SH: "Saint Helena"
|
||||
KN: "Saint Kitts And Nevis"
|
||||
LC: "Saint Lucia"
|
||||
PM: "Saint Pierre And Miquelon"
|
||||
VC: "Saint Vincent And The Grenadines"
|
||||
WS: "Samoa"
|
||||
SM: "San Marino"
|
||||
ST: "Sao Tome And Principe"
|
||||
SA: "Saudi Arabia"
|
||||
SN: "Senegal"
|
||||
RS: "Serbia"
|
||||
SC: "Seychelles"
|
||||
SL: "Sierra Leone"
|
||||
SG: "Singapore"
|
||||
SK: "Slovakia"
|
||||
SI: "Slovenia"
|
||||
SB: "Solomon Islands"
|
||||
SO: "Somalia"
|
||||
ZA: "South Africa"
|
||||
GS: "South Georgia And The South Sandwich Islands"
|
||||
ES: "Spain"
|
||||
LK: "Sri Lanka"
|
||||
SD: "Sudan"
|
||||
SR: "Suriname"
|
||||
SJ: "Svalbard And Jan Mayen"
|
||||
SZ: "Swaziland"
|
||||
SE: "Sweden"
|
||||
CH: "Switzerland"
|
||||
SY: "Syrian Arab Republic"
|
||||
TW: "Taiwan, Province Of China"
|
||||
TJ: "Tajikistan"
|
||||
TZ: "Tanzania, United Republic Of"
|
||||
TH: "Thailand"
|
||||
TG: "Togo"
|
||||
TK: "Tokelau"
|
||||
TO: "Tonga"
|
||||
TT: "Trinidad And Tobago"
|
||||
TN: "Tunisia"
|
||||
TR: "Turkey"
|
||||
TM: "Turkmenistan"
|
||||
TC: "Turks And Caicos Islands"
|
||||
TV: "Tuvalu"
|
||||
UG: "Uganda"
|
||||
UA: "Ukraine"
|
||||
AE: "United Arab Emirates"
|
||||
GB: "United Kingdom"
|
||||
US: "United States"
|
||||
UM: "United States Minor Outlying Islands"
|
||||
UY: "Uruguay"
|
||||
UZ: "Uzbekistan"
|
||||
VU: "Vanuatu"
|
||||
VE: "Venezuela"
|
||||
VN: "Viet Nam"
|
||||
VG: "Virgin Islands, British"
|
||||
VI: "Virgin Islands, U.s."
|
||||
WF: "Wallis And Futuna"
|
||||
EH: "Western Sahara"
|
||||
YE: "Yemen"
|
||||
ZM: "Zambia"
|
||||
ZW: "Zimbabwe"
|
||||
country_by_name:
|
||||
afghanistan: "AF"
|
||||
albania: "AB"
|
||||
algeria: "DZ"
|
||||
american_samoa: "AS"
|
||||
andorra: "AD"
|
||||
angola: "AO"
|
||||
anguilla: "AI"
|
||||
antarctica: "AQ"
|
||||
antigua_and_barbuda: "AG"
|
||||
argentina: "AR"
|
||||
armenia: "AM"
|
||||
aruba: "AW"
|
||||
australia: "AU"
|
||||
austria: "AT"
|
||||
azerbaijan: "AZ"
|
||||
bahamas: "BS"
|
||||
bahrain: "BH"
|
||||
bangladesh: "BD"
|
||||
barbados: "BB"
|
||||
belarus: "BY"
|
||||
belgium: "BE"
|
||||
belize: "BZ"
|
||||
benin: "BJ"
|
||||
bermuda: "BM"
|
||||
bhutan: "BT"
|
||||
bolivia: "BO"
|
||||
bosnia_and_herzegovina: "BA"
|
||||
botswana: "BW"
|
||||
bouvet_island: "BV"
|
||||
brazil: "BR"
|
||||
british_indian_ocean_territory: "IO"
|
||||
brunei_darussalam: "BN"
|
||||
bulgaria: "BG"
|
||||
burkina_faso: "BF"
|
||||
burundi: "BI"
|
||||
cambodia: "KH"
|
||||
cameroon: "CM"
|
||||
canada: "CA"
|
||||
cape_verde: "CV"
|
||||
cayman_islands: "KY"
|
||||
central_african_republic: "CF"
|
||||
chad: "TD"
|
||||
chile: "CL"
|
||||
china: "CN"
|
||||
christmas_island: "CX"
|
||||
cocos_islands: "CC"
|
||||
colombia: "CO"
|
||||
comoros: "KM"
|
||||
congo: "CG"
|
||||
cook_islands: "CK"
|
||||
costa_rica: "CR"
|
||||
cote_d_ivoire: "CI"
|
||||
croatia: "HR"
|
||||
cuba: "CU"
|
||||
cyprus: "CY"
|
||||
czech_republic: "CZ"
|
||||
denmark: "DK"
|
||||
djibouti: "DJ"
|
||||
dominica: "DM"
|
||||
dominican_republic: "DO"
|
||||
east_timor: "TP"
|
||||
ecuador: "EC"
|
||||
egypt: "EG"
|
||||
el_salvador: "SV"
|
||||
equatorial_guinea: "GQ"
|
||||
eritrea: "ER"
|
||||
estonia: "EE"
|
||||
ethiopia: "ET"
|
||||
falkland_islands: "FK"
|
||||
malvinas: "FK"
|
||||
faroe_islands: "FO"
|
||||
fiji: "FJ"
|
||||
finland: "FI"
|
||||
france: "FR"
|
||||
french_guiana: "GF"
|
||||
french_polynesia: "PF"
|
||||
french_southern_territories: "TF"
|
||||
gabon: "GA"
|
||||
gambia: "GM"
|
||||
georgia: "GE"
|
||||
germany: "DE"
|
||||
ghana: "GH:"
|
||||
gibraltar: "GI"
|
||||
greece: "GR"
|
||||
greenland: "GL"
|
||||
grenada: "GD"
|
||||
guadeloupe: "GP"
|
||||
guam: "GU"
|
||||
guatemala: "GT"
|
||||
guinea: "GN"
|
||||
guinea_bissau: "GW"
|
||||
guyana: "GY"
|
||||
haiti: "HT"
|
||||
heard_island_and_mcdonald_islands: "HM"
|
||||
holy_see: "VA"
|
||||
honduras: "HN"
|
||||
hong_kong: "HK"
|
||||
hungary: "HU"
|
||||
iceland: "IS"
|
||||
india: "IN"
|
||||
indonesia: "ID"
|
||||
ir_islamic_republic_of: "IR"
|
||||
iraq: "IQ"
|
||||
ireland: "IE"
|
||||
israel: "IL"
|
||||
italy: "IT"
|
||||
jamaica: "JM"
|
||||
japan: "JP"
|
||||
jordan: "JO"
|
||||
kazakstan: "KZ"
|
||||
kenya: "KE"
|
||||
kiribati: "KI"
|
||||
korea_democratic_people_s_republic_of: "KP"
|
||||
korea_republic_of: "KR"
|
||||
kosovo: "KV"
|
||||
kuwait: "KW"
|
||||
kyrgyzstan: "KG"
|
||||
lao_people_s_democratic_republic: "LA"
|
||||
latvia: "LV"
|
||||
lebanon: "LB"
|
||||
lesotho: "LS"
|
||||
liberia: "LR"
|
||||
libyan_arab_jamahiriya: "LY"
|
||||
liechtenstein: "LI"
|
||||
lithuania: "LT"
|
||||
luxembourg: "LU"
|
||||
macau: "MO"
|
||||
macedonia_the_former_yugoslav_republic_of: "MK"
|
||||
madagascar: "MG"
|
||||
malawi: "MW"
|
||||
malaysia: "MY"
|
||||
maldives: "MV"
|
||||
mali: "ML"
|
||||
malta: "MT"
|
||||
marshall_islands: "MH"
|
||||
martinique: "MQ"
|
||||
mauritania: "MR"
|
||||
mauritius: "MU"
|
||||
mayotte: "YT"
|
||||
mexicoMX: ""
|
||||
micronesia_federated_states_of: "FM"
|
||||
moldova_republic_of: "MD"
|
||||
monaco: "MC"
|
||||
mongolia: "MN"
|
||||
montserrat: "MS"
|
||||
montenegro: "ME"
|
||||
morocco: "MA"
|
||||
mozambique: "MZ"
|
||||
myanmar: "MM"
|
||||
namibia: "NA"
|
||||
nauru: "NR"
|
||||
nepal: "NP"
|
||||
netherlands: "NL"
|
||||
netherlands_antilles: "AN"
|
||||
new_caledonia: "NC"
|
||||
new_zealand: "NZ"
|
||||
nicaragua: "NI"
|
||||
niger: "NE"
|
||||
nigeria: "NG"
|
||||
niue: "NU"
|
||||
norfolk_island: "NF"
|
||||
northern_mariana_islands: "NP"
|
||||
norway: "NP"
|
||||
oman: "OM"
|
||||
pakistan: "PK"
|
||||
palau: "PW"
|
||||
palestinian_territory_occupied: "PS"
|
||||
panama: "PA"
|
||||
papua_new_guinea: "PG"
|
||||
paraguay: "PY"
|
||||
peru: "PE"
|
||||
philippines: "PH"
|
||||
pitcairn: "PN"
|
||||
poland: "PL"
|
||||
portugal: "PT"
|
||||
puerto_rico: "PR"
|
||||
qatar: "QA"
|
||||
reunion: "RE"
|
||||
romania: "RO"
|
||||
russian_federation: "RU"
|
||||
rwanda: "RW"
|
||||
saint_helena: "SH"
|
||||
saint_kitts_and_nevis: "KN"
|
||||
saint_lucia: "LC"
|
||||
saint_pierre_and_miquelon: "PM"
|
||||
saint_vincent_and_the_grenadines: "VC"
|
||||
samoa: "WS"
|
||||
san_marino: "SM"
|
||||
sao_tome_and_principe: "ST"
|
||||
saudi_arabia: "SA"
|
||||
senegal: "SN"
|
||||
serbia: "RS"
|
||||
seychelles: "SC"
|
||||
sierra_leone: "SL"
|
||||
singapore: "SG"
|
||||
slovakia: "SK"
|
||||
slovenia: "SI"
|
||||
solomon Islands: "SB"
|
||||
somalia: "SO"
|
||||
south_africa: "ZA"
|
||||
south_georgia_and_the_south_sandwich_islands: "GS"
|
||||
spain: "ES"
|
||||
sri_lanka: "LK"
|
||||
sudan: "SD"
|
||||
suriname: "SR"
|
||||
svalbard_and_jan_mayen: "SJ"
|
||||
swaziland: "SZ"
|
||||
sweden: "SE"
|
||||
switzerland: "CH"
|
||||
syrian_arab_republic: "SY"
|
||||
taiwan_province_of_china: "TW"
|
||||
tajikistan: "TJ"
|
||||
tanzania_united_republic_of: "TZ"
|
||||
thailand: "TH"
|
||||
togo: "TG"
|
||||
tokelau: "TK"
|
||||
tonga: "TO"
|
||||
trinidad_and_tobago: "TT"
|
||||
tunisia: "TN"
|
||||
turkey: "TR"
|
||||
turkmenistan: "TM"
|
||||
turks_and_caicos_islands: "TC"
|
||||
tuvalu: "TV"
|
||||
uganda: "UG"
|
||||
ukraine: "UA"
|
||||
united_arab_emirates: ""
|
||||
united_kingdom: "GB"
|
||||
united_states: "US"
|
||||
united_states_minor_outlying_islands: "UM"
|
||||
uruguay: "UY"
|
||||
uzbekistan: "UZ"
|
||||
vanuatu: "VU"
|
||||
venezuela: "VE"
|
||||
viet_nam: "VN"
|
||||
virgin_islands_british: "VG"
|
||||
virgin_islands_u_s_: "VI"
|
||||
wallis And Futuna: "WF"
|
||||
western_sahara: "EH"
|
||||
yemen: "YE"
|
||||
zambia: "ZM"
|
||||
zimbabwe: "ZW"
|
||||
country_code: ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"]
|
||||
country_code_long: ["ABW", "AFG", "AGO", "AIA", "ALA", "ALB", "AND", "ARE", "ARG", "ARM", "ASM", "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", "BEL", "BEN", "BES", "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", "BOL", "BRA", "BRB", "BRN", "BTN", "BVT", "BWA", "CAF", "CAN", "CCK", "CHE", "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", "COL", "COM", "CPV", "CRI", "CUB", "CUW", "CXR", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI", "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", "GNQ", "GRC", "GRD", "GRL", "GTM", "GUF", "GUM", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", "KGZ", "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", "MLI", "MLT", "MMR", "MNE", "MNG", "MNP", "MOZ", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", "NPL", "NRU", "NZL", "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SDN", "SEN", "SGP", "SGS", "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "SSD", "STP", "SUR", "SVK", "SVN", "SWE", "SWZ", "SXM", "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKL", "TKM", "TLS", "TON", "TTO", "TUN", "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "YEM", "ZAF", "ZMB", "ZWE"]
|
||||
building_number: ['#####', '####', '###']
|
||||
community_prefix: [Park, Summer, Autumn, Paradise, Eagle, Pine, Royal, University, Willow]
|
||||
community_suffix: [Village, Creek, Place, Pointe, Square, Oaks, Gardens, Crossing, Court, Acres, Estates, Heights]
|
||||
community:
|
||||
- "#{community_prefix} #{community_suffix}"
|
||||
street_suffix: [Alley, Avenue, Branch, Bridge, Brook, Brooks, Burg, Burgs, Bypass, Camp, Canyon, Cape, Causeway, Center, Centers, Circle, Circles, Cliff, Cliffs, Club, Common, Corner, Corners, Course, Court, Courts, Cove, Coves, Creek, Crescent, Crest, Crossing, Crossroad, Curve, Dale, Dam, Divide, Drive, Drive, Drives, Estate, Estates, Expressway, Extension, Extensions, Fall, Falls, Ferry, Field, Fields, Flat, Flats, Ford, Fords, Forest, Forge, Forges, Fork, Forks, Fort, Freeway, Garden, Gardens, Gateway, Glen, Glens, Green, Greens, Grove, Groves, Harbor, Harbors, Haven, Heights, Highway, Hill, Hills, Hollow, Inlet, Inlet, Island, Island, Islands, Islands, Isle, Isle, Junction, Junctions, Key, Keys, Knoll, Knolls, Lake, Lakes, Land, Landing, Lane, Light, Lights, Loaf, Lock, Locks, Locks, Lodge, Lodge, Loop, Mall, Manor, Manors, Meadow, Meadows, Mews, Mill, Mills, Mission, Mission, Motorway, Mount, Mountain, Mountain, Mountains, Mountains, Neck, Orchard, Oval, Overpass, Park, Parks, Parkway, Parkways, Pass, Passage, Path, Pike, Pine, Pines, Place, Plain, Plains, Plains, Plaza, Plaza, Point, Points, Port, Port, Ports, Ports, Prairie, Prairie, Radial, Ramp, Ranch, Rapid, Rapids, Rest, Ridge, Ridges, River, Road, Road, Roads, Roads, Route, Row, Rue, Run, Shoal, Shoals, Shore, Shores, Skyway, Spring, Springs, Springs, Spur, Spurs, Square, Square, Squares, Squares, Station, Station, Stravenue, Stravenue, Stream, Stream, Street, Street, Streets, Summit, Summit, Terrace, Throughway, Trace, Track, Trafficway, Trail, Trail, Tunnel, Tunnel, Turnpike, Turnpike, Underpass, Union, Unions, Valley, Valleys, Via, Viaduct, View, Views, Village, Village, Villages, Ville, Vista, Vista, Walk, Walks, Wall, Way, Ways, Well, Wells]
|
||||
secondary_address: ['Apt. ###', 'Suite ###']
|
||||
# Though these are US-specific, they are here (in the default locale) for backwards compatibility
|
||||
postcode: ['#####', '#####-####']
|
||||
postcode_by_state:
|
||||
AL: '350##'
|
||||
AK: '995##'
|
||||
AS: '967##'
|
||||
AZ: '850##'
|
||||
AR: '717##'
|
||||
CA: '900##'
|
||||
CO: '800##'
|
||||
CT: '061##'
|
||||
DC: '204##'
|
||||
DE: '198##'
|
||||
FL: '322##'
|
||||
GA: '301##'
|
||||
HI: '967##'
|
||||
ID: '832##'
|
||||
IL: '600##'
|
||||
IN: '463##'
|
||||
IA: '510##'
|
||||
KS: '666##'
|
||||
KY: '404##'
|
||||
LA: '701##'
|
||||
ME: '042##'
|
||||
MD: '210##'
|
||||
MA: '026##'
|
||||
MI: '480##'
|
||||
MN: '555##'
|
||||
MS: '387##'
|
||||
MO: '650##'
|
||||
MT: '590##'
|
||||
NE: '688##'
|
||||
NV: '898##'
|
||||
NH: '036##'
|
||||
NJ: '076##'
|
||||
NM: '880##'
|
||||
NY: '122##'
|
||||
NC: '288##'
|
||||
ND: '586##'
|
||||
OH: '444##'
|
||||
OK: '730##'
|
||||
OR: '979##'
|
||||
PA: '186##'
|
||||
RI: '029##'
|
||||
SC: '299##'
|
||||
SD: '577##'
|
||||
TN: '383##'
|
||||
TX: '798##'
|
||||
UT: '847##'
|
||||
VT: '050##'
|
||||
VA: '222##'
|
||||
WA: '990##'
|
||||
WV: '247##'
|
||||
WI: '549##'
|
||||
WY: '831##'
|
||||
state: [Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming]
|
||||
state_abbr: [AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY]
|
||||
time_zone: [Pacific/Midway, Pacific/Pago_Pago, Pacific/Honolulu, America/Juneau, America/Los_Angeles, America/Tijuana, America/Denver, America/Phoenix, America/Chihuahua, America/Mazatlan, America/Chicago, America/Regina, America/Mexico_City, America/Mexico_City, America/Monterrey, America/Guatemala, America/New_York, America/Indiana/Indianapolis, America/Bogota, America/Lima, America/Lima, America/Halifax, America/Caracas, America/La_Paz, America/Santiago, America/St_Johns, America/Sao_Paulo, America/Argentina/Buenos_Aires, America/Guyana, America/Godthab, Atlantic/South_Georgia, Atlantic/Azores, Atlantic/Cape_Verde, Europe/Dublin, Europe/London, Europe/Lisbon, Europe/London, Africa/Casablanca, Africa/Monrovia, Etc/UTC, Europe/Belgrade, Europe/Bratislava, Europe/Budapest, Europe/Ljubljana, Europe/Prague, Europe/Sarajevo, Europe/Skopje, Europe/Warsaw, Europe/Zagreb, Europe/Brussels, Europe/Copenhagen, Europe/Madrid, Europe/Paris, Europe/Amsterdam, Europe/Berlin, Europe/Berlin, Europe/Rome, Europe/Stockholm, Europe/Vienna, Africa/Algiers, Europe/Bucharest, Africa/Cairo, Europe/Helsinki, Europe/Kiev, Europe/Riga, Europe/Sofia, Europe/Tallinn, Europe/Vilnius, Europe/Athens, Europe/Istanbul, Europe/Minsk, Asia/Jerusalem, Africa/Harare, Africa/Johannesburg, Europe/Moscow, Europe/Moscow, Europe/Moscow, Asia/Kuwait, Asia/Riyadh, Africa/Nairobi, Asia/Baghdad, Asia/Tehran, Asia/Muscat, Asia/Muscat, Asia/Baku, Asia/Tbilisi, Asia/Yerevan, Asia/Kabul, Asia/Yekaterinburg, Asia/Karachi, Asia/Karachi, Asia/Tashkent, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kolkata, Asia/Kathmandu, Asia/Dhaka, Asia/Dhaka, Asia/Colombo, Asia/Almaty, Asia/Novosibirsk, Asia/Rangoon, Asia/Bangkok, Asia/Bangkok, Asia/Jakarta, Asia/Krasnoyarsk, Asia/Shanghai, Asia/Chongqing, Asia/Hong_Kong, Asia/Urumqi, Asia/Kuala_Lumpur, Asia/Singapore, Asia/Taipei, Australia/Perth, Asia/Irkutsk, Asia/Ulaanbaatar, Asia/Seoul, Asia/Tokyo, Asia/Tokyo, Asia/Tokyo, Asia/Yakutsk, Australia/Darwin, Australia/Adelaide, Australia/Melbourne, Australia/Melbourne, Australia/Sydney, Australia/Brisbane, Australia/Hobart, Asia/Vladivostok, Pacific/Guam, Pacific/Port_Moresby, Asia/Magadan, Asia/Magadan, Pacific/Noumea, Pacific/Fiji, Asia/Kamchatka, Pacific/Majuro, Pacific/Auckland, Pacific/Auckland, Pacific/Tongatapu, Pacific/Fakaofo, Pacific/Apia]
|
||||
city_name:
|
||||
- "#{city}"
|
||||
city:
|
||||
- "#{city_prefix} #{Name.first_name}#{city_suffix}"
|
||||
- "#{city_prefix} #{Name.first_name}"
|
||||
- "#{Name.first_name}#{city_suffix}"
|
||||
- "#{Name.last_name}#{city_suffix}"
|
||||
street_prefix: "xx"
|
||||
street_name:
|
||||
- "#{Name.first_name} #{street_suffix}"
|
||||
- "#{Name.last_name} #{street_suffix}"
|
||||
street_address:
|
||||
- "#{building_number} #{street_name}"
|
||||
full_address:
|
||||
- "#{street_address}, #{city}, #{state_abbr} #{zip_code}"
|
||||
- "#{secondary_address} #{street_address}, #{city}, #{state_abbr} #{zip_code}"
|
||||
default_country: [United States of America]
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
en:
|
||||
faker:
|
||||
ancient:
|
||||
god: ["Aphrodite", "Apollo", "Ares", "Artemis", "Athena", "Demeter", "Dionysus", "Hades", "Hephaestus", "Hera", "Hermes", "Hestia", "Poseidon", "Zeus"]
|
||||
primordial: ["Aion", "Aether", "Ananke", "Chaos", "Chronos", "Erebus", "Eros", "Hypnos", "Nesoi", "Uranus", "Gaia", "Ourea", "Phanes", "Pontus", "Tartarus", "Thalassa", "Thanatos", "Hemera", "Nyx", "Nemesis"]
|
||||
titan: ["Coeus", "Crius", "Cronus", "Hyperion", "Iapetus", "Mnemosyne", "Oceanus", "Phoebe", "Rhea", "Tethys", "Theia", "Themis", "Asteria", "Astraeus", "Atlas", "Aura", "Clymene", "Dione", "Helios", "Selene", "Eos", "Epimetheus", "Eurybia", "Eurynome", "Lelantos", "Leto", "Menoetius", "Metis", "Ophion", "Pallas", "Perses", "Prometheus", "Styx"]
|
||||
hero: ["Abderus", "Achilles", "Aeneas", "Ajax", "Amphitryon", "Antilochus", "Bellerophon", "Castor", "Chrysippus", "Daedalus", "Diomedes", "Eleusis", "Eunostus", "Ganymede", "Hector", "Hercules", "Icarus", "Iolaus", "Jason", "Meleager", "Odysseus", "Orpheus", "Pandion", "Perseus", "Theseus", "Alcestis", "Amymone", "Andromache", "Andromeda", "Antigone", "Arachne", "Ariadne", "Atalanta", "Briseis", "Caeneus", "Cassandra", "Cassiopeia", "Clytemnestra", "Danaë", "Deianeira", "Electra", "Europa", "Hecuba", "Helen", "Hermione", "Iphigenia", "Ismene", "Jocasta", "Medea", "Medusa", "Niobe", "Pandora", "Penelope", "Phaedra", "Polyxena", "Semele", "Thrace"]
|
||||
@@ -0,0 +1,6 @@
|
||||
en:
|
||||
faker:
|
||||
creature:
|
||||
animal:
|
||||
name: ["alligator", "crocodile", "alpaca", "ant", "antelope", "ape", "armadillo", "donkey", "baboon", "badger", "bat", "bear", "beaver", "bee", "beetle", "buffalo", "butterfly", "camel", "water buffalo", "caribou", "cat", "cattle", "cheetah", "chimpanzee", "chinchilla", "cicada", "clam", "cockroach", "cod", "coyote", "crab", "cricket", "crow", "raven", "deer", "dinosaur", "dog", "dolphin", "porpoise", "duck", "eagle", "eel", "elephant", "elk", "ferret", "fish", "fly", "fox", "frog", "toad", "gerbil", "giraffe", "gnat", "gnu ", "wildebeest", "goat", "goldfish", "goose", "gorilla", "grasshopper", "guinea pig", "hamster", "hare", "hedgehog", "herring", "hippopotamus", "hornet", "horse", "hound", "hyena", "impala", "jackal", "jellyfish", "kangaroo ", "wallaby", "koala", "leopard", "lion", "lizard", "llama", "locust", "louse", "macaw", "mallard", "mammoth", "manatee", "marten", "mink", "minnow", "mole", "monkey", "moose", "mosquito", "mouse", "rat", "mule", "muskrat", "otter", "ox", "oyster", "panda", "pig", "platypus", "porcupine", "prairie dog", "pug", "rabbit", "raccoon", "reindeer", "rhinoceros", "salmon", "sardine", "scorpion", "seal ", "sea lion", "serval", "shark", "sheep", "skunk", "snail", "snake", "spider", "squirrel", "swan", "termite", "tiger", "trout", "turtle ", "tortoise", "walrus", "wasp", "weasel", "whale", "wolf", "wombat", "woodchuck", "worm", "yak", "yellowjacket", "zebra"]
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
en:
|
||||
faker:
|
||||
app:
|
||||
name: ['Redhold', 'Treeflex', 'Trippledex', 'Kanlam', 'Bigtax', 'Daltfresh', 'Toughjoyfax', 'Mat Lam Tam', 'Otcom', 'Tres-Zap', 'Y-Solowarm', 'Tresom', 'Voltsillam', 'Biodex', 'Greenlam', 'Viva', 'Matsoft', 'Temp', 'Zoolab', 'Subin', 'Rank', 'Job', 'Stringtough', 'Tin', 'It', 'Home Ing', 'Zamit', 'Sonsing', 'Konklab', 'Alpha', 'Latlux', 'Voyatouch', 'Alphazap', 'Holdlamis', 'Zaam-Dox', 'Sub-Ex', 'Quo Lux', 'Bamity', 'Ventosanzap', 'Lotstring', 'Hatity', 'Tempsoft', 'Overhold', 'Fixflex', 'Konklux', 'Zontrax', 'Tampflex', 'Span', 'Namfix', 'Transcof', 'Stim', 'Fix San', 'Sonair', 'Stronghold', 'Fintone', 'Y-find', 'Opela', 'Lotlux', 'Ronstring', 'Zathin', 'Duobam', 'Keylex', 'Andalax', 'Solarbreeze', 'Cookley', 'Vagram', 'Aerified', 'Pannier', 'Asoka', 'Regrant', 'Wrapsafe', 'Prodder', 'Bytecard', 'Bitchip', 'Veribet', 'Gembucket', 'Cardguard', 'Bitwolf', 'Cardify', 'Domainer', 'Flowdesk', 'Flexidy']
|
||||
version: ['0.#.#', '0.##', '#.##', '#.#', '#.#.#']
|
||||
author:
|
||||
- "#{Name.name}"
|
||||
- "#{Company.name}"
|
||||
@@ -0,0 +1,5 @@
|
||||
en:
|
||||
faker:
|
||||
appliance:
|
||||
brand: ['Admiral','Amana','Blue Star','Bosch','Electrolux','Fagor','Franke','IKEA','KitchenAid','LG','Samsung','Sharp','Siemens','Whirlpool']
|
||||
equipment: ['Air ioniser', 'Air purifier', 'Appliance plug', 'Aroma lamp', 'Attic fan', 'Bachelor griller', 'Back boiler', 'Beverage opener', 'Blender', 'Box mangle', 'Can opener', 'Ceiling fan', 'Central vacuum cleaner', 'Clothes dryer', 'Clothes iron', 'Cold-pressed juicer', 'Combo washer dryer', 'Dish draining closet', 'Dishwasher', 'Domestic robot', 'Drawer dishwasher', 'Electric water boiler', 'Evaporative cooler', 'Exhaust hood', 'Fan heater', 'Flame supervision device', 'Forced-air', 'Futon dryer', 'Garbage disposal unit', 'Gas appliance', 'Go-to-bed matchbox', 'HVAC', 'Hair dryer', 'Hair iron', 'Hob (hearth)', 'Home server', 'Humidifier', 'Icebox', 'Kimchi refrigerator', 'Mangle (machine)', 'Micathermic heater', 'Microwave oven', 'Mousetrap', 'Oil heater', 'Oven', 'Paper shredder', 'Patio heater', 'Radiator (heating)', 'Refrigerator', 'Sewing machine', 'Solar water heater', 'Space heater', 'Steam mop', 'Stove', 'Sump pump', 'Television', 'Tie press', 'Toaster and toaster ovens', 'Trouser press', 'Vacuum cleaner', 'Washing machine', 'Water cooker', 'Water heater', 'Water purifier', 'Window fan']
|
||||
@@ -0,0 +1,4 @@
|
||||
en:
|
||||
faker:
|
||||
aqua_teen_hunger_force:
|
||||
character: ["Carl Brutananadilewski", "Cybernetic Ghost of Christmas Past from the Future", "D.P", "Dr. Weird", "Dr. Wongburger", "Emory", "Err", "Frylock", "George Lowe", "Ignignokt", "Master Shake", "MC Pee Pants", "Meatwad", "Oglethorpe", "Skeeter", "Steve", "Turkatron"]
|
||||
@@ -0,0 +1,4 @@
|
||||
en:
|
||||
faker:
|
||||
artist:
|
||||
names: ["Donatello", "Botticelli", "Michelangelo", "Raphael", "Titian", "Durer", "Caravaggio", "Rubens", "Bernini", "Rembrandt", "Pissarro", "Manet", "Degas", "Cezanne", "Monet", "Renoir", "Cassatt", "Gauguin", "Munch", "Klimt", "Matisse", "Picasso", "Kandinsky", "Chagall", "Seurat", "Magritte", "Escher", "Rothko", "Dali", "Kahlo", "Pollock", "Warhol", "Vettriano", "Da Vinci", "El Greco", "Winslow Homer", "Paul Klee", "Edward Hopper", "Diego Rivera", "Vincent", "Joan Miro", "Ansel Adams"]
|
||||
@@ -0,0 +1,45 @@
|
||||
en:
|
||||
faker:
|
||||
aviation:
|
||||
aircraft: ["An-2", "An-3", "An-8", "An-10", "An-12", "An-24", "An-26", "An-32", "An-38", "An-70", "An-72", "An-74TK", "An-124", "An-225", "Tu-2", "Tu-4", "Tu-16", "Tu-95", "Tu-104", "Tu-114", "Tu-128", "Tu-134", "Tu-144", "Tu-154", "Tu-154M", "Tu-160", "Tu-204", "Tu-214", "Tu-334", "Il-2", "Il-4", "DB-3", "Il-28","Il-38", "Il-76", "Il-86", "Il-96", "Il-112", "Il-114", "Li-2", "Yak-1", "Yak-3", "Yak-9", "Yak-12", "Yak-18A", "Yak-18T", "Yak-52", "Yak-55", "Yak-36", "Yak-38", "Yak-130", "Yak-141", "Yak-152", "Su-2", "Su-7", "Su-7B", "Su-15", "Su-17", "Su-20", "Su-22", "Su-24", "Su-25", "Su-26", "Su-27", "Su-29", "Su-30", "Su-30MK", "Su-30MKI", "Su-32FN", "Su-34", "Su-35", "Su-37", "Su-57", "MiG-1", "MiG-3", "MiG-9", "MiG-15", "MiG-17", "MiG-19", "MiG-21", "MiG-23", "MiG-25", "MiG-29", "MiG-35", "LaGG-3", "La-5", "La-5FN", "La-7", "La-9", "Be-12", "Be-200", "VVA-14", "Cessna-172", "Cessna-182", "Cessna-152", "Cessna-120", "Cessna-140", "Cessna-208", "Mi-8", "Mi-24", "Mi-35", "Mi-17", "Mi-28", "Ka-25", "Ka-27", "Ka-50", "Ka-52", "Po-2", "U-2", "SSJ", "MS-21", "Airbus 300", "Airbus 319", "Airbus 320", "Airbus 321", "Airbus 330", "Airbus 340", "Airbus 350", "Airbus 380", "Boeing 707", "Boeing 727", "Boeing 737", "Boeing 747", "Boeing 757", "Boeing 767", "Boeing 777", "Boeing 787", "C-47", "C-130", "de Havilland Canada DHC-2 Beaver", "de Havilland Canada DHC-6 Twin Otter", "de Havilland Comet", "de Havilland Dragon", "de Havilland Sea Venom", "Piper PA-28 Cherokee", "Piper J-3 Cub", "L-410", "L-29", "L-39", "Zenith STOL CH 701", "Zenair CH 640", "Zmaj Fizir FN", "Zlín Z-50", "Beechcraft Baron", "Beechcraft Queen Air", "Saab 35 Draken", "Saab JAS 39 Gripen", "Dassault Rafale", "Dassault Mirage F1", "Dassault Mirage III", "T-38", "F-4", "F-104", "F-5", "F-105", "F-101", "F-111", "F-15", "F-16", "F-18", "F-117", "F-22", "F-35", "PC-21", "P-39", "P-40", "P-63", "A-5", "A-7", "A-9", "B-25", "B-12", "B-2", "B-52", "Catalina", "Ju-87", "Ju-88", "He-111", "Fw-190", "Bf-109", "Bf-110", "Spitfire", "Hurricane", "Harrier", "Tornado"]
|
||||
airport: ["AGAF", "AGAT", "AYLA", "AYKY", "BGGD", "ULAA", "BIIS", "UEEE", "URWW", "SGAS", "SBSP", "SVMI", "SCRM", "VABB", "ZSPD", "YPPH", "KSFO", "MMLT", "UWKI", "UWWW", "UUBB", "UUOO", "USRR", "USDB", "UELL", "BIBA", "BIPA", "CYAB", "CYBA", "CYKA", "DAAD", "DIBU", "EBAW", "EBBR", "EBCI", "EBKT", "EBLG", "EBOS", "ELLZ", "ELUS", "ENAL", "ENAN", "ENAS", "FAMG", "FAMO", "FAPA", "FAPH", "FAPG", "FAMW", "GANR", "GCLA", "GCHI", "GASK", "GAYE", "GBYD", "GCFV", "HADD", "HADR", "KAAA", "KAPA", "LBIA", "LBPD", "LBPS", "MHAM", "MHCA", "MHCC", "MHCG", "NFCI", "NFCS", "NFFA", "OIBB", "OIAW", "OIAJ", "OIAA", "PAAK", "PAAL", "PAAM", "PAAN", "RJAA", "RJAF", "SAAC", "SAAG", "SAAJ", "TDCF", "TDPD", "TFFA", "VEAP", "VEBT", "VEAB", "VEAN", "WA44", "WAAA", "WAAB", "YABA", "YAGD", "YALA", "ZBAA", "ZBAD", "ZBAL", "ZBAR", "ZBBB", "RJAH"]
|
||||
metar: ["METAR: ULAA 011400Z 17004MPS 120V220 9999 SCT030 18/06 Q1002 R08/190068 NOSIG RMK QFE750/1001",
|
||||
"METAR: BIIS 101100Z 05007KT 9999 FEW025 07/M01 Q1018",
|
||||
"METAR: UEEE 151700Z 18003MPS CAVOK 19/11 Q1006 R23L/09//60 NOSIG RMK QFE746",
|
||||
"METAR: URWW 230800Z 02007MPS 9999 BKN050CB 21/08 Q1010 R06/010070 TEMPO -TSRA BKN030CB",
|
||||
"METAR: VABB 302100Z 02007KT 2100 -RA SCT010 SCT015 FEW030CB OVC080 26/25 Q1002 TEMPO 1500 +RA",
|
||||
"METAR: ZSPD 311400Z 12002MPS 080V190 9999 -SHRA NSC 23/22 Q1008 NOSIG",
|
||||
"METAR: YPPH 011730Z 01004KT CAVOK 09/08 Q1021 NOSIG",
|
||||
"METAR: KSFO 011356Z 25007KT 10SM FEW008 SCT013 SCT200 13/11 A3006 RMK AO2 SLP180 T01330106",
|
||||
"METAR: MMLT 031340Z 16006KT 8SM FEW040 SCT100 28/26 A2984 RMK 8/130 HZY",
|
||||
"METAR: NTAA 140330Z 11004KT 9999 FEW023 SCT300 22/17 Q1014 NOSIG",
|
||||
"METAR: NCRG 130400Z AUTO 10011G23KT 070V160 9999 -RA FEW012/// SCT021/// BKN043/// 20/17 Q1020",
|
||||
"METAR: PTSA 120350Z 25009KT 10SM SCT022 SCT130 BKN300 31/25 A2976 RMK LAST",
|
||||
"METAR: YSSY 110700Z 14009KT 9999 VCSH FEW018 SCT022 BKN034 14/13 Q1035 NOSIG",
|
||||
"METAR: AGGH 102330Z 11002KT 9999 FEW014 23/23 Q1011",
|
||||
"METAR: WSSS 092200Z 15008KT 130V190 9999 FEW020 BKN300 29/24 Q1009 NOSIG",
|
||||
"METAR: UIAA 082000Z AUTO 32002MPS 9999 NCD 16/10 Q1009 RMK QFE698/0931",
|
||||
"METAR: ZSPD 071300Z 13004MPS CAVOK 23/22 Q1001 NOSIG",
|
||||
"METAR: ZYHB 061600Z 20002MPS 4000 BR SCT033 23/20 Q0999 BECMG TL1420 23008MPS -TSRA",
|
||||
"METAR: VVNB 310100Z 13008KT 9999 FEW030 32/25 Q1000 NOSIG",
|
||||
"METAR: OIII 300500Z 18006KT CAVOK 38/02 Q1006 A2973 NOSIG",
|
||||
"METAR: VNKT 291250Z 36004KT 7000 FEW010 SCT030 BKN100 25/22 Q1003 NOSIG",
|
||||
"METAR: ZGKL 280600Z 32002MPS 290V350 9999 SCT043 OVC066 26/25 Q1002 RERA NOSIG",
|
||||
"METAR: UAAA 271730Z 03003MPS 9999 FEW050 30/10 Q1007 R88/CLRD65 NOSIG",
|
||||
"METAR: HECA 261900Z 34008KT CAVOK 33/17 Q1007 NOSIG",
|
||||
"METAR: GOOY 251100Z 24008KT 9999 BKN011 27/22 Q1014",
|
||||
"METAR: OSDI 241330Z 20012KT CAVOK 37/07 Q1006",
|
||||
"METAR: ORBI 231400Z 30016KT CAVOK 45/08 Q0997 NOSIG",
|
||||
"METAR: DAAG 221300Z 02012KT 360V070 6000 FEW026 SCT200 34/24 Q1015",
|
||||
"METAR: DNIB 210500Z 26004KT 9999 SCT009 24/23 Q1013",
|
||||
"METAR: FKYS 202140Z 26005KT 230V300 9999 BKN013 26/22 Q1018 BECMG BKN016",
|
||||
"METAR: FACT 190900Z 01008KT 340V050 CAVOK 17/08 Q1024 NOSIG",
|
||||
"METAR: DIAP 181230Z 22009KT 8000 SCT012 BKN040 27/24 Q1014 TEMPO BKN012",
|
||||
"METAR: SCRM 171300Z 34008KT 0100 FZFG OVC003 M03/M03 Q1006",
|
||||
"METAR: SBSP 161800Z 18008KT 4000 -RA BKN007 SCT015 OVC100 13/11 Q1019",
|
||||
"METAR: SVMI 151204Z 14003KT 9999 SCT016 26/23 Q1013",
|
||||
"METAR: SCIP 011500Z 33009KT 9999 SCT020 20/17 Q1016 NOSIG",
|
||||
"METAR: SKBO 021200Z 05007KT 9999 FEW020 SCT200 11/08 A3037 NOSIG",
|
||||
"METAR: SGAS 031230Z 19007KT 130V220 CAVOK 11/03 Q1028",
|
||||
"METAR: MMCU 041040Z 00000KT 10SM SCT030 BKN080 BKN200 20/15 A3016 RMK 8/572 RTS",
|
||||
"METAR: MMTJ 051141Z 00000KT 5SM OVC013 16/14 A3000 RMK SLP161 54000 918 8/5// HZY"]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user