Skip to content

Commit

Permalink
Support 0xacab (#128)
Browse files Browse the repository at this point in the history
* feat: Support 0xacab.org

0xacab ("hexacab") is a Gitlab instance hosted by riseup.net

Both spellings are implemented because the YAML parser will interpret
`0x` as an hexadecimal number if not quoted.

* feat: Add Sutty

* fix: Remove "hexacab" source

Co-authored-by: f <[email protected]>
  • Loading branch information
sutty-coop and fauno authored Nov 30, 2022
1 parent 5b5e73e commit 8cea0e7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cooperatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -669,3 +669,11 @@ reinblau:
url: https://reinblau.coop/
description: "Our cooperative has around 20 members spread across Germany. As a decentralized agency, we have a lot of experience working together in agile teams, even across geographical distances."
location: Berlin, Germany

sutty:
source: "0xacab"
login: "sutty"
name: "Sutty"
url: "https://sutty.coop.ar"
description: "A worker-owned cooperative developing and hosting resilient websites for collectives, non-profit organizations and activists."
location: "Argentina"
1 change: 1 addition & 0 deletions lib/coophub/backends/backends.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ defmodule Coophub.Backends do
defp get_backend_module!("github"), do: Backends.Github
defp get_backend_module!("gitlab"), do: Backends.GitlabCom
defp get_backend_module!("git.coop"), do: Backends.GitCoop
defp get_backend_module!("0xacab"), do: Backends.HexAcab
defp get_backend_module!(source), do: raise("Unknown backend source: #{source}")

########
Expand Down
12 changes: 12 additions & 0 deletions lib/coophub/backends/hex_acab.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
defmodule Coophub.Backends.HexAcab do
use Coophub.Backends.Gitlab

@spec name() :: String.t()
def name(), do: "0xacab.org"

def headers() do
[]
end

def full_url(path), do: "https://0xacab.org/api/v4/#{path}"
end

0 comments on commit 8cea0e7

Please sign in to comment.