-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Separate entities into grape-entity #294
Comments
I've already tried the extraction once and it seemed to work quite well. I pretty much just pulled out the code and related specs. I am going to take a shot at this over the weekend. Once it is working I will add you as an admin to the new project so that you can transfer it to where it should really live. |
Okay, I've got them pulled out here: https://github.com/agileanimal/grape-entity with a working branch of grape here: https://github.com/agileanimal/grape/tree/extract-entities To finish things up we should agree on where the gem should live. Then I can update the documentation. @dblock I have added you to the repos so you can take ownership and move it if you'd like. I am also fine with maintaining this if you'd prefer. |
This is awesome. The gem can live with you and you should totally maintain it. I am happy to help as usual. I want to make some suggestions, will make PRs and we can discuss them there. Make a pull request for getting rid of entities inside Grape proper, please. |
Okay I am going to iterate on this a bit. I will push the entities gem up as a starting point and try and get something really usable by the end of the week. I think the first two goals should be improve the testability of entities and (as you noted) proper decoupling from Grape. I like simplicity of entities for small projects so I am a bit biased - I'd prefer to leave them as the default for Grape, with the option to exclude them and replace them with another option - but lets get things to the point where they are completely decoupled and then that decision can be made. |
Something has been bothering me since I wrote this. Hypermedia. I know Roar does this, but it doesn't fit in my world view of what an Entity does. If an Entity is a Facade on the model it shouldn't know about Hypermedia. Hypermedia feels like it fits in more with something like a formatter. Maybe even further from the model than that. I want the result of this to facilitate (but not require) hypermedia. |
…the work needed for ruby-grape#294
I've merged the PR with additional README and spec changes. We no longer require |
Entites in Grape are a specialized way of representing objects. There's nothing in them that's truly grape-specific, although there's a bit of integration with parameters and such. I suggest we split entites into a new gem, much like roar or rabl.
The text was updated successfully, but these errors were encountered: