Rename project to Mobilizon

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-10-11 17:37:39 +02:00
parent 3b48ac957f
commit 559c889f1b
191 changed files with 739 additions and 739 deletions

View File

@@ -1,4 +1,4 @@
defmodule EventosWeb.ChannelCase do
defmodule MobilizonWeb.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
@@ -21,15 +21,15 @@ defmodule EventosWeb.ChannelCase do
use Phoenix.ChannelTest
# The default endpoint for testing
@endpoint EventosWeb.Endpoint
@endpoint MobilizonWeb.Endpoint
end
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Eventos.Repo)
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Mobilizon.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(Eventos.Repo, {:shared, self()})
Ecto.Adapters.SQL.Sandbox.mode(Mobilizon.Repo, {:shared, self()})
end
:ok

View File

@@ -1,4 +1,4 @@
defmodule EventosWeb.ConnCase do
defmodule MobilizonWeb.ConnCase do
@moduledoc """
This module defines the test case to be used by
tests that require setting up a connection.
@@ -19,13 +19,13 @@ defmodule EventosWeb.ConnCase do
quote do
# Import conveniences for testing with connections
use Phoenix.ConnTest
import EventosWeb.Router.Helpers
import MobilizonWeb.Router.Helpers
# The default endpoint for testing
@endpoint EventosWeb.Endpoint
@endpoint MobilizonWeb.Endpoint
def auth_conn(%Plug.Conn{} = conn, %Eventos.Actors.User{} = user) do
{:ok, token, _claims} = EventosWeb.Guardian.encode_and_sign(user)
def auth_conn(%Plug.Conn{} = conn, %Mobilizon.Actors.User{} = user) do
{:ok, token, _claims} = MobilizonWeb.Guardian.encode_and_sign(user)
conn
|> Plug.Conn.put_req_header("authorization", "Bearer #{token}")
@@ -35,10 +35,10 @@ defmodule EventosWeb.ConnCase do
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Eventos.Repo)
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Mobilizon.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(Eventos.Repo, {:shared, self()})
Ecto.Adapters.SQL.Sandbox.mode(Mobilizon.Repo, {:shared, self()})
end
{:ok, conn: Phoenix.ConnTest.build_conn()}

View File

@@ -1,4 +1,4 @@
defmodule Eventos.DataCase do
defmodule Mobilizon.DataCase do
@moduledoc """
This module defines the setup for tests requiring
access to the application's data layer.
@@ -16,20 +16,20 @@ defmodule Eventos.DataCase do
using do
quote do
alias Eventos.Repo
alias Mobilizon.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query
import Eventos.DataCase
import Mobilizon.DataCase
end
end
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Eventos.Repo)
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Mobilizon.Repo)
unless tags[:async] do
Ecto.Adapters.SQL.Sandbox.mode(Eventos.Repo, {:shared, self()})
Ecto.Adapters.SQL.Sandbox.mode(Mobilizon.Repo, {:shared, self()})
end
:ok

View File

@@ -1,12 +1,12 @@
defmodule Eventos.Factory do
defmodule Mobilizon.Factory do
@moduledoc """
Factory for fixtures with ExMachina
"""
# with Ecto
use ExMachina.Ecto, repo: Eventos.Repo
use ExMachina.Ecto, repo: Mobilizon.Repo
def user_factory do
%Eventos.Actors.User{
%Mobilizon.Actors.User{
password_hash: "Jane Smith",
email: sequence(:email, &"email-#{&1}@example.com"),
role: 0
@@ -20,12 +20,12 @@ defmodule Eventos.Factory do
preferred_username = sequence("thomas")
%Eventos.Actors.Actor{
%Mobilizon.Actors.Actor{
preferred_username: preferred_username,
domain: nil,
keys: pem,
type: :Person,
url: EventosWeb.Endpoint.url() <> "/@#{preferred_username}",
url: MobilizonWeb.Endpoint.url() <> "/@#{preferred_username}",
user: nil
}
end
@@ -40,21 +40,21 @@ defmodule Eventos.Factory do
end
def follower_factory do
%Eventos.Actors.Follower{
%Mobilizon.Actors.Follower{
target_actor: build(:actor),
actor: build(:actor)
}
end
def category_factory do
%Eventos.Events.Category{
%Mobilizon.Events.Category{
title: sequence("MyCategory"),
description: "My category desc"
}
end
def address_factory do
%Eventos.Addresses.Address{
%Mobilizon.Addresses.Address{
description: sequence("MyAddress"),
geom: %Geo.Point{coordinates: {30, -90}, srid: 4326},
floor: "Myfloor",
@@ -69,19 +69,19 @@ defmodule Eventos.Factory do
def comment_factory do
uuid = Ecto.UUID.generate()
%Eventos.Events.Comment{
%Mobilizon.Events.Comment{
text: "My Comment",
actor: build(:actor),
event: build(:event),
uuid: uuid,
url: "#{EventosWeb.Endpoint.url()}/comments/#{uuid}"
url: "#{MobilizonWeb.Endpoint.url()}/comments/#{uuid}"
}
end
def event_factory do
actor = build(:actor)
%Eventos.Events.Event{
%Mobilizon.Events.Event{
title: sequence("MyEvent"),
description: "My desc",
begins_on: nil,
@@ -90,19 +90,19 @@ defmodule Eventos.Factory do
category: build(:category),
physical_address: build(:address),
public: true,
url: "#{EventosWeb.Endpoint.url()}/@#{actor.url}/#{Ecto.UUID.generate()}"
url: "#{MobilizonWeb.Endpoint.url()}/@#{actor.url}/#{Ecto.UUID.generate()}"
}
end
def participant_factory do
%Eventos.Events.Participant{
%Mobilizon.Events.Participant{
event: build(:event),
actor: build(:actor)
}
end
def session_factory do
%Eventos.Events.Session{
%Mobilizon.Events.Session{
title: sequence("MySession"),
event: build(:event),
track: build(:track)
@@ -110,14 +110,14 @@ defmodule Eventos.Factory do
end
def track_factory do
%Eventos.Events.Track{
%Mobilizon.Events.Track{
name: sequence("MyTrack"),
event: build(:event)
}
end
def bot_factory do
%Eventos.Actors.Bot{
%Mobilizon.Actors.Bot{
source: "https://mysource.tld/feed.ics",
type: "ics",
user: build(:user),
@@ -126,7 +126,7 @@ defmodule Eventos.Factory do
end
def member_factory do
%Eventos.Actors.Member{
%Mobilizon.Actors.Member{
parent: build(:actor),
actor: build(:actor)
}