Skip to content

Commit

Permalink
Merge pull request #58 from jiro4989/feature/#20-lorem
Browse files Browse the repository at this point in the history
rename provider name from word to lorem
  • Loading branch information
jiro4989 authored Feb 10, 2020
2 parents 3363241 + d309f2c commit b0edc03
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
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
File renamed without changes.
File renamed without changes.

0 comments on commit b0edc03

Please sign in to comment.