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

WIP: Move to dry-rb and remove Virtus #98

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

forest
Copy link
Contributor

@forest forest commented Mar 13, 2017

This is an exploration of moving away from Virtus. The http://dry-rb.org/ project is a collection of gems that in combination do much of what Virtus does. There are the next generation of Virtus with more general use cases considered and supported.

* Need to symbolize keys to make Dry::Struct happy.
* origin/master:
  Specifying sub-tree for 'comments' is not supported #97
  Add attribute context to notification resource #95
@@ -285,4 +285,15 @@ def next_page_params
end
end
end

require 'faraday_middleware/response_middleware'
class ParseJsonWithSymbols < FaradayMiddleware::ResponseMiddleware
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dry::Struct expects keys to be symbols when creating the Dry::Struct based class from a hash (e.g. parsed JSON).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 96.349% when pulling ce19e1e on move-to-dry-rb into 032c0cf on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 96.349% when pulling ce19e1e on move-to-dry-rb into 032c0cf on master.

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.

2 participants