factory-helper 1.7.2 → 1.7.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: 49290064ffe7f5787ab0ef9b4e1917d9e628c7ed
4
- data.tar.gz: bd0fe13ab86afbe4e142c8f883be914dcbd6b364
3
+ metadata.gz: b6da63f932142e44ce11edd71bab598badb64c53
4
+ data.tar.gz: 04493c963464eaf1cdcdf9c2cd875d4bb9bfc35e
5
5
  SHA512:
6
- metadata.gz: 11921bb744d08e0c15f763fd36c3b85b902f0f511a2886e2c7187ea88364d6f01123abba6e49b46e64a1759c830bd47a7db10baa9402e421e9a45ff4aea0412e
7
- data.tar.gz: 316220e2ebff579ef5015aaab6b4c1cf37be03cdf60b7b883d5e9cb4764251717da567ec004b389f218b22ddd2aa9d0d1b6323c567d8bdb6a423829af2ae0d4c
6
+ metadata.gz: 17a27de292ae66e4dffb5d75611acad4d150cc3e596100a7417870405aa51733896bd6d5c708626bb5e29b011817031be77e883fb14c72eb2189ca09a072680c
7
+ data.tar.gz: caee66faea0cf88d53a03c6193c6e15c2a026303d02726c122501208dd059bc65ccd10110ca43f263885c4326367ca9fd4e0da35f8f27a92c5b4063c2dcaa9aa
data/README.md CHANGED
@@ -54,13 +54,14 @@ FactoryHelper::Company.bs #=> "revolutionize plug-and-play architectures"
54
54
 
55
55
  ###FactoryHelper::String
56
56
  -----------------
57
- Random UTF-8 string with an optional length argument.
57
+ Random UTF-8 string with optional nested length arguments.
58
58
 
59
59
  ```ruby
60
60
  FactoryHelper::String.random #=> "3 뇦\u0017&y\u{3A109}$8^4* 녹豿4좘툢ꔾ쉙6ɉ\uA6F8TN畀챵|\"3쇤Ŵ"
61
61
  FactoryHelper::String.random(4) #=> "⼨%0*"
62
62
  FactoryHelper::String.random(3..12) #=> "\u{69FDC};秨툫"
63
63
  FactoryHelper::String.random([0, 6]) #=> "I轤𣴒P溟L"
64
+ FactoryHelper::String.random([0, 3..12]) #=> "葓L#ћ"
64
65
  ```
65
66
 
66
67
 
@@ -3,7 +3,7 @@ module FactoryHelper
3
3
  class Internet < Base
4
4
  class << self
5
5
  def email(name = nil)
6
- [ user_name(name), domain_name ].join('@')
6
+ [ email_word, domain_name ].join('@')
7
7
  end
8
8
 
9
9
  def free_email(name = nil)
@@ -67,10 +67,6 @@ module FactoryHelper
67
67
  [ fix_umlauts(domain_word), domain_suffix ].join('.')
68
68
  end
69
69
 
70
- def domain_word
71
- Company.name.split(' ').first.gsub(/\W/, '').downcase
72
- end
73
-
74
70
  def domain_suffix
75
71
  fetch('internet.domain_suffix')
76
72
  end
@@ -121,6 +117,19 @@ module FactoryHelper
121
117
  string
122
118
  end
123
119
 
120
+ def domain_word
121
+ Lorem.word
122
+ end
123
+
124
+ private
125
+
126
+ def email_word
127
+ name= Name.first_name.downcase
128
+ return name unless name.empty?
129
+ I18n.with_locale('en') do
130
+ return Name.first_name.downcase
131
+ end
132
+ end
124
133
  end
125
134
  end
126
135
  end
@@ -1,3 +1,3 @@
1
1
  module FactoryHelper #:nodoc:
2
- VERSION = "1.7.2"
2
+ VERSION = "1.7.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Avvakumov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-11 00:00:00.000000000 Z
12
+ date: 2015-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler