-
Notifications
You must be signed in to change notification settings - Fork 10
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
[WEBSITE-899][WEBSITE-946][WEBSITE-950] Extract components to separate gems. #63
Changes from 1 commit
b8a1951
3c9e889
f8a0ed8
513a0de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
module Parliament | ||
module Builder | ||
# API response builder, allowing the user to return the body of an HTTPResponse. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be 'Base response builder'? It's not technically API specific |
||
# @since 0.7.5 | ||
class BaseResponseBuilder | ||
def initialize(response) | ||
# Creates a new BaseReponseBuilder. | ||
# @param [HTTPResponse] response an HTTP response containing n-triple data. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it need to contain ntriple data? |
||
# @param [Module] decorators the decorator modules to provide alias methods to the resulting objects. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be more like: 'A namespace which contains modules used to decorate the objects we receive'? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Infact, is this even needed? Our base response doesn't actually use the decorators? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seeing the code below perhaps we need to mention why it's not used and that it is for API completeness? |
||
def initialize(response:, decorators: nil) | ||
@response = response | ||
@decorators = decorators | ||
end | ||
|
||
# Builds a Parliament::Response::BaseResponse. | ||
# | ||
# @return [Parliament::Response::Base::Response] a Parliament::Response::BaseResponse containing the HTTPResponse. | ||
def build | ||
@response | ||
Parliament::Response::BaseResponse.new(@response) | ||
end | ||
end | ||
end | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
If these are being used for testing we will need to either add them as development dependencies or look at how they are needed within the app.
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 is also breaking tests