Skip to content

Commit

Permalink
Merge from http://github.com/ept/neo4j/commits/restful, Thanks Martin…
Browse files Browse the repository at this point in the history
… 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
andreas committed Jun 17, 2009
2 parents 5ad8181 + 9bc7cb8 commit 24c6faf
Show file tree
Hide file tree
Showing 21 changed files with 5,251 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -4,3 +4,7 @@ nbproject
# ignore generated database
var

# ignore files generated by 'rake gem:install'
pkg
tmp
neo4j.gemspec
3 changes: 2 additions & 1 deletion Rakefile
Expand Up @@ -93,7 +93,8 @@ spec = Gem::Specification.new do |s|
s.rdoc_options = ["--quiet", "--title", "Neo4j.rb", "--opname", "index.html", "--line-numbers", "--main", "README.rdoc", "--inline-source"]

s.required_ruby_version = ">= 1.8.4"


s.add_dependency("json_pure", ">=1.1.4")
end

Rake::GemPackageTask.new(spec) do |pkg|
Expand Down
4 changes: 4 additions & 0 deletions examples/admin/Rakefile
@@ -0,0 +1,4 @@
task :default => :spec
task :spec do
system("spec --options spec/spec.opts spec/*_spec.rb") || raise
end
28 changes: 28 additions & 0 deletions examples/admin/admin.rb
@@ -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

0 comments on commit 24c6faf

Please sign in to comment.