A multi-layer REST API Ruby wrapper for the Neo4j graph database built on top of Faraday.
Oracle: Our time is up. Listen to me, Neo.
You can save Zion if you reach The Source,
but to do that you will need the Keymaker.
Neo: The Keymaker?
Install and start the Neo4j server:
rake neo4j:install
rake neo4j:start
# optionally for testing
rake neo4j:install RAILS_ENV=test
rake neo4j:start RAILS_ENV=test
Add this line to your application's Gemfile:
gem 'keymaker'
And then execute:
$ bundle
Create a config/neo4j.yml
file:
development:
server: localhost
port: 7474
test:
server: localhost
port: 7475
Then, create a Rails initializer config/initializers/keymaker.rb
:
if Rails.env.development? || Rails.env.test?
database_config = YAML::load_file('config/neo4j.yml')
Keymaker.configure do |c|
c.server = database_config["#{Rails.env}"]['server']
c.port = database_config["#{Rails.env}"]['port']
end
else
# Heroku neo4j add-on
Keymaker.configure do |c|
c.server = ENV['NEO4J_HOST']
c.port = ENV['NEO4J_PORT']
c.username = ENV['NEO4J_LOGIN']
c.password = ENV['NEO4J_PASSWORD']
end
end
Keymaker.configure do |c|
c.server = "localhost"
c.port = 7474
end
## Create a node ##
response = Keymaker.service.create_node_request({:name => 'John Connor', :catch_phrase => 'No problemo'})
## Update node properties ##
## Delete a node ##
## Create a relationship ##
## Update relationship properties ##
## Delete a relationship ##
Coming soon
Coming soon
Coming soon
Coming soon
- Fork it
- Create a feature branch (
git checkout -b my_new_feature
) - Write passing tests!
- Commit your changes (
git commit -v
) - Push to the branch (
git push origin my_new_feature
) - Create new Pull Request
- Test coverage
- Contributing documentation (installing neo4j, etc).
- Documentation
- Avdi Grimm
- Micah Cooper
- Stephen Caudill
- Travis Anderson
Copyright (c) 2012 Rogelio J. Samour See LICENSE for details.