Skip to content

Commit

Permalink
add module mixin WasCreated to response.parsed_response when an opera…
Browse files Browse the repository at this point in the history
…tion creates a new entity
  • Loading branch information
Dan Janowski committed Mar 15, 2013
2 parents c8553c0 + 845df3e commit 414674a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
TAGS
*.rbc
Gemfile.lock
.idea
*.iml
Expand Down
6 changes: 5 additions & 1 deletion lib/neography/connection.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module Neography
module WasCreated
end
class Connection

USER_AGENT = "Neography/#{Neography::VERSION}"
Expand Down Expand Up @@ -94,7 +96,9 @@ def evaluate_response(response)
response.parsed_response
when 201
@logger.debug "OK, created #{body}" if @log_enabled
response.parsed_response
r=response.parsed_response
r.extend(WasCreated)
r
when 204
@logger.debug "OK, no content returned" if @log_enabled
nil
Expand Down
2 changes: 1 addition & 1 deletion lib/neography/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Neography
VERSION = "1.0.8"
VERSION = "1.0.9"
end

0 comments on commit 414674a

Please sign in to comment.