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
Add RDF::Util::File::HurleyAdapter #180
Conversation
(I wouldn't suggest merging this yet, but I had a couple questions that may turn into PRs against hurley) |
@@ -209,7 +209,7 @@ | |||
it "sets arbitrary header" do | |||
WebMock.stub_request(:get, uri).to_return(body: "foo", headers: {"Foo" => "Bar"}) | |||
RDF::Util::File.open_file(uri) do |f| | |||
expect(f.headers).to include(:foo => %(Bar)) |
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.
Hurley::Header
does not the enumerable methods (#all?
, #any?
) that rspec needs to properly use the include
matcher. I suspect it's worth following up with them, perhaps, to try to get them in.
Why do you think this should go into core RDF.rb? It could be a different gem that could be included to get this functionality, which would seem a better approach to me. It's good to have some examples of extending RDF::Util::File, but I think we have enough to make it clear how to do more extensions. |
@gkellogg I agree, it probably doesn't belong in |
Yeah, that would be a good idea, if your up for it. We probably need to update the Ruby-rdf page on GitHub to better feature gems that it might not make sense to add to the linkeddata gem. |
I've extracted that shared context in: Do you think I should move the hurley adapter into a new module in the ruby-rdf organization, or just keep it in my personal space until we have good reason to move it? |
@cbeer If you think it generally useful, then creating a separate gem in ruby-rdf would make sense. Ultimately, we should use either the main page at ruby-rdf.github.io to describe the suite (not everything makes sense to include in the linkeddata gem). Of course, we can also reference gems hosted elsewhere. I presume we can close this PR? If so, please do so. |
Hurley is the upcoming successor to faraday (lostisland/faraday#454).