faker 1.6.2 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8d813fb3f02fe0b9cc3240c9527146419ae204c
4
- data.tar.gz: 5f6f467713b08fa70f1e0584a5cbe6d850db4a6a
3
+ metadata.gz: 60e8a82dac923a23a59ecf9c9d5393f47871839a
4
+ data.tar.gz: b5c3a57051bb7fd13ca97a51a7a687ebe6b5c128
5
5
  SHA512:
6
- metadata.gz: fa43666ec5c059693a67abf16729e7e2b2c568362779e78f3048cb57f9d06d9dcdcec45ba221c7ff39a53af3193fa28833ca73a516237a31fb778626b8d14bb0
7
- data.tar.gz: f1cdfa4db3b887031455f01ea045a5fa59624d2588b03271e7d2269a616d43897a50d437882e3276137c22e182c5021a08eede35445a8aa9184cf210cb1aea26
6
+ metadata.gz: 56d14ef1ac946cdab85cadf2c2eb2f38d2477da48fdcd1323d8e1313c34c38861421d7505ba57f01e01e18925cf2fe1648bf2ac438874a5f016ac5fb800275cc
7
+ data.tar.gz: 61dca68c941316bfa157da3163aea701074e5a1fa200f63a94d5e63551680795d87aa3bab9d3173d6db83c56034253d7177115ab39eea3cfb9241bc2ff0610f6
@@ -1,3 +1,8 @@
1
+ == 1.6.3 2016-02-23
2
+ * Fix for UTF problem in Ruby 1.9.3
3
+ * Fix for Faker::StarWars.character
4
+ * Updated sv locale
5
+
1
6
  == 1.6.2 2016-02-20
2
7
  * Fix for locale-switching (Russian email addresses)
3
8
  * Added Faker::Beer, Faker::Boolean, Faker::Cat, Faker::StarWars, and Faker::Superhero
data/README.md CHANGED
@@ -655,6 +655,29 @@ Faker::StarWars.specie #=> "Gungan"
655
655
  Faker::StarWars.vehicle #=> "Sandcrawler"
