faker 2.1.2 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -7
- data/README.md +2 -2
- data/lib/faker.rb +22 -1
- data/lib/faker/books/dune.rb +12 -2
- data/lib/faker/books/lovecraft.rb +54 -7
- data/lib/faker/default/address.rb +30 -5
- data/lib/faker/default/alphanumeric.rb +45 -7
- data/lib/faker/default/app.rb +16 -1
- data/lib/faker/default/avatar.rb +24 -1
- data/lib/faker/default/bank.rb +12 -2
- data/lib/faker/default/boolean.rb +6 -1
- data/lib/faker/default/chile_rut.rb +20 -2
- data/lib/faker/default/code.rb +22 -3
- data/lib/faker/default/commerce.rb +26 -3
- data/lib/faker/default/company.rb +12 -2
- data/lib/faker/default/crypto_coin.rb +18 -3
- data/lib/faker/default/date.rb +48 -5
- data/lib/faker/default/demographic.rb +6 -1
- data/lib/faker/default/driving_licence.rb +20 -4
- data/lib/faker/default/file.rb +36 -2
- data/lib/faker/default/fillmurray.rb +16 -1
- data/lib/faker/default/finance.rb +6 -1
- data/lib/faker/default/hipster.rb +78 -6
- data/lib/faker/default/id_number.rb +12 -2
- data/lib/faker/default/internet.rb +124 -13
- data/lib/faker/default/invoice.rb +22 -3
- data/lib/faker/default/json.rb +26 -2
- data/lib/faker/default/lorem.rb +120 -10
- data/lib/faker/default/lorem_flickr.rb +69 -5
- data/lib/faker/default/lorem_pixel.rb +26 -1
- data/lib/faker/default/markdown.rb +10 -1
- data/lib/faker/default/measurement.rb +48 -8
- data/lib/faker/default/name.rb +6 -1
- data/lib/faker/default/nhs.rb +6 -1
- data/lib/faker/default/number.rb +81 -11
- data/lib/faker/default/omniauth.rb +84 -5
- data/lib/faker/default/phone_number.rb +6 -1
- data/lib/faker/default/placeholdit.rb +24 -1
- data/lib/faker/default/relationship.rb +6 -1
- data/lib/faker/default/source.rb +22 -3
- data/lib/faker/default/string.rb +6 -1
- data/lib/faker/default/stripe.rb +24 -4
- data/lib/faker/default/time.rb +68 -4
- data/lib/faker/default/twitter.rb +26 -3
- data/lib/faker/default/types.rb +38 -5
- data/lib/faker/default/vehicle.rb +22 -3
- data/lib/faker/default/world_cup.rb +16 -2
- data/lib/faker/games/dota.rb +6 -1
- data/lib/faker/movies/star_wars.rb +6 -1
- data/lib/faker/version.rb +1 -1
- metadata +5 -5
data/lib/faker/games/dota.rb
CHANGED
@@ -20,7 +20,12 @@ module Faker
|
|
20
20
|
fetch('games.dota.player')
|
21
21
|
end
|
22
22
|
|
23
|
-
def quote(hero: 'abaddon')
|
23
|
+
def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon')
|
24
|
+
if legacy_hero != NOT_GIVEN
|
25
|
+
warn_with_uplevel 'Passing `hero` with the 1st argument of `Dota.quote` is deprecated. Use keyword argument like `Dota.quote(hero: ...)` instead.', uplevel: 1
|
26
|
+
hero = legacy_hero
|
27
|
+
end
|
28
|
+
|
24
29
|
fetch("games.dota.#{hero}.quote")
|
25
30
|
end
|
26
31
|
end
|
@@ -44,7 +44,12 @@ module Faker
|
|
44
44
|
sentence + sample(['.', '?', '!'])
|
45
45
|
end
|
46
46
|
|
47
|
-
def quote(character: nil)
|
47
|
+
def quote(legacy_character = NOT_GIVEN, character: nil)
|
48
|
+
if legacy_character != NOT_GIVEN
|
49
|
+
warn_with_uplevel 'Passing `character` with the 1st argument of `StarWars.quote` is deprecated. Use keyword argument like `StarWars.quote(character: ...)` instead.', uplevel: 1
|
50
|
+
character = legacy_character
|
51
|
+
end
|
52
|
+
|
48
53
|
quoted_characters = translate('faker.star_wars.quotes')
|
49
54
|
|
50
55
|
if character.nil?
|
data/lib/faker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Curtis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-08-
|
12
|
+
date: 2019-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -101,14 +101,14 @@ dependencies:
|
|
101
101
|
requirements:
|
102
102
|
- - '='
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 3.
|
104
|
+
version: 3.3.3
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - '='
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 3.
|
111
|
+
version: 3.3.3
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: timecop
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -536,7 +536,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
536
536
|
- !ruby/object:Gem::Version
|
537
537
|
version: '0'
|
538
538
|
requirements: []
|
539
|
-
rubygems_version: 3.0.
|
539
|
+
rubygems_version: 3.0.3
|
540
540
|
signing_key:
|
541
541
|
specification_version: 4
|
542
542
|
summary: Easily generate fake data
|