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

Refactor Endpoint Discovery #16

Merged
merged 7 commits into from Aug 17, 2018
Merged

Refactor Endpoint Discovery #16

merged 7 commits into from Aug 17, 2018

Conversation

jgarber623
Copy link
Member

This PR addresses issue #14. This work is an incremental step toward removing endpoint discovery code from this gem in favor of relying on webmention-endpoint-ruby.

These changes implement a version of the Webmention::Endpoint module and Webmention::Endpoint::Discover that's very similar to that in the webmention-endpoint-ruby gem but that uses existing code from webmention-client-ruby.

The point here being to mimic the API before adding the webmention-endpoint-ruby gem and removing code, specs, etc. from webmention-client-ruby. Basically, this PR is a stop along the path toward fully implementing #14.

@jgarber623 jgarber623 added this to the v1.0.0 milestone Jul 6, 2018
@jgarber623 jgarber623 self-assigned this Jul 6, 2018
@jgarber623 jgarber623 requested a review from aaronpk July 6, 2018 18:18
# Keeping for convenience of test suite passage
def discover_webmention_endpoint_from_html(html)
Discover.endpoint_from_body(html) || false
end
Copy link
Member Author

Choose a reason for hiding this comment

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

These two discover_* methods are heavily integrated into the test suite, so I've left them as class methods. Ultimately, the tests cover functionality that will be provided by the webmention-endpoint-ruby gem and will be removed.

end
end
end
end
Copy link
Member Author

Choose a reason for hiding this comment

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

This class is very similar to the one in webmention-endpoint-ruby.

end
end

end
Copy link
Member Author

Choose a reason for hiding this comment

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

This file was moved to endpoint_test.rb to better reflect the module it tests.

@jgarber623 jgarber623 merged commit a2daf8e into indieweb:master Aug 17, 2018
@jgarber623 jgarber623 deleted the refactor-endpoint-discovery branch August 17, 2018 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant