Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from http://github.com/ept/neo4j/commits/restful, Thanks Martin…
… Kleppmann. Moved the rest.rb to the extension folder and made it listen for neo4j.stop and start events. TODO: add an UUID generator extensions that listen for create node events and sets the :uuid property. Use this UUID in the rest extension instead of neo_node_id [#26]
- Loading branch information
Showing
21 changed files
with
5,251 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ nbproject | |
# ignore generated database | ||
var | ||
|
||
# ignore files generated by 'rake gem:install' | ||
pkg | ||
tmp | ||
neo4j.gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
task :default => :spec | ||
task :spec do | ||
system("spec --options spec/spec.opts spec/*_spec.rb") || raise | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../../lib") | ||
require 'neo4j' | ||
require 'rubygems' | ||
require 'sinatra/base' | ||
#require 'sinatra' | ||
|
||
Sinatra::Application.set(:public, File.dirname(__FILE__) + "/public") | ||
|
||
Sinatra::Application.get('/') do | ||
erb :index | ||
end | ||
|
||
Sinatra::Application.post('/echo') do | ||
puts request.body | ||
request.body | ||
end | ||
Sinatra::Application.post('/jquery.js') do | ||
puts request.body | ||
request.body | ||
end | ||
|
||
Sinatra::Application.get('/echo') do | ||
puts request.body | ||
'pong get' | ||
end | ||
puts "HOST " + Sinatra::Application.host | ||
Sinatra::Application.run! :port => 9123 | ||
#Neo4j.start_rest |
Oops, something went wrong.