Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use application aliasing in .iex.exs file for easier console work. #389

Merged
merged 3 commits into from
Feb 27, 2018

Conversation

nicholalexander
Copy link
Contributor

Description of Change(s) Introduced:
Automatically aliasing modules when working with the console (iex -S mix) makes it easier and allows you to not have to write RemoteRetro a thousand times.

You get to move from doing stuff like this:
RemoteRetro.User.changeset(%RemoteRetro.User{}, u) |> RemoteRetro.Repo.insert!

to doing stuff like this:
User.changeset(%User{}, u) |> Repo.insert!

This is implemented by having a .iex.exs file in the root and utilizing thoughtbot's Quick Alias library. It is only in the dependencies for the dev environment as this is only focused on making it easier for devs to work with the console.

Dependencies Introduced or Upgraded:
https://github.com/thoughtbot/quick_alias, 0.1.0.

Description of Testing Applied:
Ran test suite. No new tests added.

@@ -0,0 +1 @@
use QuickAlias, RemoteRetro

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a final \n at the end of each file.

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 1 fixed issue! 🎉

You can see more details about this review at https://ebertapp.io/github/stride-nyc/remote_retro/pulls/389.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.703% when pulling c6b6479 on iex_alias into a0d8999 on master.

@vanderhoop
Copy link
Contributor

love it! mergin'

@vanderhoop vanderhoop merged commit 992d6bc into master Feb 27, 2018
@vanderhoop vanderhoop deleted the iex_alias branch February 27, 2018 00:02
@vanderhoop
Copy link
Contributor

hmmmm, this breaks regular iex if you invoke it in your remote_retro directory, which is a pretty common use case if you want to play around in the repl. @nicholalexander can you look into that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants