diff --git a/.build.yml b/.build.yml index 6e2cb09..81366f8 100644 --- a/.build.yml +++ b/.build.yml @@ -5,33 +5,33 @@ packages: - postgresql-contrib - docker artifacts: -- management/_build/prod/rel/recycledcloud.tar.gz +- meta/_build/prod/rel/meta.tar.gz sources: -- https://code.recycled.cloud/e-Durable/management.git +- https://code.recycled.cloud/RecycledCloud/met.git tasks: - setup: | sudo service postgresql setup sudo service postgresql start sudo service docker start - cd management + cd meta mix local.hex --force mix local.rebar --force mix deps.get - build: | - cd management + cd meta MIX_ENV=test mix deps.compile MIX_ENV=test mix compile - test: | - cd management + cd meta sudo docker pull code.ungleich.ch:5050/fnux/e-durable-oci-images/openldap-playground:latest CALL_CONTAINER_RUNTIME_AS_ROOT=1 LDAP_WAIT_LOOPS=100 MIX_ENV=test mix test - lint: | - cd management + cd meta MIX_ENV=test mix credo - release: | - cd management + cd meta MIX_ENV=prod mix compile MIX_ENV=prod mix phx.digest MIX_ENV=prod mix release cd _build/prod/rel - tar cvzf recycledcloud.tar.gz recycledcloud/ + tar cvzf meta.tar.gz met/ diff --git a/CHANGELOG.md b/CHANGELOG.md index fa6de5c..043acbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# meta 0.5.0, not yet release + +* Rename app from Recycled Cloud / management to Meta + # management 0.4.0, 2021-04-09 * Initial VM dashboard diff --git a/README.md b/README.md index 14fa082..4ad22a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Recycled Cloud Management Interface +# Recycled Cloud Management Interface (Meta) -[![builds.sr.ht status](https://builds.sr.ht/~fnux.svg?search=recycledcloud-management)](https://builds.sr.ht/~fnux?search=recycledcloud-management) +[![builds.sr.ht status](https://builds.sr.ht/~fnux.svg?search=recycledcloud-meta)](https://builds.sr.ht/~fnux?search=recycledcloud-meta) This repository tracks the initial work for a web interface atop the recycled cloud. It is written in [Elixir](https://elixir-lang.org/), making use of the diff --git a/config/config.exs b/config/config.exs index bdcb2e1..b74371f 100644 --- a/config/config.exs +++ b/config/config.exs @@ -7,17 +7,17 @@ # General application configuration use Mix.Config -config :recycledcloud, - namespace: RecycledCloud, - ecto_repos: [RecycledCloud.Repo], +config :meta, + namespace: Meta, + ecto_repos: [Meta.Repo], enable_registration: true # Configures the endpoint -config :recycledcloud, RecycledCloudWeb.Endpoint, +config :meta, MetaWeb.Endpoint, url: [host: "localhost"], secret_key_base: "bm4MGjSLcEbL3HEDg2H0LlcJ5d3nIkogyd/PpGW1iXdEbKbtM0N8Ct4Jh/PbsnoS", - render_errors: [view: RecycledCloudWeb.ErrorView, accepts: ~w(html json), layout: false], - pubsub_server: RecycledCloud.PubSub, + render_errors: [view: MetaWeb.ErrorView, accepts: ~w(html json), layout: false], + pubsub_server: Meta.PubSub, live_view: [signing_salt: "kTyyWZd5"] # Configures Elixir's Logger diff --git a/config/dev.exs b/config/dev.exs index b41d77d..91d9aec 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,10 +1,10 @@ use Mix.Config # Configure your database -config :recycledcloud, RecycledCloud.Repo, +config :meta, Meta.Repo, username: "postgres", password: "postgres", - database: "recycledcloud_dev", + database: "meta_dev", hostname: "localhost", show_sensitive_data_on_connection_error: true, pool_size: 10 @@ -15,7 +15,7 @@ config :recycledcloud, RecycledCloud.Repo, # The watchers configuration can be used to run external # watchers to your application. For example, we use it # with webpack to recompile .js and .css sources. -config :recycledcloud, RecycledCloudWeb.Endpoint, +config :meta, MetaWeb.Endpoint, http: [port: 4000], debug_errors: true, code_reloader: true, @@ -47,13 +47,13 @@ config :recycledcloud, RecycledCloudWeb.Endpoint, # different ports. # Watch static and templates for browser reloading. -config :recycledcloud, RecycledCloudWeb.Endpoint, +config :meta, MetaWeb.Endpoint, live_reload: [ patterns: [ ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$", ~r"priv/gettext/.*(po)$", - ~r"lib/recycledcloud_web/(live|views)/.*(ex)$", - ~r"lib/recycledcloud_web/templates/.*(eex)$" + ~r"lib/meta_web/(live|views)/.*(ex)$", + ~r"lib/meta_web/templates/.*(eex)$" ] ] @@ -68,11 +68,11 @@ config :phoenix, :stacktrace_depth, 20 config :phoenix, :plug_init_mode, :runtime # Send emails to local memory for development. -config :recycledcloud, RecycledCloud.Mailer, +config :meta, Meta.Mailer, adapter: Bamboo.LocalAdapter # LDAP configuration -config :recycledcloud, :ldap, +config :meta, :ldap, server: "127.0.0.1", port: 3089, ssl: false, @@ -82,7 +82,7 @@ config :recycledcloud, :ldap, default_group_gid: 1000 ## Odoo API credentials -config :recycledcloud, :odoo, +config :meta, :odoo, server: "https://odoo.staging.e-durable.ch", database: "e-Durable", user: "user", diff --git a/config/prod.exs b/config/prod.exs index e4f779d..05535ae 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -9,7 +9,7 @@ use Mix.Config # manifest is generated by the `mix phx.digest` task, # which you should run after static files are built and # before starting your production server. -config :recycledcloud, RecycledCloudWeb.Endpoint, +config :meta, MetaWeb.Endpoint, url: [host: "example.com", port: 80], cache_static_manifest: "priv/static/cache_manifest.json" @@ -21,7 +21,7 @@ config :logger, level: :info # To get SSL working, you will need to add the `https` key # to the previous section and set your `:url` port to 443: # -# config :recycledcloud, RecycledCloudWeb.Endpoint, +# config :meta, MetaWeb.Endpoint, # ... # url: [host: "example.com", port: 443], # https: [ @@ -45,7 +45,7 @@ config :logger, level: :info # We also recommend setting `force_ssl` in your endpoint, ensuring # no data is ever sent via http, always redirecting to https: # -# config :recycledcloud, RecycledCloudWeb.Endpoint, +# config :meta, MetaWeb.Endpoint, # force_ssl: [hsts: true] # # Check `Plug.SSL` for all available options in `force_ssl`. diff --git a/config/release-runtime.exs b/config/release-runtime.exs index 7c7eebb..94189ef 100644 --- a/config/release-runtime.exs +++ b/config/release-runtime.exs @@ -10,7 +10,7 @@ database_url = For example: ecto://USER:PASS@HOST/DATABASE """ -config :recycledcloud, RecycledCloud.Repo, +config :meta, Meta.Repo, # ssl: true, url: database_url, pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10") @@ -22,7 +22,7 @@ secret_key_base = You can generate one by calling: mix phx.gen.secret """ -config :recycledcloud, RecycledCloudWeb.Endpoint, +config :meta, MetaWeb.Endpoint, http: [ port: String.to_integer(System.get_env("PORT") || "4000"), transport_options: [socket_opts: [:inet6]] @@ -34,7 +34,7 @@ config :recycledcloud, RecycledCloudWeb.Endpoint, # If you are doing OTP releases, you need to instruct Phoenix # to start each relevant endpoint: # -config :recycledcloud, RecycledCloudWeb.Endpoint, server: true +config :meta, MetaWeb.Endpoint, server: true # # Then you can assemble a release by calling `mix release`. # See `mix help release` for more information. diff --git a/config/test.exs b/config/test.exs index b325936..4b8dfb8 100644 --- a/config/test.exs +++ b/config/test.exs @@ -8,16 +8,16 @@ config :bcrypt_elixir, :log_rounds, 1 # The MIX_TEST_PARTITION environment variable can be used # to provide built-in test partitioning in CI environment. # Run `mix help test` for more information. -config :recycledcloud, RecycledCloud.Repo, +config :meta, Meta.Repo, username: "postgres", password: "postgres", - database: "recycledcloud_test#{System.get_env("MIX_TEST_PARTITION")}", + database: "meta_test#{System.get_env("MIX_TEST_PARTITION")}", hostname: "localhost", pool: Ecto.Adapters.SQL.Sandbox # We don't run a server during test. If one is required, # you can enable the server option below. -config :recycledcloud, RecycledCloudWeb.Endpoint, +config :meta, MetaWeb.Endpoint, http: [port: 4002], server: false @@ -25,7 +25,7 @@ config :recycledcloud, RecycledCloudWeb.Endpoint, config :logger, level: :warn # LDAP configuration -config :recycledcloud, :ldap, +config :meta, :ldap, server: "127.0.0.1", port: 3089, ssl: false, @@ -34,5 +34,5 @@ config :recycledcloud, :ldap, bind_pw: "admin" # Send emails to local memory for testing. -config :recycledcloud, RecycledCloud.Mailer, +config :meta, Meta.Mailer, adapter: Bamboo.LocalAdapter diff --git a/lib/recycledcloud.ex b/lib/meta.ex similarity index 82% rename from lib/recycledcloud.ex rename to lib/meta.ex index 9a80729..67cdf9b 100644 --- a/lib/recycledcloud.ex +++ b/lib/meta.ex @@ -1,6 +1,6 @@ -defmodule RecycledCloud do +defmodule Meta do @moduledoc """ - RecycledCloud keeps the contexts that define your domain + Meta keeps the contexts that define your domain and business logic. Contexts are also responsible for managing your data, regardless diff --git a/lib/recycledcloud/accounts.ex b/lib/meta/accounts.ex similarity index 98% rename from lib/recycledcloud/accounts.ex rename to lib/meta/accounts.ex index 9a95a10..c1bd435 100644 --- a/lib/recycledcloud/accounts.ex +++ b/lib/meta/accounts.ex @@ -1,11 +1,11 @@ -defmodule RecycledCloud.Accounts do +defmodule Meta.Accounts do @moduledoc """ The Accounts context. """ import Ecto.Query, warn: false - alias RecycledCloud.Repo - alias RecycledCloud.Accounts.{User, Key, UserToken, UserNotifier} + alias Meta.Repo + alias Meta.Accounts.{User, Key, UserToken, UserNotifier} ## Database getters diff --git a/lib/recycledcloud/accounts/key.ex b/lib/meta/accounts/key.ex similarity index 93% rename from lib/recycledcloud/accounts/key.ex rename to lib/meta/accounts/key.ex index 6410969..597bcfa 100644 --- a/lib/recycledcloud/accounts/key.ex +++ b/lib/meta/accounts/key.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.Accounts.Key do +defmodule Meta.Accounts.Key do use Ecto.Schema import Ecto.Changeset @@ -6,7 +6,7 @@ defmodule RecycledCloud.Accounts.Key do field :comment, :string field :value, :string field :fingerprint, :string - belongs_to :user, RecycledCloud.Accounts.User + belongs_to :user, Meta.Accounts.User timestamps() end diff --git a/lib/recycledcloud/accounts/user.ex b/lib/meta/accounts/user.ex similarity index 97% rename from lib/recycledcloud/accounts/user.ex rename to lib/meta/accounts/user.ex index d77b2fb..d0039b9 100644 --- a/lib/recycledcloud/accounts/user.ex +++ b/lib/meta/accounts/user.ex @@ -1,10 +1,10 @@ -defmodule RecycledCloud.Accounts.User do +defmodule Meta.Accounts.User do use Ecto.Schema import Ecto.Changeset require Logger - alias RecycledCloud.{LDAP,Accounts} - alias RecycledCloud.Accounts.User - alias RecycledCloud.Repo + alias Meta.{LDAP,Accounts} + alias Meta.Accounts.User + alias Meta.Repo @min_password_lenght 6 @max_password_lenght 80 @@ -74,7 +74,7 @@ defmodule RecycledCloud.Accounts.User do defp create_ldap_user(%User{} = user) do # TODO: read dn template from conf, gid_number - conf = Application.get_env(:recycledcloud, :ldap) + conf = Application.get_env(:meta, :ldap) basetree = conf |> Keyword.get(:base_dn) default_group_gid = conf |> Keyword.get(:default_group_gid, 1000) @@ -156,7 +156,7 @@ defmodule RecycledCloud.Accounts.User do user |> cast(attrs, [:username, :password, :email, :dn, :captcha]) - |> RecycledCloud.Captcha.validate(expected_captcha_result) + |> Meta.Captcha.validate(expected_captcha_result) |> validate_username() |> validate_email() |> validate_password() diff --git a/lib/recycledcloud/accounts/user_notifier.ex b/lib/meta/accounts/user_notifier.ex similarity index 94% rename from lib/recycledcloud/accounts/user_notifier.ex rename to lib/meta/accounts/user_notifier.ex index 83caf5f..9d7c10b 100644 --- a/lib/recycledcloud/accounts/user_notifier.ex +++ b/lib/meta/accounts/user_notifier.ex @@ -1,5 +1,5 @@ -defmodule RecycledCloud.Accounts.UserNotifier do - alias RecycledCloud.Mailer +defmodule Meta.Accounts.UserNotifier do + alias Meta.Mailer import Bamboo.Email defp deliver(to, body) do diff --git a/lib/recycledcloud/accounts/user_token.ex b/lib/meta/accounts/user_token.ex similarity index 87% rename from lib/recycledcloud/accounts/user_token.ex rename to lib/meta/accounts/user_token.ex index c3497ba..a1b7d37 100644 --- a/lib/recycledcloud/accounts/user_token.ex +++ b/lib/meta/accounts/user_token.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.Accounts.UserToken do +defmodule Meta.Accounts.UserToken do use Ecto.Schema import Ecto.Query @@ -16,7 +16,7 @@ defmodule RecycledCloud.Accounts.UserToken do field :token, :binary field :context, :string field :sent_to, :string - belongs_to :user, RecycledCloud.Accounts.User + belongs_to :user, Meta.Accounts.User timestamps(updated_at: false) end @@ -28,7 +28,7 @@ defmodule RecycledCloud.Accounts.UserToken do """ def build_session_token(user) do token = :crypto.strong_rand_bytes(@rand_size) - {token, %RecycledCloud.Accounts.UserToken{token: token, context: "session", user_id: user.id}} + {token, %Meta.Accounts.UserToken{token: token, context: "session", user_id: user.id}} end @doc """ @@ -63,7 +63,7 @@ defmodule RecycledCloud.Accounts.UserToken do hashed_token = :crypto.hash(@hash_algorithm, token) {Base.url_encode64(token, padding: false), - %RecycledCloud.Accounts.UserToken{ + %Meta.Accounts.UserToken{ token: hashed_token, context: context, sent_to: sent_to, @@ -123,17 +123,17 @@ defmodule RecycledCloud.Accounts.UserToken do Returns the given token with the given context. """ def token_and_context_query(token, context) do - from RecycledCloud.Accounts.UserToken, where: [token: ^token, context: ^context] + from Meta.Accounts.UserToken, where: [token: ^token, context: ^context] end @doc """ Gets all tokens for the given user for the given contexts. """ def user_and_contexts_query(user, :all) do - from t in RecycledCloud.Accounts.UserToken, where: t.user_id == ^user.id + from t in Meta.Accounts.UserToken, where: t.user_id == ^user.id end def user_and_contexts_query(user, [_ | _] = contexts) do - from t in RecycledCloud.Accounts.UserToken, where: t.user_id == ^user.id and t.context in ^contexts + from t in Meta.Accounts.UserToken, where: t.user_id == ^user.id and t.context in ^contexts end end diff --git a/lib/recycledcloud/application.ex b/lib/meta/application.ex similarity index 59% rename from lib/recycledcloud/application.ex rename to lib/meta/application.ex index bc035fb..315830c 100644 --- a/lib/recycledcloud/application.ex +++ b/lib/meta/application.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.Application do +defmodule Meta.Application do # See https://hexdocs.pm/elixir/Application.html # for more information on OTP Applications @moduledoc false @@ -8,31 +8,31 @@ defmodule RecycledCloud.Application do def start(_type, _args) do children = [ # Start the Ecto repository - RecycledCloud.Repo, + Meta.Repo, # Start the Telemetry supervisor - RecycledCloudWeb.Telemetry, + MetaWeb.Telemetry, # Start the PubSub system - {Phoenix.PubSub, name: RecycledCloud.PubSub}, + {Phoenix.PubSub, name: Meta.PubSub}, # Start the Endpoint (http/https) - RecycledCloudWeb.Endpoint, + MetaWeb.Endpoint, # Starts LDAP connection pool - RecycledCloud.LDAP, + Meta.LDAP, # Starts Odoo client - RecycledCloud.Odoo - # Start a worker by calling: RecycledCloud.Worker.start_link(arg) - # {RecycledCloud.Worker, arg} + Meta.Odoo + # Start a worker by calling: Meta.Worker.start_link(arg) + # {Meta.Worker, arg} ] # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: RecycledCloud.Supervisor] + opts = [strategy: :one_for_one, name: Meta.Supervisor] Supervisor.start_link(children, opts) end # Tell Phoenix to update the endpoint configuration # whenever the application is updated. def config_change(changed, _new, removed) do - RecycledCloudWeb.Endpoint.config_change(changed, removed) + MetaWeb.Endpoint.config_change(changed, removed) :ok end end diff --git a/lib/recycledcloud/billing/invoice.ex b/lib/meta/billing/invoice.ex similarity index 86% rename from lib/recycledcloud/billing/invoice.ex rename to lib/meta/billing/invoice.ex index b783e7a..5ca8e2f 100644 --- a/lib/recycledcloud/billing/invoice.ex +++ b/lib/meta/billing/invoice.ex @@ -1,6 +1,6 @@ -defmodule RecycledCloud.Billing.Invoice do - alias RecycledCloud.Billing.{Partner, Invoice} - alias RecycledCloud.Odoo +defmodule Meta.Billing.Invoice do + alias Meta.Billing.{Partner, Invoice} + alias Meta.Odoo use Ecto.Schema diff --git a/lib/recycledcloud/billing/partner.ex b/lib/meta/billing/partner.ex similarity index 92% rename from lib/recycledcloud/billing/partner.ex rename to lib/meta/billing/partner.ex index e084f1e..2756a9f 100644 --- a/lib/recycledcloud/billing/partner.ex +++ b/lib/meta/billing/partner.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloud.Billing.Partner do - alias RecycledCloud.Accounts.User - alias RecycledCloud.Billing.Partner - alias RecycledCloud.Odoo - alias RecycledCloud.Repo +defmodule Meta.Billing.Partner do + alias Meta.Accounts.User + alias Meta.Billing.Partner + alias Meta.Odoo + alias Meta.Repo import Ecto.Changeset use Ecto.Schema diff --git a/lib/recycledcloud/captcha.ex b/lib/meta/captcha.ex similarity index 95% rename from lib/recycledcloud/captcha.ex rename to lib/meta/captcha.ex index d45f309..d0e7ba1 100644 --- a/lib/recycledcloud/captcha.ex +++ b/lib/meta/captcha.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.Captcha do +defmodule Meta.Captcha do # We can't use a graphical-only captcha library such as # https://hex.pm/packages/captcha since it would break accessibility for # blind people. Let's make it simple maths instead! diff --git a/lib/recycledcloud/ldap.ex b/lib/meta/ldap.ex similarity index 94% rename from lib/recycledcloud/ldap.ex rename to lib/meta/ldap.ex index 1f2435f..7c1218a 100644 --- a/lib/recycledcloud/ldap.ex +++ b/lib/meta/ldap.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.LDAP do +defmodule Meta.LDAP do require Logger use GenServer @@ -54,7 +54,7 @@ defmodule RecycledCloud.LDAP do ### def search(ldap_conn, field, value, search_timeout \\ 1000) do - base_dn = Application.get_env(:recycledcloud, :ldap) |> Keyword.get(:base_dn) + base_dn = Application.get_env(:meta, :ldap) |> Keyword.get(:base_dn) opts = [ {:base, to_charlist(base_dn)}, {:scope, :eldap.wholeSubtree()}, @@ -89,7 +89,7 @@ defmodule RecycledCloud.LDAP do defp internal_execute_query(query, ldap_conn), do: query.(ldap_conn) defp bind(ldap_conn) do - conf = Application.get_env(:recycledcloud, :ldap, []) + conf = Application.get_env(:meta, :ldap, []) dn = conf |> Keyword.get(:bind_dn) pw = conf |> Keyword.get(:bind_pw) @@ -98,7 +98,7 @@ defmodule RecycledCloud.LDAP do # The method is used by the RC.LDAPTestEnvironment module. def connect do - conf = Application.get_env(:recycledcloud, :ldap, []) + conf = Application.get_env(:meta, :ldap, []) host = Keyword.get(conf, :server, "localhost") |> String.to_charlist opts = [ diff --git a/lib/recycledcloud/mailer.ex b/lib/meta/mailer.ex similarity index 59% rename from lib/recycledcloud/mailer.ex rename to lib/meta/mailer.ex index b3e748b..5546e09 100644 --- a/lib/recycledcloud/mailer.ex +++ b/lib/meta/mailer.ex @@ -1,5 +1,5 @@ -defmodule RecycledCloud.Mailer do - use Bamboo.Mailer, otp_app: :recycledcloud +defmodule Meta.Mailer do + use Bamboo.Mailer, otp_app: :meta import Bamboo.Email @from "no-reply@recycled.cloud" diff --git a/lib/recycledcloud/odoo.ex b/lib/meta/odoo.ex similarity index 96% rename from lib/recycledcloud/odoo.ex rename to lib/meta/odoo.ex index ba4d2bf..fae4886 100644 --- a/lib/recycledcloud/odoo.ex +++ b/lib/meta/odoo.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.Odoo do +defmodule Meta.Odoo do use GenServer require Logger @@ -8,7 +8,7 @@ defmodule RecycledCloud.Odoo do # Odoo 14.0 API is documented at https://www.odoo.com/documentation/14.0/webservices/odoo.html defp get_odoo_config(key) do - Application.get_env(:recycledcloud, :odoo, []) |> Keyword.get(key) + Application.get_env(:meta, :odoo, []) |> Keyword.get(key) end defp post!(call, endpoint) do diff --git a/lib/recycledcloud/opennebula.ex b/lib/meta/opennebula.ex similarity index 93% rename from lib/recycledcloud/opennebula.ex rename to lib/meta/opennebula.ex index 9aa0d5b..2b50672 100644 --- a/lib/recycledcloud/opennebula.ex +++ b/lib/meta/opennebula.ex @@ -1,18 +1,18 @@ -defmodule RecycledCloud.OpenNebula do +defmodule Meta.OpenNebula do @moduledoc """ The OpenNebula context and XML-RPC Interface. See http://docs.opennebula.io/5.12/integration/system_interfaces/api.html for details. """ - alias RecycledCloud.OpenNebula.{VM, VMPool} + alias Meta.OpenNebula.{VM, VMPool} require Logger # OpenNebula daemon. @endpoint "/RPC2" defp get_opennebula_config(key) do - Application.get_env(:recycledcloud, :opennebula, []) |> Keyword.get(key) + Application.get_env(:meta, :opennebula, []) |> Keyword.get(key) end def get_locations() do diff --git a/lib/recycledcloud/opennebula/schema.ex b/lib/meta/opennebula/schema.ex similarity index 90% rename from lib/recycledcloud/opennebula/schema.ex rename to lib/meta/opennebula/schema.ex index 278ae30..c629012 100644 --- a/lib/recycledcloud/opennebula/schema.ex +++ b/lib/meta/opennebula/schema.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.OpenNebula.Schema do +defmodule Meta.OpenNebula.Schema do @moduledoc """ Helpers used to process OpenNebula's XSD schema. @@ -24,8 +24,8 @@ defmodule RecycledCloud.OpenNebula.Schema do """ require Logger - alias RecycledCloud.OpenNebula.Schema - alias RecycledCloud.OpenNebula.Schema.Records + alias Meta.OpenNebula.Schema + alias Meta.OpenNebula.Schema.Records @opennebula_release "5.12" @@ -33,7 +33,7 @@ defmodule RecycledCloud.OpenNebula.Schema do # Data-binding: access and extract XSD models. defp get_raw(type, object) do - priv_dir = :code.priv_dir(:recycledcloud) |> to_string + priv_dir = :code.priv_dir(:meta) |> to_string {data_dir, extension} = case type do :xsd -> {"xsd-src", ".xsd"} :hrl -> {"xsd-records", ".hrl"} @@ -73,8 +73,8 @@ defmodule RecycledCloud.OpenNebula.Schema do schema = elem(data, 0) if schema in Keyword.keys(Schema.Records.__info__(:macros)) do call = quote do - require RecycledCloud.OpenNebula.Schema.Records - RecycledCloud.OpenNebula.Schema.Records."XSD"(:data) + require Meta.OpenNebula.Schema.Records + Meta.OpenNebula.Schema.Records."XSD"(:data) end replace = fn :XSD, {model, data} -> {model, {model, data}} diff --git a/lib/recycledcloud/opennebula/schema/records.ex b/lib/meta/opennebula/schema/records.ex similarity index 85% rename from lib/recycledcloud/opennebula/schema/records.ex rename to lib/meta/opennebula/schema/records.ex index 96988ff..74f469b 100644 --- a/lib/recycledcloud/opennebula/schema/records.ex +++ b/lib/meta/opennebula/schema/records.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloud.OpenNebula.Schema.Records do +defmodule Meta.OpenNebula.Schema.Records do @moduledoc """ Here we define XSD template into something we can play with (Records). @@ -6,11 +6,11 @@ defmodule RecycledCloud.OpenNebula.Schema.Records do code - which is what we're doing right now: the records are defined in .hrl (erlang headers) by erlsom. - See RecycledCloud.OpenNebula.Schema module for details. + See Meta.OpenNebula.Schema module for details. """ require Record - alias RecycledCloud.OpenNebula.Schema + alias Meta.OpenNebula.Schema @models %{ "vm" => Schema.generate_model_for("vm"), diff --git a/lib/recycledcloud/opennebula/vm.ex b/lib/meta/opennebula/vm.ex similarity index 98% rename from lib/recycledcloud/opennebula/vm.ex rename to lib/meta/opennebula/vm.ex index 9cac3ab..ac78bc8 100644 --- a/lib/recycledcloud/opennebula/vm.ex +++ b/lib/meta/opennebula/vm.ex @@ -1,9 +1,9 @@ -defmodule RecycledCloud.OpenNebula.VM do +defmodule Meta.OpenNebula.VM do @moduledoc """ OpenNebula VM: http://docs.opennebula.io/5.12/integration/system_interfaces/api.html#one-vm-info """ - alias RecycledCloud.OpenNebula, as: ONE - alias RecycledCloud.OpenNebula.Schema + alias Meta.OpenNebula, as: ONE + alias Meta.OpenNebula.Schema @states [ {:any, -2}, diff --git a/lib/recycledcloud/opennebula/vm_pool.ex b/lib/meta/opennebula/vm_pool.ex similarity index 91% rename from lib/recycledcloud/opennebula/vm_pool.ex rename to lib/meta/opennebula/vm_pool.ex index a33a777..feaeb5e 100644 --- a/lib/recycledcloud/opennebula/vm_pool.ex +++ b/lib/meta/opennebula/vm_pool.ex @@ -1,9 +1,9 @@ -defmodule RecycledCloud.OpenNebula.VMPool do +defmodule Meta.OpenNebula.VMPool do @moduledoc """ OpenNebula VM Pool: http://docs.opennebula.io/5.12/integration/system_interfaces/api.html#one-vmpool-info """ - alias RecycledCloud.OpenNebula, as: ONE - alias RecycledCloud.OpenNebula.Schema + alias Meta.OpenNebula, as: ONE + alias Meta.OpenNebula.Schema # Filters ressourses. # (user) ID >= 0 matches an user's resources. diff --git a/lib/recycledcloud/release.ex b/lib/meta/release.ex similarity index 88% rename from lib/recycledcloud/release.ex rename to lib/meta/release.ex index 3faeb57..37af326 100644 --- a/lib/recycledcloud/release.ex +++ b/lib/meta/release.ex @@ -1,5 +1,5 @@ -defmodule RecycledCloud.Release do - @app :recycledcloud +defmodule Meta.Release do + @app :meta def migrate do load_app() diff --git a/lib/meta/repo.ex b/lib/meta/repo.ex new file mode 100644 index 0000000..5742f2e --- /dev/null +++ b/lib/meta/repo.ex @@ -0,0 +1,5 @@ +defmodule Meta.Repo do + use Ecto.Repo, + otp_app: :meta, + adapter: Ecto.Adapters.Postgres +end diff --git a/lib/recycledcloud/support_request.ex b/lib/meta/support_request.ex similarity index 78% rename from lib/recycledcloud/support_request.ex rename to lib/meta/support_request.ex index 2d13700..276fe91 100644 --- a/lib/recycledcloud/support_request.ex +++ b/lib/meta/support_request.ex @@ -1,11 +1,11 @@ -defmodule RecycledCloud.SupportRequest do +defmodule Meta.SupportRequest do use Ecto.Schema import Ecto.Changeset import Bamboo.Email - alias RecycledCloud.SupportRequest - alias RecycledCloud.Mailer - alias RecycledCloud.Captcha + alias Meta.SupportRequest + alias Meta.Mailer + alias Meta.Captcha embedded_schema do field :name, :string @@ -26,8 +26,8 @@ defmodule RecycledCloud.SupportRequest do end def send(%SupportRequest{} = request) do - admin_email = Application.get_env(:recycledcloud, :admin_email) - host = Application.get_env(:recycledcloud, RecycledCloudWeb.Endpoint) + admin_email = Application.get_env(:meta, :admin_email) + host = Application.get_env(:meta, MetaWeb.Endpoint) |> Keyword.get(:url, []) |> Keyword.get(:host, "localhost") diff --git a/lib/recycledcloud_web.ex b/lib/meta_web.ex similarity index 73% rename from lib/recycledcloud_web.ex rename to lib/meta_web.ex index 7919182..0bb7582 100644 --- a/lib/recycledcloud_web.ex +++ b/lib/meta_web.ex @@ -1,12 +1,12 @@ -defmodule RecycledCloudWeb do +defmodule MetaWeb do @moduledoc """ The entrypoint for defining your web interface, such as controllers, views, channels and so on. This can be used in your application as: - use RecycledCloudWeb, :controller - use RecycledCloudWeb, :view + use MetaWeb, :controller + use MetaWeb, :view The definitions below will be executed for every view, controller, etc, so keep them short and clean, focused @@ -19,19 +19,19 @@ defmodule RecycledCloudWeb do def controller do quote do - use Phoenix.Controller, namespace: RecycledCloudWeb + use Phoenix.Controller, namespace: MetaWeb import Plug.Conn - import RecycledCloudWeb.Gettext - alias RecycledCloudWeb.Router.Helpers, as: Routes + import MetaWeb.Gettext + alias MetaWeb.Router.Helpers, as: Routes end end def view do quote do use Phoenix.View, - root: "lib/recycledcloud_web/templates", - namespace: RecycledCloudWeb + root: "lib/meta_web/templates", + namespace: MetaWeb # Import convenience functions from controllers import Phoenix.Controller, @@ -54,7 +54,7 @@ defmodule RecycledCloudWeb do def channel do quote do use Phoenix.Channel - import RecycledCloudWeb.Gettext + import MetaWeb.Gettext end end @@ -66,9 +66,9 @@ defmodule RecycledCloudWeb do # Import basic rendering functionality (render, render_layout, etc) import Phoenix.View - import RecycledCloudWeb.ErrorHelpers - import RecycledCloudWeb.Gettext - alias RecycledCloudWeb.Router.Helpers, as: Routes + import MetaWeb.ErrorHelpers + import MetaWeb.Gettext + alias MetaWeb.Router.Helpers, as: Routes end end diff --git a/lib/recycledcloud_web/channels/user_socket.ex b/lib/meta_web/channels/user_socket.ex similarity index 83% rename from lib/recycledcloud_web/channels/user_socket.ex rename to lib/meta_web/channels/user_socket.ex index 264ef65..d020607 100644 --- a/lib/recycledcloud_web/channels/user_socket.ex +++ b/lib/meta_web/channels/user_socket.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloudWeb.UserSocket do +defmodule MetaWeb.UserSocket do use Phoenix.Socket ## Channels - # channel "room:*", RecycledCloudWeb.RoomChannel + # channel "room:*", MetaWeb.RoomChannel # Socket params are passed from the client and can # be used to verify and authenticate a user. After @@ -27,7 +27,7 @@ defmodule RecycledCloudWeb.UserSocket do # Would allow you to broadcast a "disconnect" event and terminate # all active sockets and channels for a given user: # - # RecycledCloudWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{}) + # MetaWeb.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{}) # # Returning `nil` makes this socket anonymous. @impl true diff --git a/lib/recycledcloud_web/controllers/billing_controller.ex b/lib/meta_web/controllers/billing_controller.ex similarity index 86% rename from lib/recycledcloud_web/controllers/billing_controller.ex rename to lib/meta_web/controllers/billing_controller.ex index 4cfe757..328fc77 100644 --- a/lib/recycledcloud_web/controllers/billing_controller.ex +++ b/lib/meta_web/controllers/billing_controller.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloudWeb.BillingController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.BillingController do + use MetaWeb, :controller - alias RecycledCloud.Billing.{Partner, Invoice} - alias RecycledCloud.Repo + alias Meta.Billing.{Partner, Invoice} + alias Meta.Repo def current_partner(conn) do user = conn.assigns.current_user diff --git a/lib/meta_web/controllers/page_controller.ex b/lib/meta_web/controllers/page_controller.ex new file mode 100644 index 0000000..87bda33 --- /dev/null +++ b/lib/meta_web/controllers/page_controller.ex @@ -0,0 +1,7 @@ +defmodule MetaWeb.PageController do + use MetaWeb, :controller + + def index(conn, _params) do + render(conn, "index.html") + end +end diff --git a/lib/recycledcloud_web/controllers/support_controller.ex b/lib/meta_web/controllers/support_controller.ex similarity index 87% rename from lib/recycledcloud_web/controllers/support_controller.ex rename to lib/meta_web/controllers/support_controller.ex index de95cf3..f6d0345 100644 --- a/lib/recycledcloud_web/controllers/support_controller.ex +++ b/lib/meta_web/controllers/support_controller.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloudWeb.SupportController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.SupportController do + use MetaWeb, :controller - alias RecycledCloud.SupportRequest - alias RecycledCloud.Captcha + alias Meta.SupportRequest + alias Meta.Captcha def new(conn, _params) do {captcha_text, captcha_result} = Captcha.generate() diff --git a/lib/recycledcloud_web/controllers/user_auth.ex b/lib/meta_web/controllers/user_auth.ex similarity index 95% rename from lib/recycledcloud_web/controllers/user_auth.ex rename to lib/meta_web/controllers/user_auth.ex index ad081bd..aa3eacb 100644 --- a/lib/recycledcloud_web/controllers/user_auth.ex +++ b/lib/meta_web/controllers/user_auth.ex @@ -1,9 +1,9 @@ -defmodule RecycledCloudWeb.UserAuth do +defmodule MetaWeb.UserAuth do import Plug.Conn import Phoenix.Controller - alias RecycledCloud.Accounts - alias RecycledCloudWeb.Router.Helpers, as: Routes + alias Meta.Accounts + alias MetaWeb.Router.Helpers, as: Routes # Make the remember me cookie valid for 60 days. # If you want bump or reduce this value, also change @@ -75,7 +75,7 @@ defmodule RecycledCloudWeb.UserAuth do user_token && Accounts.delete_session_token(user_token) if live_socket_id = get_session(conn, :live_socket_id) do - RecycledCloudWeb.Endpoint.broadcast(live_socket_id, "disconnect", %{}) + MetaWeb.Endpoint.broadcast(live_socket_id, "disconnect", %{}) end conn diff --git a/lib/recycledcloud_web/controllers/user_confirmation_controller.ex b/lib/meta_web/controllers/user_confirmation_controller.ex similarity index 92% rename from lib/recycledcloud_web/controllers/user_confirmation_controller.ex rename to lib/meta_web/controllers/user_confirmation_controller.ex index 66b6021..d5dbf34 100644 --- a/lib/recycledcloud_web/controllers/user_confirmation_controller.ex +++ b/lib/meta_web/controllers/user_confirmation_controller.ex @@ -1,7 +1,7 @@ -defmodule RecycledCloudWeb.UserConfirmationController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.UserConfirmationController do + use MetaWeb, :controller - alias RecycledCloud.Accounts + alias Meta.Accounts def new(conn, _params) do render(conn, "new.html") diff --git a/lib/recycledcloud_web/controllers/user_keys_controller.ex b/lib/meta_web/controllers/user_keys_controller.ex similarity index 91% rename from lib/recycledcloud_web/controllers/user_keys_controller.ex rename to lib/meta_web/controllers/user_keys_controller.ex index ee4742a..8217fca 100644 --- a/lib/recycledcloud_web/controllers/user_keys_controller.ex +++ b/lib/meta_web/controllers/user_keys_controller.ex @@ -1,7 +1,7 @@ -defmodule RecycledCloudWeb.UserKeysController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.UserKeysController do + use MetaWeb, :controller - alias RecycledCloud.Accounts + alias Meta.Accounts def index(conn, %{"username" => username}) do case Accounts.get_user_by_username(username) do diff --git a/lib/recycledcloud_web/controllers/user_registration_controller.ex b/lib/meta_web/controllers/user_registration_controller.ex similarity index 83% rename from lib/recycledcloud_web/controllers/user_registration_controller.ex rename to lib/meta_web/controllers/user_registration_controller.ex index 3b6f271..5eddbb7 100644 --- a/lib/recycledcloud_web/controllers/user_registration_controller.ex +++ b/lib/meta_web/controllers/user_registration_controller.ex @@ -1,13 +1,13 @@ -defmodule RecycledCloudWeb.UserRegistrationController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.UserRegistrationController do + use MetaWeb, :controller - alias RecycledCloud.Captcha - alias RecycledCloud.Accounts - alias RecycledCloud.Accounts.User - alias RecycledCloudWeb.UserAuth + alias Meta.Captcha + alias Meta.Accounts + alias Meta.Accounts.User + alias MetaWeb.UserAuth defp is_registration_enabled?() do - Application.get_env(:recycledcloud, :enable_registration) + Application.get_env(:meta, :enable_registration) end def new(conn, _params) do diff --git a/lib/recycledcloud_web/controllers/user_reset_password_controller.ex b/lib/meta_web/controllers/user_reset_password_controller.ex similarity index 93% rename from lib/recycledcloud_web/controllers/user_reset_password_controller.ex rename to lib/meta_web/controllers/user_reset_password_controller.ex index 76df16f..6a85d37 100644 --- a/lib/recycledcloud_web/controllers/user_reset_password_controller.ex +++ b/lib/meta_web/controllers/user_reset_password_controller.ex @@ -1,7 +1,7 @@ -defmodule RecycledCloudWeb.UserResetPasswordController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.UserResetPasswordController do + use MetaWeb, :controller - alias RecycledCloud.Accounts + alias Meta.Accounts plug :get_user_by_reset_password_token when action in [:edit, :update] diff --git a/lib/recycledcloud_web/controllers/user_session_controller.ex b/lib/meta_web/controllers/user_session_controller.ex similarity index 78% rename from lib/recycledcloud_web/controllers/user_session_controller.ex rename to lib/meta_web/controllers/user_session_controller.ex index d91fd24..edcd1db 100644 --- a/lib/recycledcloud_web/controllers/user_session_controller.ex +++ b/lib/meta_web/controllers/user_session_controller.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloudWeb.UserSessionController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.UserSessionController do + use MetaWeb, :controller - alias RecycledCloud.Accounts - alias RecycledCloudWeb.UserAuth + alias Meta.Accounts + alias MetaWeb.UserAuth def new(conn, _params) do render(conn, "new.html", error_message: nil) diff --git a/lib/recycledcloud_web/controllers/user_settings_controller.ex b/lib/meta_web/controllers/user_settings_controller.ex similarity index 93% rename from lib/recycledcloud_web/controllers/user_settings_controller.ex rename to lib/meta_web/controllers/user_settings_controller.ex index e4711ba..ec73f1e 100644 --- a/lib/recycledcloud_web/controllers/user_settings_controller.ex +++ b/lib/meta_web/controllers/user_settings_controller.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloudWeb.UserSettingsController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.UserSettingsController do + use MetaWeb, :controller - alias RecycledCloud.Accounts - alias RecycledCloudWeb.UserAuth + alias Meta.Accounts + alias MetaWeb.UserAuth plug :assign_email_and_password_changesets diff --git a/lib/recycledcloud_web/controllers/virtual_machine_hosting_controller.ex b/lib/meta_web/controllers/virtual_machine_hosting_controller.ex similarity index 92% rename from lib/recycledcloud_web/controllers/virtual_machine_hosting_controller.ex rename to lib/meta_web/controllers/virtual_machine_hosting_controller.ex index b38775d..8560bc5 100644 --- a/lib/recycledcloud_web/controllers/virtual_machine_hosting_controller.ex +++ b/lib/meta_web/controllers/virtual_machine_hosting_controller.ex @@ -1,7 +1,7 @@ -defmodule RecycledCloudWeb.VirtualMachineHostingController do - use RecycledCloudWeb, :controller +defmodule MetaWeb.VirtualMachineHostingController do + use MetaWeb, :controller - alias RecycledCloud.OpenNebula, as: ONE + alias Meta.OpenNebula, as: ONE def index(conn, _params) do username = conn.assigns.current_user.username diff --git a/lib/recycledcloud_web/endpoint.ex b/lib/meta_web/endpoint.ex similarity index 80% rename from lib/recycledcloud_web/endpoint.ex rename to lib/meta_web/endpoint.ex index 4233dae..0169019 100644 --- a/lib/recycledcloud_web/endpoint.ex +++ b/lib/meta_web/endpoint.ex @@ -1,16 +1,16 @@ -defmodule RecycledCloudWeb.Endpoint do - use Phoenix.Endpoint, otp_app: :recycledcloud +defmodule MetaWeb.Endpoint do + use Phoenix.Endpoint, otp_app: :meta # The session will be stored in the cookie and signed, # this means its contents can be read but not tampered with. # Set :encryption_salt if you would also like to encrypt it. @session_options [ store: :cookie, - key: "_recycledcloud_key", + key: "_meta_key", signing_salt: "6k95bz+m" ] - socket "/socket", RecycledCloudWeb.UserSocket, + socket "/socket", MetaWeb.UserSocket, websocket: true, longpoll: false @@ -20,7 +20,7 @@ defmodule RecycledCloudWeb.Endpoint do # when deploying your static files in production. plug Plug.Static, at: "/", - from: :recycledcloud, + from: :meta, gzip: false, only: ~w(css fonts images js favicon.ico robots.txt) @@ -30,7 +30,7 @@ defmodule RecycledCloudWeb.Endpoint do socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket plug Phoenix.LiveReloader plug Phoenix.CodeReloader - plug Phoenix.Ecto.CheckRepoStatus, otp_app: :recycledcloud + plug Phoenix.Ecto.CheckRepoStatus, otp_app: :meta end plug Plug.RequestId @@ -44,5 +44,5 @@ defmodule RecycledCloudWeb.Endpoint do plug Plug.MethodOverride plug Plug.Head plug Plug.Session, @session_options - plug RecycledCloudWeb.Router + plug MetaWeb.Router end diff --git a/lib/recycledcloud_web/gettext.ex b/lib/meta_web/gettext.ex similarity index 84% rename from lib/recycledcloud_web/gettext.ex rename to lib/meta_web/gettext.ex index b36790b..0a9a7f6 100644 --- a/lib/recycledcloud_web/gettext.ex +++ b/lib/meta_web/gettext.ex @@ -1,11 +1,11 @@ -defmodule RecycledCloudWeb.Gettext do +defmodule MetaWeb.Gettext do @moduledoc """ A module providing Internationalization with a gettext-based API. By using [Gettext](https://hexdocs.pm/gettext), your module gains a set of macros for translations, for example: - import RecycledCloudWeb.Gettext + import MetaWeb.Gettext # Simple translation gettext("Here is the string to translate") @@ -20,5 +20,5 @@ defmodule RecycledCloudWeb.Gettext do See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. """ - use Gettext, otp_app: :recycledcloud + use Gettext, otp_app: :meta end diff --git a/lib/recycledcloud_web/router.ex b/lib/meta_web/router.ex similarity index 89% rename from lib/recycledcloud_web/router.ex rename to lib/meta_web/router.ex index 0f05658..4a48249 100644 --- a/lib/recycledcloud_web/router.ex +++ b/lib/meta_web/router.ex @@ -1,7 +1,7 @@ -defmodule RecycledCloudWeb.Router do - use RecycledCloudWeb, :router +defmodule MetaWeb.Router do + use MetaWeb, :router - import RecycledCloudWeb.UserAuth + import MetaWeb.UserAuth pipeline :browser do plug :accepts, ["html"] @@ -28,14 +28,14 @@ defmodule RecycledCloudWeb.Router do plug :accepts, ["text"] end - scope "/", RecycledCloudWeb do + scope "/", MetaWeb do pipe_through :browser get "/", PageController, :index get "/support/new", SupportController, :new end - scope "/", RecycledCloudWeb do + scope "/", MetaWeb do pipe_through :browser_with_forgery # The static recycled.cloud website POST this endpoint, which basically is @@ -43,7 +43,7 @@ defmodule RecycledCloudWeb.Router do post "/support/new", SupportController, :create end - scope "/", RecycledCloudWeb do + scope "/", MetaWeb do pipe_through :plain get "/keys/:username", UserKeysController, :index @@ -51,7 +51,7 @@ defmodule RecycledCloudWeb.Router do ## Authentication routes - scope "/", RecycledCloudWeb do + scope "/", MetaWeb do pipe_through [:browser, :redirect_if_user_is_authenticated] get "/users/register", UserRegistrationController, :new @@ -64,7 +64,7 @@ defmodule RecycledCloudWeb.Router do put "/users/reset_password/:token", UserResetPasswordController, :update end - scope "/", RecycledCloudWeb do + scope "/", MetaWeb do pipe_through [:browser, :require_authenticated_user] get "/users/settings", UserSettingsController, :edit @@ -79,7 +79,7 @@ defmodule RecycledCloudWeb.Router do get "/hosting/vm/:location/:id", VirtualMachineHostingController, :show end - scope "/", RecycledCloudWeb do + scope "/", MetaWeb do pipe_through [:browser] get "/users/log_out", UserSessionController, :delete @@ -91,7 +91,7 @@ defmodule RecycledCloudWeb.Router do # In-memory mailer for development purposes only. # See https://hexdocs.pm/bamboo/Bamboo.SentEmailViewerPlug.html for details. - if RecycledCloud.env() == :dev do + if Meta.env() == :dev do forward "/outbox", Bamboo.SentEmailViewerPlug end end diff --git a/lib/recycledcloud_web/telemetry.ex b/lib/meta_web/telemetry.ex similarity index 72% rename from lib/recycledcloud_web/telemetry.ex rename to lib/meta_web/telemetry.ex index 39c34ec..8b302ca 100644 --- a/lib/recycledcloud_web/telemetry.ex +++ b/lib/meta_web/telemetry.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloudWeb.Telemetry do +defmodule MetaWeb.Telemetry do use Supervisor import Telemetry.Metrics @@ -31,11 +31,11 @@ defmodule RecycledCloudWeb.Telemetry do ), # Database Metrics - summary("recycledcloud.repo.query.total_time", unit: {:native, :millisecond}), - summary("recycledcloud.repo.query.decode_time", unit: {:native, :millisecond}), - summary("recycledcloud.repo.query.query_time", unit: {:native, :millisecond}), - summary("recycledcloud.repo.query.queue_time", unit: {:native, :millisecond}), - summary("recycledcloud.repo.query.idle_time", unit: {:native, :millisecond}), + summary("meta.repo.query.total_time", unit: {:native, :millisecond}), + summary("meta.repo.query.decode_time", unit: {:native, :millisecond}), + summary("meta.repo.query.query_time", unit: {:native, :millisecond}), + summary("meta.repo.query.queue_time", unit: {:native, :millisecond}), + summary("meta.repo.query.idle_time", unit: {:native, :millisecond}), # VM Metrics summary("vm.memory.total", unit: {:byte, :kilobyte}), @@ -49,7 +49,7 @@ defmodule RecycledCloudWeb.Telemetry do [ # A module, function and arguments to be invoked periodically. # This function must call :telemetry.execute/3 and a metric must be added above. - # {RecycledCloudWeb, :count_users, []} + # {MetaWeb, :count_users, []} ] end end diff --git a/lib/recycledcloud_web/templates/billing/index.html.eex b/lib/meta_web/templates/billing/index.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/billing/index.html.eex rename to lib/meta_web/templates/billing/index.html.eex diff --git a/lib/recycledcloud_web/templates/layout/_sidebar_nav.html.eex b/lib/meta_web/templates/layout/_sidebar_nav.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/layout/_sidebar_nav.html.eex rename to lib/meta_web/templates/layout/_sidebar_nav.html.eex diff --git a/lib/recycledcloud_web/templates/layout/app.html.eex b/lib/meta_web/templates/layout/app.html.eex similarity index 85% rename from lib/recycledcloud_web/templates/layout/app.html.eex rename to lib/meta_web/templates/layout/app.html.eex index 780756e..83a2b72 100644 --- a/lib/recycledcloud_web/templates/layout/app.html.eex +++ b/lib/meta_web/templates/layout/app.html.eex @@ -4,7 +4,7 @@ - RecycledCloud · Management + Meta · Management "/> @@ -15,7 +15,7 @@ "> diff --git a/lib/recycledcloud_web/templates/page/index.html.eex b/lib/meta_web/templates/page/index.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/page/index.html.eex rename to lib/meta_web/templates/page/index.html.eex diff --git a/lib/recycledcloud_web/templates/support/new.html.eex b/lib/meta_web/templates/support/new.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/support/new.html.eex rename to lib/meta_web/templates/support/new.html.eex diff --git a/lib/recycledcloud_web/templates/user_confirmation/new.html.eex b/lib/meta_web/templates/user_confirmation/new.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/user_confirmation/new.html.eex rename to lib/meta_web/templates/user_confirmation/new.html.eex diff --git a/lib/recycledcloud_web/templates/user_registration/new.html.eex b/lib/meta_web/templates/user_registration/new.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/user_registration/new.html.eex rename to lib/meta_web/templates/user_registration/new.html.eex diff --git a/lib/recycledcloud_web/templates/user_reset_password/edit.html.eex b/lib/meta_web/templates/user_reset_password/edit.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/user_reset_password/edit.html.eex rename to lib/meta_web/templates/user_reset_password/edit.html.eex diff --git a/lib/recycledcloud_web/templates/user_reset_password/new.html.eex b/lib/meta_web/templates/user_reset_password/new.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/user_reset_password/new.html.eex rename to lib/meta_web/templates/user_reset_password/new.html.eex diff --git a/lib/recycledcloud_web/templates/user_session/new.html.eex b/lib/meta_web/templates/user_session/new.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/user_session/new.html.eex rename to lib/meta_web/templates/user_session/new.html.eex diff --git a/lib/recycledcloud_web/templates/user_settings/edit.html.eex b/lib/meta_web/templates/user_settings/edit.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/user_settings/edit.html.eex rename to lib/meta_web/templates/user_settings/edit.html.eex diff --git a/lib/recycledcloud_web/templates/virtual_machine_hosting/index.html.eex b/lib/meta_web/templates/virtual_machine_hosting/index.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/virtual_machine_hosting/index.html.eex rename to lib/meta_web/templates/virtual_machine_hosting/index.html.eex diff --git a/lib/recycledcloud_web/templates/virtual_machine_hosting/show.html.eex b/lib/meta_web/templates/virtual_machine_hosting/show.html.eex similarity index 100% rename from lib/recycledcloud_web/templates/virtual_machine_hosting/show.html.eex rename to lib/meta_web/templates/virtual_machine_hosting/show.html.eex diff --git a/lib/meta_web/views/billing_view.ex b/lib/meta_web/views/billing_view.ex new file mode 100644 index 0000000..3fe9985 --- /dev/null +++ b/lib/meta_web/views/billing_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.BillingView do + use MetaWeb, :view +end diff --git a/lib/recycledcloud_web/views/error_helpers.ex b/lib/meta_web/views/error_helpers.ex similarity index 87% rename from lib/recycledcloud_web/views/error_helpers.ex rename to lib/meta_web/views/error_helpers.ex index 471beeb..30b9de8 100644 --- a/lib/recycledcloud_web/views/error_helpers.ex +++ b/lib/meta_web/views/error_helpers.ex @@ -1,4 +1,4 @@ -defmodule RecycledCloudWeb.ErrorHelpers do +defmodule MetaWeb.ErrorHelpers do @moduledoc """ Conveniences for translating and building error messages. """ @@ -39,9 +39,9 @@ defmodule RecycledCloudWeb.ErrorHelpers do # should be written to the errors.po file. The :count option is # set by Ecto and indicates we should also apply plural rules. if count = opts[:count] do - Gettext.dngettext(RecycledCloudWeb.Gettext, "errors", msg, msg, count, opts) + Gettext.dngettext(MetaWeb.Gettext, "errors", msg, msg, count, opts) else - Gettext.dgettext(RecycledCloudWeb.Gettext, "errors", msg, opts) + Gettext.dgettext(MetaWeb.Gettext, "errors", msg, opts) end end end diff --git a/lib/recycledcloud_web/views/error_view.ex b/lib/meta_web/views/error_view.ex similarity index 86% rename from lib/recycledcloud_web/views/error_view.ex rename to lib/meta_web/views/error_view.ex index 01b757b..67ab7e6 100644 --- a/lib/recycledcloud_web/views/error_view.ex +++ b/lib/meta_web/views/error_view.ex @@ -1,5 +1,5 @@ -defmodule RecycledCloudWeb.ErrorView do - use RecycledCloudWeb, :view +defmodule MetaWeb.ErrorView do + use MetaWeb, :view # If you want to customize a particular status code # for a certain format, you may uncomment below. diff --git a/lib/meta_web/views/layout_view.ex b/lib/meta_web/views/layout_view.ex new file mode 100644 index 0000000..4674341 --- /dev/null +++ b/lib/meta_web/views/layout_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.LayoutView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/page_view.ex b/lib/meta_web/views/page_view.ex new file mode 100644 index 0000000..ba38ed0 --- /dev/null +++ b/lib/meta_web/views/page_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.PageView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/support_view.ex b/lib/meta_web/views/support_view.ex new file mode 100644 index 0000000..9e7bcad --- /dev/null +++ b/lib/meta_web/views/support_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.SupportView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/user_confirmation_view.ex b/lib/meta_web/views/user_confirmation_view.ex new file mode 100644 index 0000000..c6ff670 --- /dev/null +++ b/lib/meta_web/views/user_confirmation_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.UserConfirmationView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/user_registration_view.ex b/lib/meta_web/views/user_registration_view.ex new file mode 100644 index 0000000..25ad29d --- /dev/null +++ b/lib/meta_web/views/user_registration_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.UserRegistrationView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/user_reset_password_view.ex b/lib/meta_web/views/user_reset_password_view.ex new file mode 100644 index 0000000..033f99f --- /dev/null +++ b/lib/meta_web/views/user_reset_password_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.UserResetPasswordView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/user_session_view.ex b/lib/meta_web/views/user_session_view.ex new file mode 100644 index 0000000..308ad6e --- /dev/null +++ b/lib/meta_web/views/user_session_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.UserSessionView do + use MetaWeb, :view +end diff --git a/lib/meta_web/views/user_settings_view.ex b/lib/meta_web/views/user_settings_view.ex new file mode 100644 index 0000000..b8e2f77 --- /dev/null +++ b/lib/meta_web/views/user_settings_view.ex @@ -0,0 +1,3 @@ +defmodule MetaWeb.UserSettingsView do + use MetaWeb, :view +end diff --git a/lib/recycledcloud_web/views/virtual_machine_hosting_view.ex b/lib/meta_web/views/virtual_machine_hosting_view.ex similarity index 61% rename from lib/recycledcloud_web/views/virtual_machine_hosting_view.ex rename to lib/meta_web/views/virtual_machine_hosting_view.ex index acb06f7..ce27262 100644 --- a/lib/recycledcloud_web/views/virtual_machine_hosting_view.ex +++ b/lib/meta_web/views/virtual_machine_hosting_view.ex @@ -1,8 +1,8 @@ -defmodule RecycledCloudWeb.VirtualMachineHostingView do - use RecycledCloudWeb, :view +defmodule MetaWeb.VirtualMachineHostingView do + use MetaWeb, :view - alias RecycledCloud.OpenNebula, as: ONE - alias RecycledCloud.OpenNebula.VM + alias Meta.OpenNebula, as: ONE + alias Meta.OpenNebula.VM def render_state(vm) do state = Map.get(vm, :STATE) |> VM.state_for diff --git a/lib/mix/tasks/generate_opennebula_records.ex b/lib/mix/tasks/generate_opennebula_records.ex index 68e2d50..246bb3e 100644 --- a/lib/mix/tasks/generate_opennebula_records.ex +++ b/lib/mix/tasks/generate_opennebula_records.ex @@ -10,7 +10,7 @@ defmodule Mix.Tasks.GenerateOpenNebulaRecords do @shortdoc "Generate erlang records from OpenNebula's XSD templates" def run(_) do - priv_dir = to_string(:code.priv_dir(:recycledcloud)) + priv_dir = to_string(:code.priv_dir(:meta)) xsd_dir = Path.join([priv_dir, "opennebula", @opennebula_release, "xsd-src"]) hrl_dir = Path.join([priv_dir, "opennebula", @opennebula_release, "xsd-records"]) diff --git a/lib/recycledcloud/repo.ex b/lib/recycledcloud/repo.ex deleted file mode 100644 index 1a98a76..0000000 --- a/lib/recycledcloud/repo.ex +++ /dev/null @@ -1,5 +0,0 @@ -defmodule RecycledCloud.Repo do - use Ecto.Repo, - otp_app: :recycledcloud, - adapter: Ecto.Adapters.Postgres -end diff --git a/lib/recycledcloud_web/controllers/page_controller.ex b/lib/recycledcloud_web/controllers/page_controller.ex deleted file mode 100644 index dd3cf5e..0000000 --- a/lib/recycledcloud_web/controllers/page_controller.ex +++ /dev/null @@ -1,7 +0,0 @@ -defmodule RecycledCloudWeb.PageController do - use RecycledCloudWeb, :controller - - def index(conn, _params) do - render(conn, "index.html") - end -end diff --git a/lib/recycledcloud_web/views/billing_view.ex b/lib/recycledcloud_web/views/billing_view.ex deleted file mode 100644 index 1cc24a8..0000000 --- a/lib/recycledcloud_web/views/billing_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.BillingView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/layout_view.ex b/lib/recycledcloud_web/views/layout_view.ex deleted file mode 100644 index dafcec1..0000000 --- a/lib/recycledcloud_web/views/layout_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.LayoutView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/page_view.ex b/lib/recycledcloud_web/views/page_view.ex deleted file mode 100644 index ecb2c08..0000000 --- a/lib/recycledcloud_web/views/page_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.PageView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/support_view.ex b/lib/recycledcloud_web/views/support_view.ex deleted file mode 100644 index 8dd26ac..0000000 --- a/lib/recycledcloud_web/views/support_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.SupportView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/user_confirmation_view.ex b/lib/recycledcloud_web/views/user_confirmation_view.ex deleted file mode 100644 index 19d09bd..0000000 --- a/lib/recycledcloud_web/views/user_confirmation_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.UserConfirmationView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/user_registration_view.ex b/lib/recycledcloud_web/views/user_registration_view.ex deleted file mode 100644 index 3f86737..0000000 --- a/lib/recycledcloud_web/views/user_registration_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.UserRegistrationView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/user_reset_password_view.ex b/lib/recycledcloud_web/views/user_reset_password_view.ex deleted file mode 100644 index c645b25..0000000 --- a/lib/recycledcloud_web/views/user_reset_password_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.UserResetPasswordView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/user_session_view.ex b/lib/recycledcloud_web/views/user_session_view.ex deleted file mode 100644 index 9598570..0000000 --- a/lib/recycledcloud_web/views/user_session_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.UserSessionView do - use RecycledCloudWeb, :view -end diff --git a/lib/recycledcloud_web/views/user_settings_view.ex b/lib/recycledcloud_web/views/user_settings_view.ex deleted file mode 100644 index c8e7c5a..0000000 --- a/lib/recycledcloud_web/views/user_settings_view.ex +++ /dev/null @@ -1,3 +0,0 @@ -defmodule RecycledCloudWeb.UserSettingsView do - use RecycledCloudWeb, :view -end diff --git a/mix.exs b/mix.exs index d8561a9..9f044b3 100644 --- a/mix.exs +++ b/mix.exs @@ -1,9 +1,9 @@ -defmodule RecycledCloud.MixProject do +defmodule Meta.MixProject do use Mix.Project def project do [ - app: :recycledcloud, + app: :meta, version: "0.4.0", elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env()), @@ -12,7 +12,7 @@ defmodule RecycledCloud.MixProject do aliases: aliases(), deps: deps(), releases: [ - recycledcloud: [ + meta: [ include_executables_for: [:unix], applications: [runtime_tools: :permanent], include_erts: true, @@ -27,7 +27,7 @@ defmodule RecycledCloud.MixProject do # Type `mix help compile.app` for more information. def application do [ - mod: {RecycledCloud.Application, []}, + mod: {Meta.Application, []}, extra_applications: [:logger, :runtime_tools, :eldap] ] end diff --git a/mix.lock b/mix.lock index fb22ed3..964222f 100644 --- a/mix.lock +++ b/mix.lock @@ -1,42 +1,42 @@ %{ - "bamboo": {:hex, :bamboo, "1.6.0", "adfb583bef028923aae6f22deaea6667290561da1246058556ecaeb0fec5a175", [:mix], [{:hackney, ">= 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "454e67feacbc9b6e00553ce1d2fba003c861e0035600d59b09d6159985b17f9b"}, + "bamboo": {:hex, :bamboo, "1.7.1", "7f0946e8c9081ce10d347cdba33c247c7c1c4f7dddc194ab0633603ef879bbdf", [:mix], [{:hackney, ">= 1.15.2", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.4", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.1", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "5fb34c3ab638fc409deec47c1e91f9d78ad95bf22ccb153588b434e1ff1aa730"}, "bamboo_smtp": {:git, "https://github.com/Fnux/bamboo_smtp.git", "bdc911bb82963e548f7189ad10670107b24bb28b", []}, "bcrypt_elixir": {:hex, :bcrypt_elixir, "2.3.0", "6cb662d5c1b0a8858801cf20997bd006e7016aa8c52959c9ef80e0f34fb60b7a", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "2c81d61d4f6ed0e5cf7bf27a9109b791ff216a1034b3d541327484f46dd43769"}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "certifi": {:hex, :certifi, "2.5.3", "70bdd7e7188c804f3a30ee0e7c99655bc35d8ac41c23e12325f36ab449b70651", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "ed516acb3929b101208a9d700062d520f3953da3b6b918d866106ffa980e1c10"}, + "certifi": {:hex, :certifi, "2.6.1", "dbab8e5e155a0763eea978c913ca280a6b544bfa115633fa20249c3d396d9493", [:rebar3], [], "hexpm", "524c97b4991b3849dd5c17a631223896272c6b0af446778ba4675a1dff53bb7e"}, "comeonin": {:hex, :comeonin, "5.3.2", "5c2f893d05c56ae3f5e24c1b983c2d5dfb88c6d979c9287a76a7feb1e1d8d646", [:mix], [], "hexpm", "d0993402844c49539aeadb3fe46a3c9bd190f1ecf86b6f9ebd71957534c95f04"}, "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, "cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"}, "credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"}, - "db_connection": {:hex, :db_connection, "2.3.1", "4c9f3ed1ef37471cbdd2762d6655be11e38193904d9c5c1c9389f1b891a3088e", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "abaab61780dde30301d840417890bd9f74131041afd02174cf4e10635b3a63f5"}, + "db_connection": {:hex, :db_connection, "2.4.0", "d04b1b73795dae60cead94189f1b8a51cc9e1f911c234cc23074017c43c031e5", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ad416c21ad9f61b3103d254a71b63696ecadb6a917b36f563921e0de00d7d7c8"}, "decimal": {:hex, :decimal, "1.9.0", "83e8daf59631d632b171faabafb4a9f4242c514b0a06ba3df493951c08f64d07", [:mix], [], "hexpm", "b1f2343568eed6928f3e751cf2dffde95bfaa19dd95d09e8a9ea92ccfd6f7d85"}, - "ecto": {:hex, :ecto, "3.5.5", "48219a991bb86daba6e38a1e64f8cea540cded58950ff38fbc8163e062281a07", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "98dd0e5e1de7f45beca6130d13116eae675db59adfa055fb79612406acf6f6f1"}, - "ecto_sql": {:hex, :ecto_sql, "3.5.3", "1964df0305538364b97cc4661a2bd2b6c89d803e66e5655e4e55ff1571943efd", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.5.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d2f53592432ce17d3978feb8f43e8dc0705e288b0890caf06d449785f018061c"}, + "ecto": {:hex, :ecto, "3.6.0", "df6b00f7278b458108044da4cff365dde31f6f2f621cf7dc0bf857b26be3bd20", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3035603f5b308ea7731b854493e5b5c1565e4d1e073186c3963b9689304f1d08"}, + "ecto_sql": {:hex, :ecto_sql, "3.6.1", "8774dc3fc0ff7b6be510858b99883640f990c0736b8ab54588f9a0c91807f909", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.6.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.4.0 or ~> 0.5.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "66f35c3f2d5978b6bffebd1e6351ab8c9d6b68650d62abd1ab8d149de40e0779"}, "elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"}, "erlsom": {:hex, :erlsom, "1.5.0", "c5a5cdd0ee0e8dca62bcc4b13ff08da24fdefc16ccd8b25282a2fda2ba1be24a", [:rebar3], [], "hexpm", "55a9dbf9cfa77fcfc108bd8e2c4f9f784dea228a8f4b06ea10b684944946955a"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "gen_smtp": {:hex, :gen_smtp, "1.0.1", "cc3de2898d9136ff02dc78fc8193d4fc997824fc793f5bbbada79ccde94581be", [:rebar3], [{:hut, "1.3.0", [hex: :hut, repo: "hexpm", optional: false]}, {:ranch, "1.6.2", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "341a98dc4dafad9cc1e4426e4988e45b31d3f235fa637408f7579a9b598c0ab6"}, "gettext": {:hex, :gettext, "0.18.2", "7df3ea191bb56c0309c00a783334b288d08a879f53a7014341284635850a6e55", [:mix], [], "hexpm", "f9f537b13d4fdd30f3039d33cb80144c3aa1f8d9698e47d7bcbcc8df93b1f5c5"}, - "hackney": {:hex, :hackney, "1.17.0", "717ea195fd2f898d9fe9f1ce0afcc2621a41ecfe137fae57e7fe6e9484b9aa99", [:rebar3], [{:certifi, "~>2.5", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "64c22225f1ea8855f584720c0e5b3cd14095703af1c9fbc845ba042811dc671c"}, + "hackney": {:hex, :hackney, "1.17.4", "99da4674592504d3fb0cfef0db84c3ba02b4508bae2dff8c0108baa0d6e0977c", [:rebar3], [{:certifi, "~>2.6.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "de16ff4996556c8548d512f4dbe22dd58a587bf3332e7fd362430a7ef3986b16"}, "httpoison": {:hex, :httpoison, "1.8.0", "6b85dea15820b7804ef607ff78406ab449dd78bed923a49c7160e1886e987a3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "28089eaa98cf90c66265b6b5ad87c59a3729bea2e74e9d08f9b51eb9729b3c3a"}, "hut": {:hex, :hut, "1.3.0", "71f2f054e657c03f959cf1acc43f436ea87580696528ca2a55c8afb1b06c85e7", [:"erlang.mk", :rebar, :rebar3], [], "hexpm", "7e15d28555d8a1f2b5a3a931ec120af0753e4853a4c66053db354f35bf9ab563"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, - "mime": {:hex, :mime, "1.5.0", "203ef35ef3389aae6d361918bf3f952fa17a09e8e43b5aa592b93eba05d0fb8d", [:mix], [], "hexpm", "55a94c0f552249fc1a3dd9cd2d3ab9de9d3c89b559c2bd01121f824834f24746"}, + "mime": {:hex, :mime, "1.6.0", "dabde576a497cef4bbdd60aceee8160e02a6c89250d6c0b29e56c0dfb00db3d2", [:mix], [], "hexpm", "31a1a8613f8321143dde1dafc36006a17d28d02bdfecb9e95a880fa7aabd19a7"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, - "phoenix": {:hex, :phoenix, "1.5.7", "2923bb3af924f184459fe4fa4b100bd25fa6468e69b2803dfae82698269aa5e0", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "774cd64417c5a3788414fdbb2be2eb9bcd0c048d9e6ad11a0c1fd67b7c0d0978"}, + "phoenix": {:hex, :phoenix, "1.5.8", "71cfa7a9bb9a37af4df98939790642f210e35f696b935ca6d9d9c55a884621a4", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "35ded0a32f4836168c7ab6c33b88822eccd201bcd9492125a9bea4c54332d955"}, "phoenix_ecto": {:hex, :phoenix_ecto, "4.2.1", "13f124cf0a3ce0f1948cf24654c7b9f2347169ff75c1123f44674afee6af3b03", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "478a1bae899cac0a6e02be1deec7e2944b7754c04e7d4107fc5a517f877743c0"}, "phoenix_html": {:hex, :phoenix_html, "2.14.3", "51f720d0d543e4e157ff06b65de38e13303d5778a7919bcc696599e5934271b8", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "efd697a7fff35a13eeeb6b43db884705cba353a1a41d127d118fda5f90c8e80f"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.3.0", "f35f61c3f959c9a01b36defaa1f0624edd55b87e236b606664a556d6f72fd2e7", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "02c1007ae393f2b76ec61c1a869b1e617179877984678babde131d716f95b582"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"}, - "phx_gen_auth": {:hex, :phx_gen_auth, "0.6.0", "4ffbfa5b34ad8178c3dfcb996fed776df425903595cbc8d56a9ae5bc53136810", [:mix], [{:phoenix, "~> 1.5.2", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "9a801c0f0bc251d8d91d62cecba0ebb6a90b8580fa8843029d931d15164e6ad9"}, - "plug": {:hex, :plug, "1.11.0", "f17217525597628298998bc3baed9f8ea1fa3f1160aa9871aee6df47a6e4d38e", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2d9c633f0499f9dc5c2fd069161af4e2e7756890b81adcbb2ceaa074e8308876"}, + "phx_gen_auth": {:hex, :phx_gen_auth, "0.7.0", "2e10e9527b6b71abbfbb4601c7dc4aa4fb9f2db6f9a6be457c468b7f2b0f6319", [:mix], [{:phoenix, "~> 1.5.2", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "b9dc3e3b866e67c5db8f00f4a2adb28fc8636e794f78600e35aba0e55bdac209"}, + "plug": {:hex, :plug, "1.11.1", "f2992bac66fdae679453c9e86134a4201f6f43a687d8ff1cd1b2862d53c80259", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "23524e4fefbb587c11f0833b3910bfb414bf2e2534d61928e920f54e3a1b881f"}, "plug_cowboy": {:hex, :plug_cowboy, "2.4.1", "779ba386c0915027f22e14a48919a9545714f849505fa15af2631a0d298abf0f", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d72113b6dff7b37a7d9b2a5b68892808e3a9a752f2bf7e503240945385b70507"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.0", "1cb20793aa63a6c619dd18bb33d7a3aa94818e5fd39ad357051a67f26dfa2df6", [:mix], [], "hexpm", "a48b538ae8bf381ffac344520755f3007cc10bd8e90b240af98ea29b69683fc2"}, + "plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"}, "postgrex": {:hex, :postgrex, "0.15.8", "f5e782bbe5e8fa178d5e3cd1999c857dc48eda95f0a4d7f7bd92a50e84a0d491", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "698fbfacea34c4cf22c8281abeb5cf68d99628d541874f085520ab3b53d356fe"}, "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, diff --git a/run-ci.sh b/run-ci.sh index aa6d0e2..4b34112 100755 --- a/run-ci.sh +++ b/run-ci.sh @@ -13,5 +13,5 @@ fi curl \ -H Authorization:"token $SRHT_ACCESS_TOKEN" \ --data "manifest=$(jq -R -r --slurp < $MANIFEST)" \ - --data "note=recycledcloud-management" \ + --data "note=recycledcloud-meta" \ -X POST $BUILDS_INSTANCE/api/jobs | jq