Gab Social. All are welcome.

This commit is contained in:
robcolbert
2019-07-02 03:10:25 -04:00
commit bd0b5afc92
5366 changed files with 222812 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
Fabricator :access_token, from: 'Doorkeeper::AccessToken' do
end

View File

@@ -0,0 +1,4 @@
Fabricator :accessible_access_token, from: :access_token do
expires_in { nil }
revoked_at { nil }
end

View File

@@ -0,0 +1,4 @@
Fabricator(:account_domain_block) do
account
domain 'example.com'
end

View File

@@ -0,0 +1,13 @@
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(nil, %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

View File

@@ -0,0 +1,8 @@
Fabricator(:account_identity_proof) do
account
provider 'keybase'
provider_username { sequence(:provider_username) { |i| "#{Faker::Lorem.characters(15)}" } }
token { sequence(:token) { |i| "#{i}#{Faker::Crypto.sha1()*2}"[0..65] } }
verified false
live false
end

View File

@@ -0,0 +1,4 @@
Fabricator(:account_moderation_note) do
content "MyText"
account nil
end

View File

@@ -0,0 +1,4 @@
Fabricator(:account_pin) do
account nil
target_account nil
end

View File

@@ -0,0 +1,6 @@
Fabricator(:account_stat) do
account nil
statuses_count ""
following_count ""
followers_count ""
end

View File

@@ -0,0 +1,3 @@
Fabricator(:account_tag_stat) do
accounts_count ""
end

View File

@@ -0,0 +1,5 @@
Fabricator(:account_warning) do
account nil
target_account nil
text "MyText"
end

View File

@@ -0,0 +1,3 @@
Fabricator(:account_warning_preset) do
text "MyText"
end

View File

@@ -0,0 +1,5 @@
Fabricator('Admin::ActionLog') do
account nil
action "MyString"
target nil
end

View File

@@ -0,0 +1,5 @@
Fabricator(:application, from: Doorkeeper::Application) do
name 'Example'
website 'http://example.com'
redirect_uri 'http://example.com/callback'
end

View File

@@ -0,0 +1,6 @@
This "Utah teapot" photograph is licensed under the Creative Commons
Attribution-Share Alike 3.0 Unported license:
https://creativecommons.org/licenses/by-sa/3.0/deed.en
Original source of work:
https://commons.wikimedia.org/wiki/File:Utah_teapot_simple_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

View File

@@ -0,0 +1,3 @@
Fabricator(:backup) do
user
end

View File

@@ -0,0 +1,4 @@
Fabricator(:block) do
account
target_account { Fabricate(:account) }
end

View File

@@ -0,0 +1,6 @@
Fabricator(:conversation_account) do
account nil
conversation nil
participant_account_ids ""
last_status nil
end

View File

@@ -0,0 +1,2 @@
Fabricator(:conversation) do
end

View File

@@ -0,0 +1,2 @@
Fabricator(:conversation_mute) do
end

View File

@@ -0,0 +1,5 @@
Fabricator(:custom_emoji) do
shortcode 'coolcat'
domain nil
image { File.open(Rails.root.join('spec', 'fixtures', 'files', 'emojo.png')) }
end

View File

@@ -0,0 +1,6 @@
Fabricator(:custom_filter) do
account
expires_at nil
phrase 'discourse'
context %w(home notifications)
end

View File

@@ -0,0 +1,3 @@
Fabricator(:domain_block) do
domain { sequence(:domain) { |i| "#{i}#{Faker::Internet.domain_name}" } }
end

View File

@@ -0,0 +1,3 @@
Fabricator(:email_domain_block) do
domain { sequence(:domain) { |i| "#{i}#{Faker::Internet.domain_name}" } }
end

View File

@@ -0,0 +1,4 @@
Fabricator(:favourite) do
account
status
end

View File

@@ -0,0 +1,6 @@
Fabricator(:featured_tag) do
account
tag
statuses_count 1_337
last_status_at Time.now.utc
end

View File

@@ -0,0 +1,4 @@
Fabricator(:follow) do
account
target_account { Fabricate(:account) }
end

View File

@@ -0,0 +1,4 @@
Fabricator(:follow_request) do
account
target_account { Fabricate(:account, locked: true) }
end

View File

@@ -0,0 +1,5 @@
Fabricator(:identity) do
user nil
provider "MyString"
uid "MyString"
end

View File

@@ -0,0 +1,2 @@
Fabricator(:import) do
end

View File

@@ -0,0 +1,6 @@
Fabricator(:invite) do
user
expires_at nil
max_uses nil
uses 0
end

View File

@@ -0,0 +1,5 @@
Fabricator(:list_account) do
list nil
account nil
follow nil
end

View File

@@ -0,0 +1,4 @@
Fabricator(:list) do
account
title "MyString"
end

View File

@@ -0,0 +1,16 @@
Fabricator(:media_attachment) do
account
file do |attrs|
[
case attrs[:type]
when :gifv
attachment_fixture ['attachment.gif', 'attachment.webm'].sample
when :image
attachment_fixture 'attachment.jpg'
when nil
attachment_fixture ['attachment.gif', 'attachment.jpg', 'attachment.webm'].sample
end,
nil
].sample
end
end

View File

@@ -0,0 +1,4 @@
Fabricator(:mention) do
account
status
end

View File

@@ -0,0 +1,4 @@
Fabricator(:mute) do
account
target_account { Fabricate(:account) }
end

View File

@@ -0,0 +1,4 @@
Fabricator(:notification) do
activity fabricator: [:mention, :status, :follow, :follow_request, :favourite].sample
account
end

View File

@@ -0,0 +1,8 @@
Fabricator(:poll) do
account
status
expires_at { 7.days.from_now }
options %w(Foo Bar)
multiple false
hide_totals false
end

View File

@@ -0,0 +1,5 @@
Fabricator(:poll_vote) do
account
poll
choice 0
end

View File

@@ -0,0 +1,4 @@
Fabricator(:relay) do
inbox_url "https://example.com/inbox"
state :idle
end

View File

@@ -0,0 +1,6 @@
Fabricator(:report) do
account
target_account { Fabricate(:account) }
comment "You nasty"
action_taken false
end

View File

@@ -0,0 +1,5 @@
Fabricator(:report_note) do
report
account { Fabricate(:account) }
content "Test Content"
end

View File

@@ -0,0 +1,4 @@
Fabricator(:scheduled_status) do
account
scheduled_at { 20.hours.from_now }
end

View File

@@ -0,0 +1,4 @@
Fabricator(:session_activation) do
user
session_id "MyString"
end

View File

@@ -0,0 +1,4 @@
# frozen_string_literal: true
Fabricator(:setting) do
end

View File

@@ -0,0 +1,3 @@
Fabricator(:site_upload) do
file { File.open(File.join(Rails.root, 'spec', 'fabricators', 'assets', 'utah_teapot.png')) }
end

View File

@@ -0,0 +1,8 @@
Fabricator(:status) do
account
text "Lorem ipsum dolor sit amet"
after_build do |status|
status.uri = Faker::Internet.device_token if !status.account.local? && status.uri.nil?
end
end

View File

@@ -0,0 +1,4 @@
Fabricator(:status_pin) do
account
status
end

View File

@@ -0,0 +1,6 @@
Fabricator(:status_stat) do
status_id nil
replies_count ""
reblogs_count ""
favourites_count ""
end

View File

@@ -0,0 +1,5 @@
Fabricator(:stream_entry) do
account
activity { Fabricate(:status) }
hidden { [true, false].sample }
end

View File

@@ -0,0 +1,7 @@
Fabricator(:subscription) do
account
callback_url "http://example.com/callback"
secret "foobar"
expires_at "2016-11-28 11:30:07"
confirmed false
end

View File

@@ -0,0 +1,3 @@
Fabricator(:tag) do
name { sequence(:hashtag) { |i| "#{Faker::Lorem.word}#{i}" } }
end

View File

@@ -0,0 +1,7 @@
Fabricator(:user) do
account
email { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } }
password "123456789"
confirmed_at { Time.zone.now }
agreement true
end

View File

@@ -0,0 +1,4 @@
Fabricator(:user_invite_request) do
user
text { Faker::Lorem.sentence }
end

View File

@@ -0,0 +1,5 @@
Fabricator(:web_push_subscription, from: Web::PushSubscription) do
endpoint Faker::Internet.url
key_p256dh Faker::Internet.password
key_auth Faker::Internet.password
end

View File

@@ -0,0 +1,2 @@
Fabricator(:web_setting, from: Web::Setting) do
end