2018-10-11 17:37:39 +02:00
|
|
|
defmodule Mobilizon.Mixfile do
|
2017-12-08 09:58:14 +01:00
|
|
|
use Mix.Project
|
|
|
|
|
2019-03-14 15:00:34 +01:00
|
|
|
@version "0.0.1-dev"
|
|
|
|
|
2017-12-08 09:58:14 +01:00
|
|
|
def project do
|
|
|
|
[
|
2018-10-11 17:37:39 +02:00
|
|
|
app: :mobilizon,
|
2019-03-14 15:00:34 +01:00
|
|
|
version: @version,
|
2019-08-12 16:04:16 +02:00
|
|
|
elixir: "~> 1.8",
|
2018-07-25 16:42:04 +02:00
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
|
|
|
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
|
|
|
|
start_permanent: Mix.env() == :prod,
|
2017-12-08 09:58:14 +01:00
|
|
|
aliases: aliases(),
|
2018-01-14 00:56:26 +01:00
|
|
|
deps: deps(),
|
|
|
|
test_coverage: [tool: ExCoveralls],
|
2018-07-25 16:42:04 +02:00
|
|
|
preferred_cli_env: [
|
|
|
|
coveralls: :test,
|
|
|
|
"coveralls.detail": :test,
|
|
|
|
"coveralls.post": :test,
|
2018-11-13 12:23:37 +01:00
|
|
|
"coveralls.html": :test,
|
|
|
|
vcr: :test,
|
|
|
|
"vcr.delete": :test,
|
|
|
|
"vcr.check": :test,
|
|
|
|
"vcr.show": :test
|
2018-07-25 16:42:04 +02:00
|
|
|
],
|
2018-10-11 17:37:39 +02:00
|
|
|
name: "Mobilizon",
|
2019-07-08 17:35:22 +02:00
|
|
|
source_url: "https://framagit.org/framasoft/mobilizon",
|
|
|
|
homepage_url: "https://joinmobilizon.org",
|
2019-03-14 15:00:34 +01:00
|
|
|
docs: docs()
|
2017-12-08 09:58:14 +01:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Configuration for the OTP application.
|
|
|
|
#
|
|
|
|
# Type `mix help compile.app` for more information.
|
|
|
|
def application do
|
|
|
|
[
|
2019-09-16 01:13:20 +02:00
|
|
|
mod: {Mobilizon, []},
|
2019-02-27 16:28:09 +01:00
|
|
|
extra_applications: [:logger, :runtime_tools, :guardian, :bamboo, :geolix, :crypto, :cachex]
|
2017-12-08 09:58:14 +01:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Specifies which paths to compile per environment.
|
|
|
|
defp elixirc_paths(:test), do: ["lib", "test/support"]
|
2018-07-27 10:45:35 +02:00
|
|
|
defp elixirc_paths(:dev), do: ["lib", "test/support/factory.ex"]
|
2018-07-25 16:42:04 +02:00
|
|
|
defp elixirc_paths(_), do: ["lib"]
|
2017-12-08 09:58:14 +01:00
|
|
|
|
|
|
|
# Specifies your project dependencies.
|
|
|
|
#
|
|
|
|
# Type `mix help deps` for examples and options.
|
|
|
|
defp deps do
|
|
|
|
[
|
2018-11-27 11:29:58 +01:00
|
|
|
{:phoenix, "~> 1.4.0"},
|
2017-12-08 09:58:14 +01:00
|
|
|
{:phoenix_pubsub, "~> 1.0"},
|
2019-02-14 14:19:55 +01:00
|
|
|
{:phoenix_ecto, "~> 4.0"},
|
2019-04-18 10:02:26 +02:00
|
|
|
{:postgrex, ">= 0.14.2"},
|
2017-12-08 09:58:14 +01:00
|
|
|
{:phoenix_html, "~> 2.10"},
|
|
|
|
{:gettext, "~> 0.11"},
|
2019-02-14 14:19:55 +01:00
|
|
|
{:cowboy, "~> 2.6"},
|
2019-09-24 09:43:54 +02:00
|
|
|
{:guardian, "~> 2.0"},
|
|
|
|
{:guardian_db, "~> 2.0.2"},
|
2019-02-14 14:19:55 +01:00
|
|
|
{:argon2_elixir, "~> 2.0"},
|
2019-02-07 16:53:58 +01:00
|
|
|
{:cors_plug, "~> 2.0"},
|
2019-07-23 15:41:59 +02:00
|
|
|
{:ecto_autoslug_field, "~> 2.0"},
|
2018-01-13 23:33:03 +01:00
|
|
|
{:rsa_ex, "~> 0.1"},
|
2018-08-24 12:31:41 +02:00
|
|
|
{:geo, "~> 3.0"},
|
2019-02-14 14:19:55 +01:00
|
|
|
{:geo_postgis, "~> 3.1"},
|
2018-01-13 23:33:03 +01:00
|
|
|
{:timex, "~> 3.0"},
|
2019-04-03 17:29:03 +02:00
|
|
|
{:icalendar, github: "tcitworld/icalendar"},
|
2018-01-26 11:02:11 +01:00
|
|
|
{:exgravatar, "~> 2.0.1"},
|
|
|
|
{:httpoison, "~> 1.0"},
|
2019-01-24 15:06:38 +01:00
|
|
|
{:json_ld, "~> 0.3"},
|
2019-02-14 14:19:55 +01:00
|
|
|
{:jason, "~> 1.1"},
|
2019-02-21 16:59:39 +01:00
|
|
|
{:ex_crypto, "~> 0.10.0"},
|
2018-05-17 11:32:23 +02:00
|
|
|
{:http_sign, "~> 0.1.1"},
|
2018-05-18 09:56:21 +02:00
|
|
|
{:ecto_enum, "~> 1.0"},
|
2018-08-24 12:31:41 +02:00
|
|
|
{:ex_ical, "~> 0.2"},
|
2018-07-04 14:29:17 +02:00
|
|
|
{:bamboo, "~> 1.0"},
|
2019-09-23 20:27:49 +02:00
|
|
|
{:bamboo_smtp, "~> 2.0"},
|
2019-09-24 07:05:27 +02:00
|
|
|
{:geolix, "~> 1.0"},
|
2019-09-24 09:26:04 +02:00
|
|
|
{:geolix_adapter_mmdb2, "~> 0.1.0"},
|
2019-04-01 17:17:08 +02:00
|
|
|
{:absinthe, "~> 1.4.16"},
|
2018-11-06 10:30:27 +01:00
|
|
|
{:absinthe_phoenix, "~> 1.4.0"},
|
2019-04-01 17:17:08 +02:00
|
|
|
{:absinthe_plug, "~> 1.4.6"},
|
2018-11-06 10:30:27 +01:00
|
|
|
{:absinthe_ecto, "~> 0.1.3"},
|
2019-04-01 17:17:08 +02:00
|
|
|
{:dataloader, "~> 1.0.6"},
|
2019-02-14 14:19:55 +01:00
|
|
|
{:plug_cowboy, "~> 2.0"},
|
2019-02-27 16:28:09 +01:00
|
|
|
{:atomex, "0.3.0"},
|
|
|
|
{:cachex, "~> 3.1"},
|
2019-09-24 07:03:58 +02:00
|
|
|
{:earmark, "~> 1.4.0"},
|
2019-03-12 11:52:28 +01:00
|
|
|
{:geohax, "~> 0.3.0"},
|
2019-05-22 14:12:11 +02:00
|
|
|
{:mogrify, "~> 0.7.2"},
|
2019-09-23 19:33:58 +02:00
|
|
|
{:premailex, "~> 0.3.0"},
|
2019-07-26 11:30:28 +02:00
|
|
|
{:auto_linker,
|
|
|
|
git: "https://git.pleroma.social/pleroma/auto_linker.git",
|
|
|
|
ref: "95e8188490e97505c56636c1379ffdf036c1fdde"},
|
2019-07-30 16:40:59 +02:00
|
|
|
{:http_signatures,
|
|
|
|
git: "https://git.pleroma.social/pleroma/http_signatures.git",
|
|
|
|
ref: "293d77bb6f4a67ac8bde1428735c3b42f22cbb30"},
|
|
|
|
{:html_sanitize_ex, "~> 1.3.0"},
|
2018-01-26 11:02:11 +01:00
|
|
|
# Dev and test dependencies
|
2018-11-27 11:29:58 +01:00
|
|
|
{:phoenix_live_reload, "~> 1.2", only: :dev},
|
2019-04-01 17:17:08 +02:00
|
|
|
{:ex_machina, "~> 2.3", only: [:dev, :test]},
|
2018-11-27 11:29:58 +01:00
|
|
|
{:excoveralls, "~> 0.10", only: :test},
|
2019-07-23 15:41:59 +02:00
|
|
|
{:ex_doc, "~> 0.21.1", only: [:dev, :test], runtime: false},
|
2018-01-15 11:41:47 +01:00
|
|
|
{:mix_test_watch, "~> 0.5", only: :dev, runtime: false},
|
2018-11-12 18:17:53 +01:00
|
|
|
{:ex_unit_notifier, "~> 0.1", only: :test},
|
2018-11-13 12:23:37 +01:00
|
|
|
{:dialyxir, "~> 1.0.0-rc.4", only: [:dev], runtime: false},
|
2019-01-03 14:59:59 +01:00
|
|
|
{:exvcr, "~> 0.10", only: :test},
|
2019-07-23 15:41:59 +02:00
|
|
|
{:credo, "~> 1.1.2", only: [:dev, :test], runtime: false},
|
2019-02-27 16:28:09 +01:00
|
|
|
{:mock, "~> 0.3.0", only: :test},
|
2019-03-01 12:57:22 +01:00
|
|
|
{:elixir_feed_parser, "~> 2.1.0", only: :test}
|
2017-12-08 09:58:14 +01:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
# Aliases are shortcuts or tasks specific to the current project.
|
|
|
|
# For example, to create, migrate and run the seeds file at once:
|
|
|
|
#
|
|
|
|
# $ mix ecto.setup
|
|
|
|
#
|
|
|
|
# See the documentation for `Mix` for more info on aliases.
|
|
|
|
defp aliases do
|
|
|
|
[
|
2019-09-08 01:51:18 +02:00
|
|
|
"ecto.setup": [
|
|
|
|
"ecto.create",
|
|
|
|
"ecto.migrate",
|
|
|
|
"run priv/repo/seeds.exs"
|
|
|
|
],
|
|
|
|
"ecto.reset": [
|
|
|
|
"ecto.drop",
|
|
|
|
"ecto.setup"
|
|
|
|
],
|
|
|
|
test: [
|
|
|
|
"ecto.create --quiet",
|
|
|
|
"ecto.migrate",
|
2019-09-09 09:55:33 +02:00
|
|
|
&run_test/1
|
2019-09-08 01:51:18 +02:00
|
|
|
],
|
2019-04-30 13:16:29 +02:00
|
|
|
"phx.deps_migrate_serve": [
|
|
|
|
"deps.get",
|
|
|
|
"ecto.create --quiet",
|
|
|
|
"ecto.migrate",
|
|
|
|
"cmd cd js && yarn install && cd ../",
|
|
|
|
"phx.server"
|
|
|
|
]
|
2017-12-08 09:58:14 +01:00
|
|
|
]
|
|
|
|
end
|
2019-03-14 15:00:34 +01:00
|
|
|
|
2019-09-09 09:55:33 +02:00
|
|
|
defp run_test(args) do
|
|
|
|
Mix.Task.run("test", args)
|
|
|
|
File.rm_rf!("test/uploads")
|
|
|
|
end
|
|
|
|
|
2019-03-14 15:00:34 +01:00
|
|
|
defp docs() do
|
|
|
|
[
|
|
|
|
source_ref: "v#{@version}",
|
|
|
|
extra_section: "GUIDES",
|
|
|
|
main: "introduction",
|
|
|
|
api_reference: false,
|
|
|
|
groups_for_modules: groups_for_modules(),
|
|
|
|
extras: extras(),
|
|
|
|
groups_for_extras: groups_for_extras(),
|
|
|
|
nest_modules_by_prefix: [
|
|
|
|
Mobilizon,
|
|
|
|
MobilizonWeb,
|
|
|
|
Mobilizon.Service.Geospatial,
|
|
|
|
MobilizonWeb.Resolvers,
|
|
|
|
MobilizonWeb.Schema,
|
|
|
|
Mobilizon.Service
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp extras() do
|
|
|
|
[
|
|
|
|
"support/guides/development/development.md",
|
|
|
|
"support/guides/development/tests.md",
|
|
|
|
"support/guides/development/styleguide.md",
|
|
|
|
"support/guides/install/install.md",
|
|
|
|
"support/guides/install/dependencies.md",
|
|
|
|
"support/guides/install/docker.md",
|
|
|
|
"support/guides/introduction.md",
|
2019-03-19 11:16:03 +01:00
|
|
|
"support/guides/contributing.md",
|
|
|
|
"support/guides/code_of_conduct.md"
|
2019-03-14 15:00:34 +01:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp groups_for_modules() do
|
|
|
|
[
|
|
|
|
Models: [
|
|
|
|
Mobilizon.Actors,
|
|
|
|
Mobilizon.Actors.Actor,
|
2019-09-09 00:52:49 +02:00
|
|
|
Mobilizon.Actors.ActorOpenness,
|
|
|
|
Mobilizon.Actors.ActorType,
|
|
|
|
Mobilizon.Actors.MemberRole,
|
2019-03-14 15:00:34 +01:00
|
|
|
Mobilizon.Actors.Bot,
|
|
|
|
Mobilizon.Actors.Follower,
|
|
|
|
Mobilizon.Actors.Member,
|
|
|
|
Mobilizon.Addresses,
|
|
|
|
Mobilizon.Addresses.Address,
|
|
|
|
Mobilizon.Events,
|
2019-09-22 09:24:18 +02:00
|
|
|
Mobilizon.Service.ActivityPub.Activity,
|
2019-03-14 15:00:34 +01:00
|
|
|
Mobilizon.Events.Event,
|
|
|
|
Mobilizon.Events.Comment,
|
|
|
|
Mobilizon.Events.FeedToken,
|
|
|
|
Mobilizon.Events.Participant,
|
|
|
|
Mobilizon.Events.Session,
|
|
|
|
Mobilizon.Events.Tag,
|
|
|
|
Mobilizon.Events.TagRelations,
|
|
|
|
Mobilizon.Events.Track,
|
2019-09-13 01:01:17 +02:00
|
|
|
Mobilizon.Event.EventCategory,
|
|
|
|
Mobilizon.Events.CommentVisibility,
|
|
|
|
Mobilizon.Events.EventStatus,
|
|
|
|
Mobilizon.Events.EventVisibility,
|
|
|
|
Mobilizon.Events.JoinOptions,
|
|
|
|
Mobilizon.Events.ParticipantRole,
|
2019-03-14 15:00:34 +01:00
|
|
|
Mobilizon.Events.Tag.TitleSlug,
|
|
|
|
Mobilizon.Events.Tag.TitleSlug.Type,
|
|
|
|
Mobilizon.Events.TagRelation,
|
|
|
|
Mobilizon.Users,
|
|
|
|
Mobilizon.Users.User,
|
2019-09-07 19:54:11 +02:00
|
|
|
Mobilizon.Users.UserRole,
|
2019-03-14 15:00:34 +01:00
|
|
|
Mobilizon.Users.Guards,
|
2019-09-08 01:49:56 +02:00
|
|
|
Mobilizon.Storage.Ecto,
|
|
|
|
Mobilizon.Storage.Repo
|
2019-03-14 15:00:34 +01:00
|
|
|
],
|
|
|
|
APIs: [
|
|
|
|
MobilizonWeb.API.Comments,
|
|
|
|
MobilizonWeb.API.Events,
|
|
|
|
MobilizonWeb.API.Groups,
|
|
|
|
MobilizonWeb.API.Search,
|
|
|
|
MobilizonWeb.API.Utils
|
|
|
|
],
|
|
|
|
Web: [
|
|
|
|
MobilizonWeb,
|
|
|
|
MobilizonWeb.PageView,
|
|
|
|
MobilizonWeb.Router,
|
|
|
|
MobilizonWeb.Router.Helpers,
|
|
|
|
MobilizonWeb.AuthErrorHandler,
|
|
|
|
MobilizonWeb.AuthPipeline,
|
2019-09-17 23:39:26 +02:00
|
|
|
MobilizonWeb.Cache,
|
2019-03-14 15:00:34 +01:00
|
|
|
MobilizonWeb.ChangesetView,
|
|
|
|
MobilizonWeb.Context,
|
|
|
|
MobilizonWeb.Endpoint,
|
|
|
|
MobilizonWeb.ErrorHelpers,
|
|
|
|
MobilizonWeb.ErrorView,
|
|
|
|
MobilizonWeb.FallbackController,
|
|
|
|
MobilizonWeb.FeedController,
|
|
|
|
MobilizonWeb.Gettext,
|
|
|
|
MobilizonWeb.Guardian,
|
|
|
|
MobilizonWeb.Guardian.Plug,
|
|
|
|
MobilizonWeb.JsonLD.ObjectView,
|
|
|
|
MobilizonWeb.PageController,
|
|
|
|
MobilizonWeb.Uploaders.Avatar,
|
|
|
|
MobilizonWeb.Uploaders.Category,
|
|
|
|
MobilizonWeb.Uploaders.Category.Type
|
|
|
|
],
|
|
|
|
Geospatial: [
|
|
|
|
Mobilizon.Service.Geospatial,
|
|
|
|
Mobilizon.Service.Geospatial.Addok,
|
|
|
|
Mobilizon.Service.Geospatial.GoogleMaps,
|
|
|
|
Mobilizon.Service.Geospatial.MapQuest,
|
|
|
|
Mobilizon.Service.Geospatial.Nominatim,
|
|
|
|
Mobilizon.Service.Geospatial.Photon,
|
|
|
|
Mobilizon.Service.Geospatial.Provider
|
|
|
|
],
|
|
|
|
GraphQL: [
|
|
|
|
MobilizonWeb.Resolvers.Address,
|
|
|
|
MobilizonWeb.Resolvers.Comment,
|
|
|
|
MobilizonWeb.Resolvers.Event,
|
|
|
|
MobilizonWeb.Resolvers.FeedToken,
|
|
|
|
MobilizonWeb.Resolvers.Group,
|
|
|
|
MobilizonWeb.Resolvers.Person,
|
|
|
|
MobilizonWeb.Resolvers.Search,
|
|
|
|
MobilizonWeb.Resolvers.Tag,
|
|
|
|
MobilizonWeb.Resolvers.User,
|
|
|
|
MobilizonWeb.Schema,
|
|
|
|
MobilizonWeb.Schema.ActorInterface,
|
|
|
|
MobilizonWeb.Schema.Actors.FollowerType,
|
|
|
|
MobilizonWeb.Schema.Actors.GroupType,
|
|
|
|
MobilizonWeb.Schema.Actors.MemberType,
|
|
|
|
MobilizonWeb.Schema.Actors.PersonType,
|
|
|
|
MobilizonWeb.Schema.AddressType,
|
|
|
|
MobilizonWeb.Schema.CommentType,
|
|
|
|
MobilizonWeb.Schema.Custom.Point,
|
|
|
|
MobilizonWeb.Schema.Custom.UUID,
|
|
|
|
MobilizonWeb.Schema.EventType,
|
|
|
|
MobilizonWeb.Schema.Events.FeedTokenType,
|
|
|
|
MobilizonWeb.Schema.Events.ParticipantType,
|
|
|
|
MobilizonWeb.Schema.SortType,
|
|
|
|
MobilizonWeb.Schema.TagType,
|
|
|
|
MobilizonWeb.Schema.UserType,
|
|
|
|
MobilizonWeb.Schema.Utils
|
|
|
|
],
|
|
|
|
ActivityPub: [
|
|
|
|
MobilizonWeb.ActivityPub.ActorView,
|
|
|
|
MobilizonWeb.ActivityPub.ObjectView,
|
|
|
|
MobilizonWeb.ActivityPubController,
|
|
|
|
Mobilizon.Service.ActivityPub,
|
|
|
|
Mobilizon.Service.ActivityPub.Transmogrifier,
|
|
|
|
Mobilizon.Service.ActivityPub.Utils,
|
|
|
|
MobilizonWeb.HTTPSignaturePlug,
|
|
|
|
MobilizonWeb.WebFingerController,
|
|
|
|
MobilizonWeb.NodeInfoController,
|
2019-07-30 16:40:59 +02:00
|
|
|
Mobilizon.Service.HTTPSignatures.Signature,
|
2019-03-14 15:00:34 +01:00
|
|
|
Mobilizon.Service.WebFinger,
|
|
|
|
Mobilizon.Service.XmlBuilder,
|
|
|
|
Mobilizon.Service.Federator
|
|
|
|
],
|
|
|
|
Services: [
|
|
|
|
Mobilizon.Service.EmailChecker,
|
|
|
|
Mobilizon.Service.Export.Feed,
|
|
|
|
Mobilizon.Service.Export.ICalendar,
|
|
|
|
Mobilizon.Service.Metadata,
|
|
|
|
Mobilizon.Service.Formatter,
|
|
|
|
Mobilizon.Service.Users.Tools
|
|
|
|
],
|
|
|
|
Tools: [
|
|
|
|
Mobilizon.Application,
|
|
|
|
Mobilizon.Factory,
|
2019-09-17 02:45:32 +02:00
|
|
|
MobilizonWeb.Email.Mailer,
|
|
|
|
MobilizonWeb.Email.User,
|
|
|
|
MobilizonWeb.EmailView
|
2019-03-14 15:00:34 +01:00
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp groups_for_extras() do
|
|
|
|
[
|
|
|
|
Introduction: [
|
|
|
|
"support/guides/introduction.md",
|
2019-03-19 11:16:03 +01:00
|
|
|
"support/guides/contributing.md",
|
|
|
|
"support/guides/code_of_conduct.md"
|
2019-03-14 15:00:34 +01:00
|
|
|
],
|
|
|
|
Development: [
|
|
|
|
"support/guides/development/development.md",
|
|
|
|
"support/guides/development/tests.md",
|
|
|
|
"support/guides/development/styleguide.md"
|
|
|
|
],
|
|
|
|
Production: [
|
|
|
|
"support/guides/install/install.md",
|
|
|
|
"support/guides/install/docker.md",
|
|
|
|
"support/guides/install/dependencies.md"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
end
|
2017-12-08 09:58:14 +01:00
|
|
|
end
|