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

Any interest in having this turned into an engine? #15

Open
knewter opened this issue Jan 27, 2012 · 11 comments
Open

Any interest in having this turned into an engine? #15

knewter opened this issue Jan 27, 2012 · 11 comments

Comments

@knewter
Copy link

knewter commented Jan 27, 2012

@mischa78 do you have any interest in having boxroom turned into an engine + a rails app that includes the engine? This would allow people to mount the app in their own rails apps easily. I have a fair bit of experience doing this. One of the first requirements along these lines would be to namespace everything.

I'm likely to use this project in the short term, and just hack together auth that works across it and my parent app, but if we end up using it in the project I'd have some interest in assisting to turn this into an engine (that hosted the boxroom app itself) and a demo app (that mounted boxroom engine, and would essentially serve the same purpose as this current repo).

Just curious if it interests you, and this seemed a decent place to ask. Thanks for your time.

-Josh Adams

@mischa78
Copy link
Owner

Hi Josh,

Thank you for your email. I would be interested in that very much. I don't have any experience with engines, but this seems like a good opportunity to learn. How do you suggest we proceed from here? Is there anything I can do?

Best,
Mischa Berger.

@knewter
Copy link
Author

knewter commented Jan 29, 2012

I think that a good move would be for you to create a new project called boxroom-engine. From there, you would use rails to create a new engine: rails plugin new boxroom-engine --mountable

That will create a base engine named boxroom-engine. It will include a 'dummy' rails app in test/dummy, and set that app up to include the engine. Any integration tests run against the dummy app. Rails 3 In Action by Ryan Bigg and Yehuda Katz has a really good section on building engines, for what it's worth.

Anyway, from there I would move all of the existing functionality over to the engine, as well as the tests. I don't mind assisting with any of these parts, for what it's worth.

So now you have an engine, but no replacement for this repo - that is, no rails app people can just download and run. For that, you can just do a basic basic rails app, and mount your engine in it. That's what would live at boxroom (or whatever other naming convention you want to follow). That way people that just want to download and play with something can use this repo like always, and people that want to embed it in another rails app can use boxroom-engine.

The only other remaining bit to deal with would be authentication. \cc @radar from forem (Ryan Bigg, whose book I mentioned earlier) has already apparently got a pretty good authentication setup going on in forem, and I need to learn how that auth system works anyway :) The point is, you would want it to be fairly trivial to tie the engine into your parent app's authentication system.

Did this start towards the explanation? I'm just hoping we can get on the same page and then make things happen. FWIW, forem also breaks out the theme into its own gem (the 'how it looks' part). This makes changing styles all that much easier, when you want to integrate it into your existing app.

Like I said, I have plenty of experience with this and will gladly help out - it will be especially easy if we get the project we were going to use this with, as I can justify doing it during business hours :) Once we agree on what you want to do, though, I'll gladly give plenty of assistance.

@radar
Copy link

radar commented Jan 30, 2012

Hi,

I agree with Josh above about creating an engine using the rails plugin new command. That's really the best way of generating one at the moment. There's a couple of neat caveats like this one that you'll need to be aware of. That one in particular allows you to use the normal get, post, put and delete methods in your engine's controller specs.

I'll be talking about this and more at SpreeConf in February, so I don't want to give away too much here.

Having an example application with the engine built-in to it is exactly what we do with Spree at the moment. I think that's also the best way to go about showing it off. You can also put a demo on Heroku, as people like going through that too.

As for authentication, I disagree with the way it's done in Spree, but that's outside of my control :P I would much prefer to allow people to have their own choice of authentication engines. What we do in Forem is we just have a Forem.user_class setting that people setup in an initializer. That's going to run before the engine's models are loaded, so that's super helpful for when we want to set up associations, like in the Post model. We've just recently disabled people from setting this as a class, as it causes an issue during development environment caused by the automatic re-loading of classes.

Anyway, if you have any questions I'm sure that we can assist you in this.

@pietere
Copy link

pietere commented Jan 30, 2013

We would for sure use it, if this was available as an engine

@mischa78
Copy link
Owner

Thanks for the interest in Boxroom and sorry for the late reply. I definitely haven't abandoned this idea, but I have no idea when I will actually get around to working on this.

@Texicitys
Copy link

Hello !

I'm going to fork the code of boxroom and adapt it to make a gem for easily managing files in rails applications.

I want to try to do a gem portable without gui.
I'll let you know.

@mischa78
Copy link
Owner

@Texicitys thanks. Looking forward to see what you come up with.

@Texicitys
Copy link

The repository is here : https://github.com/Texicitys/Repository-Manager

I was a little inspired from your migrations but I mad a new structure. I'll start from zero.

Cheers.

@mischa78
Copy link
Owner

OK, good luck!

@Texicitys
Copy link

The gem RepositoryManager is not finished, but it actualy works : https://github.com/collaide/repository-manager

I didn't take the code of Boxroom. I mad my own table structure for being the more complete and flexible possible.

@sergey-koba-mobidev
Copy link

I've turned Boxroom into an engine.
https://github.com/sergey-koba-mobidev/boxroom-engine

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

No branches or pull requests

6 participants