mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 04:55:08 +01:00
82d2069c75
* Bump faker from 1.9.6 to 2.1.0 Bumps [faker](https://github.com/stympy/faker) from 1.9.6 to 2.1.0. - [Release notes](https://github.com/stympy/faker/releases) - [Changelog](https://github.com/stympy/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/stympy/faker/compare/1.9.6...v2.1.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Use faker api v2 https://github.com/stympy/faker/releases/tag/2.0
14 lines
542 B
Ruby
14 lines
542 B
Ruby
keypair = OpenSSL::PKey::RSA.new(2048)
|
|
public_key = keypair.public_key.to_pem
|
|
private_key = keypair.to_pem
|
|
|
|
Fabricator(:account) do
|
|
transient :suspended, :silenced
|
|
username { sequence(:username) { |i| "#{Faker::Internet.user_name(separators: %w(_))}#{i}" } }
|
|
last_webfingered_at { Time.now.utc }
|
|
public_key { public_key }
|
|
private_key { private_key }
|
|
suspended_at { |attrs| attrs[:suspended] ? Time.now.utc : nil }
|
|
silenced_at { |attrs| attrs[:silenced] ? Time.now.utc : nil }
|
|
end
|