• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

serpro69/kotlin-faker: https://serpro69.github.io/kotlin-faker/ Generate realist ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

serpro69/kotlin-faker

开源软件地址(OpenSource Url):

https://github.com/serpro69/kotlin-faker

开源编程语言(OpenSource Language):

Kotlin 98.3%

开源软件介绍(OpenSource Introduction):

kotlin-faker

Generates realistically-looking fake data
Just like this fake-logo, but not quite so.
fake-logo

Build Status Maven Central Sonatype Nexus (Snapshots) Issues GitHub Top Lang Awesome Kotlin Licence

About

Port of a popular ruby faker gem written in kotlin. Generates realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data-anonymization purposes.

Usage

Documentation for kotlin-faker is available at serpro69.github.io/kotlin-faker/.

Downloading

Latest releases are always available on maven central.

With gradle

dependencies {
    implementation 'io.github.serpro69:kotlin-faker:$version'
}

With maven

<dependencies>
    <dependency>
        <groupId>io.github.serpro69</groupId>
        <artifactId>kotlin-faker</artifactId>
        <version>${version}</version>
    </dependency>
</dependencies>

Snapshots are also available using the following repository: https://oss.sonatype.org/content/repositories/snapshots/

With gradle

repositories {
    maven {
        url = 'https://oss.sonatype.org/content/repositories/snapshots/'
    }
}

With maven

<repositories>
    <repository>
        <id>sonatype-snapshot</id>
        <name>Sonatype Snapshot</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>

Generating data

val faker = faker { }

faker.name.firstName() // => Ana
faker.address.city() // => New York

CLI

Command line application can be used for a quick lookup of faker functions. See faker-bot README for installation and usage details.

Test

To run unit tests: ./gradlew clean test

To run integration tests: ./gradlew clean integrationTest

Build and Deploy

To deploy to OSS Sonatype repo:

  • set the following properties in ~/.gradle/gradle.properties
    • signing.keyId=<key_id>
    • signing.password=<key_passphrase>
    • signing.secretKeyRingFile=/home/user/.gnupg/secring.gpg
    • sonatypeUsername=<oss_user_token>
    • sonatypePassword=<oss_password_token>
    • stagingProfileId=<oss_staging_profile_id>
  • running publishFakerCorePublicationToSonatypeRepository will publish the artifacts to either staging release repo or to snapshots repo, depending on the current version

Bumping versions

Versions need to be bumped manually through a tag with the next release version that has to follow the semver rules, and the tag has to be pushed to origin.

Creating the tag can be either done manually with git tag or by using gradlew tag task.

Pre-releases

To create a new pre-release version (new release candidate) the following can be used: ./gradlew clean tag -Prelease -PnewPreRelease -PbumpComponent={comp}, where comp can be one of the following values: major, minor, or patch.

To bump an existing pre-release to the next version (next release candidate for the same release version) the following can be used: ./gradlew clean tag -Prelease -PpreRelease.

Releases

To promote a pre-release to a release version the following can be used: ./gradlew clean tag -Prelease -PpromoteToRelease,

To create a new release version the following can be used: ./gradlew clean tag -Prelease -PbumpComponent={comp}, where comp can be one of the following values: major , minor, or patch.

Make targets

Alternatively to the above targets from Makefile can be used for the same purposes.

Contributing

The CONTRIBUTING guidelines should help in getting you started on how to contribute to this project.

Thanks

Many thanks to these awesome tools that help us in creating open-source software:
Intellij IDEA YourKit Java profiler

Licence

This code is free to use under the terms of the MIT licence. See LICENCE.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap