Merge branch 'develop' into styling/patch_fixes_for_theme_colors

This commit is contained in:
Dank Gabs 2019-07-03 13:50:17 -04:00
commit 68503930a4
18 changed files with 101 additions and 90 deletions

View File

@ -23,7 +23,6 @@ LOCAL_DOMAIN=example.com
# Changing LOCAL_HTTPS in production is no longer supported. (Gab Social will always serve https:// links)
# Use this only if you need to run Gab Social on a different domain than the one used for federation.
# You can read more about this option on https://github.com/gab-ai-inc/documentation/blob/master/Running-GabSocial/Serving_a_different_domain.md
# DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
# WEB_DOMAIN=gabsocial.example.com

7
.github/CODEOWNERS vendored
View File

@ -1,7 +1,12 @@
# CODEOWNERS for gab-ai-inc/gab-social
# CODEOWNERS for /gab/social/gab-social
# Translators
All previously-credited contributors to Mastodon's translations efforts have
been removed in order to prevent confusion and unintended association with the
Gab Social fork of Mastodon.
Please visit the Mastodon project on
[GitHub](https://github.com/tootsuite/mastodon/blob/master/AUTHORS.md) for a
complete and up-to-date list of the original contributors to the Mastodon
project from which Gab Social was forked.

View File

@ -1,8 +1,9 @@
Authors
=======
Gab Social is available on [GitHub](https://github.com/gab-ai-inc/gab-social).
And, that's where we have to stop.
Gab Social is available on our self-hosted
[GitLab](https://code.gab.com/gab/social/gab-social). And, that's where we have
to stop.
Gab does not publicly disclose the members of our team or their contributions to
this software. All Gab contributions should be regarded as anonymous.

View File

@ -13,4 +13,4 @@ You can contribute in the following ways:
## Bug reports
Bug reports and feature suggestions can be submitted to Gab Social's [GitHub Issues](https://github.com/gab-ai-inc/gab-social/issues) tracker. Please make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected in the past using the search function. Please also use descriptive, concise titles.
Bug reports and feature suggestions can be submitted to Gab Social's [GitLab Issues](https://code.gab.com/gab/social/gab-social/issues) tracker. Please make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected in the past using the search function. Please also use descriptive, concise titles.

View File

@ -2,7 +2,7 @@
Gab Social is an open source and fully decentralized social network powered by the Gab Platform. It is the new social network of Gab.com. This change was made to further Gab's committment to it's users trust and privacy online. And, by offering decentralization and federation, Gab further demonstrates a lack of interest in the ownership of your data.
The Gab Social project is based on the [Gab Social](https://github.com/gab-ai-inc/gab-social) project, and is licensed under the terms and conditions of AGPL-3.0. While we will be keeping this license, over time we will be keeping less and less of the original project's source code and approach.
The Gab Social project is based on the [Gab Social](https://code.gab.com/gab/social/gab-social) project, and is licensed under the terms and conditions of AGPL-3.0. While we will be keeping this license, over time we will be keeping less and less of the original project's source code and approach.
Our goal is to establish the foundation of a federated network of social networks. Our first step is our move to this technology, which immediately enables the construction of that network and provides the tools people will need to create and build. Over time, a new implementation of this system will emerge that is entirely based on Node.js, moves away from Postgres as it's database, and becomes part of the HYDRA family.

View File

@ -1,8 +1,8 @@
{
"name": "Gab Social",
"description": "A social network that champions free speech, individual liberty and the free flow of information online.",
"repository": "https://github.com/gab-ai-inc/gab-social",
"logo": "https://github.com/tootsuite.png",
"repository": "https://code.gab.com/gab/social/gab-social",
"logo": "https://code.gab.com/gab/social/gab-social/blob/master/public/android-chrome-192x192.png",
"env": {
"HEROKU": {
"description": "Leave this as true",

View File

@ -93,7 +93,6 @@ export default class IntersectionObserverArticle extends React.Component {
// When the browser gets a chance, test if we're still not intersecting,
// and if so, set our isHidden to true to trigger an unrender. The point of
// this is to save DOM nodes and avoid using up too much memory.
// See: https://github.com/gab-ai-inc/gab-social/issues/2900
this.setState((prevState) => ({ isHidden: !prevState.isIntersecting }));
}

View File

@ -2,7 +2,7 @@
lock '3.11.0'
set :repo_url, ENV.fetch('REPO', 'https://github.com/gab-ai-inc/gab-social.git')
set :repo_url, ENV.fetch('REPO', 'https://code.gab.com/gab/social/gab-social')
set :branch, ENV.fetch('BRANCH', 'master')
set :application, 'gabsocial'

View File

@ -78,8 +78,6 @@ class IdsToBigints < ActiveRecord::Migration[5.1]
say ''
say 'This migration has some sections that can be safely interrupted'
say 'and restarted later, and will tell you when those are occurring.'
say ''
say 'For more information, see https://github.com/gab-ai-inc/gab-social/pull/5088'
10.downto(1) do |i|
say "Continuing in #{i} second#{i == 1 ? '' : 's'}...", true

View File

@ -1,12 +1,12 @@
# Gab Social Developer Setup
Developers wanting to work on [Gab Social](https://github.com/gab-ai-inc/gab-social) source code and make changes to the system must configure a host for use with Gab Social's development environment.
Developers wanting to work on [Gab Social](https://code.gab.com/gab/social/gab-social) source code and make changes to the system must configure a host for use with Gab Social's development environment.
The instructions in this file do not create a production-grade host that is secure and can scale. Instead, these instructions deliver a working environment tuned for making changes to Gab Social and for quickly iterating on those changes to get stuff done.
## Host OS
[Gab Social](https://github.com/gab-ai-inc/gab-social) development has been tested on [Ubuntu 18.04LTS](https://www.ubuntu.com/download/desktop). As we continue to migrate further away from Gab Social's code, at least MacOS will be supported as a choice.
[Gab Social](https://code.gab.com/gab/social/gab-social) development has been tested on [Ubuntu 18.04LTS](https://www.ubuntu.com/download/desktop). As we continue to migrate further away from Gab Social's code, at least MacOS will be supported as a choice.
We are unlikely to support Windows as a host OS because no part of our software development infrastructure is based on Windows. We will, however, be happy to review and accept your pull requests adding Windows support for development and even production hosting if you think that's not too nutty.
@ -28,7 +28,7 @@ sudo apt update
## System Dependencies
The following software components and libraries are required by [Gab Social](https://github.com/gab-ai-inc/gab-social).
The following software components and libraries are required by [Gab Social](https://code.gab.com/gab/social/gab-social).
- *ImageMagick* - Gab Social uses imagemagick for image related operations
- *FFMPEG* - Gab Social uses ffmpeg for conversion of GIFs to MP4s
@ -58,7 +58,7 @@ apt-get install -y imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file gi
### Install Node.js 10.15.3 LTS
Node.js is required for running the [Gab Social](https://github.com/gab-ai-inc/gab-social) Streaming API server and for other system management tasks related to the Gab Platform.
Node.js is required for running the [Gab Social](https://code.gab.com/gab/social/gab-social) Streaming API server and for other system management tasks related to the Gab Platform.
```bash
# Install nvm to manage Node.js versions
@ -83,7 +83,7 @@ adduser --disabled-password --quiet gabsocial
## PostgreSQL Database Creation
[Gab Social](https://github.com/gab-ai-inc/gab-social) requires access to a [PostgreSQL](https://www.postgresql.org) instance.
[Gab Social](https://code.gab.com/gab/social/gab-social) requires access to a [PostgreSQL](https://www.postgresql.org) instance.
Create a user for a [PostgreSQL](https://www.postgresql.org) instance:
@ -127,7 +127,7 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
```
Now that [`rbenv`](https://github.com/rbenv/rbenv) and [`ruby-build`](https://github.com/rbenv/ruby-build) are installed, we will install the
[Ruby](https://www.ruby-lang.org/en/) version which [Gab Social](https://github.com/gab-ai-inc/gab-social) uses. That version will also need to be enabled.
[Ruby](https://www.ruby-lang.org/en/) version which [Gab Social](https://code.gab.com/gab/social/gab-social) uses. That version will also need to be enabled.
To enable [Ruby](https://www.ruby-lang.org/en/), run:
@ -140,7 +140,7 @@ This will take some time. Go stretch for a bit and drink some water while the co
### node.js And Ruby Dependencies
Now that [Ruby](https://www.ruby-lang.org/en/) is enabled, we will clone the [Git Social git repository](https://github.com/gab-ai-inc/gab-social) and install the [Ruby](https://www.ruby-lang.org/en/) and [node.js](https://nodejs.org/en/) dependancies.
Now that [Ruby](https://www.ruby-lang.org/en/) is enabled, we will clone the [Git Social git repository](https://code.gab.com/gab/social/gab-social) and install the [Ruby](https://www.ruby-lang.org/en/) and [node.js](https://nodejs.org/en/) dependancies.
Run the following to clone and install:
@ -150,7 +150,7 @@ mkdir -p ~/projects
cd ~/projects
# Clone the Gab Social repository into ~/projects
git clone https://github.com/gab-ai-inc/gab-social.git gab-social
git clone https://code.gab.com/gab/social/gab-social gab-social
# Hop into the project directory (all are welcome!)
cd ~/projects/gab-social
@ -211,7 +211,7 @@ You can check code quality with:
## Federation development tips
Federation absolutely requires your Gab Social instance to have a domain name. If you want to operate a permanently-federated development server (Gab does), set up a [Gab Social](https://github.com/gab-ai-inc/gab-social) instance with a domain, and update it against your development fork/branch while doing that development on your local workstation or as a team.
Federation absolutely requires your Gab Social instance to have a domain name. If you want to operate a permanently-federated development server (Gab does), set up a [Gab Social](https://code.gab.com/gab/social/gab-social) instance with a domain, and update it against your development fork/branch while doing that development on your local workstation or as a team.
To test federation on a *local* developer workstation, localhost =&gt; world tunneling can be made possible yourself on a domain you manage or by using services like [ngrok](https://ngrok.com).

View File

@ -10,7 +10,7 @@ This document describes how to prepare a host for development, test, and product
## What is this guide?
This guide is a walk through of the setup process of a [Gab Social](https://github.com/gab-ai-inc/gab-social/) instance.
This guide is a walk through of the setup process of a [Gab Social](https://code.gab.com/gab/social/gab-social) instance.
We use example.com to represent a domain or sub-domain. Example.com should be replaced with your instance domain or sub-domain.
@ -139,7 +139,7 @@ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
```
Now that [`rbenv`](https://github.com/rbenv/rbenv) and [`ruby-build`](https://github.com/rbenv/ruby-build) are installed, we will install the
[Ruby](https://www.ruby-lang.org/en/) version which [Gab Social](https://github.com/gab-ai-inc/gab-social) uses. That version will also need to be enabled.
[Ruby](https://www.ruby-lang.org/en/) version which [Gab Social](https://code.gab.com/gab/social/gab-social) uses. That version will also need to be enabled.
To enable [Ruby](https://www.ruby-lang.org/en/), run:
@ -154,7 +154,7 @@ rbenv global 2.6.1
### node.js And Ruby Dependencies
Now that [Ruby](https://www.ruby-lang.org/en/) is enabled, we will clone the [Gab Social git repository](https://github.com/gab-ai-inc/gab-social/) and install the [Ruby](https://www.ruby-lang.org/en/) and [node.js](https://nodejs.org/en/) dependancies.
Now that [Ruby](https://www.ruby-lang.org/en/) is enabled, we will clone the [Gab Social git repository](https://code.gab.com/gab/social/gab-social) and install the [Ruby](https://www.ruby-lang.org/en/) and [node.js](https://nodejs.org/en/) dependancies.
Run the following to clone and install:
@ -163,10 +163,10 @@ Run the following to clone and install:
cd ~
# Clone the gabsocial git repository into ~/live
git clone https://github.com/gab-ai-inc/gab-social.git live
git clone https://code.gab.com/gab/social/gab-social live
# Or, clone the developer version (requires credentials)
git clone git@dev.openplatform.us:/opt/git/gab-social live
git clone https://code.gab.com/gab/social/gab-social live
# Change directory to ~/live
cd ~/live
@ -194,7 +194,7 @@ Eventually, the Ruby On Rails dependencies are going away. This is a stop-gap so
## PostgreSQL Database Creation
[Gab Social](https://github.com/gab-ai-inc/gab-social) requires access to a [PostgreSQL](https://www.postgresql.org) instance.
[Gab Social](https://code.gab.com/gab/social/gab-social) requires access to a [PostgreSQL](https://www.postgresql.org) instance.
Create a user for a [PostgreSQL](https://www.postgresql.org) instance:
@ -211,7 +211,7 @@ CREATE USER gabsocial CREATEDB;
## nginx Configuration
You need to configure [nginx](http://nginx.org) to serve your [Gab Social](https://github.com/gab-ai-inc/gab-social/) instance.
You need to configure [nginx](http://nginx.org) to serve your [Gab Social](https://code.gab.com/gab/social/gab-social) instance.
**Reminder: Replace all occurrences of example.com with your own instance's domain or sub-domain.**
@ -407,7 +407,7 @@ For this we will switch to the `gabsocial` system user:
sudo su - gabsocial
```
Change directory to `~/live` and run the [Gab Social](https://github.com/gab-ai-inc/gab-social) setup wizard:
Change directory to `~/live` and run the [Gab Social](https://code.gab.com/gab/social/gab-social) setup wizard:
```sh
cd ~/live
@ -431,7 +431,7 @@ We will need three [systemd](https://github.com/systemd/systemd) service files f
Now switch back to the root user.
For the [Gab Social](https://github.com/gab-ai-inc/gab-social/) web workers service place the following in `/etc/systemd/system/gabsocial-web.service`:
For the [Gab Social](https://code.gab.com/gab/social/gab-social) web workers service place the following in `/etc/systemd/system/gabsocial-web.service`:
```
[Unit]
@ -453,7 +453,7 @@ Restart=always
WantedBy=multi-user.target
```
For [Gab Social](https://github.com/gab-ai-inc/gab-social/) background queue service, place the following in `/etc/systemd/system/gabsocial-sidekiq.service`:
For [Gab Social](https://code.gab.com/gab/social/gab-social) background queue service, place the following in `/etc/systemd/system/gabsocial-sidekiq.service`:
```
[Unit]
@ -474,7 +474,7 @@ Restart=always
WantedBy=multi-user.target
```
For the [Gab Social](https://github.com/gab-ai-inc/gab-social/) streaming API service place the following in `/etc/systemd/system/gabsocial-streaming.service`:
For the [Gab Social](https://code.gab.com/gab/social/gab-social) streaming API service place the following in `/etc/systemd/system/gabsocial-streaming.service`:
```
[Unit]
@ -550,13 +550,13 @@ SMTP_PASSWORD=HolySnacksAPassword
SMTP_FROM_ADDRESS=Domain.com Gab Social Admin <notifications@gab.com>
```
Finally, to test this, spin up a Rails console (see [the administration guide](https://github.com/gab-ai-inc/gab-social-documentation/blob/master/Running-Gab-Social/Administration-guide.md)) and run the following commands to test this out:
Finally, to test this, spin up a Rails console (see [the administration guide](https://code.gab.com/gab/social/gab-social/blob/master/docs/server.md)) and run the following commands to test this out:
```ruby
m = UserMailer.new.mail to:'email@address.com', subject: 'test', body: 'awoo'
m.deliver
```
That is all! If everything was done correctly, a [Gab Social](https://github.com/gab-ai-inc/gab-social/) instance will appear when you visit `https://example.com` in a web browser.
That is all! If everything was done correctly, a [Gab Social](https://code.gab.com/gab/social/gab-social) instance will appear when you visit `https://example.com` in a web browser.
Congratulations and welcome to Gab Social!

View File

@ -33,11 +33,11 @@ module GabSocial
end
def repository
ENV.fetch('GITHUB_REPOSITORY') { 'gab-ai-inc/gab-social' }
ENV.fetch('GITHUB_REPOSITORY') { 'gab/social/gab-social' }
end
def source_base_url
ENV.fetch('SOURCE_BASE_URL') { "https://github.com/#{repository}" }
ENV.fetch('SOURCE_BASE_URL') { "https://code.gab.com/#{repository}" }
end
# specify git tag or commit hash here

View File

@ -1,57 +1,66 @@
# frozen_string_literal: true
# 2019-07-02 (Rjc)
# Don't run what command? I see no command here.
# This is certainly not the command you are looking for.
# Gab doesn't do this
namespace :repo do
desc 'Generate the AUTHORS.md file'
task :authors do
# Gab AI, Inc., does not disclose information about contributors to the Gab
# Social project in this way. Please refer to our public git repository or
# contact us directly at legal@gab.com with any questions about the
# contributors to Gab Social.
end
desc 'Replace pull requests with authors in the CHANGELOG.md file'
task :changelog do
path = Rails.root.join('CHANGELOG.md')
tmp = Tempfile.new
# task :authors do
# # Gab AI, Inc., does not disclose information about contributors to the Gab
# # Social project in this way. Please refer to our public git repository or
# # contact us directly at legal@gab.com with any questions about the
# # contributors to Gab Social.
# end
HttpLog.config.compact_log = true
# desc 'Replace pull requests with authors in the CHANGELOG.md file'
# task :changelog do
# path = Rails.root.join('CHANGELOG.md')
# tmp = Tempfile.new
begin
File.open(path, 'r') do |file|
file.each_line do |line|
if line.start_with?('-')
new_line = line.gsub(/#([[:digit:]]+)*/) do |pull_request_reference|
pull_request_number = pull_request_reference[1..-1]
response = nil
# HttpLog.config.compact_log = true
loop do
response = HTTP.headers('Authorization' => "token #{ENV['GITHUB_API_TOKEN']}").get("https://api.github.com/repos/gab-ai-inc/gab-social/pulls/#{pull_request_number}")
# begin
# File.open(path, 'r') do |file|
# file.each_line do |line|
# if line.start_with?('-')
# new_line = line.gsub(/#([[:digit:]]+)*/) do |pull_request_reference|
# pull_request_number = pull_request_reference[1..-1]
# response = nil
if response.code == 403
sleep_for = (response.headers['X-RateLimit-Reset'].to_i - Time.now.to_i).abs
puts "Sleeping for #{sleep_for} seconds to get over rate limit"
sleep sleep_for
else
break
end
end
# loop do
# # (Rjc) 2019-07-03
# # this can't possibly work
# # will adapt post-launch I am trying to ship
# response = HTTP.headers('Authorization' => "token #{ENV['GITLAB_API_TOKEN']}").get("https://api.code.gab.com/repos/gab/social/gab-social/pulls/#{pull_request_number}")
pull_request = Oj.load(response.to_s)
"[#{pull_request['user']['login']}](#{pull_request['html_url']})"
end
# if response.code == 403
# sleep_for = (response.headers['X-RateLimit-Reset'].to_i - Time.now.to_i).abs
# puts "Sleeping for #{sleep_for} seconds to get over rate limit"
# sleep sleep_for
# else
# break
# end
# end
tmp.puts new_line
else
tmp.puts line
end
end
end
# pull_request = Oj.load(response.to_s)
# "[#{pull_request['user']['login']}](#{pull_request['html_url']})"
# end
tmp.close
FileUtils.mv(tmp.path, path)
ensure
tmp.close
tmp.unlink
end
end
# tmp.puts new_line
# else
# tmp.puts line
# end
# end
# end
# tmp.close
# FileUtils.mv(tmp.path, path)
# ensure
# tmp.close
# tmp.unlink
# end
# end
end

View File

@ -16,7 +16,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/gab-ai-inc/gab-social.git"
"url": "https://code.gab.com/gab/social/gab-social"
},
"browserslist": [
"last 2 versions",

View File

@ -1,8 +1,8 @@
{
"name": "Gab Social",
"description": "A GNU Social-compatible microblogging server",
"repository": "https://github.com/gab-ai-inc/gab-social",
"logo": "https://github.com/tootsuite.png",
"repository": "https://code.gab.com/gab/social/gab-social",
"logo": "https://code.gab.com/gab/social/gab-social/blob/master/public/android-chrome-192x192.png",
"env": {
"LOCAL_DOMAIN": {
"description": "The domain that your Gab Social instance will run on (this can be appname.scalingo.io or a custom domain)",

View File

@ -107,14 +107,14 @@
<uri>https://gab.com/users/robcolbert</uri>
<name>Rob Colbert</name>
<email>robcolbert@gab.com</email>
<summary>Developer of Gab Social, a GNU social alternative: https://github.com/gab-ai-inc/gab-social</summary>
<summary>Developer of Gab Social, a GNU social alternative: https://code.gab.com/gab/social/gab-social</summary>
<link rel="alternate" type="text/html" href="https://gab.com/users/robcolbert"/>
<link rel="avatar" type="image/png" media:width="300" media:height="300" href="http://kickass.zone/system/accounts/avatars/000/000/003/large/4375_eugencommish.png"/>
<link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://kickass.zone/system/accounts/avatars/000/000/003/medium/4375_eugencommish.png"/>
<link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://kickass.zone/system/accounts/avatars/000/000/003/small/4375_eugencommish.png"/>
<poco:preferredUsername>robcolbert</poco:preferredUsername>
<poco:displayName>Eugen</poco:displayName>
<poco:note>Developer of Gab Social, a GNU social alternative: https://github.com/gab-ai-inc/gab-social</poco:note>
<poco:note>Developer of Gab Social, a GNU social alternative: https://code.gab.com/gab/social/gab-social</poco:note>
</author>
</activity:object>
</entry>
@ -192,14 +192,14 @@
<uri>https://gab.com/users/robcolbert</uri>
<name>Rob Colbert</name>
<email>robcolbert@gab.com</email>
<summary>Developer of Gab Social, a GNU social alternative: https://github.com/gab-ai-inc/gab-social</summary>
<summary>Developer of Gab Social, a GNU social alternative: https://code.gab.com/gab/social/gab-social</summary>
<link rel="alternate" type="text/html" href="https://gab.com/users/robcolbert"/>
<link rel="avatar" type="image/png" media:width="300" media:height="300" href="http://kickass.zone/system/accounts/avatars/000/000/003/large/4375_eugencommish.png"/>
<link rel="avatar" type="image/png" media:width="96" media:height="96" href="http://kickass.zone/system/accounts/avatars/000/000/003/medium/4375_eugencommish.png"/>
<link rel="avatar" type="image/png" media:width="48" media:height="48" href="http://kickass.zone/system/accounts/avatars/000/000/003/small/4375_eugencommish.png"/>
<poco:preferredUsername>robcolbert</poco:preferredUsername>
<poco:displayName>Eugen</poco:displayName>
<poco:note>Developer of Gab Social, a GNU social alternative: https://github.com/gab-ai-inc/gab-social</poco:note>
<poco:note>Developer of Gab Social, a GNU social alternative: https://code.gab.com/gab/social/gab-social</poco:note>
</activity:object>
</entry>
<entry>

View File

@ -91,8 +91,8 @@ describe InstancePresenter do
end
describe '#source_url' do
it 'returns "https://github.com/gab-ai-inc/gab-social"' do
expect(instance_presenter.source_url).to eq('https://github.com/gab-ai-inc/gab-social')
it 'returns "https://code.gab.com/gab/social/gab-social"' do
expect(instance_presenter.source_url).to eq('https://code.gab.com/gab/social/gab-social')
end
end

View File

@ -17,7 +17,7 @@ describe 'about/show.html.haml', without_verify_partial_doubles: true do
site_short_description: 'something',
site_description: 'something',
version_number: '1.0',
source_url: 'https://github.com/gab-ai-inc/gab-social',
source_url: 'https://code.gab.com/gab/social/gab-social',
open_registrations: false,
thumbnail: nil,
hero: nil,