656
656
  ```
657
657
 
658
+ ###Faker::Beer
659
+ ----------------
660
+
661
+ ```ruby
662
+ Faker::Beer.name #=> "Hercules Double IPA"
663
+
664
+ Faker::Beer.style #=> "Belgian Strong Ale"
665
+
666
+ Faker::Beer.hop #=> "Equinox"
667
+
668
+ Faker::Beer.yeast #=> "2278 - Czech Pils"
669
+
670
+ Faker::Beer.malts #=> "Rye malt"
671
+
672
+ Faker::Beer.ibu #=> "40 IBU"
673
+
674
+ Faker::Beer.alcohol #=> "6.3%"
675
+
676
+ Faker::Beer.blg #=> "18.5°Blg"
677
+ ```
678
+
679
+
680
+
658
681
  Customization
659
682
  ------------
660
683
  Since you may want to make addresses and other types of data look different
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Faker
2
3
  class Beer < Base
3
4
  flexible :beer
@@ -2,7 +2,7 @@ module Faker
2
2
  class StarWars < Base
3
3
  class << self
4
4
  def character
5
- planets.sample
5
+ characters.sample
6
6
  end
7
7
 
8
8
  def droid
@@ -1,3 +1,3 @@
1
1
  module Faker #:nodoc:
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
@@ -37,9 +37,10 @@ sv:
37
37
  domain_suffix: [se, nu, info, com, org]
38
38
 
39
39
  name:
40
- first_name_women: [Maria, Anna, Margareta, Elisabeth, Eva, Birgitta, Kristina, Karin, Elisabet, Marie]
41
- first_name_men: [Erik, Lars, Karl, Anders, Per, Johan, Nils, Lennart, Emil, Hans ]
42
- last_name: [Johansson, Andersson, Karlsson, Nilsson, Eriksson, Larsson, Olsson, Persson, Svensson, Gustafsson]
40
+ first_name_women: [Maria, Anna, Margareta, Elisabeth, Eva, Birgitta, Kristina, Karin, Elisabet, Marie, Åsa, Hjördis, Ingegärd]
41
+ first_name_men: [Erik, Lars, Karl, Anders, Per, Johan, Nils, Lennart, Emil, Hans, Jörgen, Göran, Håkan, Kåre]
42
+ first_name: [Erik, Lars, Karl, Anders, Per, Johan, Nils, Lennart, Emil, Hans, Jörgen, Göran, Håkan, Kåre, Maria, Anna, Margareta, Elisabeth, Eva, Birgitta, Kristina, Karin, Elisabet, Marie, Åsa, Hjördis, Ingegärd]
43
+ last_name: [Johansson, Andersson, Karlsson, Nilsson, Eriksson, Larsson, Olsson, Persson, Svensson, Gustafsson, Åslund, Östlund, Änglund]
43
44
  prefix: [Dr., Prof., PhD.]
44
45
 
45
46
  title:
@@ -47,20 +48,16 @@ sv:
47
48
  level: [Solutions, Program, Brand, Security, Research, Marketing, Directives, Implementation, Integration, Functionality, Response, Paradigm, Tactics, Identity, Markets, Group, Division, Applications, Optimization, Operations, Infrastructure, Intranet, Communications, Web, Branding, Quality, Assurance, Mobility, Accounts, Data, Creative, Configuration, Accountability, Interactions, Factors, Usability, Metrics]
48
49
  job: [Supervisor, Associate, Executive, Liaison, Officer, Manager, Engineer, Specialist, Director, Coordinator, Administrator, Architect, Analyst, Designer, Planner, Orchestrator, Technician, Developer, Producer, Consultant, Assistant, Facilitator, Agent, Representative, Strategist]
49
50
  name:
50
- - "#{first_name_women} #{last_name}"
51
- - "#{first_name_men} #{last_name}"
52
- - "#{first_name_women} #{last_name}"
53
- - "#{first_name_men} #{last_name}"
54
- - "#{first_name_women} #{last_name}"
55
- - "#{first_name_men} #{last_name}"
56
- - "#{prefix} #{first_name_men} #{last_name}"
57
- - "#{prefix} #{first_name_women} #{last_name}"
51
+ - "#{first_name} #{last_name}"
52
+ - "#{prefix} #{first_name} #{last_name}"
58
53
 
59
54
  phone_number:
60
55
  formats: ['####-#####', '####-######']
61
56
  cell_phone:
62
- common_cell_prefix: [070, 076, 073]
63
- formats: ['#{common_cell_prefix}-###-####']
57
+ formats:
58
+ - '070-###-####'
59
+ - '076-###-####'
60
+ - '073-###-####'
64
61
 
65
62
  commerce:
66
63
  color: [vit, silver, grå, svart, röd, grön, blå, gul, lila, indigo, guld, brun, rosa, purpur, korall]
@@ -0,0 +1,28 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
2
+
3
+ class TestSVLocale < Test::Unit::TestCase
4
+ def setup
5
+ Faker::Config.locale = 'sv'
6
+ end
7
+
8
+ def teardown
9
+ Faker::Config.locale = nil
10
+ end
11
+
12
+ def test_sv_names
13
+ assert Faker::Name.name.is_a? String
14
+ assert Faker::Name.first_name.is_a? String
15
+ assert Faker::Name.first_name_men.is_a? String
16
+ assert Faker::Name.first_name_women.is_a? String
17
+ assert Faker::Name.last_name.is_a? String
18
+ end
19
+
20
+ def test_sv_phone_number
21
+ assert Faker::PhoneNumber.cell_phone.match(/^07[036]{1}[\-\s]?\d{3}[\-\s]?\d{4}$/)
22
+ assert Faker::PhoneNumber.phone_number.match(/^\d{4}[\s\-]?\d{4,6}$/)
23
+ end
24
+
25
+ def test_sv_post_code
26
+ assert Faker::Address.postcode.match(/^[\d]{5}$/)
27
+ end
28
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Curtis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-21 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -157,6 +157,7 @@ files:
157
157
  - test/test_pl_locale.rb
158
158
  - test/test_placeholdit.rb
159
159
  - test/test_pt_locale.rb
160
+ - test/test_sv_locale.rb
160
161
  - test/test_uk_locale.rb
161
162
  homepage: https://github.com/stympy/faker
162
163
  licenses:
@@ -231,4 +232,5 @@ test_files:
231
232
  - test/test_pl_locale.rb
232
233
  - test/test_placeholdit.rb
233
234
  - test/test_pt_locale.rb
235
+ - test/test_sv_locale.rb
234
236
  - test/test_uk_locale.rb