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

Recommended Approach for Pliny App with no DB #278

Open
naaman opened this issue Sep 13, 2016 · 4 comments
Open

Recommended Approach for Pliny App with no DB #278

naaman opened this issue Sep 13, 2016 · 4 comments

Comments

@naaman
Copy link

naaman commented Sep 13, 2016

I just created a small service that has no need for a database; the service uses REST APIs as its backend. To clean up dependencies and operations, I had to remove a few things from the generated pliny app:

  • db related gems, pg and sequel
  • a handful of config
  • the db folder
  • pliny tasks that try to run db tasks by default

Does it make sense to provide a --no-db option for pliny-new? If so, what else should needs to be avoided? If not, what's the recommended approach for cleaning up a new pliny app that doesn't need a database?

edit:

Also need to remove

  • DatabaseCleaner in spec helper
@pedro
Copy link

pedro commented Sep 13, 2016

+1. We shouldn't go crazy on these pliny-new options (eg: no --use-activerecord 😬 ) but no db is definitely a use case we've seen before.

@brandur
Copy link
Member

brandur commented Sep 13, 2016

I'm a light +1 as long as we can implement the new pliny-new path in such a way that it's unlikely that we'll see any major regressions.

Generally, it seems like a useful enough feature, but I would guess one that's seen infrequently enough that we could probably get away without a special installation path if no one's too keen on tackling the patch.

@naaman
Copy link
Author

naaman commented Sep 13, 2016

Yea, I don't know what the general usage is, but it's the second time I've had to do it (in ~1 year). If I get around to it (we're on a dreamforce tear atm), I might submit a patch and we can mull it over from there.

That said, anything glaring I'm missing from the list above? I think the one thing I forgot to mention was removing the DB transaction stuff from the specs.

@brandur
Copy link
Member

brandur commented Oct 18, 2016

@naaman Ah man, sorry for the late reply. My email etiquette's been terrible lately.

That said, anything glaring I'm missing from the list above? I think the one thing I forgot to mention was removing the DB transaction stuff from the specs.

I think you mostly got it. I just took a look through the templates folder and a few others jumped out at me:

  • models/ + associated spec folder.
  • migrations/.

I think that's it though.

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

No branches or pull requests

3 participants