Skip to content

Commit

Permalink
Add new data providers from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
serpro69 committed Oct 16, 2022
1 parent 2913f7e commit c4d3d1d
Show file tree
Hide file tree
Showing 16 changed files with 1,195 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class IntrospectorTest : DescribeSpec() {
"GratefulDead",
"GreekPhilosophers",
"Hacker",
"Hackers",
"HalfLife",
"HarryPotter",
"Heroes",
Expand Down Expand Up @@ -143,6 +144,7 @@ class IntrospectorTest : DescribeSpec() {
"Minecraft",
"Money",
"Mountain",
"Mountaineering",
"Movie",
"Music",
"Myst",
Expand Down Expand Up @@ -182,6 +184,7 @@ class IntrospectorTest : DescribeSpec() {
"SonicTheHedgehog",
"SouthPark",
"Space",
"Sport",
"StarTrek",
"StarWars",
"Stargate",
Expand All @@ -196,6 +199,7 @@ class IntrospectorTest : DescribeSpec() {
"Superhero",
"Supernatural",
"SwordArtOnline",
"Tarkov",
"Tea",
"Team",
"TheExpanse",
Expand Down Expand Up @@ -319,6 +323,7 @@ class IntrospectorTest : DescribeSpec() {
"gratefulDead",
"greekPhilosophers",
"hacker",
"hackers",
"halfLife",
"harryPotter",
"heroes",
Expand Down Expand Up @@ -352,6 +357,7 @@ class IntrospectorTest : DescribeSpec() {
"minecraft",
"money",
"mountain",
"mountaineering",
"movie",
"music",
"myst",
Expand Down Expand Up @@ -391,6 +397,7 @@ class IntrospectorTest : DescribeSpec() {
"sonicTheHedgehog",
"southPark",
"space",
"sport",
"starTrek",
"starWars",
"stargate",
Expand All @@ -405,6 +412,7 @@ class IntrospectorTest : DescribeSpec() {
"superhero",
"supernatural",
"swordArtOnline",
"tarkov",
"tea",
"team",
"theExpanse",
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val gratefulDead: GratefulDead by lazy { GratefulDead(fakerService) }
val greekPhilosophers: GreekPhilosophers by lazy { GreekPhilosophers(fakerService) }
val hacker: Hacker by lazy { Hacker(fakerService) }
val hackers: Hackers by lazy { Hackers(fakerService) }
val halfLife: HalfLife by lazy { HalfLife(fakerService) }
val harryPotter: HarryPotter by lazy { HarryPotter(fakerService) }
val heroes: Heroes by lazy { Heroes(fakerService) }
Expand Down Expand Up @@ -154,6 +155,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val minecraft: Minecraft by lazy { Minecraft(fakerService) }
val money: Money by lazy { Money(fakerService) }
val mountain: Mountain by lazy { Mountain(fakerService) }
val mountaineering: Mountaineering by lazy { Mountaineering(fakerService) }
val movie: Movie by lazy { Movie(fakerService) }
val music: Music by lazy { Music(fakerService) }
val myst: Myst by lazy { Myst(fakerService) }
Expand Down Expand Up @@ -195,6 +197,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
// val source: Source by lazy {Source(fakerService }
val southPark: SouthPark by lazy { SouthPark(fakerService) }
val space: Space by lazy { Space(fakerService) }
val sport: Sport by lazy { Sport(fakerService) }
val stargate: Stargate by lazy { Stargate(fakerService) }
val starTrek: StarTrek by lazy { StarTrek(fakerService) }
val starWars: StarWars by lazy { StarWars(fakerService) }
Expand All @@ -209,6 +212,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val supernatural: Supernatural by lazy { Supernatural(fakerService) }
val superSmashBros: SuperSmashBros by lazy { SuperSmashBros(fakerService) }
val swordArtOnline: SwordArtOnline by lazy { SwordArtOnline(fakerService) }
val tarkov: Tarkov by lazy { Tarkov(fakerService) }
val tea: Tea by lazy { Tea(fakerService) }
val team: Team by lazy { Team(fakerService) }
val theExpanse: TheExpanse by lazy { TheExpanse(fakerService) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ internal enum class YamlCategory : Category {
GRATEFUL_DEAD,
GREEK_PHILOSOPHERS,
HACKER,
HACKERS,
HARRY_POTTER,
HEROES,
HEROES_OF_THE_STORM,
Expand Down Expand Up @@ -123,6 +124,7 @@ internal enum class YamlCategory : Category {
MILITARY,
MONEY,
MOUNTAIN,
MOUNTAINEERING,
MOVIE,
MUSIC,
NAME,
Expand Down Expand Up @@ -158,6 +160,7 @@ internal enum class YamlCategory : Category {
SOURCE,
SOUTH_PARK,
SPACE,
SPORT,
STARGATE,
STAR_TREK,
STAR_WARS,
Expand All @@ -169,6 +172,7 @@ internal enum class YamlCategory : Category {
SUPERHERO,
SUPERNATURAL,
SWORD_ART_ONLINE,
TARKOV,
TEA,
TEAM,
THE_EXPANSE,
Expand Down
24 changes: 24 additions & 0 deletions core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hackers.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.github.serpro69.kfaker.provider

import io.github.serpro69.kfaker.*
import io.github.serpro69.kfaker.dictionary.*
import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider
import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate

/**
* [FakeDataProvider] implementation for [YamlCategory.HACKERS] category.
*/
@Suppress("unused")
class Hackers internal constructor(fakerService: FakerService) : YamlFakeDataProvider<Hackers>(fakerService) {
override val yamlCategory = YamlCategory.HACKERS
override val localUniqueDataProvider = LocalUniqueDataProvider<Hackers>()
override val unique by UniqueProviderDelegate(localUniqueDataProvider)

init {
fakerService.load(yamlCategory)
}

fun characters() = resolve("characters")
fun handles() = resolve("handles")
fun quotes() = resolve("quotes")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@file:Suppress("unused")

package io.github.serpro69.kfaker.provider

import io.github.serpro69.kfaker.*
import io.github.serpro69.kfaker.dictionary.*
import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider
import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate

/**
* [FakeDataProvider] implementation for [YamlCategory.MOUNTAINEERING] category.
*/
class Mountaineering internal constructor(fakerService: FakerService) :
YamlFakeDataProvider<Mountaineering>(fakerService) {
override val yamlCategory = YamlCategory.MOUNTAINEERING
override val localUniqueDataProvider = LocalUniqueDataProvider<Mountaineering>()
override val unique by UniqueProviderDelegate(localUniqueDataProvider)

init {
fakerService.load(yamlCategory)
}

fun mountaineer(): String = resolve("mountaineer")
}
27 changes: 27 additions & 0 deletions core/src/main/kotlin/io/github/serpro69/kfaker/provider/Sport.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package io.github.serpro69.kfaker.provider

import io.github.serpro69.kfaker.*
import io.github.serpro69.kfaker.dictionary.*
import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider
import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate

/**
* [FakeDataProvider] implementation for [YamlCategory.SPORT] category.
*/
@Suppress("unused")
class Sport internal constructor(fakerService: FakerService) : YamlFakeDataProvider<Sport>(fakerService) {
override val yamlCategory = YamlCategory.SPORT
override val localUniqueDataProvider = LocalUniqueDataProvider<Sport>()
override val unique by UniqueProviderDelegate(localUniqueDataProvider)

init {
fakerService.load(yamlCategory)
}

fun summerOlympics() = resolve("summer_olympics")
fun winterOlympics() = resolve("winter_olympics")
fun summerParalympics() = resolve("summer_paralympics")
fun winterParalympics() = resolve("winter_paralympics")
fun ancientOlympics() = resolve("ancient_olympics")
fun unusual() = resolve("unusual")
}
51 changes: 51 additions & 0 deletions core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tarkov.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@file:Suppress("unused")

package io.github.serpro69.kfaker.provider

import io.github.serpro69.kfaker.*
import io.github.serpro69.kfaker.dictionary.*
import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider
import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate

/**
* [FakeDataProvider] implementation for [YamlCategory.TARKOV] category.
*/
class Tarkov internal constructor(fakerService: FakerService) :
YamlFakeDataProvider<Tarkov>(fakerService) {
override val yamlCategory = YamlCategory.TARKOV
override val localUniqueDataProvider = LocalUniqueDataProvider<Tarkov>()
override val unique by UniqueProviderDelegate(localUniqueDataProvider)

init {
fakerService.load(yamlCategory)
}

val quests = TarkovQuests(fakerService)

fun locations() = resolve("locations")
fun traders() = resolve("traders")
fun weapons() = resolve("weapons")
fun items() = resolve("items")
fun factions() = resolve("factions")
fun bosses() = resolve("bosses")
}

class TarkovQuests internal constructor(fakerService: FakerService) :
YamlFakeDataProvider<TarkovQuests>(fakerService) {
override val yamlCategory = YamlCategory.TARKOV
override val localUniqueDataProvider = LocalUniqueDataProvider<TarkovQuests>()
override val unique by UniqueProviderDelegate(localUniqueDataProvider)

init {
fakerService.load(yamlCategory)
}

fun prapor() = resolve("quests", "prapor")
fun therapist() = resolve("quests", "therapist")
fun skier() = resolve("quests", "skier")
fun peacekeeper() = resolve("quests", "peacekeeper")
fun mechanic() = resolve("quests", "mechanic")
fun ragman() = resolve("quests", "ragman")
fun jaeger() = resolve("quests", "jaeger")
fun fence() = resolve("quests", "fence")
}
55 changes: 55 additions & 0 deletions core/src/main/resources/locales/en/hackers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# START hackers_provider_dict
en:
faker:
hackers:
characters:
- Dade Murphy
- Kate Libby
- Emmanuel Goldstein
- Ramόn Sánchez
- Paul Cook
- Joey Pardella
- Eugene Belford
- Margo Wallace
- Hal
- Lauren Murphy
- Special Agent Richard Gill
- Special Agent Ray
- Special Agent Bob
handles:
- Zero Cool
- Crash Override
- Acid Burn
- Cereal Killer
- The Phantom Phreak
- Lord Nikon
- The Plague
- Razor
- Blade
quotes:
- Hack the Planet!
- There is no right or wrong, only fun and boring
- Mess with the best, die like the rest
- This is the end, my friend. Thank you for calling
- Never send a boy to do a woman's job
- We have no names, man. No names. We are nameless!
- Kid, don't threaten me. There are worse things than death, and uh, I can do all of them
- I got a photographic memory. It's a curse!
- Remember, hacking is more than just a crime. It's a survival trait
- This is our world now. The world of the electron and the switch. The beauty of the baud. We exist without nationality, skin color, or religious bias. You wage wars, murder, cheat, lie to us and try to make us believe it's for our own good, yet we're the criminals. Yes, I am a criminal. My crime is that of curiosity. I am a hacker and this is my manifesto. You may stop me, but you can't stop us all
- God gave men brains larger than dogs so they wouldn't hump women's legs at cocktail parties
- There is no right and wrong. There's only fun and boring
- Never fear, I is here
- It's stupid, man. It's universally stupid
- Yo, I kinda feel like God
- That's it, you're looking at it. He just looks slick all day
- Well, it looks like I'm on top
- Congratulations. No one's ever beat her before. You just made an enemy for life
- Pool on the roof must have a leak
- Whoa, this isn't wood shop class?
- I hope you don't screw like you type
- I don't play well with others
- Anything else? You want me to mow the lawn? Oops forgot, New York, no grass
- It's in that place where I put that thing that time
- RISC is good
# END hackers_provider_dict
16 changes: 16 additions & 0 deletions core/src/main/resources/locales/en/mountaineering.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# START mountaineering_provider_dict
en:
faker:
mountaineering:
mountaineer:
- Junko Tabei
- Catherine Destivelle
- Sasha DiGiulian
- Priti Wright
- Caroline Gleich
- Conrad Anker
- Edmund Hillary
- George Mallory
- Steve House
- Fred Beckey
# END mountaineering_provider_dict
Loading

0 comments on commit c4d3d1d

Please sign in to comment.