From b7d772224cea19cded854ff563c54fc1aec78045 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Sun, 25 Sep 2016 13:39:56 -0700 Subject: [PATCH] Setup initial stripe config, add ENV, improve README --- .env.example | 3 ++ README.md | 10 ++--- config/config.exs | 3 ++ docs/USAGE.md | 11 ++++++ mix.exs | 32 ++++++++-------- mix.lock | 38 +++++++++++-------- .../20160918003206_fix_mixed_case_slugs.exs | 9 ++--- 7 files changed, 62 insertions(+), 44 deletions(-) diff --git a/.env.example b/.env.example index 06e0e98a8..7225b69f2 100644 --- a/.env.example +++ b/.env.example @@ -3,3 +3,6 @@ AWS_SECRET_ACCESS_KEY= CLOUDFRONT_DOMAIN= S3_BUCKET= SEGMENT_WRITE_KEY= +SENTRY_DSN= +STRIPE_SECRET_KEY= +STRIPE_PLATFORM_CLIENT_ID= diff --git a/README.md b/README.md index 91f526b97..8dcf198ae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Code Corps Phoenix Logo](https://d3pgew4wbk2vb1.cloudfront.net/images/github/code-corps-api.png) -[![CircleCI](https://circleci.com/gh/code-corps/code-corps-api.svg?style=svg)](https://circleci.com/gh/code-corps/code-corps-api) [![Coverage Status](https://coveralls.io/repos/github/code-corps/code-corps-api/badge.svg?branch=develop)](https://coveralls.io/github/code-corps/code-corps-api?branch=develop) [![Deps Status](https://beta.hexfaktor.org/badge/all/github/code-corps/code-corps-api.svg)](https://beta.hexfaktor.org/github/code-corps/code-corps-api) +[![CircleCI](https://circleci.com/gh/code-corps/code-corps-api.svg?style=svg)](https://circleci.com/gh/code-corps/code-corps-api) [![Inline docs](http://inch-ci.org/github/code-corps/code-corps-api.svg?branch=develop)](http://inch-ci.org/github/code-corps/code-corps-api) [![Coverage Status](https://coveralls.io/repos/github/code-corps/code-corps-api/badge.svg?branch=develop)](https://coveralls.io/github/code-corps/code-corps-api?branch=develop) [![Deps Status](https://beta.hexfaktor.org/badge/all/github/code-corps/code-corps-api.svg)](https://beta.hexfaktor.org/github/code-corps/code-corps-api) [![Slack Status](http://slack.codecorps.org/badge.svg)](http://slack.codecorps.org) ## Installing with Docker @@ -18,10 +18,6 @@ The `circle.yml` file specifies what happens in the builds. You can [read more a The CircleCI builds also rely on some environment variables for reporting, deployments, and other requirements. -## Learn more +## Usage - * Official website: http://www.phoenixframework.org/ - * Guides: http://phoenixframework.org/docs/overview - * Docs: https://hexdocs.pm/phoenix - * Mailing list: http://groups.google.com/group/phoenix-talk - * Source: https://github.com/phoenixframework/phoenix +To learn about how to run the application, run tests, configure your environment, and more [in the usage guides](docs/USAGE.md). diff --git a/config/config.exs b/config/config.exs index 09f076426..909bed3ee 100644 --- a/config/config.exs +++ b/config/config.exs @@ -64,6 +64,9 @@ config :code_corps, :icon_color_generator, CodeCorps.RandomIconColor.Generator # Set Corsica logging to output a console warning when rejecting a request config :code_corps, :corsica_log_level, [rejected: :warn] +config :stripity_stripe, secret_key: System.get_env("STRIPE_SECRET_KEY") +config :stripity_stripe, platform_client_id: System.get_env("STRIPE_PLATFORM_CLIENT_ID") + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env}.exs" diff --git a/docs/USAGE.md b/docs/USAGE.md index 363e7864a..55e5a783d 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -12,6 +12,17 @@ To run the tests you can run `docker-compose run test mix test`. If you ever need to rebuild you can run `docker-compose up --build`. Unless you've destroyed your Docker container images, this should be faster than the first run. +### Donations and Stripe + +If you're testing anything with donations locally, you'll need a Stripe account. Unfortunately, we cannot provide you with sandboxed keys for doing this on your own. + +You can register for a Stripe account here: [https://dashboard.stripe.com/register](https://dashboard.stripe.com/register) + +In your `.env` you should have a `STRIPE_SECRET_KEY` and `STRIPE_PLATFORM_CLIENT_ID`. + +- `STRIPE_SECRET_KEY` should be set to your "Test Secret Key" from the [API Keys section of your Stripe dashboard](https://dashboard.stripe.com/account/apikeys). +- `STRIPE_PLATFORM_CLIENT_ID` should be set to "Development `client_id`" key from the [Connect section of your Stripe dashboard](https://dashboard.stripe.com/account/applications/settings). You'll want to set the redirect URI to `http://localhost:4200/oauth/stripe`. + ### Pushing changes You can use `git` as you normally would, either on your own host machine or in Docker's `web` container. diff --git a/mix.exs b/mix.exs index d6207992e..c72fa9f99 100644 --- a/mix.exs +++ b/mix.exs @@ -29,14 +29,15 @@ defmodule CodeCorps.Mixfile do :gettext, :phoenix_ecto, :postgrex, + :arc_ecto, :comeonin, :corsica, :earmark, :ex_aws, :httpoison, - :arc_ecto, :scrivener_ecto, - :segment + :segment, + :stripity_stripe ] ] end @@ -50,7 +51,7 @@ defmodule CodeCorps.Mixfile do # Type `mix help deps` for examples and options. defp deps do [ - {:phoenix, "~> 1.2.0"}, + {:phoenix, "~> 1.2.1"}, {:phoenix_pubsub, "~> 1.0"}, {:phoenix_ecto, "~> 3.0"}, {:postgrex, ">= 0.0.0"}, @@ -58,24 +59,25 @@ defmodule CodeCorps.Mixfile do {:phoenix_live_reload, "~> 1.0", only: :dev}, {:gettext, "~> 0.11"}, {:cowboy, "~> 1.0"}, - {:ja_serializer, "~> 0.10"}, # JSON API - {:guardian, "~> 0.12.0"}, # Authentication (JWT) + {:arc, git: "https://github.com/stavro/arc.git", ref: "354d4d2e1b86bcd6285db3528118fe3f5db36cf5", override: true}, # Photo uploads + {:arc_ecto, "~> 0.4.4"}, + {:canary, "~> 1.0"}, # Authorization {:comeonin, "~> 2.0"}, - {:mix_test_watch, "~> 0.2", only: :dev}, # Test watcher - {:credo, "~> 0.4", only: [:dev, :test]}, # Code style suggestions - {:inflex, "~> 1.7.0"}, {:corsica, "~> 0.4"}, # CORS + {:credo, "~> 0.4", only: [:dev, :test]}, # Code style suggestions {:earmark, "~> 1.0"}, # Markdown rendering - {:ex_machina, "~> 1.0", only: :test}, # test factories - {:arc, git: "https://github.com/stavro/arc.git", ref: "354d4d2e1b86bcd6285db3528118fe3f5db36cf5", override: true}, # Photo uploads - {:arc_ecto, "~> 0.4.3"}, - {:ex_aws, "~> 0.4.10"}, # Amazon AWS + {:ex_aws, "~> 0.5"}, # Amazon AWS {:excoveralls, "~> 0.5", only: :test}, # Test coverage + {:ex_machina, "~> 1.0", only: :test}, # test factories + {:guardian, "~> 0.13"}, # Authentication (JWT) {:httpoison, "~> 0.7"}, - {:poison, "~> 1.2"}, - {:canary, "~> 0.14.2"}, # Authorization + {:inflex, "~> 1.7.0"}, + {:ja_serializer, "~> 0.10.1"}, # JSON API + {:mix_test_watch, "~> 0.2", only: :dev}, # Test watcher + {:poison, "~> 1.2 or ~> 2.0"}, {:scrivener_ecto, "~> 1.0"}, # DB query pagination - {:segment, github: "stueccles/analytics-elixir"} # Segment analytics + {:segment, github: "stueccles/analytics-elixir"}, # Segment analytics + {:stripity_stripe, "~> 1.4.0"} # Stripe ] end diff --git a/mix.lock b/mix.lock index d24453507..0c85cc178 100644 --- a/mix.lock +++ b/mix.lock @@ -1,45 +1,49 @@ %{"addict": {:hex, :addict, "0.3.0", "8cbf72bb80abe5cc2934dea1fa601eb4f7fd7fa9ea6869c9e47d24289a939d22", [:mix], [{:mailgun, "~> 0.1", [hex: :mailgun, optional: false]}, {:comeonin, "~> 2.1", [hex: :comeonin, optional: false]}, {:ecto, "~> 2.0", [hex: :ecto, optional: false]}, {:phoenix, "~> 1.1", [hex: :phoenix, optional: false]}, {:cowboy, "~> 1.0", [hex: :cowboy, optional: false]}]}, "arc": {:git, "https://github.com/stavro/arc.git", "354d4d2e1b86bcd6285db3528118fe3f5db36cf5", [ref: "354d4d2e1b86bcd6285db3528118fe3f5db36cf5"]}, - "arc_ecto": {:hex, :arc_ecto, "0.4.3", "f4383780f7bacee22e700a92783b562b5ec9f65a828c48b0daed7389eb441e13", [:mix], [{:arc, "~> 0.5.3", [hex: :arc, optional: false]}, {:ecto, "~> 2.0", [hex: :ecto, optional: false]}]}, + "arc_ecto": {:hex, :arc_ecto, "0.4.4", "2ea481a546ceb79090e90984de1a423a1a8a04fe78c871ab05b09f1dffcf9e35", [:mix], [{:arc, "~> 0.5.3", [hex: :arc, optional: false]}, {:ecto, "~> 2.0", [hex: :ecto, optional: false]}]}, "base64url": {:hex, :base64url, "0.0.1", "36a90125f5948e3afd7be97662a1504b934dd5dac78451ca6e9abf85a10286be", [:rebar], []}, "bunt": {:hex, :bunt, "0.1.6", "5d95a6882f73f3b9969fdfd1953798046664e6f77ec4e486e6fafc7caad97c6f", [:mix], []}, "canada": {:hex, :canada, "1.0.1", "da96d0ff101a0c2a6cc7b07d92b8884ff6508f058781d3679999416feacf41c5", [:mix], []}, - "canary": {:hex, :canary, "0.14.2", "fa5f66db9d35a19ead19364a28d790bdc28f3cfb449978fa4e2c88f0d1c9d161", [:mix], [{:canada, "~> 1.0.0", [hex: :canada, optional: false]}, {:ecto, ">= 1.1.0", [hex: :ecto, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}]}, - "certifi": {:hex, :certifi, "0.4.0", "a7966efb868b179023618d29a407548f70c52466bf1849b9e8ebd0e34b7ea11f", [:rebar3], []}, + "canary": {:hex, :canary, "1.0.0", "55e130bd015001d2fcdc16be23994c6bb711205a625f340d7a74f1c29825d4ba", [:mix], [{:canada, "~> 1.0.0", [hex: :canada, optional: false]}, {:ecto, ">= 1.1.0", [hex: :ecto, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}]}, + "certifi": {:hex, :certifi, "0.3.0", "389d4b126a47895fe96d65fcf8681f4d09eca1153dc2243ed6babad0aac1e763", [:rebar3], []}, "comeonin": {:hex, :comeonin, "2.5.2", "bbad773af30a7632a63053014d5cfebf6df2c1ad114167b4db02f05b5c60901b", [:mix, :make, :make], []}, - "connection": {:hex, :connection, "1.0.3", "3145f7416be3df248a4935f24e3221dc467c1e3a158d62015b35bd54da365786", [:mix], []}, + "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], []}, "corsica": {:hex, :corsica, "0.5.0", "eb5b2fccc5bc4f31b8e2b77dd15f5f302aca5d63286c953e8e916f806056d50c", [:mix], [{:cowboy, ">= 1.0.0", [hex: :cowboy, optional: false]}, {:plug, ">= 0.9.0", [hex: :plug, optional: false]}]}, "cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:rebar, :make], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]}, "cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []}, "credo": {:hex, :credo, "0.4.7", "1516ebd3c6099eff74ed0ef50637f0a43113c3f65338a9e1792efc03dff34855", [:mix], [{:bunt, "~> 0.1.6", [hex: :bunt, optional: false]}]}, - "db_connection": {:hex, :db_connection, "1.0.0-rc.3", "d9ceb670fe300271140af46d357b669983cd16bc0d01206d7d3222dde56cf038", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0.0-beta.3", [hex: :sbroker, optional: true]}]}, + "db_connection": {:hex, :db_connection, "1.0.0-rc.5", "1d9ab6e01387bdf2de7a16c56866971f7c2f75aea7c69cae2a0346e4b537ae0d", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:sbroker, "~> 1.0.0-beta.3", [hex: :sbroker, optional: true]}]}, "decimal": {:hex, :decimal, "1.1.2", "79a769d4657b2d537b51ef3c02d29ab7141d2b486b516c109642d453ee08e00c", [:mix], []}, "dogma": {:hex, :dogma, "0.1.7", "927f76a89a809db96e0983b922fc899f601352690aefa123529b8aa0c45123b2", [:mix], [{:poison, ">= 1.0.0", [hex: :poison, optional: false]}]}, "earmark": {:hex, :earmark, "1.0.1", "2c2cd903bfdc3de3f189bd9a8d4569a075b88a8981ded9a0d95672f6e2b63141", [:mix], []}, - "ecto": {:hex, :ecto, "2.0.2", "b02331c1f20bbe944dbd33c8ecd8f1ccffecc02e344c4471a891baf3a25f5406", [:mix], [{:db_connection, "~> 1.0-rc.2", [hex: :db_connection, optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.7.7", [hex: :mariaex, optional: true]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.11.2", [hex: :postgrex, optional: true]}, {:sbroker, "~> 1.0-beta", [hex: :sbroker, optional: true]}]}, + "ecto": {:hex, :ecto, "2.0.4", "03fd3b9aa508b1383eb38c00ac389953ed22af53811aa2e504975a3e814a8d97", [:mix], [{:db_connection, "~> 1.0-rc.2", [hex: :db_connection, optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:mariaex, "~> 0.7.7", [hex: :mariaex, optional: true]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}, {:postgrex, "~> 0.11.2", [hex: :postgrex, optional: true]}, {:sbroker, "~> 1.0-beta", [hex: :sbroker, optional: true]}]}, "ecto_state_machine": {:hex, :ecto_state_machine, "0.1.0", "39f5a2fef325eae20a1d1b8e543cc93825295cb069482fe61fd9a5ed930f4eb5", [:mix], [{:ecto, ">= 1.1.2 or >= 2.0.0", [hex: :ecto, optional: false]}]}, - "ex_aws": {:hex, :ex_aws, "0.4.19", "84284a2ce936b1aed3d6db4dac4ccf28105f2b617201194b2804d737cd0ef818", [:mix], [{:httpoison, "~> 0.8", [hex: :httpoison, optional: true]}, {:httpotion, "~> 2.0", [hex: :httpotion, optional: true]}, {:jsx, "~> 2.5", [hex: :jsx, optional: true]}, {:poison, "~> 1.2 or ~> 2.0", [hex: :poison, optional: true]}, {:sweet_xml, "~> 0.5", [hex: :sweet_xml, optional: true]}]}, + "ex_aws": {:hex, :ex_aws, "0.5.0", "6ca02f1e8fe8340aa2eee66d9f08efcd6ff1f9f4ef7264669d0756e0b3917218", [:mix], [{:httpoison, "~> 0.8", [hex: :httpoison, optional: true]}, {:jsx, "~> 2.5", [hex: :jsx, optional: true]}, {:poison, "~> 1.2 or ~> 2.0", [hex: :poison, optional: true]}, {:sweet_xml, "~> 0.5", [hex: :sweet_xml, optional: true]}]}, "ex_machina": {:hex, :ex_machina, "1.0.2", "1cc49e1a09e3f7ab2ecb630c17f14c2872dc4ec145d6d05a9c3621936a63e34f", [:mix], [{:ecto, "~> 2.0", [hex: :ecto, optional: true]}]}, + "excoveralls": {:hex, :excoveralls, "0.5.6", "35a903f6f78619ee7f951448dddfbef094b3a0d8581657afaf66465bc930468e", [:mix], [{:exjsx, "~> 3.0", [hex: :exjsx, optional: false]}, {:hackney, ">= 0.12.0", [hex: :hackney, optional: false]}]}, + "exjsx": {:hex, :exjsx, "3.2.0", "7136cc739ace295fc74c378f33699e5145bead4fdc1b4799822d0287489136fb", [:mix], [{:jsx, "~> 2.6.2", [hex: :jsx, optional: false]}]}, "fs": {:hex, :fs, "0.9.2", "ed17036c26c3f70ac49781ed9220a50c36775c6ca2cf8182d123b6566e49ec59", [:rebar], []}, "gettext": {:hex, :gettext, "0.11.0", "80c1dd42d270482418fa158ec5ba073d2980e3718bacad86f3d4ad71d5667679", [:mix], []}, - "guardian": {:hex, :guardian, "0.12.0", "ab1f0a1ab0cd8f4f9c8cca6e28d61136ca682684cf0f82e55a50e8061be7575a", [:mix], [{:jose, "~> 1.6", [hex: :jose, optional: false]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}, {:poison, ">= 1.3.0", [hex: :poison, optional: false]}, {:uuid, ">=1.1.1", [hex: :uuid, optional: false]}]}, - "hackney": {:hex, :hackney, "1.6.1", "ddd22d42db2b50e6a155439c8811b8f6df61a4395de10509714ad2751c6da817", [:rebar3], [{:certifi, "0.4.0", [hex: :certifi, optional: false]}, {:idna, "1.2.0", [hex: :idna, optional: false]}, {:metrics, "1.0.1", [hex: :metrics, optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, optional: false]}, {:ssl_verify_fun, "1.1.0", [hex: :ssl_verify_fun, optional: false]}]}, - "httpoison": {:hex, :httpoison, "0.9.0", "68187a2daddfabbe7ca8f7d75ef227f89f0e1507f7eecb67e4536b3c516faddb", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]}, - "idna": {:hex, :idna, "1.2.0", "ac62ee99da068f43c50dc69acf700e03a62a348360126260e87f2b54eced86b2", [:rebar3], []}, + "guardian": {:hex, :guardian, "0.13.0", "37c5b5302617276093570ee938baca146f53e1d5de1f5c2b8effb1d2fea596d2", [:mix], [{:jose, "~> 1.8", [hex: :jose, optional: false]}, {:phoenix, "~> 1.2.0", [hex: :phoenix, optional: true]}, {:plug, "~> 1.0", [hex: :plug, optional: false]}, {:poison, ">= 1.3.0", [hex: :poison, optional: false]}, {:uuid, ">=1.1.1", [hex: :uuid, optional: false]}]}, + "hackney": {:hex, :hackney, "1.4.10", "7da877a7388a8bcc7d71253d4a38103c955333dd470a3af5e47fa1ad8d5e3c23", [:rebar3], [{:certifi, "0.3.0", [hex: :certifi, optional: false]}, {:idna, "1.1.0", [hex: :idna, optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, optional: false]}, {:ssl_verify_hostname, "1.0.5", [hex: :ssl_verify_hostname, optional: false]}]}, + "httpoison": {:hex, :httpoison, "0.8.1", "5b706be2b0af81d1a3870479a2e1b925517c2a64316f70c6cc8aceac9e55f695", [:mix], [{:hackney, "~> 1.4.4", [hex: :hackney, optional: false]}]}, + "idna": {:hex, :idna, "1.1.0", "b4315c6da1c37dc8ab1df3ed18796ecd5172c4165fb886f43732ce598d145b50", [:rebar3], []}, "inflex": {:hex, :inflex, "1.7.0", "4466a34b7d8e871d8164619ba0f3b8410ec782e900f0ae1d3d27a5875a29532e", [:mix], []}, "ja_serializer": {:hex, :ja_serializer, "0.10.1", "50ccdfbc411831004e1107f383a8cf5872f3f671703f42b792d3c70932c007c3", [:mix], [{:ecto, "~> 1.1 or ~> 2.0", [hex: :ecto, optional: false]}, {:inflex, "~> 1.4", [hex: :inflex, optional: false]}, {:plug, "> 1.0.0", [hex: :plug, optional: false]}, {:poison, "~> 1.4 or ~> 2.0", [hex: :poison, optional: false]}, {:scrivener, "~> 1.2 or ~> 2.0", [hex: :scrivener, optional: true]}]}, - "jose": {:hex, :jose, "1.7.9", "9dc5a14ab62db4e41677fcc97993752562fb57ad0b8ba062589682edd3acb91f", [:mix, :rebar], [{:base64url, "~> 0.0.1", [hex: :base64url, optional: false]}]}, + "jose": {:hex, :jose, "1.8.0", "1ee027c5c0ff3922e3bfe58f7891509e8f87f771ba609ee859e623cc60237574", [:mix, :rebar3], [{:base64url, "~> 0.0.1", [hex: :base64url, optional: false]}]}, + "jsx": {:hex, :jsx, "2.6.2", "213721e058da0587a4bce3cc8a00ff6684ced229c8f9223245c6ff2c88fbaa5a", [:mix, :rebar], []}, "mailgun": {:hex, :mailgun, "0.1.2", "37c1306675cf27a66a13dea3c9d479da2a990f0aed296b5addbd0b07529b667d", [:mix], [{:poison, "~> 1.4", [hex: :poison, optional: false]}]}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []}, + "mime": {:hex, :mime, "1.0.1", "05c393850524767d13a53627df71beeebb016205eb43bfbd92d14d24ec7a1b51", [:mix], []}, "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []}, "mix_test_watch": {:hex, :mix_test_watch, "0.2.6", "9fcc2b1b89d1594c4a8300959c19d50da2f0ff13642c8f681692a6e507f92cab", [:mix], [{:fs, "~> 0.9.1", [hex: :fs, optional: false]}]}, - "phoenix": {:hex, :phoenix, "1.2.0", "1bdeb99c254f4c534cdf98fd201dede682297ccc62fcac5d57a2627c3b6681fb", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, optional: false]}, {:plug, "~> 1.1", [hex: :plug, optional: false]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: false]}]}, + "phoenix": {:hex, :phoenix, "1.2.1", "6dc592249ab73c67575769765b66ad164ad25d83defa3492dc6ae269bd2a68ab", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}, {:phoenix_pubsub, "~> 1.0", [hex: :phoenix_pubsub, optional: false]}, {:plug, "~> 1.1", [hex: :plug, optional: false]}, {:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: false]}]}, "phoenix_ecto": {:hex, :phoenix_ecto, "3.0.0", "b947aaf03d076f5b1448f87828f22fb7710478ee38455c67cc3fe8e9a4dfd015", [:mix], [{:ecto, "~> 2.0.0-rc", [hex: :ecto, optional: false]}, {:phoenix_html, "~> 2.6", [hex: :phoenix_html, optional: true]}]}, "phoenix_html": {:hex, :phoenix_html, "2.6.2", "944a5e581b0d899e4f4c838a69503ebd05300fe35ba228a74439e6253e10e0c0", [:mix], [{:plug, "~> 1.0", [hex: :plug, optional: false]}]}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.0.5", "829218c4152ba1e9848e2bf8e161fcde6b4ec679a516259442561d21fde68d0b", [:mix], [{:fs, "~> 0.9.1", [hex: :fs, optional: false]}, {:phoenix, "~> 1.0 or ~> 1.2-rc", [hex: :phoenix, optional: false]}]}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "1.0.0", "c31af4be22afeeebfaf246592778c8c840e5a1ddc7ca87610c41ccfb160c2c57", [:mix], []}, - "plug": {:hex, :plug, "1.1.6", "8927e4028433fcb859e000b9389ee9c37c80eb28378eeeea31b0273350bf668b", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}]}, - "poison": {:hex, :poison, "1.5.2", "560bdfb7449e3ddd23a096929fb9fc2122f709bcc758b2d5d5a5c7d0ea848910", [:mix], []}, + "plug": {:hex, :plug, "1.2.0", "496bef96634a49d7803ab2671482f0c5ce9ce0b7b9bc25bc0ae8e09859dd2004", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}, {:mime, "~> 1.0", [hex: :mime, optional: false]}]}, + "poison": {:hex, :poison, "2.0.1", "81248a36d1b602b17ea6556bfa8952492091f01af05173de11f8b297e2bbf088", [:mix], []}, "poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []}, "postgrex": {:hex, :postgrex, "0.11.2", "139755c1359d3c5c6d6e8b1ea72556d39e2746f61c6ddfb442813c91f53487e8", [:mix], [{:connection, "~> 1.0", [hex: :connection, optional: false]}, {:db_connection, "~> 1.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}, "ranch": {:hex, :ranch, "1.2.1", "a6fb992c10f2187b46ffd17ce398ddf8a54f691b81768f9ef5f461ea7e28c762", [:make], []}, @@ -47,4 +51,6 @@ "scrivener_ecto": {:hex, :scrivener_ecto, "1.0.1", "013ff84d3bf1a29ecc5cead9808c2433c4cc5531333249cb0186454d06e817c3", [:mix], [{:ecto, "~> 2.0", [hex: :ecto, optional: false]}, {:postgrex, "~> 0.11.2", [hex: :postgrex, optional: true]}, {:scrivener, "~> 2.0", [hex: :scrivener, optional: false]}]}, "segment": {:git, "https://github.com/stueccles/analytics-elixir.git", "8c2309b40e92c04d78ba9eb77cbb5ced4a6cdd72", []}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.0", "edee20847c42e379bf91261db474ffbe373f8acb56e9079acb6038d4e0bf414f", [:rebar, :make], []}, - "uuid": {:hex, :uuid, "1.1.4", "36c7734e4c8e357f2f67ba57fb61799d60c20a7f817b104896cca64b857e3686", [:mix], []}} + "ssl_verify_hostname": {:hex, :ssl_verify_hostname, "1.0.5", "2e73e068cd6393526f9fa6d399353d7c9477d6886ba005f323b592d389fb47be", [:make], []}, + "stripity_stripe": {:hex, :stripity_stripe, "1.4.0", "32ce7aa0c6a8f794c6c25aa9c4834d0cf2586116eea569ecb32aa0ac45375bc7", [:mix], [{:hackney, "~> 1.4.8", [hex: :hackney, optional: false]}, {:httpoison, "~> 0.8.0", [hex: :httpoison, optional: false]}, {:poison, "~> 2.0.1", [hex: :poison, optional: true]}]}, + "uuid": {:hex, :uuid, "1.1.5", "96cb36d86ee82f912efea4d50464a5df606bf3f1163d6bdbb302d98474969369", [:mix], []}} diff --git a/priv/repo/migrations/20160918003206_fix_mixed_case_slugs.exs b/priv/repo/migrations/20160918003206_fix_mixed_case_slugs.exs index fab9dc216..7902d6469 100644 --- a/priv/repo/migrations/20160918003206_fix_mixed_case_slugs.exs +++ b/priv/repo/migrations/20160918003206_fix_mixed_case_slugs.exs @@ -4,17 +4,14 @@ defmodule CodeCorps.Repo.Migrations.FixMixedCaseSlugs do alias CodeCorps.Repo alias CodeCorps.SluggedRoute - import CodeCorps.ModelHelpers - def up do SluggedRoute |> Repo.all |> Repo.preload([:user, :organization]) |> Enum.each(fn record -> - changeset = - SluggedRoute.changeset(record) - |> Ecto.Changeset.put_change(:slug, Inflex.parameterize(record.slug)) - |> Repo.update! + SluggedRoute.changeset(record) + |> Ecto.Changeset.put_change(:slug, Inflex.parameterize(record.slug)) + |> Repo.update! end) end