From fad06e697d60e11d13aa9d0556b749b9f1c38a5d Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Fri, 23 Apr 2021 15:42:54 +0000
Subject: [PATCH] =?UTF-8?q?refactor:=20replace=20castopod=20=E2=9E=A1=20ca?=
 =?UTF-8?q?stopod-host?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- rename all occurences of castopod to castopod host
- docs: update contribution guidelines
-
docs: update README to include guidance for help and links to socials
- remove
castopod_namespace.json
---
 .env.example            | 17 +++++++++-
 .gitignore              |  8 ++---
 .gitlab-ci.yml          |  6 ++--
 .phpcs.xml              |  2 +-
 .releaserc.json         |  8 ++---
 .rsync-filter           |  2 +-
 CONTRIBUTING.md         | 20 +++++++-----
 DEPENDENCIES.md         |  4 +--
 Dockerfile              |  6 ++--
 INSTALL.md              | 41 ++++++++++++------------
 README.md               | 69 ++++++++++++++++++++++++++++-------------
 castopod_namespace.json | 31 ------------------
 composer.json           | 11 +++----
 docker-compose.yml      |  4 +--
 package.json            |  6 ++--
 prepare-release.sh      |  8 ++---
 16 files changed, 129 insertions(+), 114 deletions(-)
 delete mode 100644 castopod_namespace.json

diff --git a/.env.example b/.env.example
index 0ac3f1b0d4..ca3f31a26c 100644
--- a/.env.example
+++ b/.env.example
@@ -2,7 +2,7 @@
 # Example Environment Configuration file
 # 
 # This file can be used as a starting point for
-# your castopod instance settings.
+# your Castopod Host instance settings.
 #
 # For manual configuration:
 #   - copy this file's contents to a file named `.env`
@@ -10,19 +10,34 @@
 #   - go to `/cp-install` to complete installation
 #--------------------------------------------------------------------
 
+#--------------------------------------------------------------------
 # Instance configuration
+#--------------------------------------------------------------------
 app.baseURL="https://YOUR_DOMAIN_NAME/"
 app.mediaBaseURL="https://YOUR_MEDIA_DOMAIN_NAME/"
 app.adminGateway="cp-admin"
 app.authGateway="cp-auth"
 
+#--------------------------------------------------------------------
 # Database configuration
+#--------------------------------------------------------------------
 database.default.hostname="localhost"
 database.default.database="castopod"
 database.default.username="root"
 database.default.password="****"
 database.default.DBPrefix="cp_"
 
+#--------------------------------------------------------------------
 # Cache configuration (advanced)
+#
 # Keep as is if you don't know what this means
+#--------------------------------------------------------------------
 cache.handler="file"
+
+# Redis configuration
+#--------------------------------------------------------------------
+# cache.handler="redis"
+# cache.redis.host="127.0.0.1"
+# cache.redis.password=null
+# cache.redis.port=6379
+# cache.redis.database=0
diff --git a/.gitignore b/.gitignore
index d66b6f23af..29ac934c79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -167,7 +167,7 @@ mariadb
 phpmyadmin
 sessions
 
-# Castopod bundle & packages
-castopod/
-castopod-*.zip
-castopod-*.tar.gz
+# Castopod Host bundle & packages
+castopod-host/
+castopod-host-*.zip
+castopod-host-*.tar.gz
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 627d73e9a2..94f14a8101 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,11 +48,11 @@ bundle_app:
     - mv ./writable/uploads/GeoLite2-City* ./writable/uploads/GeoLite2-City
 
     # create bundle folder: uses .rsync-filter (-F) file to copy only needed files
-    - rsync -aF --progress . ./castopod
+    - rsync -aF --progress . ./castopod-host
   artifacts:
-    name: "castopod-${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHORT_SHA}"
+    name: "castopod-host-${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHORT_SHA}"
     paths:
-      - castopod
+      - castopod-host
   except:
     - main
     - beta
diff --git a/.phpcs.xml b/.phpcs.xml
index 741acfb0a9..0877821c9e 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Castopod">
-    <description>Castopod's coding standard based on the PSR-1 standard.</description>
+    <description>Castopod Host's coding standard based on the PSR-1 standard.</description>
 
     <!-- Include the whole PSR-1 standard -->
     <rule ref="PSR1"/>
