-
Notifications
You must be signed in to change notification settings - Fork 124
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
Create http_request resource #180
Create http_request resource #180
Conversation
3dc08a5
to
9f03fda
Compare
I apologize for many fixes. |
@@ -70,6 +70,16 @@ | |||
it { should_not be_file } | |||
end | |||
|
|||
describe file('/tmp/http_request.html') do | |||
it { should be_file } | |||
its(:content) { should match(/Itamae/) } |
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.
This looks assuming http://itamae.kitchen
always return a body including Itamae
but it can change.
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.
How about https://httpbin.org/get?from=itamae ?
That's great! |
Thank you for the fix. Would you rebase the commits? |
ead3afa
to
41776e3
Compare
Thank you for reviewing. |
define_attribute :url, type: String | ||
|
||
def pre_action | ||
unless attributes.url |
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.
define_attribute
accepts required
option.
define_attribute :url, type: String, required: true
Instead of L13-L15, please use this.
Thank you for reviewing. |
Create http_request resource for itamae.
This inherits file resource.
A example is shown in below.