ffaker 1.25.0 → 1.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/Changelog.md +18 -0
- data/README.md +1 -0
- data/ffaker.gemspec +14 -2
- data/lib/ffaker.rb +9 -1
- data/lib/ffaker/address_us.rb +10 -0
- data/lib/ffaker/boolean.rb +2 -0
- data/lib/ffaker/course_fr.rb +22 -0
- data/lib/ffaker/courses.rb +22 -0
- data/lib/ffaker/data/lorem_fr/words +193 -10343
- data/lib/ffaker/data/mathematiques/lessons +58 -0
- data/lib/ffaker/data/philosophie/lessons +17 -0
- data/lib/ffaker/data/vehicle/makes_list +2 -3
- data/lib/ffaker/gender.rb +17 -0
- data/lib/ffaker/gender_cn.rb +17 -0
- data/lib/ffaker/guid.rb +12 -0
- data/lib/ffaker/internet.rb +12 -3
- data/test/test_address_us.rb +8 -0
- data/test/test_course_mathematiques.rb +11 -0
- data/test/test_course_philosophie.rb +11 -0
- data/test/test_food.rb +1 -1
- data/test/test_gender.rb +15 -0
- data/test/test_gender_cn.rb +15 -0
- data/test/test_guid.rb +9 -0
- data/test/test_hipster_ipsum.rb +8 -6
- data/test/test_internet.rb +22 -0
- metadata +64 -41
@@ -0,0 +1,58 @@
|
|
1
|
+
Racine carrée
|
2
|
+
NOMBRE DÉCIMAUX ARITHMÉTIQUES
|
3
|
+
ADDITION DE DEUX NOMBRES DÉCIMAUX
|
4
|
+
SOUSTRACTION DE DEUX NOMBRES DÉCIMAUX ARITHMÉTIQUES
|
5
|
+
RANGEMENT DES NOMBRES DÉCIMAUX ARITHMÉTIQUES
|
6
|
+
MULTIPLICATION DES NOMBRES DÉCIMAUX ARITHMÉTIQUES
|
7
|
+
DIVISION DES NOMBRES DÉCIMAUX ARITHMÉTIQUES
|
8
|
+
ORGANISATION D’UN CALCUL
|
9
|
+
PROPORTIONNALITÉ
|
10
|
+
NOMBRES DÉCIMAUX RELATIFS
|
11
|
+
REPÉRAGE
|
12
|
+
INTRODUCTION A LA GÉOMÉTRIE
|
13
|
+
LE CERCLE
|
14
|
+
DROITES PERPENDICULAIRES ET DROITES PARALLELES
|
15
|
+
SYMETRIE ORTHOGONALE PAR RAPPORT A UNE DROITE DONNEE
|
16
|
+
LES ANGLES
|
17
|
+
LES POLYGONES
|
18
|
+
LES AIRES
|
19
|
+
LA GÉOMÉTRIE DANS L’ESPACE
|
20
|
+
REPÉRAGE SUR LA SPHERE
|
21
|
+
PUISSANCE DANS D
|
22
|
+
MULTIPLES ET DIVISEURS
|
23
|
+
LES FRACTIONS
|
24
|
+
LA PROPORTIONNALITE
|
25
|
+
NOMBRES DECIMAUX RELATIFS
|
26
|
+
REPRESENTATION GRAPHIQUE D’UN TABLEAU DE CORRESPONDANCE
|
27
|
+
SYMETRIE CENTRALE
|
28
|
+
LES ANGLES
|
29
|
+
LES PARALLELOGRAMMES
|
30
|
+
LES TRIANGLES
|
31
|
+
LES AUTRES QUADRILATERES
|
32
|
+
LA GEOMETRE DANS L’ESPACE
|
33
|
+
STATISTIQUES
|
34
|
+
THÉORÈME DE THALÈS
|
35
|
+
RELATIONS TRIGONOMÉTRIQUES DANS UN TRIANGLE RECTANGLE
|
36
|
+
ANGLE INSCRIT
|
37
|
+
VECTEURS
|
38
|
+
TRANSFORMATIONS DU PLAN
|
39
|
+
REPÉRAGE DANS LE PLAN
|
40
|
+
GÉOMÉTRIE DANS L'ESPACE
|
41
|
+
NOMBRES RATIONNELS
|
42
|
+
Calcul algébrique
|
43
|
+
EQUATIONS A UNE INCONNUE
|
44
|
+
INEQUATIONS ET SYSTEMES DE DEUX INEQUATIONS A UNE INCONNUE
|
45
|
+
APPLICATIONS LINEAIRES
|
46
|
+
STATISTIQUES
|
47
|
+
DISTANCES
|
48
|
+
DROITES DES MILIEUX
|
49
|
+
DROITES REMARQUABLES DANS UN TRIANGLE ; BISSECTRICES ET MEDIANES
|
50
|
+
TRIANGLE RECTANGLE
|
51
|
+
TRANSLATIONS ET VECTEURS
|
52
|
+
ROTATIONS ET POLYGONES REGULIERS
|
53
|
+
PROJECTION ORTHOGONALE DANS LE PLAN
|
54
|
+
GEOMETRIE DANS L'ESPACE
|
55
|
+
APPLICATIONS AFFINES ET APPLICATIONS AFFINES PAR INTERVALLES
|
56
|
+
EQUATIONS ET INEQUATIONS A UNE INCONNUE
|
57
|
+
ÉQUATIONS ET SYSTÈME D'ÉQUATIONS À DEUX INCONNUES
|
58
|
+
INÉQUATIONS ET SYSTÈME D'INÉQUATIONS À DEUX INCONNUES
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Introduction à la philosophie
|
2
|
+
L’interrogation métaphysique
|
3
|
+
L’interrogation axiologique
|
4
|
+
L’interrogation anthropologique
|
5
|
+
La problématique de l’existence d’une philosophie africaine
|
6
|
+
Nature et Culture
|
7
|
+
Le travail
|
8
|
+
Le langage
|
9
|
+
Les normes
|
10
|
+
La conscience, l’inconscient
|
11
|
+
l’Etat
|
12
|
+
la Liberté
|
13
|
+
L’émergence de la pensée scientifique
|
14
|
+
Les typologies de science
|
15
|
+
Science et technique.
|
16
|
+
la problématique du beau
|
17
|
+
Fonctions et significations de l’œuvre d’art.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Acura
|
2
2
|
Alfa Romeo
|
3
|
-
AMC
|
4
3
|
AM General
|
4
|
+
AMC
|
5
5
|
Aston Martin
|
6
6
|
Audi
|
7
7
|
Autocar
|
@@ -63,7 +63,6 @@ Saab
|
|
63
63
|
Saleen
|
64
64
|
Saturn
|
65
65
|
Scion
|
66
|
-
smart
|
67
66
|
Smart
|
68
67
|
Sterling
|
69
68
|
Subaru
|
@@ -71,4 +70,4 @@ Suzuki
|
|
71
70
|
Tesla
|
72
71
|
Toyota
|
73
72
|
Volkswagen
|
74
|
-
Volvo
|
73
|
+
Volvo
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
module Gender
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
GENDERS = ['male', 'female']
|
9
|
+
|
10
|
+
def random
|
11
|
+
GENDERS[rand(GENDERS.size)]
|
12
|
+
end
|
13
|
+
|
14
|
+
alias_method :maybe, :random
|
15
|
+
alias_method :sample, :random
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Faker
|
4
|
+
module GenderCN
|
5
|
+
extend ModuleUtils
|
6
|
+
extend self
|
7
|
+
|
8
|
+
GENDERS = ['男', '女']
|
9
|
+
|
10
|
+
def random
|
11
|
+
GENDERS[rand(GENDERS.size)]
|
12
|
+
end
|
13
|
+
|
14
|
+
alias_method :maybe, :random
|
15
|
+
alias_method :sample, :random
|
16
|
+
end
|
17
|
+
end
|
data/lib/ffaker/guid.rb
ADDED
data/lib/ffaker/internet.rb
CHANGED
@@ -19,6 +19,10 @@ module Faker
|
|
19
19
|
"#{user_name(name)}@#{HOSTS.rand}"
|
20
20
|
end
|
21
21
|
|
22
|
+
def safe_email(name = nil)
|
23
|
+
[user_name(name), 'example.'+ %w[org com net].shuffle.first].join('@')
|
24
|
+
end
|
25
|
+
|
22
26
|
def user_name(name = nil)
|
23
27
|
if name
|
24
28
|
parts = ArrayUtils.shuffle(name.scan(/\w+/)).join(ArrayUtils.rand(%w(. _)))
|
@@ -67,15 +71,20 @@ module Faker
|
|
67
71
|
def slug(words = nil, glue = nil)
|
68
72
|
glue ||= SLUG_DELIMITERS.rand
|
69
73
|
|
70
|
-
(words || Faker::Lorem::words(2).join(
|
74
|
+
(words || Faker::Lorem::words(2).join(glue)).downcase
|
71
75
|
end
|
72
76
|
|
73
|
-
def password(min_length=
|
77
|
+
def password(min_length = 8, max_length = 16)
|
74
78
|
temp = Lorem.words.join
|
79
|
+
|
75
80
|
while temp.length < min_length
|
76
81
|
temp += Lorem.word
|
77
82
|
end
|
78
|
-
|
83
|
+
if max_length > min_length && temp.length > max_length
|
84
|
+
temp = temp.slice(0, max_length)
|
85
|
+
end
|
86
|
+
|
87
|
+
temp
|
79
88
|
end
|
80
89
|
|
81
90
|
BYTE = k((0..255).to_a.map { |n| n.to_s })
|
data/test/test_address_us.rb
CHANGED
@@ -15,6 +15,14 @@ class TestAddressUSUS < Test::Unit::TestCase
|
|
15
15
|
assert_match /[A-Z]/, Faker::AddressUS.state_and_territories_abbr
|
16
16
|
end
|
17
17
|
|
18
|
+
def test_us_continental_state
|
19
|
+
assert_match /[ a-z]/, Faker::AddressUS.continental_state
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_us_continental_state_abbr
|
23
|
+
assert_match /[A-Z]/, Faker::AddressUS.continental_state_abbr
|
24
|
+
end
|
25
|
+
|
18
26
|
def test_zip_code
|
19
27
|
assert_match /[0-9]/, Faker::AddressUS.zip_code
|
20
28
|
end
|
data/test/test_food.rb
CHANGED
data/test/test_gender.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
|
5
|
+
class TestFakerGender < Test::Unit::TestCase
|
6
|
+
def setup
|
7
|
+
@tester = Faker::Gender
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_random
|
11
|
+
generder_regex = /['male', 'female']/
|
12
|
+
assert_match generder_regex, @tester.random.to_s
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
|
5
|
+
class TestFakerGenderCN < Test::Unit::TestCase
|
6
|
+
def setup
|
7
|
+
@tester = Faker::GenderCN
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_random
|
11
|
+
generder_regex = /['男', '女']/
|
12
|
+
assert_match generder_regex, @tester.random.to_s
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/test/test_guid.rb
ADDED
data/test/test_hipster_ipsum.rb
CHANGED
@@ -3,27 +3,29 @@
|
|
3
3
|
require 'helper'
|
4
4
|
|
5
5
|
class TestHipsterIpsum < Test::Unit::TestCase
|
6
|
+
TEST_REGEX = /\+1|[ a-z]+/i
|
7
|
+
|
6
8
|
def test_paragraph
|
7
|
-
assert_match
|
9
|
+
assert_match TEST_REGEX, Faker::HipsterIpsum.paragraph
|
8
10
|
end
|
9
11
|
|
10
12
|
def test_sentence
|
11
|
-
assert_match
|
13
|
+
assert_match TEST_REGEX, Faker::HipsterIpsum.sentence
|
12
14
|
end
|
13
15
|
|
14
16
|
def test_paragraphs
|
15
|
-
assert_match
|
17
|
+
assert_match TEST_REGEX, Faker::HipsterIpsum.paragraphs.join(" ")
|
16
18
|
end
|
17
19
|
|
18
20
|
def test_sentences
|
19
|
-
assert_match
|
21
|
+
assert_match TEST_REGEX, Faker::HipsterIpsum.sentences.join(" ")
|
20
22
|
end
|
21
23
|
|
22
24
|
def test_words
|
23
|
-
assert_match
|
25
|
+
assert_match TEST_REGEX, Faker::HipsterIpsum.words.join(" ")
|
24
26
|
end
|
25
27
|
|
26
28
|
def test_word
|
27
|
-
assert_match
|
29
|
+
assert_match TEST_REGEX, Faker::HipsterIpsum.word
|
28
30
|
end
|
29
31
|
end
|
data/test/test_internet.rb
CHANGED
@@ -23,6 +23,10 @@ class TestFakerInternet < Test::Unit::TestCase
|
|
23
23
|
assert @tester.disposable_email.match(/.+@(mailinator\.com|suremail\.info|spamherelots\.com|binkmail\.com|safetymail\.info)/)
|
24
24
|
end
|
25
25
|
|
26
|
+
def test_safe_email
|
27
|
+
assert @tester.safe_email.match(/.+@example.(com|net|org)/)
|
28
|
+
end
|
29
|
+
|
26
30
|
def test_user_name
|
27
31
|
assert @tester.user_name.match(/[a-z]+((_|\.)[a-z]+)?/)
|
28
32
|
end
|
@@ -64,4 +68,22 @@ class TestFakerInternet < Test::Unit::TestCase
|
|
64
68
|
def test_password
|
65
69
|
assert @tester.password.match(/[a-z]+/)
|
66
70
|
end
|
71
|
+
|
72
|
+
def test_password_min_length
|
73
|
+
assert @tester.password(3).length > 2
|
74
|
+
assert @tester.password(6).length > 5
|
75
|
+
assert @tester.password(15).length > 14
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_password_max_length
|
79
|
+
assert @tester.password(3, 10).length < 11
|
80
|
+
assert @tester.password(7, 15).length < 16
|
81
|
+
assert @tester.password(1, 3).length < 4
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_password_strange_argument
|
85
|
+
assert @tester.password(10, 2).length > 9
|
86
|
+
assert @tester.password(3, 1).length > 2
|
87
|
+
assert @tester.password(8, 5).length > 7
|
88
|
+
end
|
67
89
|
end
|
metadata
CHANGED
@@ -1,48 +1,52 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffaker
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.30.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Emmanuel Oga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Version
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
21
19
|
version: 10.1.1
|
22
20
|
type: :development
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: test-unit
|
26
21
|
prerelease: false
|
27
|
-
|
28
|
-
requirements:
|
29
|
-
-
|
30
|
-
-
|
31
|
-
|
32
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 10.1.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: test-unit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
33
34
|
type: :development
|
34
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
35
41
|
description: Faster Faker, generates dummy data.
|
36
42
|
email: EmmanuelOga@gmail.com
|
37
43
|
executables: []
|
38
|
-
|
39
44
|
extensions: []
|
40
|
-
|
41
|
-
extra_rdoc_files:
|
45
|
+
extra_rdoc_files:
|
42
46
|
- README.md
|
43
47
|
- LICENSE
|
44
48
|
- Changelog.md
|
45
|
-
files:
|
49
|
+
files:
|
46
50
|
- Changelog.md
|
47
51
|
- Gemfile
|
48
52
|
- LICENSE
|
@@ -71,6 +75,8 @@ files:
|
|
71
75
|
- lib/ffaker/company_it.rb
|
72
76
|
- lib/ffaker/company_se.rb
|
73
77
|
- lib/ffaker/conference.rb
|
78
|
+
- lib/ffaker/course_fr.rb
|
79
|
+
- lib/ffaker/courses.rb
|
74
80
|
- lib/ffaker/data/address/city_suffixes
|
75
81
|
- lib/ffaker/data/address/country
|
76
82
|
- lib/ffaker/data/address/country_code
|
@@ -136,6 +142,7 @@ files:
|
|
136
142
|
- lib/ffaker/data/lorem_ar/words
|
137
143
|
- lib/ffaker/data/lorem_cn/words
|
138
144
|
- lib/ffaker/data/lorem_fr/words
|
145
|
+
- lib/ffaker/data/mathematiques/lessons
|
139
146
|
- lib/ffaker/data/movie/adj_and_adv
|
140
147
|
- lib/ffaker/data/movie/nouns
|
141
148
|
- lib/ffaker/data/movie/prefixes
|
@@ -184,6 +191,7 @@ files:
|
|
184
191
|
- lib/ffaker/data/name_vn/first_names
|
185
192
|
- lib/ffaker/data/name_vn/last_names
|
186
193
|
- lib/ffaker/data/name_vn/middle_names
|
194
|
+
- lib/ffaker/data/philosophie/lessons
|
187
195
|
- lib/ffaker/data/phone_number_it/home_phone_prefixes
|
188
196
|
- lib/ffaker/data/phone_number_it/mobile_phone_prefixes
|
189
197
|
- lib/ffaker/data/phone_number_se/phone_prefix
|
@@ -200,7 +208,10 @@ files:
|
|
200
208
|
- lib/ffaker/dizzle_ipsum.rb
|
201
209
|
- lib/ffaker/education.rb
|
202
210
|
- lib/ffaker/food.rb
|
211
|
+
- lib/ffaker/gender.rb
|
212
|
+
- lib/ffaker/gender_cn.rb
|
203
213
|
- lib/ffaker/geolocation.rb
|
214
|
+
- lib/ffaker/guid.rb
|
204
215
|
- lib/ffaker/healthcare_ipsum.rb
|
205
216
|
- lib/ffaker/hipster_ipsum.rb
|
206
217
|
- lib/ffaker/html_ipsum.rb
|
@@ -291,11 +302,16 @@ files:
|
|
291
302
|
- test/test_company_it.rb
|
292
303
|
- test/test_company_se.rb
|
293
304
|
- test/test_conference.rb
|
305
|
+
- test/test_course_mathematiques.rb
|
306
|
+
- test/test_course_philosophie.rb
|
294
307
|
- test/test_dizzle_ipsum.rb
|
295
308
|
- test/test_education.rb
|
296
309
|
- test/test_faker.rb
|
297
310
|
- test/test_food.rb
|
311
|
+
- test/test_gender.rb
|
312
|
+
- test/test_gender_cn.rb
|
298
313
|
- test/test_geolocation.rb
|
314
|
+
- test/test_guid.rb
|
299
315
|
- test/test_healthcare_ipsum.rb
|
300
316
|
- test/test_hipster_ipsum.rb
|
301
317
|
- test/test_html_ipsum.rb
|
@@ -354,29 +370,31 @@ files:
|
|
354
370
|
- test/test_vehicle.rb
|
355
371
|
- test/test_venue.rb
|
356
372
|
homepage: http://github.com/emmanueloga/ffaker
|
357
|
-
licenses:
|
373
|
+
licenses:
|
358
374
|
- MIT
|
359
375
|
metadata: {}
|
360
|
-
|
361
376
|
post_install_message:
|
362
|
-
rdoc_options:
|
363
|
-
- --charset=UTF-8
|
364
|
-
require_paths:
|
377
|
+
rdoc_options:
|
378
|
+
- "--charset=UTF-8"
|
379
|
+
require_paths:
|
365
380
|
- lib
|
366
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
367
|
-
requirements:
|
368
|
-
-
|
369
|
-
|
370
|
-
|
371
|
-
|
381
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
382
|
+
requirements:
|
383
|
+
- - ">="
|
384
|
+
- !ruby/object:Gem::Version
|
385
|
+
version: '0'
|
386
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
387
|
+
requirements:
|
388
|
+
- - ">="
|
389
|
+
- !ruby/object:Gem::Version
|
390
|
+
version: '0'
|
372
391
|
requirements: []
|
373
|
-
|
374
392
|
rubyforge_project: ffaker
|
375
|
-
rubygems_version: 2.0
|
393
|
+
rubygems_version: 2.3.0
|
376
394
|
signing_key:
|
377
395
|
specification_version: 2
|
378
396
|
summary: Faster Faker, generates dummy data.
|
379
|
-
test_files:
|
397
|
+
test_files:
|
380
398
|
- test/test_address.rb
|
381
399
|
- test/test_address_au.rb
|
382
400
|
- test/test_address_br.rb
|
@@ -398,11 +416,16 @@ test_files:
|
|
398
416
|
- test/test_company_it.rb
|
399
417
|
- test/test_company_se.rb
|
400
418
|
- test/test_conference.rb
|
419
|
+
- test/test_course_mathematiques.rb
|
420
|
+
- test/test_course_philosophie.rb
|
401
421
|
- test/test_dizzle_ipsum.rb
|
402
422
|
- test/test_education.rb
|
403
423
|
- test/test_faker.rb
|
404
424
|
- test/test_food.rb
|
425
|
+
- test/test_gender.rb
|
426
|
+
- test/test_gender_cn.rb
|
405
427
|
- test/test_geolocation.rb
|
428
|
+
- test/test_guid.rb
|
406
429
|
- test/test_healthcare_ipsum.rb
|
407
430
|
- test/test_hipster_ipsum.rb
|
408
431
|
- test/test_html_ipsum.rb
|