diff --git a/.releaserc.json b/.releaserc.json
index 6507490fcf..8c76839dab 100644
--- a/.releaserc.json
+++ b/.releaserc.json
@@ -33,12 +33,12 @@
         "gitlabUrl": "https://code.podlibre.org/",
         "assets": [
           {
-            "path": "castopod-*.zip",
-            "label": "Castopod Package (zip)"
+            "path": "castopod-host-*.zip",
+            "label": "Castopod Host Package (zip)"
           },
           {
-            "path": "castopod-*.tar.gz",
-            "label": "Castopod Package (tar.gz)"
+            "path": "castopod-host-*.tar.gz",
+            "label": "Castopod Host Package (tar.gz)"
           }
         ]
       }
diff --git a/.rsync-filter b/.rsync-filter
index f466ad22e9..fb9cc00134 100644
--- a/.rsync-filter
+++ b/.rsync-filter
@@ -1,4 +1,4 @@
-# rsync filter rules to copy required files for Castopod's bundle
+# rsync filter rules to copy required files for Castopod Host's bundle
 
 - app/Views/_assets/
 + app/***
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b775cf861f..f2eba80255 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
-# Contributing to Castopod
+# Contributing to Castopod Host
 
-Love Castopod and want to help? Thanks so much, there's something to do for
+Love Castopod Host and want to help? Thanks so much, there's something to do for
 everybody!
 
 Please take a moment to review this document in order to make the contribution
@@ -11,10 +11,14 @@ developers managing and developing this open source project. In return, they
 should reciprocate that respect in addressing your issue or assessing patches
 and features.
 
+⚠️ Note that **any** contribution made on a repository other than
+[the original repository](https://code.podlibre.org/podlibre/castopod-host) will
+not be accepted.
+
 ## Using the issue tracker
 
-The [issue tracker](https://code.podlibre.org/podlibre/castopod/-/issues) is the
-preferred channel for [bug reports](#bug-reports),
+The [issue tracker](https://code.podlibre.org/podlibre/castopod-host/-/issues)
+is the preferred channel for [bug reports](#bug-reports),
 [features requests](#feature-requests) and
 [submitting pull requests](#pull-requests).
 
@@ -73,13 +77,13 @@ the project:
 
 ```bash
 # Clone your fork of the repo into the current directory
-git clone https://code.podlibre.org/<your-username>/castopod.git
+git clone https://code.podlibre.org/<your-username>/castopod-host.git
 
 # Navigate to the newly cloned directory
-cd castopod
+cd castopod-host
 
 # Assign the original repo to a remote called "upstream"
-git remote add upstream https://code.podlibre.org/podlibre/castopod.git
+git remote add upstream https://code.podlibre.org/podlibre/castopod-host.git
 ```
 
 2. If you cloned a while ago, get the latest changes from upstream:
@@ -119,7 +123,7 @@ git push origin <topic-branch-name>
 
 **IMPORTANT**: By submitting a patch, you agree to allow the project owners to
 license your work under the terms of the
-[GNU AGPLv3](https://code.podlibre.org/podlibre/castopod/-/blob/main/LICENSE).
+[GNU AGPLv3](https://code.podlibre.org/podlibre/castopod-host/-/blob/main/LICENSE).
 
 ## Collaborating guidelines
 
diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md
index 325e823b2f..93371ef5fb 100644
--- a/DEPENDENCIES.md
+++ b/DEPENDENCIES.md
@@ -1,6 +1,6 @@
-# Castopod dependencies
+# Castopod Host dependencies
 
-Castopod uses the following components:
+Castopod Host uses the following components:
 
 PHP Dependencies:
 
diff --git a/Dockerfile b/Dockerfile
index e181870043..8792d21dc6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
 FROM php:7.3-fpm
 
-COPY . /castopod
-WORKDIR /castopod
+COPY . /castopod-host
+WORKDIR /castopod-host
 
 ### Install CodeIgniter's server requirements
 #-- https://github.com/codeigniter4/appstarter#server-requirements
@@ -34,4 +34,4 @@ RUN echo "file_uploads = On\n" \
 RUN apt-get update && \
     apt-get install -y cron
 
-RUN crontab /castopod/crontab
+RUN crontab /castopod-host/crontab
diff --git a/INSTALL.md b/INSTALL.md
index 7465139583..e23d617844 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,7 +1,7 @@
-# How to install Castopod <!-- omit in toc -->
+# How to install Castopod Host <!-- omit in toc -->
 
-Castopod was thought to be easy to install. Whether using dedicated or shared
-hosting, you can install it on most PHP-MySQL compatible web servers.
+_Castopod Host_ was thought-out to be easy to install. Whether using dedicated
+or shared hosting, you can install it on most PHP-MySQL compatible web servers.
 
 ## Table of contents <!-- omit in toc -->
 
@@ -16,20 +16,21 @@ hosting, you can install it on most PHP-MySQL compatible web servers.
 
 ## Install instructions
 
-0. Create a MySQL database for Castopod with a user having access and
+0. Create a MySQL database for Castopod Host with a user having access and
    modification privileges (for more info, see
    [Web Server Requirements](#web-server-requirements)).
-1. Download and unzip the Castopod package onto the web server if you haven’t
-   already.
+1. Download and unzip the latest
+   [Castopod Host Package](https://code.podlibre.org/podlibre/castopod-host/-/releases)
+   onto the web server if you haven’t already.
    - ⚠️ Set the web server document root to the `public/` sub-folder.
-2. ⚠️ For broadcasting social activities to the fediverse, add a cron task on
-   your web server to run every minute (replace the paths accordingly):
+2. For broadcasting social activities to the fediverse, add a cron task on your
+   web server to run every minute (replace the paths accordingly):
 
    ```php
-      * * * * * /path/to/php /path/to/castopod/public/index.php scheduled-activities
+      * * * * * /path/to/php /path/to/castopod-host/public/index.php scheduled-activities
    ```
 
-3. Run the Castopod install script by going to the install wizard page
+3. Run the Castopod Host install script by going to the install wizard page
    (`https://your_domain_name.com/cp-install`) in your favorite web browser.
 4. Follow the instructions on your screen.
 
@@ -37,11 +38,11 @@ All done, start podcasting!
 
 ### (optional) Manual configuration
 
-Before uploading Castopod files to your web server:
+Before uploading Castopod Host files to your web server:
 
 1. Rename the `.env.example` file to `.env` and update the default values with
    your own.
-2. Upload the Castopod files with `.env`
+2. Upload the Castopod Host files with `.env`
 3. Go to `/cp-install` to finish the install process.
 
 ## Web Server Requirements
@@ -71,8 +72,8 @@ server administrator.
 
 #### Privileges
 
-User must have at least these privileges on the database for Castopod to work:
-`ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`, `UPDATE`.
+User must have at least these privileges on the database for Castopod Host to
+work: `ALTER`, `DELETE`, `EXECUTE`, `INDEX`, `INSERT`, `SELECT`, `UPDATE`.
 
 ### (Optional) Other recommendations
 
@@ -82,12 +83,12 @@ User must have at least these privileges on the database for Castopod to work:
 
 ## Security concerns
 
-Castopod is built on top of Codeigniter, a PHP framework that encourages
+Castopod Host is built on top of Codeigniter, a PHP framework that encourages
 [good security practices](https://codeigniter.com/user_guide/concepts/security.html).
 
 To maximize your instance safety and prevent any malicious attack, we recommend
-you update all your Castopod files permissions (after installation to avoid any
-permission error):
+you update all your Castopod Host files permissions after installation (to avoid
+any permission error):
 
 - `writable/` folder must be **readable** and **writable**.
 - `public/media/` folder must be **readable** and **writable**.
@@ -97,7 +98,7 @@ For instance, if you are using Apache or NGINX with Ubuntu you may do the
 following:
 
 ```bash
-sudo chown -R root:root /path/to/castopod
-sudo chown -R www-data:www-data /path/to/castopod/writable
-sudo chown -R www-data:www-data /path/to/castopod/public/media
+sudo chown -R root:root /path/to/castopod-host
+sudo chown -R www-data:www-data /path/to/castopod-host/writable
+sudo chown -R www-data:www-data /path/to/castopod-host/public/media
 ```
diff --git a/README.md b/README.md
index 4449f42207..7e7091b401 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,64 @@
-# ![Castopod Logo](https://podlibre.org/static/images/Castopod-Title.svg)
+# ![Castopod Host](https://podlibre.org/static/images/Castopod-Title.svg)
 
-Castopod is an open-source podcast hosting solution for everyone.\
-Whether you are a beginner, an amateur or a professional, you will get everything
-you need:\
-Create, upload, publish, and get comprehensive audience measurement that
-respects your listeners privacy.
+_Castopod Host_ is a free and open-source podcast hosting solution made for
+podcasters who want engage and interact with their audience.
 
-Castopod is a free and open-source solution (AGPL v3).\
-Whether you choose to install it on your own server or have it hosted by a professional,
-all your data and analytics belong to you and you only.
+Create, upload, publish, interact with your followers and get comprehensive
+audience measurements that respect your listeners privacy.
 
-![Castopod Logo](https://podlibre.org/static/images/Castopod-Mascot-Server.svg)
+Whether you choose to install it on your own server or have it hosted by a
+professional, all your data and analytics belong to you and you only!
 
-## Installation
+![Castopod Mascot](https://podlibre.org/static/images/Castopod-Mascot-Server.svg)
+
+You may find Castopod Host's source code on the
+[original repository](https://code.podlibre.org/podlibre/castopod-host) or,
+alternatively, on the
+[github repository (mirror)](https://github.com/podlibre/castopod-host).
 
-Castopod can be hosted on any PHP/MySQL server:\
-Unzip it and you are ready to broadcast.
+## Installation
 
-To install Castopod on your server:
+To install Castopod Host on your PHP/MySQL server:
 
 - Download
-  [Castopod latest Package (zip or tar.gz)](https://code.podlibre.org/podlibre/castopod/-/releases),
-- Follow the procedure “[How to install Castopod](./INSTALL.md)”.
+  [Castopod Host's latest Package (zip or tar.gz)](https://code.podlibre.org/podlibre/castopod-host/-/releases),
+- Follow the procedure on “[How to install Castopod Host](./INSTALL.md)”.
 
 ## Documentation
 
-You can check castopod's documentation for
+You can check Castopod Host's documentation for
 [setting up a development environment](./docs/setup-development.md).
 
+## Contributing
+
+Love Castopod Host and would like to help? Check out the
+[contribution guidelines](./CONTRIBUTING.md) for this project, everything should
+be there!
+
+⚠️ Note that **any** contribution made on a repository other than
+[the original repository](https://code.podlibre.org/podlibre/castopod-host) will
+not be accepted.
+
 ## Support
 
+You may reach us for help or ask any question you have on:
+
+- [Discord](https://castopod.org/discord) (for direct interaction with
+  developers and the community)
+
+Alternatively, you can follow us on social media platforms to get news about
+Castopod:
+
+- [podlibre.social](https://podlibre.social/@Castopod) (Mastodon instance)
+- [Twitter](https://twitter.com/castopod)
+- [Facebook](https://www.facebook.com/castopod)
+
+## Sponsors
+
 [Castopod](https://nlnet.nl/project/Castopod/) was funded through the
-[NGI0 Discovery](https://nlnet.nl/discovery/) Fund, a fund established by NLnet
-with financial support from the European Commission's
-[Next Generation Internet](https://www.ngi.eu/) programme, under the aegis of DG
-Communications Networks, Content and Technology under grant agreement No 825322.
+[NGI0 Discovery](https://nlnet.nl/discovery/) Fund under grant agreement
+Nº 825322.
+
+The fund was established by NLnet with financial support from the European
+Commission's [Next Generation Internet](https://www.ngi.eu/) programme, under
+the aegis of DG Communications Networks, Content and Technology.
diff --git a/castopod_namespace.json b/castopod_namespace.json
deleted file mode 100644
index 41faccfaeb..0000000000
--- a/castopod_namespace.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-  "@context": {
-    "id": "@id",
-    "type": "@type",
-    "as": "https://www.w3.org/ns/activitystreams#",
-    "schema": "http://schema.org#",
-    "cp": "https://castopod.org/ns#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "Podcast": "cp:Podcast",
-    "Episode": "cp:Episode",
-    "size": {
-      "@id": "cp:size",
-      "@type": "xsd:nonNegativeInteger"
-    },
-    "season": {
-      "@id": "cp:season",
-      "@type": "xsd:nonNegativeInteger"
-    },
-    "episode": {
-      "@id": "cp:episode",
-      "@type": "xsd:nonNegativeInteger"
-    },
-    "cover": {
-      "@id": "cp:cover",
-      "@type": "as:Link"
-    },
-    "copyright": "cp:copyright",
-    "category": "sc:category",
-    "language": "sc:inLanguage"
-  }
-}
diff --git a/composer.json b/composer.json
index 447f16c778..92426f1078 100644
--- a/composer.json
+++ b/composer.json
@@ -1,8 +1,8 @@
 {
-  "name": "podlibre/castopod",
+  "name": "podlibre/castopod-host",
   "version": "1.0.0-alpha53",
   "type": "project",
-  "description": "Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience.",
+  "description": "Castopod Host is an open-source hosting platform made for podcasters who want engage and interact with their audience.",
   "homepage": "https://castopod.org",
   "license": "AGPL-3.0-or-later",
   "require": {
@@ -62,16 +62,15 @@
     ]
   },
   "support": {
-    "forum": "http://forum.codeigniter.com/",
-    "source": "https://github.com/codeigniter4/CodeIgniter4",
-    "slack": "https://codeigniterchat.slack.com"
+    "source": "https://code.podlibre.org/podlibre/castopod-host.git",
+    "discord": "https://castopod.org/discord"
   },
   "minimum-stability": "dev",
   "prefer-stable": true,
   "repositories": [
     {
       "type": "vcs",
-      "url": "https://github.com/codeigniter4/codeigniter4"
+      "url": "https://code.podlibre.org/podlibre/castopod-host.git"
     }
   ]
 }
diff --git a/docker-compose.yml b/docker-compose.yml
index 3c442ac019..296854d22e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -8,13 +8,13 @@ services:
     build:
       context: .
       dockerfile: Dockerfile
-    container_name: "castopod_app"
+    container_name: "castopod_host"
     command: >
       sh -c "cron && php spark serve --host 0.0.0.0"
     ports:
       - 8080:8080
     volumes:
-      - .:/castopod
+      - .:/castopod-host
     depends_on:
       - redis
       - mariadb
diff --git a/package.json b/package.json
index 46385a76aa..8bae3e47c9 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,12 @@
 {
-  "name": "castopod",
+  "name": "castopod-host",
   "version": "1.0.0-alpha.53",
-  "description": "Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience.",
+  "description": "Castopod Host is an open-source hosting platform made for podcasters who want engage and interact with their audience.",
   "private": true,
   "license": "AGPL-3.0-or-later",
   "repository": {
     "type": "git",
-    "url": "https://code.podlibre.org/podlibre/castopod.git"
+    "url": "https://code.podlibre.org/podlibre/castopod-host.git"
   },
   "scripts": {
     "build": "npm run build:js && cross-env NODE_ENV=production npm run build:css && npm run build:icons && npm run build:svg && npm run copy:images && npm run copy:fonts",
diff --git a/prepare-release.sh b/prepare-release.sh
index ee392c1272..7446be4bf4 100644
--- a/prepare-release.sh
+++ b/prepare-release.sh
@@ -15,9 +15,9 @@ wget -c "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Cit
 # rename extracted archives' folders
 mv ./writable/uploads/GeoLite2-City* ./writable/uploads/GeoLite2-City
 
-# create castopod folder bundle: uses .rsync-filter (-F) file to copy only needed files
-rsync -aF --progress . ./castopod
+# create castopo-host folder bundle: uses .rsync-filter (-F) file to copy only needed files
+rsync -aF --progress . ./castopod-host
 
 # create zip and tar.gz packages for release upload
-zip -r castopod-$VERSION.zip castopod
-tar -zcvf castopod-$VERSION.tar.gz castopod
+zip -r castopod-host-$VERSION.zip castopod-host
+tar -zcvf castopod-host-$VERSION.tar.gz castopod-host
-- 
GitLab