Skip to content

Commit

Permalink
Renamed #createEntityHashingEncodedResource to #createEntityTagHashin…
Browse files Browse the repository at this point in the history
…gEncodedResource
  • Loading branch information
fortizpenaloza committed Oct 7, 2019
1 parent daac54f commit ca3e881
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ PetOrdersRESTfulController >> initializeCommentsRequestHandler [
whenAccepting: ZnMimeType textPlain decodeApplying: [ :comment | comment ];
whenResponding: ZnMimeType textPlain
encodeApplying: [ :resource | self encodeComments: resource ];
createEntityHashingEncodedResource;
createEntityTagHashingEncodedResource;
build
]

Expand Down
18 changes: 9 additions & 9 deletions source/Stargate-Model/RESTfulRequestHandlerBuilder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,26 @@ RESTfulRequestHandlerBuilder >> build [
]

{ #category : #configuring }
RESTfulRequestHandlerBuilder >> createEntityHashingEncodedResource [
RESTfulRequestHandlerBuilder >> createEntityTagHashing: aBlockClosure [

self
createEntityTagWith: [ :resource :mediaType :requestContext :requestHandler |
EntityTagHasher new
include: ( requestHandler encodeResource: resource to: mediaType within: requestContext );
| hasher |
hasher := EntityTagHasher new.
aBlockClosure cull: hasher cull: resource cull: requestContext.
hasher
include: mediaType;
calculateHash
]
]

{ #category : #configuring }
RESTfulRequestHandlerBuilder >> createEntityTagHashing: aBlockClosure [
RESTfulRequestHandlerBuilder >> createEntityTagHashingEncodedResource [

self
createEntityTagWith: [ :resource :mediaType :requestContext :requestHandler |
| hasher |
hasher := EntityTagHasher new.
aBlockClosure cull: hasher cull: resource cull: requestContext.
hasher
include: mediaType;
EntityTagHasher new
include: ( requestHandler encodeResource: resource to: mediaType within: requestContext );
calculateHash
]
]
Expand Down

0 comments on commit ca3e881

Please sign in to comment.