Ashikawa Core is a Wrapper around the ArangoDB Rest API. It provides low level access and will be used in different ArangoDB ODMs.
How to use it
For a detailed description of Ashikawa::Core please refer to the documentation. An example:
database = Ashikawa::Core::Database.new "http://localhost:8529" database["my_collection"] # => Returns the collection my_collection – creates it, if it doesn't exist database["my_collection"].name = "new_name" database["new_name"].delete
How to get started developing
Getting started is easy, just follow these steps.
In a nutshell
- Clone the project.
cdinto the folder and run
rakeand see all tests passing (you need to have ArangoDB installed for that)
- Happy coding!
Make sure you are running Ruby 1.9.x (or JRuby/Rubinius in 1.9 mode) and clone the latest snapshot into a directory of your choice. Also make sure ArangoDB is installed and accessible via
arangod (for example by installing it via
brew install arangodb).
We encourage you to use rvm. If you do so, a gemset for the project is created upon changing into the directory. If you do not use
rvm nothing special will happen in this case. Don't worry about it.
Change into the project directory. Run
bundle to get all dependencies (do a
gem install bundler before if you don't have bundler installed).
Now you can run
rake to see all tests passing (hopefully). Happy coding!
You can also start up yard for documentation:
Guard is a tool for comfortable development. If you want to use it for development, you have to first start an instance of ArangoDB and then start guard with
guard. This will:
- Run a documentation server on
bundlewhenever you change the dependencies
- Run the integration and unit tests whenever you change a file in the lib or spec directory
Our tests are run on Travis CI, the build status is displayed above. Please note that it only runs the unit tests and not the integration tests, because that would require ArangoDB to be installed on the Travis CI boxes. Therefore green doesn't neccessarily mean green (which is unfortunate).
When you want to write code for the project, please follow these guidelines:
- Claim the ticket: Tell us that you want to work on a certain ticket, we will assign it to you (We don't want two people to work on the same thing ;) )
- Write an Integration Test: Describe what you want to do (our integration tests touch the database)
- Implement it: Write a unit test, check that it fails, make the test pass – repeat (our unit tests don't touch the database)
- Write Documentation for it.
- Check with
rakethat everything is fine and send the Pull Request :)