riverrun / openmaize

No longer maintained - was an Authentication library for Plug-based applications in Elixir
Other
206 stars 30 forks source link

Support for Phoenix 1.3.0 file and directory structure conventions #94

Closed mutablestate closed 7 years ago

mutablestate commented 7 years ago

With the release of Phoenix 1.3.0-rc https://github.com/phoenixframework/phoenix/releases/tag/v1.3.0-rc.0 the file structure of a new project has changed significantly (moving of web into lib etc).

The immediate concern might warrant adding a note to readme / wiki to make it clear the project currently supports Phoenix pre 1.3. An upgrade guide would also be useful to current users.

Longer term the generators will obviously need some work to keep up with the new conventions. For example the users table (if generated from 1.3) is now namespaced to accounts_users.

@riverrun would be good to hear your thoughts on how you want to handle these new developments.

riverrun commented 7 years ago

I knew that the file structure was changing, but I didn't know when so thanks for pointing that out.

My current plan is to move to the new file structure as quickly as possible. In the archives, there will be a openmaize_phx_3.0.0.ez file, which will use the old file structure, a openmaize_phx_3.1.0.ez file, which will use the new file structure, and the default openmaize_phx.ez, which will point to version 3.1.

As for notifying users of Openmaize, I'll add a note to the wiki, and I'll look into what I can do in the generator itself.

fabrik42 commented 7 years ago

I am also interested the update process to Phoenix 1.3. Please let me know, if I can help!

riverrun commented 7 years ago

A bit busy at the moment, but I've started work on it locally. I'll be pushing something to the phoenix_1.3 branch in a day or two.

fabrik42 commented 7 years ago

Thanks!

riverrun commented 7 years ago

The develop branch now has an installer for the new Phoenix 1.3 directory structure.

So far, there has been limited testing. I've tested the mix openmaize.phx --confirm and mix openmaize.phx --api --confirm commands and all the tests pass. I haven't tested the more basic mix openmaize.phx commands yet. There has also been no testing with umbrella apps.

To try it out, follow these instructions.

Install the new phx installer:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Create a new Phoenix project (add --no-html --no-brunch for an api) and cd into the project:

mix phx.new alibaba
cd alibaba

Add the following line to the mix.exs file:

{:openmaize, git: "https://github.com/riverrun/openmaize.git", branch: "develop"},

Run the following commands (if necessary, add --api or --confirm options to the openmaize.phx command):

mix openmaize.phx
mix deps.get
mix test

And then let me know if / when you find any bugs.

rrevanth commented 7 years ago

@riverrun Hi, the dir structure hasn't changed and created web & everything else in the root directory.

riverrun commented 7 years ago

I will keep the develop branch as it is, but the installer for Phoenix 1.3 will now be handled by Phauxth -- an authentication library which takes what I like from Openmaize, making it more extensible in the process, and adds Phoenix as a dependency.