Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename provider name from word to lorem #58

Merged
merged 2 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pull_request_rules:
- name: Automatic merge on approval
conditions:
- "status-success=build"
- "label=automerge"
- "approved-reviews-by>=1"
actions:
merge:
method: merge
4 changes: 2 additions & 2 deletions src/faker/provider.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# See 'faker.nimble'. #
# ----------------------------------------------- #

import provider/[address, automotive, bank, company, currency, file, job, person, phone_number, user_agent]
export address, automotive, bank, company, currency, file, job, person, phone_number, user_agent
import provider/[address, automotive, bank, company, currency, file, job, lorem, person, phone_number, user_agent]
export address, automotive, bank, company, currency, file, job, lorem, person, phone_number, user_agent
2 changes: 1 addition & 1 deletion src/faker/provider/file/file_en_US.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import tables

include interfaces
import ../util
import ../word
import ../lorem

const
applicationMimeTypes = @[
Expand Down
10 changes: 4 additions & 6 deletions src/faker/provider/word.nim → src/faker/provider/lorem.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
# See 'faker.nimble'. #
# ----------------------------------------------- #

## Warning: This module will be removed in future.

import ../base
import word/[word_ja_JP, word_en_US]
import lorem/[lorem_ja_JP, lorem_en_US]
export base

proc word*(f: Faker): string =
Expand All @@ -16,6 +14,6 @@ proc word*(f: Faker): string =
echo f.word()

case f.locale
of "ja_JP": word_ja_JP.word(f)
of "en_US": word_en_US.word(f)
else: word_en_US.word(f)
of "ja_JP": lorem_ja_JP.word(f)
of "en_US": lorem_en_US.word(f)
else: lorem_en_US.word(f)
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ import ../../base
export base

proc word*(f: Faker): string
# proc words*(f: Faker): string
# proc sentence*(f: Faker): string
# proc sentences*(f: Faker): string
# proc paragraph*(f: Faker): string
# proc paragraphs*(f: Faker): string
# proc text*(f: Faker): string
# proc texts*(f: Faker): string