139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# File 'lib/copydb.rb', line 139
def self.anonymize(type)
if type == "name"
Faker::Name.name
elsif type == "first_name"
Faker::Name.first_name
elsif type == "last_name"
Faker::Name.last_name
elsif type == "street_address"
Faker::Address.street_address
elsif type == "city"
Faker::Address.city
elsif type == "zip"
Faker::Address.zip_code
elsif type == "phone"
Faker::PhoneNumber.phone_number
elsif type == "email"
Faker::Internet.free_email
elsif type == "company"
Faker::Company.name
elsif type == "date"
"2011-11-11"
elsif type == "lorem"
Faker::Lorem.sentence(20)
else
Faker::Lorem.sentence
end
end
|