faker 1.9.6 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +152 -6
- data/README.md +4 -0
- data/lib/faker/books/dune.rb +2 -2
- data/lib/faker/books/lovecraft.rb +18 -18
- data/lib/faker/creature/animal.rb +1 -1
- data/lib/faker/creature/cat.rb +1 -1
- data/lib/faker/creature/dog.rb +1 -1
- data/lib/faker/creature/horse.rb +1 -1
- data/lib/faker/default/address.rb +3 -3
- data/lib/faker/default/alphanumeric.rb +4 -4
- data/lib/faker/default/avatar.rb +1 -1
- data/lib/faker/default/bank.rb +2 -2
- data/lib/faker/default/boolean.rb +1 -1
- data/lib/faker/default/cannabis.rb +4 -0
- data/lib/faker/default/chile_rut.rb +3 -3
- data/lib/faker/default/code.rb +5 -5
- data/lib/faker/default/commerce.rb +4 -4
- data/lib/faker/default/company.rb +2 -2
- data/lib/faker/default/crypto_coin.rb +9 -4
- data/lib/faker/default/date.rb +9 -9
- data/lib/faker/default/demographic.rb +1 -1
- data/lib/faker/default/device.rb +2 -2
- data/lib/faker/default/driving_licence.rb +2 -2
- data/lib/faker/default/educator.rb +0 -3
- data/lib/faker/default/file.rb +3 -3
- data/lib/faker/default/fillmurray.rb +2 -2
- data/lib/faker/default/finance.rb +1 -1
- data/lib/faker/default/hipster.rb +16 -16
- data/lib/faker/default/id_number.rb +8 -8
- data/lib/faker/default/internet.rb +22 -21
- data/lib/faker/default/invoice.rb +3 -3
- data/lib/faker/default/json.rb +2 -2
- data/lib/faker/default/lorem.rb +20 -20
- data/lib/faker/default/lorem_flickr.rb +4 -4
- data/lib/faker/default/lorem_pixel.rb +1 -1
- data/lib/faker/default/markdown.rb +7 -7
- data/lib/faker/default/measurement.rb +8 -8
- data/lib/faker/default/name.rb +2 -4
- data/lib/faker/default/nhs.rb +7 -7
- data/lib/faker/default/number.rb +35 -32
- data/lib/faker/default/omniauth.rb +11 -11
- data/lib/faker/default/phone_number.rb +1 -1
- data/lib/faker/default/placeholdit.rb +1 -1
- data/lib/faker/default/relationship.rb +1 -1
- data/lib/faker/default/source.rb +2 -2
- data/lib/faker/default/south_africa.rb +1 -1
- data/lib/faker/default/space.rb +2 -2
- data/lib/faker/default/string.rb +1 -1
- data/lib/faker/default/stripe.rb +4 -4
- data/lib/faker/default/time.rb +23 -8
- data/lib/faker/default/twitter.rb +30 -30
- data/lib/faker/default/types.rb +7 -7
- data/lib/faker/default/vehicle.rb +5 -5
- data/lib/faker/default/world_cup.rb +2 -2
- data/lib/faker/games/dota.rb +1 -1
- data/lib/faker/games/elder_scrolls.rb +1 -1
- data/lib/faker/games/fallout.rb +1 -1
- data/lib/faker/games/half_life.rb +1 -1
- data/lib/faker/games/heroes.rb +1 -1
- data/lib/faker/games/heroes_of_the_storm.rb +1 -1
- data/lib/faker/games/league_of_legends.rb +1 -1
- data/lib/faker/games/myst.rb +1 -1
- data/lib/faker/games/overwatch.rb +1 -1
- data/lib/faker/games/pokemon.rb +1 -1
- data/lib/faker/games/sonic_the_hedgehog.rb +1 -1
- data/lib/faker/games/super_smash_bros.rb +1 -1
- data/lib/faker/games/witcher.rb +1 -1
- data/lib/faker/games/world_of_warcraft.rb +1 -1
- data/lib/faker/games/zelda.rb +1 -1
- data/lib/faker/japanese_media/dragon_ball.rb +1 -1
- data/lib/faker/japanese_media/one_piece.rb +1 -1
- data/lib/faker/japanese_media/sword_art_online.rb +1 -1
- data/lib/faker/movies/back_to_the_future.rb +1 -1
- data/lib/faker/movies/ghostbusters.rb +1 -1
- data/lib/faker/movies/harry_potter.rb +1 -1
- data/lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb +1 -1
- data/lib/faker/movies/hobbit.rb +1 -1
- data/lib/faker/movies/lebowski.rb +1 -1
- data/lib/faker/movies/lord_of_the_rings.rb +1 -1
- data/lib/faker/movies/princess_bride.rb +1 -1
- data/lib/faker/movies/star_wars.rb +2 -2
- data/lib/faker/movies/v_for_vendetta.rb +1 -1
- data/lib/faker/tv_shows/aqua_teen_hunger_force.rb +1 -1
- data/lib/faker/tv_shows/bojack_horseman.rb +1 -1
- data/lib/faker/tv_shows/breaking_bad.rb +1 -1
- data/lib/faker/tv_shows/buffy.rb +1 -1
- data/lib/faker/tv_shows/community.rb +1 -1
- data/lib/faker/tv_shows/dr_who.rb +1 -1
- data/lib/faker/tv_shows/dumb_and_dumber.rb +1 -1
- data/lib/faker/tv_shows/family_guy.rb +1 -1
- data/lib/faker/tv_shows/friends.rb +1 -1
- data/lib/faker/tv_shows/game_of_thrones.rb +1 -1
- data/lib/faker/tv_shows/hey_arnold.rb +1 -1
- data/lib/faker/tv_shows/how_i_met_your_mother.rb +1 -1
- data/lib/faker/tv_shows/michael_scott.rb +1 -1
- data/lib/faker/tv_shows/new_girl.rb +1 -1
- data/lib/faker/tv_shows/parks_and_rec.rb +1 -1
- data/lib/faker/tv_shows/rick_and_morty.rb +1 -1
- data/lib/faker/tv_shows/ru_paul.rb +1 -1
- data/lib/faker/tv_shows/seinfeld.rb +1 -1
- data/lib/faker/tv_shows/silicon_valley.rb +1 -1
- data/lib/faker/tv_shows/simpsons.rb +1 -1
- data/lib/faker/tv_shows/south_park.rb +1 -1
- data/lib/faker/tv_shows/star_trek.rb +1 -1
- data/lib/faker/tv_shows/stargate.rb +1 -1
- data/lib/faker/tv_shows/stranger_things.rb +1 -1
- data/lib/faker/tv_shows/the_expanse.rb +1 -1
- data/lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb +1 -1
- data/lib/faker/tv_shows/the_it_crowd.rb +1 -1
- data/lib/faker/tv_shows/the_thick_of_it.rb +1 -1
- data/lib/faker/tv_shows/twin_peaks.rb +1 -1
- data/lib/faker/tv_shows/venture_bros.rb +1 -1
- data/lib/faker/version.rb +1 -1
- data/lib/locales/en-IND.yml +1 -1
- data/lib/locales/en.yml +51 -1
- data/lib/locales/en/address.yml +1 -4
- data/lib/locales/en/animal.yml +2 -2
- data/lib/locales/en/cannabis.yml +1 -0
- data/lib/locales/en/space.yml +1 -1
- data/lib/locales/en/super_smash_bros.yml +4 -0
- data/lib/locales/vi.yml +1 -1
- metadata +3 -11
- data/lib/faker/default/creature.rb +0 -6
- data/lib/faker/default/games.rb +0 -6
- data/lib/faker/default/japanese_media.rb +0 -6
- data/lib/faker/default/movies.rb +0 -6
- data/lib/faker/default/tv_shows.rb +0 -6
- data/lib/faker/deprecate/unreleased/football.rb +0 -35
- data/lib/faker/deprecate/unreleased/movies/grateful_dead.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0508a56ad29c6a2717f8836727703c9b878417feb96d61af1ed37bd1f98d2c5f'
|
4
|
+
data.tar.gz: 3de88e575961f2663db38f36e141cd1041c8a01b0de6fef34b7334a337e8c098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e5f7c654a86bd7a34628d0cd2c3e6d3495a06cb411316f3474507b395db59badfa987ea392610c83025bab7f4becc321f0c35180b828ff387b32376613be476
|
7
|
+
data.tar.gz: 48d2110e39947964f6816d9702229548c0b23665c655d74da7d0963c236347c398ead33236d49841c42b7d27d01657549e456edaf3bf533c7eb80f04e92c8448
|
data/CHANGELOG.md
CHANGED
@@ -1,21 +1,167 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
##
|
3
|
+
## [v2.0.0](https://github.com/stympy/faker/tree/2.0.0) (2019-31-07)
|
4
|
+
|
5
|
+
## Important Note:
|
6
|
+
|
7
|
+
Version 2 has several `breaking changes`. We replaced positional arguments with keyword arguments and the list below contains all the changed methods:
|
8
|
+
- `Faker::Books::Dune.quote(character = nil)` becomes `Faker::Books::Dune.quote(character: nil)`
|
9
|
+
- `Faker::Books::Dune.saying(source = nil)` becomes `Faker::Books::Dune.saying(source: nil)`
|
10
|
+
- `Faker::Books::Lovecraft.fhtagn(number_of = nil)` becomes `Faker::Books::Lovecraft.fhtagn(number: nil)`
|
11
|
+
- `Faker::Books::Lovecraft.paragraph(sentence_count = nil, random_sentences_to_add = nil)` becomes `Faker::Books::Lovecraft.paragraph(sentence_count: nil, random_sentences_to_add: nil)`
|
12
|
+
- `Faker::Books::Lovecraft.paragraph_by_chars(chars = nil)` becomes `Faker::Books::Lovecraft.paragraph_by_chars(characters: nil)`
|
13
|
+
- `Faker::Books::Lovecraft.paragraphs(paragraph_count = nil)` becomes `Faker::Books::Lovecraft.paragraphs(number: nil)`
|
14
|
+
- `Faker::Books::Lovecraft.sentence(word_count = nil, random_words_to_add = nil)` becomes `Faker::Books::Lovecraft.sentence(word_count: nil, random_words_to_add: nil)`
|
15
|
+
- `Faker::Books::Lovecraft.sentences(sentence_count = nil)` becomes `Faker::Books::Lovecraft.sentences(number: nil)`
|
16
|
+
- `Faker::Books::Lovecraft.words(num = nil, spaces_allowed = nil)` becomes `Faker::Books::Lovecraft.words(number: nil, spaces_allowed: nil)`
|
17
|
+
- `Faker::Address.city(options = nil)` becomes `Faker::Address.city(options: nil)`
|
18
|
+
- `Faker::Address.postcode(state_abbreviation = nil)` becomes `Faker::Address.postcode(state_abbreviation: nil)`
|
19
|
+
- `Faker::Address.street_address(include_secondary = nil)` becomes `Faker::Address.street_address(include_secondary: nil)`
|
20
|
+
- `Faker::Address.zip(state_abbreviation = nil)` becomes `Faker::Address.zip(state_abbreviation: nil)`
|
21
|
+
- `Faker::Address.zip_code(state_abbreviation = nil)` becomes `Faker::Address.zip_code(state_abbreviation: nil)`
|
22
|
+
- `Faker::Alphanumeric.alpha(char_count = nil)` becomes `Faker::Alphanumeric.alpha(number: nil)`
|
23
|
+
- `Faker::Alphanumeric.alphanumeric(char_count = nil)` becomes `Faker::Alphanumeric.alphanumeric(number: nil)`
|
24
|
+
- `Faker::Avatar.image(slug = nil, size = nil, format = nil, set = nil, bgset = nil)` becomes `Faker::Avatar.image(slug: nil, size: nil, format: nil, set: nil, bgset: nil)`
|
25
|
+
- `Faker::Bank.account_number(digits = nil)` becomes `Faker::Bank.account_number(digits: nil)`
|
26
|
+
- `Faker::Bank.iban(country_code = nil)` becomes `Faker::Bank.iban(country_code: nil)`
|
27
|
+
- `Faker::ChileRut.full_rut(min_rut = nil, fixed = nil)` becomes `Faker::ChileRut.full_rut(min_rut: nil, fixed: nil)`
|
28
|
+
- `Faker::ChileRut.rut(min_rut = nil, fixed = nil)` becomes `Faker::ChileRut.rut(min_rut: nil, fixed: nil)`
|
29
|
+
- `Faker::Code.ean(base = nil)` becomes `Faker::Code.ean(base: nil)`
|
30
|
+
- `Faker::Code.isbn(base = nil)` becomes `Faker::Code.isbn(base: nil)`
|
31
|
+
- `Faker::Code.nric(min_age = nil, max_age = nil)` becomes `Faker::Code.nric(min_age: nil, max_age: nil)`
|
32
|
+
- `Faker::Commerce.department(max = nil, fixed_amount = nil)` becomes `Faker::Commerce.department(max: nil, fixed_amount: nil)`
|
33
|
+
- `Faker::Commerce.price(range = nil, as_string = nil)` becomes `Faker::Commerce.price(range: nil, as_string: nil)`
|
34
|
+
- `Faker::Commerce.promotion_code(digits = nil)` becomes `Faker::Commerce.promotion_code(digits: nil)`
|
35
|
+
- `Faker::Company.polish_register_of_national_economy(length = nil)` becomes `Faker::Company.polish_register_of_national_economy(length: nil)`
|
36
|
+
- `Faker::CryptoCoin.acronym(coin = nil)` becomes `Faker::CryptoCoin.acronym(coin: nil)`
|
37
|
+
- `Faker::CryptoCoin.coin_name(coin = nil)` becomes `Faker::CryptoCoin.coin_name(coin: nil)`
|
38
|
+
- `Faker::CryptoCoin.url_logo(coin = nil)` becomes `Faker::CryptoCoin.url_logo(coin: nil)`
|
39
|
+
- `Faker::Date.backward(days = nil)` becomes `Faker::Date.backward(days: nil)`
|
40
|
+
- `Faker::Date.between(from, to)` becomes `Faker::Date.between(from:, to:)`
|
41
|
+
- `Faker::Date.between_except(from, to, excepted)` becomes `Faker::Date.between_except(from:, to:, excepted:)`
|
42
|
+
- `Faker::Date.birthday(min_age = nil, max_age = nil)` becomes `Faker::Date.birthday(min_age: nil, max_age: nil)`
|
43
|
+
- `Faker::Date.forward(days = nil)` becomes `Faker::Date.forward(days: nil)`
|
44
|
+
- `Faker::Demographic.height(unit = nil)` becomes `Faker::Demographic.height(unit: nil)`
|
45
|
+
- `Faker::File.dir(segment_count = nil, root = nil, directory_separator = nil)` becomes `Faker::File.dir(segment_count: nil, root: nil, directory_separator: nil)`
|
46
|
+
- `Faker::File.file_name(dir = nil, name = nil, ext = nil, directory_separator = nil)` becomes `Faker::File.file_name(dir: nil, name: nil, ext: nil, directory_separator: nil)`
|
47
|
+
- `Faker::Fillmurray.image(grayscale = nil, width = nil, height = nil)` becomes `Faker::Fillmurray.image(grayscale: nil, width: nil, height: nil)`
|
48
|
+
- `Faker::Finance.vat_number(country = nil)` becomes `Faker::Finance.vat_number(country: nil)`
|
49
|
+
- `Faker::Hipster.paragraph(sentence_count = nil, supplemental = nil, random_sentences_to_add = nil)` becomes `Faker::Hipster.paragraph(sentence_count: nil, supplemental: nil, random_sentences_to_add: nil)`
|
50
|
+
- `Faker::Hipster.paragraph_by_chars(chars = nil, supplemental = nil)` becomes `Faker::Hipster.paragraph_by_chars(characters: nil, supplemental: nil)`
|
51
|
+
- `Faker::Hipster.paragraphs(paragraph_count = nil, supplemental = nil)` becomes `Faker::Hipster.paragraphs(number: nil, supplemental: nil)`
|
52
|
+
- `Faker::Hipster.sentence(word_count = nil, supplemental = nil, random_words_to_add = nil)` becomes `Faker::Hipster.sentence(word_count: nil, supplemental: nil, random_words_to_add: nil)`
|
53
|
+
- `Faker::Hipster.sentences(sentence_count = nil, supplemental = nil)` becomes `Faker::Hipster.sentences(number: nil, supplemental: nil)`
|
54
|
+
- `Faker::Hipster.words(num = nil, supplemental = nil, spaces_allowed = nil)` becomes `Faker::Hipster.words(number: nil, supplemental: nil, spaces_allowed: nil)`
|
55
|
+
- `Faker::Internet.domain_name(subdomain = nil)` becomes `Faker::Internet.domain_name(subdomain: nil)`
|
56
|
+
- `Faker::Internet.email(name = nil, *separators)` becomes `Faker::Internet.email(name: nil, separators: nil)`
|
57
|
+
- `Faker::Internet.fix_umlauts(string = nil)` becomes `Faker::Internet.fix_umlauts(string: nil)`
|
58
|
+
- `Faker::Internet.free_email(name = nil)` becomes `Faker::Internet.free_email(name: nil)`
|
59
|
+
- `Faker::Internet.mac_address(prefix = nil)` becomes `Faker::Internet.mac_address(prefix: nil)`
|
60
|
+
- `Faker::Internet.password(min_length = nil, max_length = nil, mix_case = nil, special_chars = nil)` becomes `Faker::Internet.password(min_length: nil, max_length: nil, mix_case: nil, special_characters: nil)`
|
61
|
+
- `Faker::Internet.safe_email(name = nil)` becomes `Faker::Internet.safe_email(name: nil)`
|
62
|
+
- `Faker::Internet.slug(words = nil, glue = nil)` becomes `Faker::Internet.slug(words: nil, glue: nil)`
|
63
|
+
- `Faker::Internet.url(host = nil, path = nil, scheme = nil)` becomes `Faker::Internet.url(host: nil, path: nil, scheme: nil)`
|
64
|
+
- `Faker::Internet.user_agent(vendor = nil)` becomes `Faker::Internet.user_agent(vendor: nil)`
|
65
|
+
- `Faker::Internet.user_name(specifier = nil, separators = nil)` becomes `Faker::Internet.user_name(specifier: nil, separators: nil)`
|
66
|
+
- `Faker::Internet.username(specifier = nil, separators = nil)` becomes `Faker::Internet.username(specifier: nil, separators: nil)`
|
67
|
+
- `Faker::Invoice.amount_between(from = nil, to = nil)` becomes `Faker::Invoice.amount_between(from: nil, to: nil)`
|
68
|
+
- `Faker::Invoice.creditor_reference(ref = nil)` becomes `Faker::Invoice.creditor_reference(ref: nil)`
|
69
|
+
- `Faker::Invoice.reference(ref = nil)` becomes `Faker::Invoice.reference(ref: nil)`
|
70
|
+
- `Faker::Json.add_depth_to_json(json = nil, width = nil, options = nil)` becomes `Faker::Json.add_depth_to_json(json: nil, width: nil, options: nil)`
|
71
|
+
- `Faker::Json.shallow_json(width = nil, options = nil)` becomes `Faker::Json.shallow_json(width: nil, options: nil)`
|
72
|
+
- `Faker::Lorem.characters(char_count = nil)` becomes `Faker::Lorem.characters(number: nil)`
|
73
|
+
- `Faker::Lorem.paragraph(sentence_count = nil, supplemental = nil, random_sentences_to_add = nil)` becomes `Faker::Lorem.paragraph(sentence_count: nil, supplemental: nil, random_sentences_to_add: nil)`
|
74
|
+
- `Faker::Lorem.paragraph_by_chars(chars = nil, supplemental = nil)` becomes `Faker::Lorem.paragraph_by_chars(number: nil, supplemental: nil)`
|
75
|
+
- `Faker::Lorem.paragraphs(paragraph_count = nil, supplemental = nil)` becomes `Faker::Lorem.paragraphs(number: nil, supplemental: nil)`
|
76
|
+
- `Faker::Lorem.question(word_count = nil, supplemental = nil, random_words_to_add = nil)` becomes `Faker::Lorem.question(word_count: nil, supplemental: nil, random_words_to_add: nil)`
|
77
|
+
- `Faker::Lorem.questions(question_count = nil, supplemental = nil)` becomes `Faker::Lorem.questions(number: nil, supplemental: nil)`
|
78
|
+
- `Faker::Lorem.sentence(word_count = nil, supplemental = nil, random_words_to_add = nil)` becomes `Faker::Lorem.sentence(word_count: nil, supplemental: nil, random_words_to_add: nil)`
|
79
|
+
- `Faker::Lorem.sentences(sentence_count = nil, supplemental = nil)` becomes `Faker::Lorem.sentences(number: nil, supplemental: nil)`
|
80
|
+
- `Faker::Lorem.words(num = nil, supplemental = nil)` becomes `Faker::Lorem.words(number: nil, supplemental: nil)`
|
81
|
+
- `Faker::LoremFlickr.colorized_image(size = nil, color = nil, search_terms = nil, match_all = nil)` becomes `Faker::LoremFlickr.colorized_image(size: nil, color: nil, search_terms: nil, match_all: nil)`
|
82
|
+
- `Faker::LoremFlickr.grayscale_image(size = nil, search_terms = nil, match_all = nil)` becomes `Faker::LoremFlickr.grayscale_image(size: nil, search_terms: nil, match_all: nil)`
|
83
|
+
- `Faker::LoremFlickr.image(size = nil, search_terms = nil, match_all = nil)` becomes `Faker::LoremFlickr.image(size: nil, search_terms: nil, match_all: nil)`
|
84
|
+
- `Faker::LoremFlickr.pixelated_image(size = nil, search_terms = nil, match_all = nil)` becomes `Faker::LoremFlickr.pixelated_image(size: nil, search_terms: nil, match_all: nil)`
|
85
|
+
- `Faker::LoremPixel.image(size = nil, is_gray = nil, category = nil, number = nil, text = nil, secure: nil)` becomes `Faker::LoremPixel.image(size: nil, is_gray: nil, category: nil, number: nil, text: nil, secure: nil)`
|
86
|
+
- `Faker::Markdown.sandwich(sentences = nil, repeat = nil)` becomes `Faker::Markdown.sandwich(sentences: nil, repeat: nil)`
|
87
|
+
- `Faker::Measurement.height(amount = nil)` becomes `Faker::Measurement.height(amount: nil)`
|
88
|
+
- `Faker::Measurement.length(amount = nil)` becomes `Faker::Measurement.length(amount: nil)`
|
89
|
+
- `Faker::Measurement.metric_height(amount = nil)` becomes `Faker::Measurement.metric_height(amount: nil)`
|
90
|
+
- `Faker::Measurement.metric_length(amount = nil)` becomes `Faker::Measurement.metric_length(amount: nil)`
|
91
|
+
- `Faker::Measurement.metric_volume(amount = nil)` becomes `Faker::Measurement.metric_volume(amount: nil)`
|
92
|
+
- `Faker::Measurement.metric_weight(amount = nil)` becomes `Faker::Measurement.metric_weight(amount: nil)`
|
93
|
+
- `Faker::Measurement.volume(amount = nil)` becomes `Faker::Measurement.volume(amount: nil)`
|
94
|
+
- `Faker::Measurement.weight(amount = nil)` becomes `Faker::Measurement.weight(amount: nil)`
|
95
|
+
- `Faker::Name.initials(character_count = nil)` becomes `Faker::Name.initials(number: nil)`
|
96
|
+
- `Faker::NationalHealthService.check_digit(number = nil)` becomes `Faker::NationalHealthService.check_digit(number: nil)`
|
97
|
+
- `Faker::Number.between(from = nil, to = nil)` becomes `Faker::Number.between(from: nil, to: nil)`
|
98
|
+
- `Faker::Number.decimal(l_digits = nil, r_digits = nil)` becomes `Faker::Number.decimal(l_digits: nil, r_digits: nil)`
|
99
|
+
- `Faker::Number.decimal_part(*args, &block)` becomes `Faker::Number.decimal_part(digits: nil)`
|
100
|
+
- `Faker::Number.hexadecimal(digits = nil)` becomes `Faker::Number.hexadecimal(digits: nil)`
|
101
|
+
- `Faker::Number.leading_zero_number(*args, &block)` becomes `Faker::Number.leading_zero_number(digits: nil)`
|
102
|
+
- `Faker::Number.negative(from = nil, to = nil)` becomes `Faker::Number.negative(from: nil, to: nil)`
|
103
|
+
- `Faker::Number.normal(mean = nil, standard_deviation = nil)` becomes `Faker::Number.normal(mean: nil, standard_deviation: nil)`
|
104
|
+
- `Faker::Number.number(digits = nil)` becomes `Faker::Number.number(digits: nil)`
|
105
|
+
- `Faker::Number.positive(from = nil, to = nil)` becomes `Faker::Number.positive(from: nil, to: nil)`
|
106
|
+
- `Faker::Number.within(range = nil)` becomes `Faker::Number.within(range: nil)`
|
107
|
+
- `Faker::PhoneNumber.extension(length = nil)` becomes `Faker::PhoneNumber.extension(length: nil)`
|
108
|
+
- `Faker::PhoneNumber.subscriber_number(length = nil)` becomes `Faker::PhoneNumber.subscriber_number(length: nil)`
|
109
|
+
- `Faker::Placeholdit.image(size = nil, format = nil, background_color = nil, text_color = nil, text = nil)` becomes `Faker::Placeholdit.image(size: nil, format: nil, background_color: nil, text_color: nil, text: nil)`
|
110
|
+
- `Faker::Relationship.familial(connection = nil)` becomes `Faker::Relationship.familial(connection: nil)`
|
111
|
+
- `Faker::Source.hello_world(lang = nil)` becomes `Faker::Source.hello_world(lang: nil)`
|
112
|
+
- `Faker::Source.print_1_to_10(lang = nil)` becomes `Faker::Source.print_1_to_10(lang: nil)`
|
113
|
+
- `Faker::String.random(length = nil)` becomes `Faker::String.random(length: nil)`
|
114
|
+
- `Faker::Stripe.ccv(card_type = nil)` becomes `Faker::Stripe.ccv(card_type: nil)`
|
115
|
+
- `Faker::Stripe.invalid_card(card_error = nil)` becomes `Faker::Stripe.invalid_card(card_error: nil)`
|
116
|
+
- `Faker::Stripe.valid_card(card_type = nil)` becomes `Faker::Stripe.valid_card(card_type: nil)`
|
117
|
+
- `Faker::Stripe.valid_token(card_type = nil)` becomes `Faker::Stripe.valid_token(card_type: nil)`
|
118
|
+
- `Faker::Time.backward(days = nil, period = nil, format = nil)` becomes `Faker::Time.backward(days: nil, period: nil, format: nil)`
|
119
|
+
- `Faker::Time.between(from, to, period = nil, format = nil)` becomes `Faker::Time.between(from:, to:, format: nil)`
|
120
|
+
- `Faker::Time.forward(days = nil, period = nil, format = nil)` becomes `Faker::Time.forward(days: nil, period: nil, format: nil)`
|
121
|
+
- `Faker::Types.complex_rb_hash(key_count = nil)` becomes `Faker::Types.complex_rb_hash(number: nil)`
|
122
|
+
- `Faker::Types.rb_array(len = nil)` becomes `Faker::Types.rb_array(len: nil)`
|
123
|
+
- `Faker::Types.rb_hash(key_count = nil, type = nil)` becomes `Faker::Types.rb_hash(number: nil, type: nil)`
|
124
|
+
- `Faker::Types.rb_integer(from = nil, to = nil)` becomes `Faker::Types.rb_integer(from: nil, to: nil)`
|
125
|
+
- `Faker::Types.rb_string(words = nil)` becomes `Faker::Types.rb_string(words: nil)`
|
126
|
+
- `Faker::Vehicle.kilometrage(min = nil, max = nil)` becomes `Faker::Vehicle.kilometrage(min: nil, max: nil)`
|
127
|
+
- `Faker::Vehicle.license_plate(state_abreviation = nil)` becomes `Faker::Vehicle.license_plate(state_abreviation: nil)`
|
128
|
+
- `Faker::Vehicle.mileage(min = nil, max = nil)` becomes `Faker::Vehicle.mileage(min: nil, max: nil)`
|
129
|
+
- `Faker::Vehicle.model(make_of_model = nil)` becomes `Faker::Vehicle.model(make_of_model: nil)`
|
130
|
+
- `Faker::WorldCup.group(group = nil)` becomes `Faker::WorldCup.group(group: nil)`
|
131
|
+
- `Faker::WorldCup.roster(country = nil, type = nil)` becomes `Faker::WorldCup.roster(country: nil, type: nil)`
|
132
|
+
- `Faker::Movies::StarWars.quote(character = nil)` becomes `Faker::Movies::StarWars.quote(character: nil)`
|
4
133
|
|
5
134
|
### Bug/Fixes
|
6
|
-
|
135
|
+
|
136
|
+
- [PR #1660](https://github.com/stympy/faker/pull/1660) Update FillMurray Links To Include www [@RaymondFallon](https://github.com/RaymondFallon)
|
137
|
+
|
7
138
|
### Deprecation
|
139
|
+
|
140
|
+
- [PR #1634](https://github.com/stympy/faker/pull/1634) Corrected other occurrences of spelling vehicle spelling error, deprecated Space launch_vehicule [@Siyanda](https://github.com/Siyanda)
|
141
|
+
|
8
142
|
### Documentation
|
143
|
+
|
144
|
+
- [PR #1653](https://github.com/stympy/faker/pull/1653) Add /faker-ruby/faker-bot to README [@vbrazo](https://github.com/vbrazo)
|
145
|
+
|
9
146
|
### Feature Request
|
147
|
+
|
148
|
+
- [PR #1417](https://github.com/stympy/faker/pull/1417) Rework Faker::Time::between [@pjohnmeyer](https://github.com/pjohnmeyer)
|
149
|
+
- [PR #510](https://github.com/stympy/faker/pull/510) Make Faker::Number return integers and floats instead of strings [@tejasbubane](https://github.com/tejasbubane)
|
150
|
+
- [PR #1651](https://github.com/stympy/faker/pull/1651) Preparing for v2 arguments [@vbrazo](https://github.com/vbrazo)
|
151
|
+
- [PR #1664](https://github.com/stympy/faker/pull/1664) Replace positional arguments with keyword arguments [@vbrazo](https://github.com/vbrazo)
|
152
|
+
|
10
153
|
### Update/add locales
|
11
154
|
|
155
|
+
- [PR #1658](https://github.com/stympy/faker/pull/1658) Update Faker::Games::SuperSmashBros entries [@boardfish](https://github.com/boardfish)
|
156
|
+
- [PR #1649](https://github.com/stympy/faker/pull/1649) Remove mexicoMX [@vbrazo](https://github.com/vbrazo)
|
157
|
+
|
12
158
|
------------------------------------------------------------------------------
|
13
159
|
|
14
|
-
## [v1.9.6](https://github.com/stympy/faker/tree/
|
160
|
+
## [v1.9.6](https://github.com/stympy/faker/tree/1.9.6) (2019-07-05)
|
15
161
|
|
16
162
|
Fix lib/faker/version.rb
|
17
163
|
|
18
|
-
## [v1.9.5](https://github.com/stympy/faker/tree/
|
164
|
+
## [v1.9.5](https://github.com/stympy/faker/tree/v.1.9.5) (2019-07-04)
|
19
165
|
|
20
166
|
### Bug
|
21
167
|
|
@@ -39,7 +185,7 @@ Fix lib/faker/version.rb
|
|
39
185
|
|
40
186
|
------------------------------------------------------------------------------
|
41
187
|
|
42
|
-
## [v1.9.4](https://github.com/stympy/faker/tree/
|
188
|
+
## [v1.9.4](https://github.com/stympy/faker/tree/1.9.4) (2019-06-19)
|
43
189
|
|
44
190
|
### Bug/Fixes
|
45
191
|
|
@@ -111,7 +257,7 @@ Fix lib/faker/version.rb
|
|
111
257
|
|
112
258
|
------------------------------------------------------------------------------
|
113
259
|
|
114
|
-
## [v1.9.3](https://github.com/stympy/faker/tree/v1.9.
|
260
|
+
## [v1.9.3](https://github.com/stympy/faker/tree/v1.9.3) (2019-02-12)
|
115
261
|
|
116
262
|
[Full Changelog](https://github.com/stympy/faker/compare/v1.9.2...v1.9.3)
|
117
263
|
|
data/README.md
CHANGED
@@ -20,6 +20,7 @@ development.
|
|
20
20
|
- [NOTE](#note)
|
21
21
|
- [Installing](#installing)
|
22
22
|
- [Usage](#usage)
|
23
|
+
- [CLI](#cli)
|
23
24
|
- [Ensuring unique values](#ensuring-unique-values)
|
24
25
|
- [Deterministic Random](#deterministic-random)
|
25
26
|
- [Generators](#generators)
|
@@ -66,6 +67,9 @@ Faker::Name.name #=> "Christophe Bartell"
|
|
66
67
|
Faker::Internet.email #=> "kirsten.greenholt@corkeryfisher.info"
|
67
68
|
```
|
68
69
|
|
70
|
+
### CLI
|
71
|
+
Instructions are available in the [faker-bot README](https://github.com/faker-ruby/faker-bot).
|
72
|
+
|
69
73
|
### Ensuring unique values
|
70
74
|
Prefix your method call with `unique`. For example:
|
71
75
|
```ruby
|
data/lib/faker/books/dune.rb
CHANGED
@@ -19,7 +19,7 @@ module Faker
|
|
19
19
|
fetch('dune.planets')
|
20
20
|
end
|
21
21
|
|
22
|
-
def quote(character
|
22
|
+
def quote(character: nil)
|
23
23
|
quoted_characters = translate('faker.dune.quotes').keys
|
24
24
|
|
25
25
|
if character.nil?
|
@@ -36,7 +36,7 @@ module Faker
|
|
36
36
|
fetch('dune.quotes.' + character)
|
37
37
|
end
|
38
38
|
|
39
|
-
def saying(source
|
39
|
+
def saying(source: nil)
|
40
40
|
sourced_sayings = translate('faker.dune.sayings').keys
|
41
41
|
|
42
42
|
if source.nil?
|
@@ -8,8 +8,8 @@ module Faker
|
|
8
8
|
fetch('lovecraft.location')
|
9
9
|
end
|
10
10
|
|
11
|
-
def fhtagn(
|
12
|
-
Array.new(
|
11
|
+
def fhtagn(number: 1)
|
12
|
+
Array.new(number) { fetch('lovecraft.fhtagn') }.join('. ')
|
13
13
|
end
|
14
14
|
|
15
15
|
def deity
|
@@ -20,8 +20,8 @@ module Faker
|
|
20
20
|
fetch('lovecraft.tome')
|
21
21
|
end
|
22
22
|
|
23
|
-
def sentence(word_count
|
24
|
-
words(word_count + rand(random_words_to_add.to_i).to_i, true).join(' ').capitalize + '.'
|
23
|
+
def sentence(word_count: 4, random_words_to_add: 6)
|
24
|
+
words(number: word_count + rand(random_words_to_add.to_i).to_i, spaces_allowed: true).join(' ').capitalize + '.'
|
25
25
|
end
|
26
26
|
|
27
27
|
def word
|
@@ -29,8 +29,8 @@ module Faker
|
|
29
29
|
random_word =~ /\s/ ? word : random_word
|
30
30
|
end
|
31
31
|
|
32
|
-
def words(
|
33
|
-
resolved_num = resolve(
|
32
|
+
def words(number: 3, spaces_allowed: false)
|
33
|
+
resolved_num = resolve(number)
|
34
34
|
word_list = translate('faker.lovecraft.words')
|
35
35
|
word_list *= ((resolved_num / word_list.length) + 1)
|
36
36
|
|
@@ -40,32 +40,32 @@ module Faker
|
|
40
40
|
words.each_with_index { |w, i| words[i] = word if w =~ /\s/ }
|
41
41
|
end
|
42
42
|
|
43
|
-
def sentences(
|
43
|
+
def sentences(number: 3)
|
44
44
|
[].tap do |sentences|
|
45
|
-
1.upto(resolve(
|
46
|
-
sentences << sentence(3)
|
45
|
+
1.upto(resolve(number)) do
|
46
|
+
sentences << sentence(word_count: 3)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
def paragraph(sentence_count
|
52
|
-
sentences(resolve(sentence_count) + rand(random_sentences_to_add.to_i).to_i).join(' ')
|
51
|
+
def paragraph(sentence_count: 3, random_sentences_to_add: 3)
|
52
|
+
sentences(number: resolve(sentence_count) + rand(random_sentences_to_add.to_i).to_i).join(' ')
|
53
53
|
end
|
54
54
|
|
55
|
-
def paragraphs(
|
55
|
+
def paragraphs(number: 3)
|
56
56
|
[].tap do |paragraphs|
|
57
|
-
1.upto(resolve(
|
58
|
-
paragraphs << paragraph(3)
|
57
|
+
1.upto(resolve(number)) do
|
58
|
+
paragraphs << paragraph(sentence_count: 3)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def paragraph_by_chars(
|
64
|
-
paragraph = paragraph(3)
|
63
|
+
def paragraph_by_chars(characters: 256)
|
64
|
+
paragraph = paragraph(sentence_count: 3)
|
65
65
|
|
66
|
-
paragraph += ' ' + paragraph(3) while paragraph.length <
|
66
|
+
paragraph += ' ' + paragraph(sentence_count: 3) while paragraph.length < characters
|
67
67
|
|
68
|
-
paragraph[0...
|
68
|
+
paragraph[0...characters - 1] + '.'
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
data/lib/faker/creature/cat.rb
CHANGED
data/lib/faker/creature/dog.rb
CHANGED
data/lib/faker/creature/horse.rb
CHANGED
@@ -5,7 +5,7 @@ module Faker
|
|
5
5
|
flexible :address
|
6
6
|
|
7
7
|
class << self
|
8
|
-
def city(options
|
8
|
+
def city(options: {})
|
9
9
|
parse(options[:with_state] ? 'address.city_with_state' : 'address.city')
|
10
10
|
end
|
11
11
|
|
@@ -13,7 +13,7 @@ module Faker
|
|
13
13
|
parse('address.street_name')
|
14
14
|
end
|
15
15
|
|
16
|
-
def street_address(include_secondary
|
16
|
+
def street_address(include_secondary: false)
|
17
17
|
numerify(parse('address.street_address') + (include_secondary ? ' ' + secondary_address : ''))
|
18
18
|
end
|
19
19
|
|
@@ -29,7 +29,7 @@ module Faker
|
|
29
29
|
parse('address.community')
|
30
30
|
end
|
31
31
|
|
32
|
-
def zip_code(state_abbreviation
|
32
|
+
def zip_code(state_abbreviation: '')
|
33
33
|
if state_abbreviation.empty?
|
34
34
|
letterified_string = letterify(fetch('address.postcode'))
|
35
35
|
return numerify(letterified_string, leading_zero: true)
|
@@ -6,15 +6,15 @@ module Faker
|
|
6
6
|
ALPHABET = ('a'..'z').to_a
|
7
7
|
ALPHANUMS = ALPHABET + (0..9).to_a
|
8
8
|
|
9
|
-
def alpha(
|
10
|
-
char_count = resolve(
|
9
|
+
def alpha(number: 32)
|
10
|
+
char_count = resolve(number)
|
11
11
|
return '' if char_count.to_i < 1
|
12
12
|
|
13
13
|
Array.new(char_count) { sample(ALPHABET) }.join
|
14
14
|
end
|
15
15
|
|
16
|
-
def alphanumeric(
|
17
|
-
char_count = resolve(
|
16
|
+
def alphanumeric(number: 32)
|
17
|
+
char_count = resolve(number)
|
18
18
|
return '' if char_count.to_i < 1
|
19
19
|
|
20
20
|
Array.new(char_count) { sample(ALPHANUMS) }.join
|
data/lib/faker/default/avatar.rb
CHANGED
@@ -5,7 +5,7 @@ module Faker
|
|
5
5
|
class << self
|
6
6
|
SUPPORTED_FORMATS = %w[png jpg bmp].freeze
|
7
7
|
|
8
|
-
def image(slug
|
8
|
+
def image(slug: nil, size: '300x300', format: 'png', set: 'set1', bgset: nil)
|
9
9
|
raise ArgumentError, 'Size should be specified in format 300x300' unless size =~ /^[0-9]+x[0-9]+$/
|
10
10
|
raise ArgumentError, "Supported formats are #{SUPPORTED_FORMATS.join(', ')}" unless SUPPORTED_FORMATS.include?(format)
|
11
11
|
|
data/lib/faker/default/bank.rb
CHANGED
@@ -5,7 +5,7 @@ module Faker
|
|
5
5
|
flexible :bank
|
6
6
|
|
7
7
|
class << self
|
8
|
-
def account_number(digits
|
8
|
+
def account_number(digits: 10)
|
9
9
|
output = ''
|
10
10
|
|
11
11
|
output += rand.to_s[2..-1] while output.length < digits
|
@@ -13,7 +13,7 @@ module Faker
|
|
13
13
|
output[0...digits]
|
14
14
|
end
|
15
15
|
|
16
|
-
def iban(country_code
|
16
|
+
def iban(country_code: 'GB')
|
17
17
|
# Each country has it's own format for bank accounts
|
18
18
|
# Many of them use letters in certain parts of the account
|
19
19
|
# Using regex patterns we can create virtually any type of bank account
|