faker 2.1.2 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -7
  3. data/README.md +2 -2
  4. data/lib/faker.rb +22 -1
  5. data/lib/faker/books/dune.rb +12 -2
  6. data/lib/faker/books/lovecraft.rb +54 -7
  7. data/lib/faker/default/address.rb +30 -5
  8. data/lib/faker/default/alphanumeric.rb +45 -7
  9. data/lib/faker/default/app.rb +16 -1
  10. data/lib/faker/default/avatar.rb +24 -1
  11. data/lib/faker/default/bank.rb +12 -2
  12. data/lib/faker/default/boolean.rb +6 -1
  13. data/lib/faker/default/chile_rut.rb +20 -2
  14. data/lib/faker/default/code.rb +22 -3
  15. data/lib/faker/default/commerce.rb +26 -3
  16. data/lib/faker/default/company.rb +12 -2
  17. data/lib/faker/default/crypto_coin.rb +18 -3
  18. data/lib/faker/default/date.rb +48 -5
  19. data/lib/faker/default/demographic.rb +6 -1
  20. data/lib/faker/default/driving_licence.rb +20 -4
  21. data/lib/faker/default/file.rb +36 -2
  22. data/lib/faker/default/fillmurray.rb +16 -1
  23. data/lib/faker/default/finance.rb +6 -1
  24. data/lib/faker/default/hipster.rb +78 -6
  25. data/lib/faker/default/id_number.rb +12 -2
  26. data/lib/faker/default/internet.rb +124 -13
  27. data/lib/faker/default/invoice.rb +22 -3
  28. data/lib/faker/default/json.rb +26 -2
  29. data/lib/faker/default/lorem.rb +120 -10
  30. data/lib/faker/default/lorem_flickr.rb +69 -5
  31. data/lib/faker/default/lorem_pixel.rb +26 -1
  32. data/lib/faker/default/markdown.rb +10 -1
  33. data/lib/faker/default/measurement.rb +48 -8
  34. data/lib/faker/default/name.rb +6 -1
  35. data/lib/faker/default/nhs.rb +6 -1
  36. data/lib/faker/default/number.rb +81 -11
  37. data/lib/faker/default/omniauth.rb +84 -5
  38. data/lib/faker/default/phone_number.rb +6 -1
  39. data/lib/faker/default/placeholdit.rb +24 -1
  40. data/lib/faker/default/relationship.rb +6 -1
  41. data/lib/faker/default/source.rb +22 -3
  42. data/lib/faker/default/string.rb +6 -1
  43. data/lib/faker/default/stripe.rb +24 -4
  44. data/lib/faker/default/time.rb +68 -4
  45. data/lib/faker/default/twitter.rb +26 -3
  46. data/lib/faker/default/types.rb +38 -5
  47. data/lib/faker/default/vehicle.rb +22 -3
  48. data/lib/faker/default/world_cup.rb +16 -2
  49. data/lib/faker/games/dota.rb +6 -1
  50. data/lib/faker/movies/star_wars.rb +6 -1
  51. data/lib/faker/version.rb +1 -1
  52. metadata +5 -5
@@ -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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faker #:nodoc:
4
- VERSION = '2.1.2'
4
+ VERSION = '2.2.1'
5
5
  end
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.2
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-11 00:00:00.000000000 Z
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.2.8
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.2.8
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.4
539
+ rubygems_version: 3.0.3
540
540
  signing_key:
541
541
  specification_version: 4
542
542
  summary: Easily generate fake data