-
Notifications
You must be signed in to change notification settings - Fork 35
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
support #to_h and #to_hash on the Hyperclient::Resource #104
base: master
Are you sure you want to change the base?
Conversation
Update from codegram/hyperclient
…ash and Hyperclient::Collection#to_h tests; bugfix Hyperclient::Resource#to_h
lib/hyperclient/resource.rb
Outdated
[:_attributes, :_embedded, :_links].each do |target| | ||
target = send(target) | ||
puts target.inspect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stray puts
Fix tests, add to CHANGELOG, squash commits please. |
We might need to drop some old(er) rubies to get a build going and possibly lock some gems. Let us know if you can't do it part of this PR, I can take a look at some point. |
@dblock not sure why - this was a straight branch from master here. ruby-1.9.3p551 https://travis-ci.org/codegram/hyperclient/jobs/153170104
Features are failing, not sure why (again, this was a straight branch from here): |
As I said, we're bringing newer dependencies in (gems don't check in a Gemfile.lock), and some things no longer work. |
I've fixed the build in #105, you can rebase. |
This version is no longer tested with Ruby < 2.2. * [#104](https://github.com/codegram/hyperclient/pull/104): fix #to_h and #to_hash on Hyperclient::Resource - [@jufemaiz](https://github.com/jufemaiz) ### 0.9.0 (January 10, 2018) ### 0.8.6 (August 27, 2017) ### 0.8.5 (July 5, 2017) ### 0.8.4 (May 16, 2017) ### 0.8.3 (March 30, 2017) ### 0.8.2 (December 31, 2016) #### This version is no longer tested with Ruby < 2.2. ### 0.8.1 (March 15, 2016) ### 0.7.2 (August 23, 2015) ### 0.7.1 (August 15, 2015) ### 0.7.0 (February 23, 2015) #### This version introduces several backwards incompatible changes. See [UPGRADING](UPGRADING.md) for details. ### 0.6.1 (October 17, 2014) ### 0.5.0 (October 1, 2014) ### 0.4.0 (May 5, 2014) ### 0.3.2 (December 20, 2013) ### 0.3.1 (April 3, 2013) ### 0.3.0 (February 3, 2013) Generated by 🚫 Danger |
Danger and build still not happy. See above. |
@dblock the problem is the delegation to the children directly as per https://github.com/codegram/hyperclient/blob/master/features/steps/api_navigation.rb#L45-L46 + https://github.com/codegram/hyperclient/blob/master/features/steps/api_navigation.rb#L51 I can't find the approach used to go from the Hyperclient::Resource directly to the embedded elements "posts". It's got something to do with the outcome of the method_missing (https://github.com/codegram/hyperclient/blob/master/lib/hyperclient/resource.rb#L84-L94) function returning nil. |
Can't you just implement |
Bump @jufemaiz |
#103