From 8fd7ff4a6585cac3923e43d45ebef0f393e2187d Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Sun, 22 Oct 2017 14:22:14 -0700 Subject: [PATCH] Update exdoc to add groups for modules and improve some docs --- .../github/sync/pull_request/pull_request.ex | 1 - lib/code_corps/github/sync/sync.ex | 13 +- .../stripe_platform_customer.ex | 6 +- .../ignored_event_handler.ex | 2 +- .../controllers/category_controller.ex | 1 + .../controllers/comment_controller.ex | 1 + .../controllers/donation_goal_controller.ex | 1 + .../controllers/fallback_controller.ex | 1 + .../github_app_installation_controller.ex | 1 + .../controllers/github_events_controller.ex | 1 + .../controllers/github_issue_controller.ex | 1 + .../github_pull_request_controller.ex | 1 + .../controllers/github_repo_controller.ex | 1 + .../controllers/organization_controller.ex | 1 + ...tion_github_app_installation_controller.ex | 1 + .../organization_invite_controller.ex | 1 + .../controllers/page_controller.ex | 1 + .../controllers/password_controller.ex | 1 + .../controllers/password_reset_controller.ex | 1 + .../controllers/preview_controller.ex | 1 + .../project_category_controller.ex | 1 + .../controllers/project_controller.ex | 1 + .../project_github_repo_controller.ex | 1 + .../controllers/project_skill_controller.ex | 1 + .../controllers/project_user_controller.ex | 1 + .../controllers/role_controller.ex | 1 + .../controllers/role_skill_controller.ex | 1 + .../controllers/skill_controller.ex | 1 + .../controllers/slugged_route_controller.ex | 1 + .../stripe_connect_account_controller.ex | 1 + .../stripe_connect_events_controller.ex | 1 + .../stripe_connect_plan_controller.ex | 1 + .../stripe_connect_subscription_controller.ex | 1 + .../stripe_platform_card_controller.ex | 1 + .../stripe_platform_customer_controller.ex | 1 + .../stripe_platform_events_controller.ex | 1 + .../controllers/task_controller.ex | 1 + .../controllers/task_list_controller.ex | 1 + .../controllers/task_skill_controller.ex | 1 + .../controllers/token_controller.ex | 1 + .../controllers/user_category_controller.ex | 1 + .../controllers/user_controller.ex | 72 ++++ .../controllers/user_role_controller.ex | 1 + .../controllers/user_skill_controller.ex | 1 + .../controllers/user_task_controller.ex | 1 + lib/code_corps_web/views/category_view.ex | 1 + lib/code_corps_web/views/changeset_view.ex | 1 + lib/code_corps_web/views/comment_view.ex | 1 + .../views/donation_goal_view.ex | 1 + lib/code_corps_web/views/error_view.ex | 1 + .../views/github_app_installation_view.ex | 1 + lib/code_corps_web/views/github_issue_view.ex | 1 + .../views/github_pull_request_view.ex | 1 + lib/code_corps_web/views/github_repo_view.ex | 1 + lib/code_corps_web/views/layout_view.ex | 1 + ...ganization_github_app_installation_view.ex | 1 + .../views/organization_invite_view.ex | 1 + lib/code_corps_web/views/organization_view.ex | 1 + lib/code_corps_web/views/page_view.ex | 1 + .../views/password_reset_view.ex | 1 + lib/code_corps_web/views/password_view.ex | 1 + lib/code_corps_web/views/preload_helpers.ex | 2 + lib/code_corps_web/views/preview_view.ex | 1 + .../views/project_category_view.ex | 1 + .../views/project_github_repo_view.ex | 1 + .../views/project_skill_view.ex | 1 + lib/code_corps_web/views/project_user_view.ex | 1 + lib/code_corps_web/views/project_view.ex | 1 + lib/code_corps_web/views/role_skill_view.ex | 1 + lib/code_corps_web/views/role_view.ex | 1 + lib/code_corps_web/views/skill_view.ex | 1 + .../views/slugged_route_view.ex | 1 + .../views/stripe_connect_account_view.ex | 1 + .../views/stripe_connect_plan_view.ex | 1 + .../views/stripe_connect_subscription_view.ex | 1 + .../views/stripe_platform_card_view.ex | 1 + .../views/stripe_platform_customer_view.ex | 1 + lib/code_corps_web/views/task_list_view.ex | 1 + lib/code_corps_web/views/task_skill_view.ex | 1 + lib/code_corps_web/views/task_view.ex | 1 + lib/code_corps_web/views/token_view.ex | 1 + .../views/user_category_view.ex | 1 + lib/code_corps_web/views/user_role_view.ex | 1 + lib/code_corps_web/views/user_skill_view.ex | 1 + lib/code_corps_web/views/user_task_view.ex | 1 + lib/code_corps_web/views/user_view.ex | 1 + mix.exs | 310 +++++++++++++++++- mix.lock | 2 +- 88 files changed, 469 insertions(+), 19 deletions(-) diff --git a/lib/code_corps/github/sync/pull_request/pull_request.ex b/lib/code_corps/github/sync/pull_request/pull_request.ex index a960ff5eb..e5212043b 100644 --- a/lib/code_corps/github/sync/pull_request/pull_request.ex +++ b/lib/code_corps/github/sync/pull_request/pull_request.ex @@ -1,6 +1,5 @@ defmodule CodeCorps.GitHub.Sync.PullRequest do alias CodeCorps.GitHub.Sync.PullRequest.GithubPullRequest, as: GithubPullRequestSyncer - alias CodeCorps.GitHub.Sync.User.RecordLinker, as: UserRecordLinker alias Ecto.Multi @doc ~S""" diff --git a/lib/code_corps/github/sync/sync.ex b/lib/code_corps/github/sync/sync.ex index 945336b20..b1c3fa6c6 100644 --- a/lib/code_corps/github/sync/sync.ex +++ b/lib/code_corps/github/sync/sync.ex @@ -100,26 +100,19 @@ defmodule CodeCorps.GitHub.Sync do |> transact() end - @doc ~S""" - Finds the `CodeCorps.GithubRepo` using `GitHub.Sync.Utils.RepoFinder`. - """ + @doc false def find_repo(_, payload) do Multi.new |> Multi.run(:repo, fn _ -> RepoFinder.find_repo(payload) end) end - @doc ~S""" - Fetches an issue from the GitHub API using `GitHub.API.Issue.from_url/2`. - """ + @doc false def fetch_issue(%{repo: %GithubRepo{} = github_repo}, url) do Multi.new |> Multi.run(:fetch_issue, fn _ -> GitHub.API.Issue.from_url(url, github_repo) end) end - @doc ~S""" - Fetches a pull request from the GitHub API using - `GitHub.API.PullRequest.from_url/2`. - """ + @doc false def fetch_pull_request(%{repo: %GithubRepo{} = github_repo}, url) do Multi.new |> Multi.run(:fetch_pull_request, fn _ -> GitHub.API.PullRequest.from_url(url, github_repo) end) diff --git a/lib/code_corps/stripe_service/stripe_platform_customer.ex b/lib/code_corps/stripe_service/stripe_platform_customer.ex index 8834ddfc7..c373c2b4b 100644 --- a/lib/code_corps/stripe_service/stripe_platform_customer.ex +++ b/lib/code_corps/stripe_service/stripe_platform_customer.ex @@ -33,7 +33,7 @@ defmodule CodeCorps.StripeService.StripePlatformCustomerService do end @doc """ - Updates a `CodeCorps.StripePlatformCustomer` local and associated `%Stripe.Customer{} API record + Updates a `CodeCorps.StripePlatformCustomer` local and associated `%Stripe.Customer{}` API record with provided attributes Returns @@ -55,7 +55,7 @@ defmodule CodeCorps.StripeService.StripePlatformCustomerService do end @doc """ - Updates a `CodeCorps.StripePlatformCustomer` local record using `%Stripe.Customer{} API record + Updates a `CodeCorps.StripePlatformCustomer` local record using `%Stripe.Customer{}` API record retrieved from API using the provided Stripe ID Returns @@ -63,7 +63,7 @@ defmodule CodeCorps.StripeService.StripePlatformCustomerService do - `{:ok, %CodeCorps.StripePlatformCustomer{}}` if the local record was updated - `{:error, :not_found}` - If there was no record witht he specified Stripe ID - `{:error, %Ecto.Changeset{}}` -if there was a validation issue while updating the local record - - `{:error, %Stripe.APIErrorResposne{}}` - if there was a problem with retrieving the API record + - `{:error, %Stripe.APIErrorResponse{}}` - if there was a problem with retrieving the API record - `{:error, :unhandled}` -if something unexpected went wrong """ def update_from_stripe(id_from_stripe) do diff --git a/lib/code_corps/stripe_service/webhook_processing/ignored_event_handler.ex b/lib/code_corps/stripe_service/webhook_processing/ignored_event_handler.ex index f120afb63..66a053193 100644 --- a/lib/code_corps/stripe_service/webhook_processing/ignored_event_handler.ex +++ b/lib/code_corps/stripe_service/webhook_processing/ignored_event_handler.ex @@ -45,7 +45,7 @@ defmodule CodeCorps.StripeService.WebhookProcessing.IgnoredEventHandler do Determines the reason for ignoring the event, then updates the record to `status: "ignored"` and `ignored_reason: inferred_message` - Returns `{:ok, %CodeCorps.StripeEvent{}} + Returns `{:ok, %CodeCorps.StripeEvent{}}` """ @spec handle(StripeEvent.t, module) :: {:ok, StripeEvent.t} def handle(%StripeEvent{type: type} = local_event, handler) do diff --git a/lib/code_corps_web/controllers/category_controller.ex b/lib/code_corps_web/controllers/category_controller.ex index e2e06da14..2b942196c 100644 --- a/lib/code_corps_web/controllers/category_controller.ex +++ b/lib/code_corps_web/controllers/category_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.CategoryController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Category, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/comment_controller.ex b/lib/code_corps_web/controllers/comment_controller.ex index 0c8525dec..ddca868d4 100644 --- a/lib/code_corps_web/controllers/comment_controller.ex +++ b/lib/code_corps_web/controllers/comment_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.CommentController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Comment, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/donation_goal_controller.ex b/lib/code_corps_web/controllers/donation_goal_controller.ex index 4d080f474..90a9cd6fa 100644 --- a/lib/code_corps_web/controllers/donation_goal_controller.ex +++ b/lib/code_corps_web/controllers/donation_goal_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.DonationGoalController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.Services.DonationGoalsService diff --git a/lib/code_corps_web/controllers/fallback_controller.ex b/lib/code_corps_web/controllers/fallback_controller.ex index 4ff9dff94..3d59257c3 100644 --- a/lib/code_corps_web/controllers/fallback_controller.ex +++ b/lib/code_corps_web/controllers/fallback_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.FallbackController do + @moduledoc false use CodeCorpsWeb, :controller alias Ecto.Changeset diff --git a/lib/code_corps_web/controllers/github_app_installation_controller.ex b/lib/code_corps_web/controllers/github_app_installation_controller.ex index 1694858e4..0b494bb1c 100644 --- a/lib/code_corps_web/controllers/github_app_installation_controller.ex +++ b/lib/code_corps_web/controllers/github_app_installation_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubAppInstallationController do + @moduledoc false use CodeCorpsWeb, :controller import CodeCorps.Helpers.Query, only: [id_filter: 2] diff --git a/lib/code_corps_web/controllers/github_events_controller.ex b/lib/code_corps_web/controllers/github_events_controller.ex index 1ea6cf9fd..893942f20 100644 --- a/lib/code_corps_web/controllers/github_events_controller.ex +++ b/lib/code_corps_web/controllers/github_events_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GitHubEventsController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.GitHub.Webhook.{ diff --git a/lib/code_corps_web/controllers/github_issue_controller.ex b/lib/code_corps_web/controllers/github_issue_controller.ex index cc41bb90b..1f0cab7dc 100644 --- a/lib/code_corps_web/controllers/github_issue_controller.ex +++ b/lib/code_corps_web/controllers/github_issue_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubIssueController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{GithubIssue, Helpers.Query} diff --git a/lib/code_corps_web/controllers/github_pull_request_controller.ex b/lib/code_corps_web/controllers/github_pull_request_controller.ex index fbe986109..c0c72aad5 100644 --- a/lib/code_corps_web/controllers/github_pull_request_controller.ex +++ b/lib/code_corps_web/controllers/github_pull_request_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubPullRequestController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{GithubPullRequest, Helpers.Query} diff --git a/lib/code_corps_web/controllers/github_repo_controller.ex b/lib/code_corps_web/controllers/github_repo_controller.ex index 211184b2e..be4658f00 100644 --- a/lib/code_corps_web/controllers/github_repo_controller.ex +++ b/lib/code_corps_web/controllers/github_repo_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubRepoController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{GithubRepo, Helpers.Query} diff --git a/lib/code_corps_web/controllers/organization_controller.ex b/lib/code_corps_web/controllers/organization_controller.ex index ebaf73bdd..fa735701b 100644 --- a/lib/code_corps_web/controllers/organization_controller.ex +++ b/lib/code_corps_web/controllers/organization_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.OrganizationController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Helpers.Query, Organization, User} diff --git a/lib/code_corps_web/controllers/organization_github_app_installation_controller.ex b/lib/code_corps_web/controllers/organization_github_app_installation_controller.ex index 6953e29cb..72b32f25c 100644 --- a/lib/code_corps_web/controllers/organization_github_app_installation_controller.ex +++ b/lib/code_corps_web/controllers/organization_github_app_installation_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.OrganizationGithubAppInstallationController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{OrganizationGithubAppInstallation, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/organization_invite_controller.ex b/lib/code_corps_web/controllers/organization_invite_controller.ex index ccfb33d36..12fd3f3f3 100644 --- a/lib/code_corps_web/controllers/organization_invite_controller.ex +++ b/lib/code_corps_web/controllers/organization_invite_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.OrganizationInviteController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Emails, Helpers.Query, Mailer, OrganizationInvite, User} diff --git a/lib/code_corps_web/controllers/page_controller.ex b/lib/code_corps_web/controllers/page_controller.ex index 0b8a14fc6..bda26f391 100644 --- a/lib/code_corps_web/controllers/page_controller.ex +++ b/lib/code_corps_web/controllers/page_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PageController do + @moduledoc false use CodeCorpsWeb, :controller def index(conn, _params) do diff --git a/lib/code_corps_web/controllers/password_controller.ex b/lib/code_corps_web/controllers/password_controller.ex index 211521000..b330ccb47 100644 --- a/lib/code_corps_web/controllers/password_controller.ex +++ b/lib/code_corps_web/controllers/password_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PasswordController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Services.ForgotPasswordService} diff --git a/lib/code_corps_web/controllers/password_reset_controller.ex b/lib/code_corps_web/controllers/password_reset_controller.ex index dcf57c3f9..50388c603 100644 --- a/lib/code_corps_web/controllers/password_reset_controller.ex +++ b/lib/code_corps_web/controllers/password_reset_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PasswordResetController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{User, AuthToken} diff --git a/lib/code_corps_web/controllers/preview_controller.ex b/lib/code_corps_web/controllers/preview_controller.ex index ca5539c15..712172aa1 100644 --- a/lib/code_corps_web/controllers/preview_controller.ex +++ b/lib/code_corps_web/controllers/preview_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PreviewController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Preview, User} diff --git a/lib/code_corps_web/controllers/project_category_controller.ex b/lib/code_corps_web/controllers/project_category_controller.ex index ec261fc09..936fa9589 100644 --- a/lib/code_corps_web/controllers/project_category_controller.ex +++ b/lib/code_corps_web/controllers/project_category_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectCategoryController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{ProjectCategory, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/project_controller.ex b/lib/code_corps_web/controllers/project_controller.ex index 3e0cff475..e52f2b8f8 100644 --- a/lib/code_corps_web/controllers/project_controller.ex +++ b/lib/code_corps_web/controllers/project_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Project, User} diff --git a/lib/code_corps_web/controllers/project_github_repo_controller.ex b/lib/code_corps_web/controllers/project_github_repo_controller.ex index 2ab14bfc0..7c61a2679 100644 --- a/lib/code_corps_web/controllers/project_github_repo_controller.ex +++ b/lib/code_corps_web/controllers/project_github_repo_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectGithubRepoController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{ProjectGithubRepo, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/project_skill_controller.ex b/lib/code_corps_web/controllers/project_skill_controller.ex index 7b493ccfd..ed56553a1 100644 --- a/lib/code_corps_web/controllers/project_skill_controller.ex +++ b/lib/code_corps_web/controllers/project_skill_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectSkillController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{ProjectSkill, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/project_user_controller.ex b/lib/code_corps_web/controllers/project_user_controller.ex index d2a612750..e6e43e455 100644 --- a/lib/code_corps_web/controllers/project_user_controller.ex +++ b/lib/code_corps_web/controllers/project_user_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectUserController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Emails, Helpers.Query, Mailer, ProjectUser, User} diff --git a/lib/code_corps_web/controllers/role_controller.ex b/lib/code_corps_web/controllers/role_controller.ex index 529dc705d..b6a5040cc 100644 --- a/lib/code_corps_web/controllers/role_controller.ex +++ b/lib/code_corps_web/controllers/role_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.RoleController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Role, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/role_skill_controller.ex b/lib/code_corps_web/controllers/role_skill_controller.ex index c4c9d4e4b..23d7aab6e 100644 --- a/lib/code_corps_web/controllers/role_skill_controller.ex +++ b/lib/code_corps_web/controllers/role_skill_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.RoleSkillController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{RoleSkill, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/skill_controller.ex b/lib/code_corps_web/controllers/skill_controller.ex index 013668e0c..a2279885f 100644 --- a/lib/code_corps_web/controllers/skill_controller.ex +++ b/lib/code_corps_web/controllers/skill_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.SkillController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Skill, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/slugged_route_controller.ex b/lib/code_corps_web/controllers/slugged_route_controller.ex index 5fb274a34..b04fc9c91 100644 --- a/lib/code_corps_web/controllers/slugged_route_controller.ex +++ b/lib/code_corps_web/controllers/slugged_route_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.SluggedRouteController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{SluggedRoute, Helpers.Query} diff --git a/lib/code_corps_web/controllers/stripe_connect_account_controller.ex b/lib/code_corps_web/controllers/stripe_connect_account_controller.ex index 9514577ed..5a3ca998e 100644 --- a/lib/code_corps_web/controllers/stripe_connect_account_controller.ex +++ b/lib/code_corps_web/controllers/stripe_connect_account_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectAccountController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.ConnUtils diff --git a/lib/code_corps_web/controllers/stripe_connect_events_controller.ex b/lib/code_corps_web/controllers/stripe_connect_events_controller.ex index 42e217c01..20532a362 100644 --- a/lib/code_corps_web/controllers/stripe_connect_events_controller.ex +++ b/lib/code_corps_web/controllers/stripe_connect_events_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectEventsController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.StripeService.WebhookProcessing.{ diff --git a/lib/code_corps_web/controllers/stripe_connect_plan_controller.ex b/lib/code_corps_web/controllers/stripe_connect_plan_controller.ex index 32fb77dab..89e67030f 100644 --- a/lib/code_corps_web/controllers/stripe_connect_plan_controller.ex +++ b/lib/code_corps_web/controllers/stripe_connect_plan_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectPlanController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{StripeConnectPlan, User} diff --git a/lib/code_corps_web/controllers/stripe_connect_subscription_controller.ex b/lib/code_corps_web/controllers/stripe_connect_subscription_controller.ex index 2da9f2fff..9048c3b98 100644 --- a/lib/code_corps_web/controllers/stripe_connect_subscription_controller.ex +++ b/lib/code_corps_web/controllers/stripe_connect_subscription_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectSubscriptionController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{StripeConnectSubscription, User} diff --git a/lib/code_corps_web/controllers/stripe_platform_card_controller.ex b/lib/code_corps_web/controllers/stripe_platform_card_controller.ex index 8973a960f..7c3655ad0 100644 --- a/lib/code_corps_web/controllers/stripe_platform_card_controller.ex +++ b/lib/code_corps_web/controllers/stripe_platform_card_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripePlatformCardController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.StripeService.StripePlatformCardService diff --git a/lib/code_corps_web/controllers/stripe_platform_customer_controller.ex b/lib/code_corps_web/controllers/stripe_platform_customer_controller.ex index 087782724..de9a2ddf2 100644 --- a/lib/code_corps_web/controllers/stripe_platform_customer_controller.ex +++ b/lib/code_corps_web/controllers/stripe_platform_customer_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripePlatformCustomerController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.StripeService.StripePlatformCustomerService diff --git a/lib/code_corps_web/controllers/stripe_platform_events_controller.ex b/lib/code_corps_web/controllers/stripe_platform_events_controller.ex index ed5117df5..f1cb69edf 100644 --- a/lib/code_corps_web/controllers/stripe_platform_events_controller.ex +++ b/lib/code_corps_web/controllers/stripe_platform_events_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripePlatformEventsController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.StripeService.WebhookProcessing.{ diff --git a/lib/code_corps_web/controllers/task_controller.ex b/lib/code_corps_web/controllers/task_controller.ex index bb6828347..a3568c342 100644 --- a/lib/code_corps_web/controllers/task_controller.ex +++ b/lib/code_corps_web/controllers/task_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TaskController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{Task, Policy, User} diff --git a/lib/code_corps_web/controllers/task_list_controller.ex b/lib/code_corps_web/controllers/task_list_controller.ex index 200940d4c..a7056b6da 100644 --- a/lib/code_corps_web/controllers/task_list_controller.ex +++ b/lib/code_corps_web/controllers/task_list_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TaskListController do + @moduledoc false use CodeCorpsWeb, :controller import CodeCorps.Helpers.Query, only: [ diff --git a/lib/code_corps_web/controllers/task_skill_controller.ex b/lib/code_corps_web/controllers/task_skill_controller.ex index bbc0d4400..f3a57c846 100644 --- a/lib/code_corps_web/controllers/task_skill_controller.ex +++ b/lib/code_corps_web/controllers/task_skill_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TaskSkillController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{TaskSkill, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/token_controller.ex b/lib/code_corps_web/controllers/token_controller.ex index b78b9a1c8..c64b3069d 100644 --- a/lib/code_corps_web/controllers/token_controller.ex +++ b/lib/code_corps_web/controllers/token_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TokenController do + @moduledoc false use CodeCorpsWeb, :controller import Comeonin.Bcrypt, only: [checkpw: 2, dummy_checkpw: 0] alias CodeCorpsWeb.GuardianSerializer diff --git a/lib/code_corps_web/controllers/user_category_controller.ex b/lib/code_corps_web/controllers/user_category_controller.ex index 3effffcfe..9aefbc459 100644 --- a/lib/code_corps_web/controllers/user_category_controller.ex +++ b/lib/code_corps_web/controllers/user_category_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserCategoryController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{UserCategory, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/user_controller.ex b/lib/code_corps_web/controllers/user_controller.ex index 12fa764a9..8f16b9322 100644 --- a/lib/code_corps_web/controllers/user_controller.ex +++ b/lib/code_corps_web/controllers/user_controller.ex @@ -1,4 +1,76 @@ defmodule CodeCorpsWeb.UserController do + @moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false +@moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{ diff --git a/lib/code_corps_web/controllers/user_role_controller.ex b/lib/code_corps_web/controllers/user_role_controller.ex index e77b8f1b9..13db8e825 100644 --- a/lib/code_corps_web/controllers/user_role_controller.ex +++ b/lib/code_corps_web/controllers/user_role_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserRoleController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{UserRole, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/user_skill_controller.ex b/lib/code_corps_web/controllers/user_skill_controller.ex index 24f49ec24..6c9f6fe3e 100644 --- a/lib/code_corps_web/controllers/user_skill_controller.ex +++ b/lib/code_corps_web/controllers/user_skill_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserSkillController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{UserSkill, User, Helpers.Query} diff --git a/lib/code_corps_web/controllers/user_task_controller.ex b/lib/code_corps_web/controllers/user_task_controller.ex index 05c0747fc..28b6c99d7 100644 --- a/lib/code_corps_web/controllers/user_task_controller.ex +++ b/lib/code_corps_web/controllers/user_task_controller.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserTaskController do + @moduledoc false use CodeCorpsWeb, :controller alias CodeCorps.{UserTask, User, Helpers.Query} diff --git a/lib/code_corps_web/views/category_view.ex b/lib/code_corps_web/views/category_view.ex index a00e65e1e..4d1739672 100644 --- a/lib/code_corps_web/views/category_view.ex +++ b/lib/code_corps_web/views/category_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.CategoryView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project_categories] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/changeset_view.ex b/lib/code_corps_web/views/changeset_view.ex index 0e9dddfe2..c069d49c5 100644 --- a/lib/code_corps_web/views/changeset_view.ex +++ b/lib/code_corps_web/views/changeset_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ChangesetView do + @moduledoc false use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/comment_view.ex b/lib/code_corps_web/views/comment_view.ex index c30fc833e..1988cb120 100644 --- a/lib/code_corps_web/views/comment_view.ex +++ b/lib/code_corps_web/views/comment_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.CommentView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user, :task] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/donation_goal_view.ex b/lib/code_corps_web/views/donation_goal_view.ex index 10afdfa6b..08212d78a 100644 --- a/lib/code_corps_web/views/donation_goal_view.ex +++ b/lib/code_corps_web/views/donation_goal_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.DonationGoalView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/error_view.ex b/lib/code_corps_web/views/error_view.ex index d28df59d9..e935f2e82 100644 --- a/lib/code_corps_web/views/error_view.ex +++ b/lib/code_corps_web/views/error_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ErrorView do + @moduledoc false use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/github_app_installation_view.ex b/lib/code_corps_web/views/github_app_installation_view.ex index 1c687d091..2a9dd3388 100644 --- a/lib/code_corps_web/views/github_app_installation_view.ex +++ b/lib/code_corps_web/views/github_app_installation_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubAppInstallationView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: ~w(github_repos organization_github_app_installations project user)a use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/github_issue_view.ex b/lib/code_corps_web/views/github_issue_view.ex index 764d74d80..372831afa 100644 --- a/lib/code_corps_web/views/github_issue_view.ex +++ b/lib/code_corps_web/views/github_issue_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubIssueView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: ~w(github_repo)a use CodeCorpsWeb, :view diff --git a/lib/code_corps_web/views/github_pull_request_view.ex b/lib/code_corps_web/views/github_pull_request_view.ex index bd68c8a8e..644e1a806 100644 --- a/lib/code_corps_web/views/github_pull_request_view.ex +++ b/lib/code_corps_web/views/github_pull_request_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubPullRequestView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:github_repo] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/github_repo_view.ex b/lib/code_corps_web/views/github_repo_view.ex index 03a5f14e5..071b7c6d1 100644 --- a/lib/code_corps_web/views/github_repo_view.ex +++ b/lib/code_corps_web/views/github_repo_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.GithubRepoView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:github_app_installation] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/layout_view.ex b/lib/code_corps_web/views/layout_view.ex index 6d829e301..13471f7ba 100644 --- a/lib/code_corps_web/views/layout_view.ex +++ b/lib/code_corps_web/views/layout_view.ex @@ -1,3 +1,4 @@ defmodule CodeCorpsWeb.LayoutView do + @moduledoc false use CodeCorpsWeb, :view end diff --git a/lib/code_corps_web/views/organization_github_app_installation_view.ex b/lib/code_corps_web/views/organization_github_app_installation_view.ex index 69285c3c6..f0bfd80d4 100644 --- a/lib/code_corps_web/views/organization_github_app_installation_view.ex +++ b/lib/code_corps_web/views/organization_github_app_installation_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.OrganizationGithubAppInstallationView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:github_app_installation, :organization] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/organization_invite_view.ex b/lib/code_corps_web/views/organization_invite_view.ex index 15c45714a..424c26b21 100644 --- a/lib/code_corps_web/views/organization_invite_view.ex +++ b/lib/code_corps_web/views/organization_invite_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.OrganizationInviteView do + @moduledoc false use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/organization_view.ex b/lib/code_corps_web/views/organization_view.ex index cd0fff3bf..a45947048 100644 --- a/lib/code_corps_web/views/organization_view.ex +++ b/lib/code_corps_web/views/organization_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.OrganizationView do + @moduledoc false alias CodeCorps.Cloudex.CloudinaryUrl use CodeCorpsWeb.PreloadHelpers, default_preloads: [:organization_github_app_installations, :owner, :projects, :slugged_route, :stripe_connect_account] use CodeCorpsWeb, :view diff --git a/lib/code_corps_web/views/page_view.ex b/lib/code_corps_web/views/page_view.ex index 99f2df36d..ec9aea88a 100644 --- a/lib/code_corps_web/views/page_view.ex +++ b/lib/code_corps_web/views/page_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PageView do + @moduledoc false use CodeCorpsWeb, :view @dialyzer :no_match end diff --git a/lib/code_corps_web/views/password_reset_view.ex b/lib/code_corps_web/views/password_reset_view.ex index abf3905ec..1871a95d3 100644 --- a/lib/code_corps_web/views/password_reset_view.ex +++ b/lib/code_corps_web/views/password_reset_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PasswordResetView do + @moduledoc false use CodeCorpsWeb, :view def render("show.json", %{email: email, token: token, user_id: user_id}) do diff --git a/lib/code_corps_web/views/password_view.ex b/lib/code_corps_web/views/password_view.ex index 3fe45f505..6e474e9e2 100644 --- a/lib/code_corps_web/views/password_view.ex +++ b/lib/code_corps_web/views/password_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PasswordView do + @moduledoc false use CodeCorpsWeb, :view def render("show.json", %{email: email}) do diff --git a/lib/code_corps_web/views/preload_helpers.ex b/lib/code_corps_web/views/preload_helpers.ex index 787e41674..f1e695b52 100644 --- a/lib/code_corps_web/views/preload_helpers.ex +++ b/lib/code_corps_web/views/preload_helpers.ex @@ -1,4 +1,6 @@ defmodule CodeCorpsWeb.PreloadHelpers do + @moduledoc false + defmacro __using__(default_preloads: preloads) do quote do def preload(query, _conn, []) do diff --git a/lib/code_corps_web/views/preview_view.ex b/lib/code_corps_web/views/preview_view.ex index 8efe92055..5ef38b576 100644 --- a/lib/code_corps_web/views/preview_view.ex +++ b/lib/code_corps_web/views/preview_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.PreviewView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/project_category_view.ex b/lib/code_corps_web/views/project_category_view.ex index 3b7ffedc3..9f82c4ae0 100644 --- a/lib/code_corps_web/views/project_category_view.ex +++ b/lib/code_corps_web/views/project_category_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectCategoryView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project, :category] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/project_github_repo_view.ex b/lib/code_corps_web/views/project_github_repo_view.ex index 8e8e80b62..796051c48 100644 --- a/lib/code_corps_web/views/project_github_repo_view.ex +++ b/lib/code_corps_web/views/project_github_repo_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectGithubRepoView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:github_repo, :project] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/project_skill_view.ex b/lib/code_corps_web/views/project_skill_view.ex index 003c1247c..89076cb93 100644 --- a/lib/code_corps_web/views/project_skill_view.ex +++ b/lib/code_corps_web/views/project_skill_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectSkillView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project, :skill] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/project_user_view.ex b/lib/code_corps_web/views/project_user_view.ex index ab399b5c0..8313bb6ff 100644 --- a/lib/code_corps_web/views/project_user_view.ex +++ b/lib/code_corps_web/views/project_user_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectUserView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project, :user] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/project_view.ex b/lib/code_corps_web/views/project_view.ex index d324db3de..548b966c8 100644 --- a/lib/code_corps_web/views/project_view.ex +++ b/lib/code_corps_web/views/project_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.ProjectView do + @moduledoc false alias CodeCorps.StripeService.Validators.ProjectCanEnableDonations alias CodeCorps.Presenters.ImagePresenter diff --git a/lib/code_corps_web/views/role_skill_view.ex b/lib/code_corps_web/views/role_skill_view.ex index 030c98316..94649a21c 100644 --- a/lib/code_corps_web/views/role_skill_view.ex +++ b/lib/code_corps_web/views/role_skill_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.RoleSkillView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:role, :skill] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/role_view.ex b/lib/code_corps_web/views/role_view.ex index 148e3b953..2f5d379e6 100644 --- a/lib/code_corps_web/views/role_view.ex +++ b/lib/code_corps_web/views/role_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.RoleView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:role_skills] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/skill_view.ex b/lib/code_corps_web/views/skill_view.ex index dc24321bf..cbdbe83a3 100644 --- a/lib/code_corps_web/views/skill_view.ex +++ b/lib/code_corps_web/views/skill_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.SkillView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:role_skills] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/slugged_route_view.ex b/lib/code_corps_web/views/slugged_route_view.ex index 49c511847..37aed06fa 100644 --- a/lib/code_corps_web/views/slugged_route_view.ex +++ b/lib/code_corps_web/views/slugged_route_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.SluggedRouteView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:organization, :user] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/stripe_connect_account_view.ex b/lib/code_corps_web/views/stripe_connect_account_view.ex index 5a6589312..84882eff7 100644 --- a/lib/code_corps_web/views/stripe_connect_account_view.ex +++ b/lib/code_corps_web/views/stripe_connect_account_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectAccountView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:organization, :stripe_external_account] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/stripe_connect_plan_view.ex b/lib/code_corps_web/views/stripe_connect_plan_view.ex index ba3cb80e5..3c5363b7c 100644 --- a/lib/code_corps_web/views/stripe_connect_plan_view.ex +++ b/lib/code_corps_web/views/stripe_connect_plan_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectPlanView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/stripe_connect_subscription_view.ex b/lib/code_corps_web/views/stripe_connect_subscription_view.ex index 2762da477..cc6f9c11b 100644 --- a/lib/code_corps_web/views/stripe_connect_subscription_view.ex +++ b/lib/code_corps_web/views/stripe_connect_subscription_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripeConnectSubscriptionView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user, :project] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/stripe_platform_card_view.ex b/lib/code_corps_web/views/stripe_platform_card_view.ex index 9f1aaa979..aa7305da6 100644 --- a/lib/code_corps_web/views/stripe_platform_card_view.ex +++ b/lib/code_corps_web/views/stripe_platform_card_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripePlatformCardView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/stripe_platform_customer_view.ex b/lib/code_corps_web/views/stripe_platform_customer_view.ex index 43f08b424..64953c989 100644 --- a/lib/code_corps_web/views/stripe_platform_customer_view.ex +++ b/lib/code_corps_web/views/stripe_platform_customer_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.StripePlatformCustomerView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/task_list_view.ex b/lib/code_corps_web/views/task_list_view.ex index 6f9ac393e..62e92fe91 100644 --- a/lib/code_corps_web/views/task_list_view.ex +++ b/lib/code_corps_web/views/task_list_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TaskListView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:project, :tasks] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/task_skill_view.ex b/lib/code_corps_web/views/task_skill_view.ex index cc4f05a1a..afd6b3c4a 100644 --- a/lib/code_corps_web/views/task_skill_view.ex +++ b/lib/code_corps_web/views/task_skill_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TaskSkillView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:task, :skill] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/task_view.ex b/lib/code_corps_web/views/task_view.ex index 81529d76f..cdc3c9fa6 100644 --- a/lib/code_corps_web/views/task_view.ex +++ b/lib/code_corps_web/views/task_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TaskView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: ~w(github_issue github_repo github_pull_request project user task_list task_skills comments user_task)a use CodeCorpsWeb, :view diff --git a/lib/code_corps_web/views/token_view.ex b/lib/code_corps_web/views/token_view.ex index c5cb2e663..915d3b294 100644 --- a/lib/code_corps_web/views/token_view.ex +++ b/lib/code_corps_web/views/token_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.TokenView do + @moduledoc false use CodeCorpsWeb, :view def render("show.json", %{token: token, user_id: user_id}) do diff --git a/lib/code_corps_web/views/user_category_view.ex b/lib/code_corps_web/views/user_category_view.ex index d7b224bef..012cc4be7 100644 --- a/lib/code_corps_web/views/user_category_view.ex +++ b/lib/code_corps_web/views/user_category_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserCategoryView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user, :category] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/user_role_view.ex b/lib/code_corps_web/views/user_role_view.ex index 9c517c5da..d0d45ab77 100644 --- a/lib/code_corps_web/views/user_role_view.ex +++ b/lib/code_corps_web/views/user_role_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserRoleView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user, :role] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/user_skill_view.ex b/lib/code_corps_web/views/user_skill_view.ex index ea1e068db..8a18a2c0b 100644 --- a/lib/code_corps_web/views/user_skill_view.ex +++ b/lib/code_corps_web/views/user_skill_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserSkillView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:user, :skill] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/user_task_view.ex b/lib/code_corps_web/views/user_task_view.ex index c231beb93..9fef78912 100644 --- a/lib/code_corps_web/views/user_task_view.ex +++ b/lib/code_corps_web/views/user_task_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserTaskView do + @moduledoc false use CodeCorpsWeb.PreloadHelpers, default_preloads: [:task, :user] use CodeCorpsWeb, :view use JaSerializer.PhoenixView diff --git a/lib/code_corps_web/views/user_view.ex b/lib/code_corps_web/views/user_view.ex index b7c9526ff..f9ad5e34a 100644 --- a/lib/code_corps_web/views/user_view.ex +++ b/lib/code_corps_web/views/user_view.ex @@ -1,4 +1,5 @@ defmodule CodeCorpsWeb.UserView do + @moduledoc false alias CodeCorps.Presenters.ImagePresenter use CodeCorpsWeb.PreloadHelpers, diff --git a/mix.exs b/mix.exs index 16f0e87db..4490f6b13 100644 --- a/mix.exs +++ b/mix.exs @@ -1,6 +1,10 @@ defmodule CodeCorps.Mixfile do @moduledoc false + alias CodeCorps.{ + Analytics, GitHub, Policy, StripeService, StripeTesting + } + use Mix.Project def project do @@ -58,7 +62,7 @@ defmodule CodeCorps.Mixfile do {:ecto_ordered, "0.2.0-beta1"}, {:ex_aws, "~> 1.0"}, # Amazon AWS {:excoveralls, "~> 0.7", only: :test}, # Test coverage - {:ex_doc, "~> 0.16", only: [:dev, :test]}, + {:ex_doc, "~> 0.17", only: [:dev, :test]}, {:ex_machina, "~> 2.0", only: :test}, # test factories {:guardian, "~> 0.14.5"}, # Authentication (JWT) {:hackney, ">= 1.4.4"}, @@ -81,12 +85,312 @@ defmodule CodeCorps.Mixfile do defp docs do [ + main: "README", + source_url: "https://github.com/code-corps/code-corps-api", + groups_for_modules: groups_for_modules(), extras: [ "README.md": [title: "README"], "LICENSE.md": [title: "LICENSE"] ], - main: "README", - source_url: "https://github.com/code-corps/code-corps-api/doc" + ] + end + + defp groups_for_modules do + [ + "Models": [ + CodeCorps.Accounts, + CodeCorps.Accounts.Changesets, + CodeCorps.AuthToken, + CodeCorps.Category, + CodeCorps.Comment, + CodeCorps.DonationGoal, + CodeCorps.GithubAppInstallation, + CodeCorps.GithubComment, + CodeCorps.GithubEvent, + CodeCorps.GithubIssue, + CodeCorps.GithubPullRequest, + CodeCorps.GithubRepo, + CodeCorps.MapUtils, + CodeCorps.Model, + CodeCorps.Organization, + CodeCorps.OrganizationGithubAppInstallation, + CodeCorps.OrganizationInvite, + CodeCorps.Preview, + CodeCorps.Project, + CodeCorps.Project.Query, + CodeCorps.ProjectCategory, + CodeCorps.ProjectGithubRepo, + CodeCorps.ProjectSkill, + CodeCorps.ProjectUser, + CodeCorps.Repo, + CodeCorps.Role, + CodeCorps.RoleSkill, + CodeCorps.Skill, + CodeCorps.SluggedRoute, + CodeCorps.StripeConnectAccount, + CodeCorps.StripeConnectCard, + CodeCorps.StripeConnectCharge, + CodeCorps.StripeConnectCustomer, + CodeCorps.StripeConnectPlan, + CodeCorps.StripeConnectSubscription, + CodeCorps.StripeEvent, + CodeCorps.StripeExternalAccount, + CodeCorps.StripeFileUpload, + CodeCorps.StripeInvoice, + CodeCorps.StripePlatformCard, + CodeCorps.StripePlatformCustomer, + CodeCorps.Task, + CodeCorps.Task.Query, + CodeCorps.TaskList, + CodeCorps.TaskSkill, + CodeCorps.Transition.UserState, + CodeCorps.User, + CodeCorps.UserCategory, + CodeCorps.UserRole, + CodeCorps.UserSkill, + CodeCorps.UserTask, + CodeCorps.Validators.SlugValidator, + CodeCorps.Validators.TimeValidator + ], + + "Services": [ + CodeCorps.Comment.Service, + CodeCorps.Services.DonationGoalsService, + CodeCorps.Services.ForgotPasswordService, + CodeCorps.Services.MarkdownRendererService, + CodeCorps.Services.ProjectService, + CodeCorps.Services.UserService, + CodeCorps.Task.Service + ], + + "Policies": [ + Policy, + Policy.Category, + Policy.Comment, + Policy.DonationGoal, + Policy.GithubAppInstallation, + Policy.Helpers, + Policy.Organization, + Policy.OrganizationGithubAppInstallation, + Policy.OrganizationInvite, + Policy.Preview, + Policy.Project, + Policy.ProjectCategory, + Policy.ProjectGithubRepo, + Policy.ProjectSkill, + Policy.ProjectUser, + Policy.Role, + Policy.RoleSkill, + Policy.Skill, + Policy.StripeConnectAccount, + Policy.StripeConnectPlan, + Policy.StripeConnectSubscription, + Policy.StripePlatformCard, + Policy.StripePlatformCustomer, + Policy.Task, + Policy.TaskSkill, + Policy.User, + Policy.UserCategory, + Policy.UserRole, + Policy.UserSkill, + Policy.UserTask + ], + + "Helpers": [ + CodeCorps.Helpers.Query, + CodeCorps.Helpers.RandomIconColor, + CodeCorps.Helpers.Slug, + CodeCorps.Helpers.String, + CodeCorps.Helpers.URL, + CodeCorps.RandomIconColor.Generator, + CodeCorps.RandomIconColor.TestGenerator + ], + + "Emails": [ + CodeCorps.Mailer, + CodeCorps.Emails.BaseEmail, + CodeCorps.Emails.ForgotPasswordEmail, + CodeCorps.Emails.OrganizationInviteEmail, + CodeCorps.Emails.ProjectUserAcceptanceEmail, + CodeCorps.Emails.ReceiptEmail + ], + + "Web": [ + CodeCorpsWeb, + CodeCorpsWeb.Endpoint, + CodeCorpsWeb.ErrorHelpers, + CodeCorpsWeb.Gettext, + CodeCorpsWeb.GuardianSerializer, + CodeCorpsWeb.Router, + CodeCorpsWeb.Router.Helpers, + CodeCorpsWeb.UserSocket + ], + + "Web – Plugs": [ + CodeCorpsWeb.Plug.AnalyticsIdentify, + CodeCorpsWeb.Plug.CurrentUser, + CodeCorpsWeb.Plug.DataToAttributes, + CodeCorpsWeb.Plug.IdsToIntegers, + CodeCorpsWeb.Plug.Segment, + CodeCorpsWeb.Plug.SetSentryUserContext + ], + + "Miscellaneous": [ + CodeCorps.Adapter.MapTransformer, + CodeCorps.ConnUtils, + CodeCorps.Presenters.ImagePresenter, + CodeCorps.WebClient + ], + + "GitHub – API": [ + GitHub, + GitHub.HTTPClientError, + GitHub.Utils.ResultAggregator, + GitHub.API, + GitHub.API.Comment, + GitHub.API.Headers, + GitHub.API.Installation, + GitHub.API.Issue, + GitHub.API.JWT, + GitHub.API.PullRequest, + GitHub.API.User, + GitHub.APIError, + GitHub.APIErrorObject + ], + + "GitHub – Sync": [ + GitHub.Sync, + GitHub.Sync.Comment, + GitHub.Sync.Comment.Comment, + GitHub.Sync.Comment.Comment.Changeset, + GitHub.Sync.Comment.GithubComment, + GitHub.Sync.Issue, + GitHub.Sync.Issue.GithubIssue, + GitHub.Sync.Issue.Task, + GitHub.Sync.Issue.Task.Changeset, + GitHub.Sync.PullRequest, + GitHub.Sync.PullRequest.BodyParser, + GitHub.Sync.PullRequest.GithubPullRequest, + GitHub.Sync.User.RecordLinker, + GitHub.Sync.Utils.RepoFinder + ], + + "Github – Webhooks": [ + GitHub.Webhook.EventSupport, + GitHub.Webhook.Handler, + GitHub.Webhook.Processor, + GitHub.Event, + GitHub.Event.Handler, + GitHub.Event.Installation, + GitHub.Event.Installation.ChangesetBuilder, + GitHub.Event.Installation.MatchedUser, + GitHub.Event.Installation.Repos, + GitHub.Event.Installation.UnmatchedUser, + GitHub.Event.Installation.Validator, + GitHub.Event.InstallationRepositories, + GitHub.Event.InstallationRepositories.Validator, + GitHub.Event.IssueComment, + GitHub.Event.IssueComment.CommentDeleter, + GitHub.Event.IssueComment.Validator, + GitHub.Event.Issues, + GitHub.Event.Issues.Validator, + GitHub.Event.PullRequest, + GitHub.Event.PullRequest.Validator + ], + + "GitHub – Adapters": [ + GitHub.Adapters.AppInstallation, + GitHub.Adapters.Comment, + GitHub.Adapters.Issue, + GitHub.Adapters.PullRequest, + GitHub.Adapters.Repo, + GitHub.Adapters.User, + GitHub.Adapters.Utils.BodyDecorator + ], + + "Stripe – Services": [ + StripeService.StripeConnectAccountService, + StripeService.StripeConnectCardService, + StripeService.StripeConnectChargeService, + StripeService.StripeConnectCustomerService, + StripeService.StripeConnectExternalAccountService, + StripeService.StripeConnectPlanService, + StripeService.StripeConnectSubscriptionService, + StripeService.StripeInvoiceService, + StripeService.StripePlatformCardService, + StripeService.StripePlatformCustomerService + ], + + "Stripe – Webhooks": [ + StripeService.WebhookProcessing.ConnectEventHandler, + StripeService.WebhookProcessing.EnvironmentFilter, + StripeService.WebhookProcessing.EventHandler, + StripeService.WebhookProcessing.IgnoredEventHandler, + StripeService.WebhookProcessing.PlatformEventHandler, + StripeService.WebhookProcessing.WebhookProcessor, + StripeService.Events.AccountUpdated, + StripeService.Events.ConnectChargeSucceeded, + StripeService.Events.ConnectExternalAccountCreated, + StripeService.Events.CustomerSourceUpdated, + StripeService.Events.CustomerSubscriptionDeleted, + StripeService.Events.CustomerSubscriptionUpdated, + StripeService.Events.CustomerUpdated, + StripeService.Events.InvoicePaymentSucceeded + ], + + "Stripe – Adapters": [ + StripeService.Adapters.StripeConnectAccountAdapter, + StripeService.Adapters.StripeConnectCardAdapter, + StripeService.Adapters.StripeConnectChargeAdapter, + StripeService.Adapters.StripeConnectCustomerAdapter, + StripeService.Adapters.StripeConnectPlanAdapter, + StripeService.Adapters.StripeConnectSubscriptionAdapter, + StripeService.Adapters.StripeEventAdapter, + StripeService.Adapters.StripeExternalAccountAdapter, + StripeService.Adapters.StripeFileUploadAdapter, + StripeService.Adapters.StripeInvoiceAdapter, + StripeService.Adapters.StripePlatformCardAdapter, + StripeService.Adapters.StripePlatformCustomerAdapter, + ], + + "Stripe – Validators": [ + StripeService.Validators.ProjectCanEnableDonations, + StripeService.Validators.ProjectSubscribable, + StripeService.Validators.UserCanSubscribe, + ], + + "Stripe – Testing": [ + StripeTesting.Account, + StripeTesting.Card, + StripeTesting.Charge, + StripeTesting.Customer, + StripeTesting.Event, + StripeTesting.ExternalAccount, + StripeTesting.Helpers, + StripeTesting.Invoice, + StripeTesting.Plan, + StripeTesting.Subscription, + StripeTesting.Token + ], + + "Analytics": [ + Analytics.InMemoryAPI, + Analytics.SegmentAPI, + Analytics.SegmentDataExtractor, + Analytics.SegmentEventNameBuilder, + Analytics.SegmentPlugTracker, + Analytics.SegmentTracker, + Analytics.SegmentTrackingSupport, + Analytics.SegmentTraitsBuilder, + Analytics.TestAPI + ], + + "Cloudinary": [ + CodeCorps.Cloudex.CloudinaryUrl, + CodeCorps.Cloudex.Uploader, + CloudexTest, + CloudexTest.Url + ] ] end diff --git a/mix.lock b/mix.lock index 64f323c39..1310e418f 100644 --- a/mix.lock +++ b/mix.lock @@ -21,7 +21,7 @@ "ecto_ordered": {:hex, :ecto_ordered, "0.2.0-beta1", "cb066bc608f1c8913cea85af8293261720e6a88e3c99061e6877d7025352f045", [:mix], [{:ecto, "~> 2.0", [hex: :ecto, optional: false]}]}, "elixir_make": {:hex, :elixir_make, "0.4.0", "992f38fabe705bb45821a728f20914c554b276838433349d4f2341f7a687cddf", [:mix], []}, "ex_aws": {:hex, :ex_aws, "1.1.4", "4bdc4fff91f8d35c7fe2355b9da54cc51f980c92f1137715d8b2d70d8e8511cc", [:mix], [{:configparser_ex, "~> 0.2.1", [hex: :configparser_ex, optional: true]}, {:hackney, "1.6.3 or 1.6.5 or 1.7.1 or 1.8.6 or ~> 1.9", [hex: :hackney, optional: true]}, {:jsx, "~> 2.8", [hex: :jsx, optional: true]}, {:poison, ">= 1.2.0", [hex: :poison, optional: true]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, optional: true]}, {:xml_builder, "~> 0.1.0", [hex: :xml_builder, optional: true]}]}, - "ex_doc": {:hex, :ex_doc, "0.16.3", "cd2a4cfe5d26e37502d3ec776702c72efa1adfa24ed9ce723bb565f4c30bd31a", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]}, + "ex_doc": {:hex, :ex_doc, "0.18.1", "37c69d2ef62f24928c1f4fdc7c724ea04aecfdf500c4329185f8e3649c915baf", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"}, "ex_machina": {:hex, :ex_machina, "2.1.0", "4874dc9c78e7cf2d429f24dc3c4005674d4e4da6a08be961ffccc08fb528e28b", [:mix], [{:ecto, "~> 2.1", [hex: :ecto, optional: true]}]}, "excoveralls": {:hex, :excoveralls, "0.7.2", "f69ede8c122ccd3b60afc775348a53fc8c39fe4278aee2f538f0d81cc5e7ff3a", [:mix], [{:exjsx, ">= 3.0.0", [hex: :exjsx, optional: false]}, {:hackney, ">= 0.12.0", [hex: :hackney, optional: false]}]}, "exjsx": {:hex, :exjsx, "3.2.1", "1bc5bf1e4fd249104178f0885030bcd75a4526f4d2a1e976f4b428d347614f0f", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, optional: false]}]},