ashikawa-core 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +3 -3
- data/CHANGELOG.md +49 -0
- data/Gemfile +3 -2
- data/Gemfile.devtools +14 -22
- data/Guardfile +3 -2
- data/README.md +37 -6
- data/Rakefile +2 -1
- data/ashikawa-core.gemspec +2 -2
- data/cache/Mac_applications +1 -0
- data/config/devtools.yml +5 -0
- data/config/flay.yml +1 -1
- data/config/flog.yml +1 -2
- data/config/reek.yml +1 -1
- data/config/rubocop.yml +23 -25
- data/lib/ashikawa-core.rb +6 -5
- data/lib/ashikawa-core/collection.rb +142 -165
- data/lib/ashikawa-core/configuration.rb +41 -2
- data/lib/ashikawa-core/connection.rb +17 -16
- data/lib/ashikawa-core/cursor.rb +18 -12
- data/lib/ashikawa-core/database.rb +69 -59
- data/lib/ashikawa-core/document.rb +22 -20
- data/lib/ashikawa-core/edge.rb +8 -6
- data/lib/ashikawa-core/exceptions/client_error.rb +1 -0
- data/lib/ashikawa-core/exceptions/client_error/authentication_failed.rb +25 -0
- data/lib/ashikawa-core/exceptions/client_error/bad_syntax.rb +3 -2
- data/lib/ashikawa-core/exceptions/client_error/resource_not_found.rb +3 -2
- data/lib/ashikawa-core/exceptions/client_error/resource_not_found/collection_not_found.rb +3 -2
- data/lib/ashikawa-core/exceptions/client_error/resource_not_found/document_not_found.rb +3 -2
- data/lib/ashikawa-core/exceptions/client_error/resource_not_found/index_not_found.rb +3 -2
- data/lib/ashikawa-core/exceptions/no_collection_provided.rb +1 -0
- data/lib/ashikawa-core/exceptions/server_error.rb +1 -0
- data/lib/ashikawa-core/exceptions/server_error/json_error.rb +3 -2
- data/lib/ashikawa-core/figure.rb +18 -17
- data/lib/ashikawa-core/index.rb +15 -5
- data/lib/ashikawa-core/key_options.rb +5 -4
- data/lib/ashikawa-core/query.rb +38 -27
- data/lib/ashikawa-core/request_preprocessor.rb +4 -3
- data/lib/ashikawa-core/response_preprocessor.rb +64 -24
- data/lib/ashikawa-core/status.rb +1 -0
- data/lib/ashikawa-core/transaction.rb +12 -11
- data/lib/ashikawa-core/version.rb +2 -1
- data/spec/acceptance/basic_spec.rb +117 -116
- data/spec/acceptance/index_spec.rb +18 -15
- data/spec/acceptance/query_spec.rb +61 -64
- data/spec/acceptance/spec_helper.rb +26 -3
- data/spec/acceptance/transactions_spec.rb +12 -16
- data/spec/setup/arangodb.sh +2 -2
- data/spec/unit/collection_spec.rb +224 -242
- data/spec/unit/configuration_spec.rb +64 -0
- data/spec/unit/connection_spec.rb +121 -111
- data/spec/unit/cursor_spec.rb +78 -65
- data/spec/unit/database_spec.rb +112 -163
- data/spec/unit/document_spec.rb +74 -70
- data/spec/unit/edge_spec.rb +45 -33
- data/spec/unit/exception_spec.rb +28 -38
- data/spec/unit/figure_spec.rb +44 -47
- data/spec/unit/index_spec.rb +27 -24
- data/spec/unit/key_options_spec.rb +19 -17
- data/spec/unit/query_spec.rb +186 -135
- data/spec/unit/spec_helper.rb +14 -3
- data/spec/unit/status_spec.rb +37 -37
- data/spec/unit/transaction_spec.rb +71 -74
- data/tasks/adjustments.rake +10 -34
- metadata +11 -13
- data/spec/acceptance/arango_helper.rb +0 -27
- data/spec/acceptance_auth/arango_helper.rb +0 -30
- data/spec/acceptance_auth/auth_spec.rb +0 -40
- data/spec/acceptance_auth/spec_helper.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a85f6915e0b414287dc3307d02e085f84bfc82
|
4
|
+
data.tar.gz: e3c79577a4ac4d4a2ed35f7b9af0ad8c3a67e2d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa06b6fd63584f04f87695bf84a9821fd34f7773dfad1321b0f4feaa84aadf97343dc9b789c49a6673ecbf26595eeec2ebfee801fe822606876d53e7fec96ad2
|
7
|
+
data.tar.gz: f37af4b66535e42206d44b7c2897e87a3579f8da027ba1defb450d85173279f79f88d21222e0c3c7a650151e5966d3eaad868d92300174e4935e3b24e0faa59d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.0.0-
|
1
|
+
ruby-2.0.0-p247
|
data/.travis.yml
CHANGED
@@ -2,17 +2,17 @@ language: ruby
|
|
2
2
|
before_script:
|
3
3
|
- ./spec/setup/arangodb.sh
|
4
4
|
rvm:
|
5
|
-
- 1.9.2
|
6
5
|
- 1.9.3
|
7
6
|
- 2.0.0
|
8
7
|
- jruby-19mode
|
9
8
|
- jruby-head
|
10
9
|
- rbx-19mode
|
11
10
|
- ruby-head
|
11
|
+
env:
|
12
|
+
- ARANGODB_DISABLE_AUTHENTIFICATION=true VERSION=1.4.devel
|
13
|
+
- ARANGODB_DISABLE_AUTHENTIFICATION=false VERSION=1.4.devel
|
12
14
|
matrix:
|
13
15
|
allow_failures:
|
14
16
|
- rvm: ruby-head
|
15
17
|
- rvm: jruby-head
|
16
18
|
script: "bundle exec rake ci"
|
17
|
-
notifications:
|
18
|
-
webhooks: https://www.buildheroes.com/api/projects/0f136ecd2207606cfacf9a968fe9fd0819398b63/builds
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Version 0.9
|
2
|
+
|
3
|
+
**Codename: Weramur**
|
4
|
+
|
5
|
+
* Support for ArangoDB 1.4
|
6
|
+
* Dropping support for Ruby 1.9.2
|
7
|
+
* Additions:
|
8
|
+
* Support for multiple databases
|
9
|
+
* Create unique indexes
|
10
|
+
* Performance Improvements:
|
11
|
+
* Document creation is faster now
|
12
|
+
* Deprecations:
|
13
|
+
* `Database#authenticate_with`: Use the initializer block instead
|
14
|
+
* Methods deprecated in 0.8 were removed
|
15
|
+
* Bug Fixes:
|
16
|
+
* Getting single attributes via an AQL query works now
|
17
|
+
* Continuous Integration
|
18
|
+
* All specs now also run on a ArangoDB with authentication activated
|
19
|
+
* A lot of refactoring, more enforced coding guidelines
|
20
|
+
* Especially the Specs were heavily refactored
|
21
|
+
* Specs are now in the new RSpec Syntax
|
22
|
+
|
23
|
+
*Codename in honor of Saor Patrol.*
|
24
|
+
|
25
|
+
# Version 0.8
|
26
|
+
|
27
|
+
[Release on Github](https://github.com/triAGENS/ashikawa-core/releases/tag/v0.8.0)
|
28
|
+
|
29
|
+
**Codename: Timer Koala Sing**
|
30
|
+
|
31
|
+
* Support for ArangoDB 1.3
|
32
|
+
* Dropping support for Ruby 1.8.7
|
33
|
+
* API changes:
|
34
|
+
* `Database#collections` no longer returns system collections, use `Database#system_collections` for that
|
35
|
+
* Renamed `Collection#[]` to `Collection#fetch` and introducing a new `Collection#[]` method
|
36
|
+
* Additions:
|
37
|
+
* Support for Auto Increment
|
38
|
+
* Deprecations:
|
39
|
+
* `Collection#<<` (use `Collection#create_document` instead)
|
40
|
+
* `Collection#[]=` (use `Collection#replace` instead)
|
41
|
+
* `Document#to_hash` (use `Collection#hash` instead)
|
42
|
+
* Improvements:
|
43
|
+
* Introduction of Equality methods and better `inspect` methods via Equalizer
|
44
|
+
* Improved error handling for Arango errors
|
45
|
+
* MultiJSON was removed
|
46
|
+
* Support for Transactions
|
47
|
+
* Various Bug Fixes, Dependency Updates and Refactorings
|
48
|
+
|
49
|
+
*Codename in honor of Federico Viticci, President of Special Business.*
|
data/Gemfile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
source 'https://rubygems.org'
|
2
3
|
|
3
4
|
# Specify your gem's dependencies in ashikawa-core.gemspec
|
4
5
|
gemspec
|
5
6
|
|
6
|
-
gem 'devtools', :
|
7
|
+
gem 'devtools', git: 'https://github.com/rom-rb/devtools.git'
|
7
8
|
|
8
|
-
|
9
|
+
eval_gemfile 'Gemfile.devtools'
|
data/Gemfile.devtools
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
group :development do
|
4
4
|
gem 'rake', '~> 10.1.0'
|
5
5
|
gem 'rspec', '~> 2.14.1'
|
6
|
-
gem 'yard', '~> 0.8.
|
6
|
+
gem 'yard', '~> 0.8.7'
|
7
7
|
end
|
8
8
|
|
9
9
|
group :yard do
|
10
|
-
gem 'kramdown', '~> 1.
|
10
|
+
gem 'kramdown', '~> 1.2.0'
|
11
11
|
end
|
12
12
|
|
13
13
|
group :guard do
|
@@ -18,38 +18,30 @@ group :guard do
|
|
18
18
|
gem 'guard-mutant', '~> 0.0.1'
|
19
19
|
|
20
20
|
# file system change event handling
|
21
|
-
gem 'listen', '~> 1.
|
22
|
-
gem 'rb-fchange', '~> 0.0.6', :
|
23
|
-
gem 'rb-fsevent', '~> 0.9.3', :
|
24
|
-
gem 'rb-inotify', '~> 0.9.0', :
|
21
|
+
gem 'listen', '~> 1.3.0'
|
22
|
+
gem 'rb-fchange', '~> 0.0.6', require: false
|
23
|
+
gem 'rb-fsevent', '~> 0.9.3', require: false
|
24
|
+
gem 'rb-inotify', '~> 0.9.0', require: false
|
25
25
|
|
26
26
|
# notification handling
|
27
|
-
gem 'libnotify', '~> 0.8.0', :
|
28
|
-
gem 'rb-notifu', '~> 0.0.4', :
|
29
|
-
gem 'terminal-notifier-guard', '~> 1.5.3', :
|
27
|
+
gem 'libnotify', '~> 0.8.0', require: false
|
28
|
+
gem 'rb-notifu', '~> 0.0.4', require: false
|
29
|
+
gem 'terminal-notifier-guard', '~> 1.5.3', require: false
|
30
30
|
end
|
31
31
|
|
32
32
|
group :metrics do
|
33
33
|
gem 'coveralls', '~> 0.6.7'
|
34
|
-
gem 'flay', '~> 2.
|
34
|
+
gem 'flay', '~> 2.4.0'
|
35
35
|
gem 'flog', '~> 4.1.1'
|
36
|
-
gem 'reek', '~> 1.3.
|
37
|
-
gem 'rubocop', '~> 0.
|
36
|
+
gem 'reek', '~> 1.3.2'
|
37
|
+
gem 'rubocop', '~> 0.13.0'
|
38
38
|
gem 'simplecov', '~> 0.7.1'
|
39
|
-
gem 'yardstick', '~> 0.9.
|
39
|
+
gem 'yardstick', '~> 0.9.7', git: 'https://github.com/dkubb/yardstick.git'
|
40
40
|
|
41
41
|
platforms :ruby_19, :ruby_20 do
|
42
|
-
gem 'mutant',
|
42
|
+
gem 'mutant', git: 'https://github.com/mbj/mutant.git'
|
43
43
|
gem 'yard-spellcheck', '~> 0.1.5'
|
44
44
|
end
|
45
|
-
|
46
|
-
platforms :ruby_19 do
|
47
|
-
gem 'json', '~> 1.8.0'
|
48
|
-
end
|
49
|
-
|
50
|
-
platforms :rbx do
|
51
|
-
gem 'pelusa', '~> 0.2.2'
|
52
|
-
end
|
53
45
|
end
|
54
46
|
|
55
47
|
group :benchmarks do
|
data/Guardfile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
guard 'bundler' do
|
2
3
|
watch(/^.+\.gemspec/)
|
3
4
|
end
|
4
5
|
|
5
|
-
guard 'rspec', :
|
6
|
-
watch(
|
6
|
+
guard 'rspec', spec_paths: 'spec/unit' do
|
7
|
+
watch('spec/.+\.rb')
|
7
8
|
watch(%r{lib/ashikawa-core/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
8
9
|
end
|
data/README.md
CHANGED
@@ -1,18 +1,39 @@
|
|
1
|
-
# Ashikawa Core
|
1
|
+
# Ashikawa Core
|
2
2
|
|
3
|
-
Ashikawa
|
3
|
+
| Project | Ashikawa::Core
|
4
|
+
|:----------------|:--------------------------------------------------
|
5
|
+
| Homepage | http://triagens.github.io/ashikawa-core/
|
6
|
+
| Documentation | http://www.rubydoc.info/github/triAGENS/ashikawa-core
|
7
|
+
| CI | [![Build Status](https://secure.travis-ci.org/triAGENS/ashikawa-core.png?branch=master)](http://travis-ci.org/triAGENS/ashikawa-core)
|
8
|
+
| Code Metrics | [![Code Climate](https://codeclimate.com/github/triAGENS/ashikawa-core.png)](https://codeclimate.com/github/triAGENS/ashikawa-core) [![Coverage Status](https://coveralls.io/repos/triAGENS/ashikawa-core/badge.png?branch=coverall)](https://coveralls.io/r/triAGENS/ashikawa-core)
|
9
|
+
| Gem Version | [![Gem Version](https://badge.fury.io/rb/ashikawa-core.png)](http://badge.fury.io/rb/ashikawa-core)
|
10
|
+
| Dependencies | [![Dependency Status](https://gemnasium.com/triAGENS/ashikawa-core.png)](https://gemnasium.com/triAGENS/ashikawa-core)
|
11
|
+
|
12
|
+
Ashikawa Core is a Wrapper around the ArangoDB Rest API. It provides low level access and is intended to be used in ArangoDB ODMs and other projects related to the database. It is always working with the stable version of ArangoDB, this is currently version **1.4**. If you want to access an ArangoDB instance running version **1.3** to version [0.8](https://github.com/triAGENS/ashikawa-core/tree/0.8) of this gem (or just update :wink:).
|
4
13
|
|
5
14
|
All tests run on Travis CI for the following versions of Ruby:
|
6
15
|
|
7
|
-
* MRI 1.9.
|
16
|
+
* MRI 1.9.3 and 2.0.0
|
8
17
|
* Rubinius 1.9 mode
|
9
18
|
* JRuby 1.9 mode
|
10
19
|
|
11
20
|
We also run on JRuby and MRI Head, but they are allowed failures (Please see [Travis](http://travis-ci.org/triAGENS/ashikawa-core) for their build status).
|
12
21
|
|
13
|
-
Please note that the [`master`](https://github.com/triAGENS/ashikawa-core) branch is always the stable version released on Ruby Gems and documented on RDoc. If you want the most recent version, please refer to the [`development`](https://github.com/triAGENS/ashikawa-core/tree/development) branch.
|
22
|
+
Please note that the [`master`](https://github.com/triAGENS/ashikawa-core) branch is always the stable version released on Ruby Gems and documented on [RDoc](http://www.rubydoc.info/github/triAGENS/ashikawa-core). If you want the most recent version, please refer to the [`development`](https://github.com/triAGENS/ashikawa-core/tree/development) branch.
|
23
|
+
|
24
|
+
## How to install it?
|
25
|
+
|
26
|
+
```shell
|
27
|
+
gem install ashikawa-core
|
28
|
+
```
|
29
|
+
|
30
|
+
or, when using bundler:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
gem "ashikawa-core", "~> 0.9"
|
34
|
+
```
|
14
35
|
|
15
|
-
## How to Setup a Connection
|
36
|
+
## How to Setup a Connection?
|
16
37
|
|
17
38
|
We want to provide you with as much flexibility as possible. So you can choose which adapter to use for HTTP (choose from the adapters available for [Faraday](https://github.com/lostisland/faraday)) and what you want to use for logging (basically anything that has an `info` method that takes a String). It defaults to Net::HTTP and no logging:
|
18
39
|
|
@@ -22,6 +43,16 @@ database = Ashikawa::Core::Database.new do |config|
|
|
22
43
|
end
|
23
44
|
```
|
24
45
|
|
46
|
+
If you want to access the `my_db` database of your ArangoDB instance (and not the `_system` database) and connect as a certain user, do the following:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
database = Ashikawa::Core::Database.new do |config|
|
50
|
+
config.url = "http://localhost:8529/_db/my_db"
|
51
|
+
config.user = "lebowski"
|
52
|
+
config.password = "i<3bowling"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
25
56
|
But you could for example use Typhoeus for HTTP and yell for logging:
|
26
57
|
|
27
58
|
```ruby
|
@@ -47,7 +78,7 @@ database["new_name"].delete
|
|
47
78
|
|
48
79
|
# Issues or Questions
|
49
80
|
|
50
|
-
If you find a bug in this gem, please report it on [our tracker](https://github.com/triAGENS/ashikawa-core/issues). If you have a question, just contact us via the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ashikawa) – we are happy to help you :
|
81
|
+
If you find a bug in this gem, please report it on [our tracker](https://github.com/triAGENS/ashikawa-core/issues). If you have a question, just contact us via the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/ashikawa) – we are happy to help you :smile:
|
51
82
|
|
52
83
|
# Contributing
|
53
84
|
|
data/Rakefile
CHANGED
data/ashikawa-core.gemspec
CHANGED
@@ -9,11 +9,11 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.email = ["me@moonglum.net"]
|
10
10
|
gem.homepage = "http://triagens.github.com/ashikawa-core"
|
11
11
|
gem.summary = "Ashikawa Core is a wrapper around the ArangoDB REST API"
|
12
|
-
gem.description = "Ashikawa Core is a wrapper around the ArangoDB REST API. It provides low level access and
|
12
|
+
gem.description = "Ashikawa Core is a wrapper around the ArangoDB REST API. It provides low level access and is intended to be used in ArangoDB ODMs and other tools."
|
13
13
|
gem.license = "Apache License 2.0"
|
14
14
|
|
15
15
|
gem.required_ruby_version = '>= 1.9.2'
|
16
|
-
gem.requirements << "ArangoDB, v1.
|
16
|
+
gem.requirements << "ArangoDB, v1.4"
|
17
17
|
|
18
18
|
gem.rubyforge_project = "ashikawa-core"
|
19
19
|
|
@@ -0,0 +1 @@
|
|
1
|
+
_mac_apps=( '/Applications/Safari.app' '/Applications/Mail.app' '/Applications/Byword.app' '/Applications/iTunes.app' '/Applications/Amazon MP3 Downloader.app' '/Applications/App Store.app' '/Applications/Utilities/AppleScript Editor.app' '/Applications/Google Chrome.app' '/Applications/Messages.app' '/Applications/Preview.app' '/Applications/Minecraft.app' '/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/AppleMobileSync.app' '/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/AppleMobileDeviceHelper.app' '/Applications/TextEdit.app' '/System/Library/CoreServices/Installer.app' '/Applications/QuickTime Player.app' '/Users/moonglum/Library/Printers/Dohmen.app' '/Applications/Pages.app' '/Applications/Keynote.app' '/Applications/Reminders.app' '/Applications/1Password 4.app' '/Applications/iTerm.app' '/Applications/Dictionary.app' '/Applications/GPG Keychain Access.app' '/Applications/OmniOutliner.app' '/Applications/System Preferences.app' '/Applications/Pixelmator.app' '/Applications/nvALT.app' '/Applications/Soulver.app' '/Applications/Adium.app' '/Applications/Marked.app' '/Applications/Calendar.app' '/Applications/TrueCrypt.app' '/Applications/FaceTime.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/appmon-2.1.14.2/ebin/appmon.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/asn1-2.0.2/ebin/asn1.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/common_test-1.7.2/ebin/common_test.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/compiler-4.9.2/ebin/compiler.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosEvent-2.1.14/ebin/cosEvent.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosEventDomain-1.1.13/ebin/cosEventDomain.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosFileTransfer-1.1.15/ebin/cosFileTransfer.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosNotification-1.1.20/ebin/cosNotification.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosProperty-1.1.16/ebin/cosProperty.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosTime-1.1.13/ebin/cosTime.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/cosTransactions-1.2.13/ebin/cosTransactions.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/crypto-3.0/ebin/crypto.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/debugger-3.2.11/ebin/debugger.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/dialyzer-2.6.1/ebin/dialyzer.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/diameter-1.4.2/ebin/diameter.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/edoc-0.7.12/ebin/edoc.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/eldap-1.0.1/ebin/eldap.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/erl_docgen-0.3.4/ebin/erl_docgen.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/et-1.4.4.4/ebin/et.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/eunit-2.2.4/ebin/eunit.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/gs-1.5.15.2/ebin/gs.app' '/Applications/DaisyDisk.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/hipe-3.10.2/ebin/hipe.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/ic-4.3.2/ebin/ic.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/inets-5.9.5/ebin/inets.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/kernel-2.16.2/ebin/kernel.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/kernel-2.16.2/examples/uds_dist/src/uds_dist.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/megaco-3.17.0.1/ebin/megaco.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/mnesia-4.9/ebin/mnesia.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/observer-1.3.1/ebin/observer.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/odbc-2.10.16/ebin/odbc.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/orber-3.6.26.1/ebin/orber.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/os_mon-2.2.12/ebin/os_mon.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/otp_mibs-1.0.8/ebin/otp_mibs.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/parsetools-2.0.9/ebin/parsetools.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/percept-0.8.8.1/ebin/percept.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/pman-2.7.1.4/ebin/pman.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/public_key-0.19/ebin/public_key.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/reltool-0.6.4/ebin/reltool.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/runtime_tools-1.8.11/ebin/runtime_tools.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/sasl-2.3.2/ebin/sasl.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/snmp-4.24/ebin/snmp.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/ssh-2.1.7/ebin/ssh.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/ssl-5.3/ebin/ssl.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/stdlib-1.19.2/ebin/stdlib.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/syntax_tools-1.6.11/ebin/syntax_tools.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/test_server-3.6.2/ebin/test_server.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/toolbar-1.4.2.3/ebin/toolbar.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/tools-2.6.11/ebin/tools.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/tv-2.1.4.10/ebin/tv.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/typer-0.9.5/ebin/typer.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/webtool-0.8.9.2/ebin/webtool.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/wx-1.0/ebin/wx.app' '/usr/local/Cellar/erlang/R16B01/lib/erlang/lib/xmerl-1.3.3/ebin/xmerl.app' '/Applications/Contacts.app' '/Applications/Sequel Pro.app' '/System/Library/CoreServices/Archive Utility.app' '/Applications/Font Book.app' '/Applications/Utilities/Disk Utility.app' '/Applications/Numbers.app' '/Applications/Textual.app' '/Applications/OutBank.app' '/Applications/Little Snitch Configuration.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/couch-1.4.0/ebin/couch.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/ejson-0.1.0/ebin/ejson.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/erlang-oauth/ebin/oauth.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb.app' '/usr/local/Cellar/couchdb/1.4.0/lib/couchdb/erlang/lib/snappy-1.0.5/ebin/snappy.app' '/Applications/iPhoto.app' '/Applications/CleanMyMac 2.app' '/Applications/Firefox.app' '/Applications/Skype.app' '/Applications/Utilities/Terminal.app' '/usr/local/Cellar/macvim/7.4-70/MacVim.app' '/usr/local/Cellar/git/1.8.4/share/git-gui/lib/Git Gui.app' '/Library/Frameworks/Libmacgpg.framework/Versions/B/Resources/pinentry-mac.app' '/Library/Mail/Bundles/GPGMail.mailbundle/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app' '/Library/Mail/Bundles/GPGMail.mailbundle/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/dmgExtract.app' '/Applications/Apogee Maestro 2.app' '/Users/moonglum/Library/Printers/Wohnung.app' '/Applications/Intego/VirusBarrier.app' '/Applications/Alfred 2.app' '/Applications/Fantastical.app' '/Users/moonglum/Library/Printers/HP LaserJet CP1525N (Marketing).app' '/Applications/PG Commander.app' '/Applications/Utilities/AirPort Utility.app' '/Users/moonglum/Library/Developer/Xcode/DerivedData/AlphaTouch-ecpvlibnypfcetbpvasynpnotjab/Build/Products/Debug-iphonesimulator/AlphaTouch.app' '/Applications/Xcode5-DP.app/Contents/Applications/Printer Simulator.app' '/Applications/Xcode5-DP.app/Contents/Applications/Instruments.app' '/Applications/Xcode5-DP.app/Contents/Applications/FileMerge.app' '/Applications/Xcode5-DP.app/Contents/Applications/Application Loader.app' '/Applications/Xcode5-DP.app/Contents/Applications/Accessibility Inspector.app' '/Applications/Xcode5-DP.app' '/Applications/Cave.app' '/Applications/ForkLift.app' '/Applications/Utilities/Bluetooth File Exchange.app' '/Applications/Notes.app' '/Applications/Utilities/Migration Assistant.app' '/Applications/Game Center.app' '/Applications/Utilities/Boot Camp Assistant.app' '/Applications/Automator.app' '/Applications/Utilities/System Information.app' '/Applications/Dropbox.app' '/Users/moonglum/Code/automator/DVDArchivieren.app' '/Applications/Intego/NetUpdate.app' '/Applications/BibDesk.app' '/Applications/iMovie.app' '/Users/Shared/Battle.net/Client/Blizzard Launcher.1974/Blizzard Launcher.app' '/Users/Shared/Battle.net/Client/Blizzard Launcher.app' '/Users/Shared/Battle.net/Client/Blizzard Launcher.1575/Blizzard Launcher.app' '/Users/Shared/Battle.net/Agent/Agent.1737/Agent.app' '/Users/Shared/Battle.net/Agent/Agent.app' '/Users/Shared/Battle.net/Agent/Error Reporter.app' '/Users/Shared/Battle.net/Agent/Agent.954/Agent.app' '/Users/Shared/Battle.net/Setup/diablo3_engb/Diablo III Setup.app' '/Applications/Utilities/ApogeeRegistration.app' '/Applications/Utilities/VoiceOver Utility.app' '/Applications/Photo Booth.app' '/Applications/DVD Player.app' '/Applications/Chess.app' '/Applications/Bartender.app' '/Applications/Utilities/XQuartz.app' '/Applications/VLC.app' '/Applications/Utilities/Keychain Access.app' '/Applications/Utilities/Console.app' '/Applications/Calculator.app' '/Applications/OnyX.app' '/Applications/Stickies.app' '/Applications/Image Capture.app' '/Applications/Time Machine.app' '/Applications/Utilities/Grab.app' '/Applications/Dashboard.app' '/Applications/Utilities/DigitalColor Meter.app' '/Applications/Utilities/ColorSync Utility.app' '/Applications/Utilities/Audio MIDI Setup.app' '/Applications/Utilities/Activity Monitor.app' '/usr/share/java/Tools/Java VisualVM.app' '/usr/share/java/Tools/Jar Bundler.app' '/usr/share/java/Tools/Applet Launcher.app' '/Applications/Utilities/Grapher.app' '/Applications/Mission Control.app' '/Applications/Launchpad.app' '/Applications/Utilities/Network Utility.app' '/Applications/Utilities/RAID Utility.app' '/Users/moonglum/Code/cellar/Houston/build/Houston.app' '/Users/moonglum/Library/Developer/Xcode/DerivedData/dawn-dcyqxtmmuqihddfjnmzpplbsmcls/Build/Products/Debug/dawn.app' '/Users/moonglum/Library/Developer/Xcode/DerivedData/macruby-statusmenu-gglbuiexzdxlfgduugzfxasxqefc/Build/Products/Debug/macruby-statusmenu.app' '/Users/moonglum/Library/Mail/V2/Mailboxes/Personal.mbox/Chaotisch.mbox/DA2BC3F2-47DC-4F98-990F-2A55D6AF0AA8/Data/2/7/Attachments/72345/2.2/ToDo List.app' '/Users/moonglum/Library/Mail/V2/Mailboxes/Personal.mbox/Chaotisch.mbox/DA2BC3F2-47DC-4F98-990F-2A55D6AF0AA8/Data/1/Attachments/1153/2.2/ToDo List.app' '/usr/local/MacGPG2/libexec/pinentry-mac.app' '/usr/local/MacGPG2/libexec/MacGPG2_Updater.app' '/Library/Image Capture/Devices/HP Scanner 3.app' '/Library/Printers/hp/Frameworks/HPDeviceModel.framework/Versions/4.0/Runtime/hpdot4d.app' '/Library/Printers/hp/Frameworks/HPDeviceModel.framework/Versions/3.0/Runtime/hpdot4d.app' '/Library/Printers/hp/Utilities/HP Utility.app' '/Library/Printers/hp/filter/hpPreProcessing.filter' '/Library/Printers/hp/Fax/rastertofax.filter' '/Library/Printers/hp/Fax/fax.backend' '/Library/Printers/hp/cups/filters/commandtohp.filter' '/usr/local/Cellar/qt/4.8.5/qttracereplay.app' '/usr/local/Cellar/qt/4.8.5/QMLViewer.app' '/usr/local/Cellar/qt/4.8.5/Linguist.app' '/usr/local/Cellar/qt/4.8.5/Designer.app' '/usr/local/Cellar/qt/4.8.5/Assistant.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/macx-g++/Info.plist.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/macx-g++40/Info.plist.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/macx-g++42/Info.plist.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/macx-llvm/Info.plist.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/macx-pbuilder/Info.plist.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/macx-xcode/Info.plist.app' '/usr/local/Cellar/qt/4.8.5/mkspecs/unsupported/macx-clang/Info.plist.app' '/System/Library/CoreServices/AirPort Base Station Agent.app' '/Users/moonglum/Library/Application Support/CleanMyMac 2/CleanMyMac 2 Helper.app' '/Users/moonglum/Library/Application Support/iPhone Simulator/7.0/Applications/3323C2FA-3A8C-45F6-A767-7EDC3B367A31/AlphaTouch.app' '/Library/Application Support/Google/GoogleVoiceAndVideoUninstaller.app' '/Library/Application Support/Google/GoogleTalkPlugin.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/couch-1.3.1/ebin/couch.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/snappy-1.0.3/ebin/snappy.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/mochiweb-1.4.1/ebin/mochiweb.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/ibrowse-2.2.0/ebin/ibrowse.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/erlang-oauth/ebin/oauth.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/ejson-0.1.0/ebin/ejson.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/couch_replicator-0.1/ebin/couch_replicator.app' '/usr/local/Cellar/couchdb/1.3.1/lib/couchdb/erlang/lib/couch_mrview-0.1/ebin/couch_mrview.app' '/Library/Little Snitch/Little Snitch Agent.app' '/Library/Little Snitch/Little Snitch Software Update.app' '/Library/Little Snitch/Little Snitch Network Monitor.app' '/Library/Little Snitch/Little Snitch Uninstaller.app' '/System/Library/CoreServices/Java Web Start.app' '/System/Library/CoreServices/Jar Launcher.app' '/System/Library/CoreServices/Wireless Diagnostics.app' '/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app' '/System/Library/Image Capture/Devices/TWAINBridge.app' '/System/Library/PrivateFrameworks/SystemMigration.framework/Versions/A/Resources/IncompatibleAppDisplay.app' '/System/Library/Services/SummaryService.app' '/System/Library/Input Methods/DictationIM.app' '/System/Library/CoreServices/Software Update.app' '/System/Library/CoreServices/RemoteManagement/ARDAgent.app' '/System/Library/CoreServices/NotificationCenter.app' '/System/Library/CoreServices/Setup Assistant.app' '/System/Library/CoreServices/ManagedClient.app' '/System/Library/Image Capture/Support/Image Capture Extension.app' '/System/Library/Image Capture/Devices/VirtualScanner.app' '/System/Library/Image Capture/Devices/Type8Camera.app' '/System/Library/Image Capture/Devices/Type5Camera.app' '/System/Library/Image Capture/Devices/Type4Camera.app' '/System/Library/Image Capture/Devices/PTPCamera.app' '/System/Library/Image Capture/Devices/MassStorageCamera.app' '/System/Library/Image Capture/Automatic Tasks/Build Web Page.app' '/System/Library/Image Capture/Automatic Tasks/MakePDF.app' '/System/Library/CoreServices/OBEXAgent.app' '/System/Library/CoreServices/BluetoothUIServer.app' '/System/Library/CoreServices/BluetoothAudioAgent.app' '/System/Library/CoreServices/Bluetooth Setup Assistant.app' '/System/Library/CoreServices/AVRCPAgent.app' '/System/Library/PrivateFrameworks/IMCore.framework/imagent.app' '/System/Library/Frameworks/IMServicePlugIn.framework/IMServicePlugInAgent.app' '/System/Library/CoreServices/Finder.app' '/System/Library/CoreServices/Dock.app' '/System/Library/CoreServices/Problem Reporter.app' '/System/Library/CoreServices/Captive Network Assistant.app' '/System/Library/CoreServices/Automator Runner.app' '/System/Library/CoreServices/Automator Launcher.app' '/System/Library/Frameworks/AddressBook.framework/Versions/A/Resources/AddressBookSync.app' '/System/Library/Frameworks/AddressBook.framework/Versions/A/Resources/AddressBookSourceSync.app' '/System/Library/Frameworks/AddressBook.framework/Versions/A/Resources/AddressBookManager.app' '/System/Library/Frameworks/AddressBook.framework/Versions/A/Resources/ABAssistantService.app' '/System/Library/CoreServices/AddressBookUrlForwarder.app' '/System/Library/PrivateFrameworks/AOSKit.framework/Versions/A/Resources/AOSPushRelay.app' '/System/Library/PrivateFrameworks/AOSKit.framework/Versions/A/Resources/AOSAlertManager.app' '/System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app' '/System/Library/PrivateFrameworks/WebKit2.framework/PluginProcess.app' '/System/Library/PrivateFrameworks/SystemMigration.framework/Versions/A/Resources/FindReaperFiles.app' '/System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/store_helper.app' '/System/Library/CoreServices/Apple80211Agent.app' '/Library/PrivilegedHelperTools/NetUpdateAgent.app' '/Library/Intego/TaskManager/TM_Notifier.app' '/Library/Intego/Intego Uninstaller.app' '/Library/Frameworks/Libmacgpg.framework/Versions/A/Resources/pinentry-mac.app' '/usr/local/Cellar/python/2.7.5/IDLE.app' '/usr/local/Cellar/python/2.7.5/Python Launcher.app' '/usr/local/Cellar/python/2.7.5/Build Applet.app' '/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/Resources/Python.app' '/usr/local/git/share/git-gui/lib/Git Gui.app' '/Library/Printers/EPSON/LaserPrinter/Utilities/Epson Remote Panel Lite.app' '/Library/Printers/EPSON/LaserPrinter/GD2/tools/escpageSupplyTool.app' '/Library/Printers/EPSON/LaserPrinter/GD2/tools/escpageASTool.app' '/Library/Printers/EPSON/LaserPrinter/GD2/filter/pdftoescpage.app' '/Library/Printers/EPSON/LaserPrinter/GD2/filter/commandtoescpage.app' '/Library/Printers/EPSON/LaserPrinter/Common/PageLibraries/STMStart2.app' '/System/Library/StagedFrameworks/Safari/WebKit.framework/WebKitPluginHost.app' '/System/Library/StagedFrameworks/Safari/WebKit2.framework/WebProcess.app' '/System/Library/StagedFrameworks/Safari/WebKit2.framework/PluginProcess.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/appmon-2.1.14.1/ebin/appmon.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/asn1-1.8/ebin/asn1.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/common_test-1.6.3/ebin/common_test.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/compiler-4.8.2/ebin/compiler.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosEvent-2.1.12/ebin/cosEvent.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosEventDomain-1.1.12/ebin/cosEventDomain.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosFileTransfer-1.1.13/ebin/cosFileTransfer.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosNotification-1.1.18/ebin/cosNotification.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosProperty-1.1.15/ebin/cosProperty.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosTime-1.1.12/ebin/cosTime.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/cosTransactions-1.2.12/ebin/cosTransactions.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/crypto-2.2/ebin/crypto.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/debugger-3.2.8/ebin/debugger.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/dialyzer-2.5.3/ebin/dialyzer.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/diameter-1.3/ebin/diameter.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/edoc-0.7.10/ebin/edoc.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/eldap-1.0/ebin/eldap.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/erl_docgen-0.3.3/ebin/erl_docgen.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/et-1.4.4.2/ebin/et.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/eunit-2.2.3/ebin/eunit.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/gs-1.5.15.1/ebin/gs.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/hipe-3.9.3/ebin/hipe.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/ic-4.2.31/ebin/ic.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/inets-5.9.2/ebin/inets.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/inviso-0.6.3/ebin/inviso.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/kernel-2.15.3/ebin/kernel.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/kernel-2.15.3/examples/uds_dist/src/uds_dist.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/megaco-3.16.0.2/ebin/megaco.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/mnesia-4.7.1/ebin/mnesia.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/observer-1.2/ebin/observer.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/odbc-2.10.13/ebin/odbc.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/orber-3.6.24/ebin/orber.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/os_mon-2.2.10/ebin/os_mon.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/otp_mibs-1.0.7/ebin/otp_mibs.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/parsetools-2.0.7/ebin/parsetools.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/percept-0.8.7/ebin/percept.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/pman-2.7.1.2/ebin/pman.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/public_key-0.17/ebin/public_key.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/reltool-0.6.1/ebin/reltool.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/runtime_tools-1.8.9/ebin/runtime_tools.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/sasl-2.2.1/ebin/sasl.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/snmp-4.22.1/ebin/snmp.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/ssh-2.1.2/ebin/ssh.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/ssl-5.1.2/ebin/ssl.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/stdlib-1.18.3/ebin/stdlib.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/syntax_tools-1.6.9/ebin/syntax_tools.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/test_server-3.5.3/ebin/test_server.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/toolbar-1.4.2.2/ebin/toolbar.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/tools-2.6.8/ebin/tools.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/tv-2.1.4.9/ebin/tv.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/typer-0.9.4/ebin/typer.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/webtool-0.8.9.1/ebin/webtool.app' '/usr/local/Cellar/erlang/R15B03-1/lib/erlang/lib/xmerl-1.3.2/ebin/xmerl.app' '/System/Library/CoreServices/MRTAgent.app' '/System/Library/CoreServices/Pass Viewer.app' '/System/Library/Input Methods/TCIM.app' '/System/Library/Input Methods/SCIM.app' '/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app' '/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app' '/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app' '/System/Library/CoreServices/loginwindow.app' '/System/Library/CoreServices/UniversalAccessControl.app' '/System/Library/CoreServices/Ticket Viewer.app' '/System/Library/CoreServices/System Events.app' '/System/Library/CoreServices/Image Events.app' '/System/Library/CoreServices/Folder Actions Setup.app' '/System/Library/CoreServices/Folder Actions Dispatcher.app' '/System/Library/CoreServices/Database Events.app' '/System/Library/CoreServices/AppleScript Runner.app' '/System/Library/PrivateFrameworks/SyncServicesUI.framework/Versions/A/Resources/syncuid.app' '/System/Library/PrivateFrameworks/SyncServicesUI.framework/Versions/A/Resources/Conflict Resolver.app' '/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/SyncServer.app' '/System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/SyncDiagnostics.app' '/System/Library/CoreServices/SocialPushAgent.app' '/Library/Application Support/Script Editor/Templates/Droplets/Recursive Image File Processing Droplet.app' '/Library/Application Support/Script Editor/Templates/Droplets/Recursive File Processing Droplet.app' '/Library/Application Support/Script Editor/Templates/Droplets/Droplet with Settable Properties.app' '/Library/Application Support/Script Editor/Templates/Cocoa-AppleScript Applet.app' '/System/Library/CoreServices/Screen Sharing.app' '/System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app' '/System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/VoiceOver Quickstart.app' '/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/quicklookd.app' '/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/Resources/QuickLookUIHelper.app' '/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/quicklookd32.app' '/System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app' '/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Plugins/PrinterProxy.app' '/System/Library/CoreServices/AddPrinter.app' '/System/Library/CoreServices/Printer Setup Utility.app' '/System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/Resources/ParentalControls.app' '/System/Library/CoreServices/Install in Progress.app' '/System/Library/CoreServices/System Image Utility.app' '/System/Library/CoreServices/Language Chooser.app' '/System/Library/CoreServices/Memory Slot Utility.app' '/System/Library/CoreServices/Expansion Slot Utility.app' '/System/Library/CoreServices/Directory Utility.app' '/System/Library/CoreServices/CoreLocationAgent.app' '/System/Library/PrivateFrameworks/CoreChineseEngine.framework/Versions/A/SharedSupport/userdictionaryd.app' '/System/Library/PrivateFrameworks/CoreChineseEngine.framework/Versions/A/SharedSupport/CIMUserDictionaryTool.app' '/System/Library/PrivateFrameworks/CoreChineseEngine.framework/Versions/A/SharedSupport/CIMFindInputCodeTool.app' '/System/Library/CoreServices/AirPlayUIAgent.app' '/System/Library/CoreServices/SecurityAgent.app' '/System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/ScreenReaderUIServer.app' '/System/Library/CoreServices/VoiceOver.app' '/System/Library/CoreServices/Network Diagnostics.app' '/System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/DiskImages UI Agent.app' '/System/Library/CoreServices/DiskImageMounter.app' '/Users/moonglum/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/CocoaDialog.app' '/Users/moonglum/Library/Application Support/TextMate/Managed/Bundles/SCM.tmbundle/Support/bin/CommitWindow.app' '/Users/moonglum/Library/Application Support/Ubiquity/peer-0573BAFF-D03D-859E-C05B-5E1ADCB455EC-v23/SharedPackageExtensions.app' '/Library/Application Support/Microsoft/Silverlight/OutOfBrowser/SLLauncher.app' '/System/Library/CoreServices/SystemUIServer.app' '/System/Library/Input Methods/PluginIM.app' '/System/Library/CoreServices/RegisterPluginIMApp.app' '/System/Library/Input Methods/InkServer.app' '/System/Library/CoreServices/HelpViewer.app' '/System/Library/Input Methods/CharacterPalette.app' '/System/Library/CoreServices/Certificate Assistant.app' '/System/Library/CoreServices/AppleFileServer.app' '/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesisServer.app' '/System/Library/PrivateFrameworks/FindMyMac.framework/Versions/A/Resources/FindMyMacMessenger.app' '/Library/Image Capture/Devices/Samsung Scanner.app' '/System/Library/Input Methods/50onPaletteServer.app' '/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Wish.app' '/System/Library/Frameworks/Tk.framework/Versions/8.4/Resources/Wish.app' '/usr/libexec/MiniTerm.app' '/System/Library/CoreServices/ZoomWindow.app' '/System/Library/Input Methods/VietnameseIM.app' '/System/Library/CoreServices/UserNotificationCenter.app' '/System/Library/CoreServices/UnmountAssistantAgent.app' '/System/Library/Input Methods/TrackpadIM.app' '/System/Library/Input Methods/TamilIM.app' '/System/Library/Speech/Recognizers/AppleSpeakableItems.SpeechRecognizer/Contents/PlugIns/SpeakableItems.app' '/System/Library/CoreServices/SecurityFixer.app' '/System/Library/Input Methods/PressAndHold.app' '/System/Library/CoreServices/ODSAgent.app' '/System/Library/CoreServices/Network Setup Assistant.app' '/System/Library/CoreServices/LocationMenu.app' '/System/Library/Input Methods/KeyboardViewer.app' '/System/Library/CoreServices/KeyboardSetupAssistant.app' '/System/Library/Services/ImageCaptureService.app' '/System/Library/Image Capture/Support/Application/AutoImporter.app' '/System/Library/CoreServices/FileSyncAgent.app' '/System/Library/CoreServices/File Sync.app' '/Library/Image Capture/Devices/EPSON Scanner.app' '/System/Library/CoreServices/CoreServicesUIAgent.app' '/System/Library/ColorSync/Calibrators/Display Calibrator.app' '/Library/Scripts/ColorSync/Show Info.app' '/Library/Scripts/ColorSync/Set Info.app' '/Library/Scripts/ColorSync/Rename.app' '/Library/Scripts/ColorSync/Remove.app' '/Library/Scripts/ColorSync/Proof.app' '/Library/Scripts/ColorSync/Match.app' '/Library/Scripts/ColorSync/Extract.app' '/Library/Scripts/ColorSync/Embed.app' '/System/Library/Services/ChineseTextConverterService.app' '/Library/Image Capture/Devices/Canon IJScanner2.app' '/System/Library/CoreServices/CalendarFileHandler.app' '/System/Library/CoreServices/AppleScript Utility.app' '/System/Library/CoreServices/rcd.app' '/System/Library/CoreServices/AppleGraphicsWarning.app' '/System/Library/PrivateFrameworks/AirPortDevices.framework/Versions/A/Resources/AirPortDevicesUIAgent.app' '/System/Library/PrivateFrameworks/EAP8021X.framework/Support/eaptlstrust.app' '/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Support/FontRegistryUIAgent.app' '/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognitionServer.app' '/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechFeedbackWindow.app' '/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/Speech Startup.app' '/System/Library/CoreServices/NetAuthAgent.app' '/System/Library/Input Methods/Kotoeri.app' '/System/Library/Input Methods/KoreanIM.app' '/System/Library/Filesystems/AppleShare/check_afp.app' '/Users/moonglum/Library/Application Support/Torque.app' '/Library/Printers/Canon/CUPSCMFP/Utilities/Canon CMFP Printmonitor.app' '/Library/Printers/Canon/CUPSCMFP/BackGrounder/Canon CMFP BackGrounder.app' '/Library/Printers/Canon/UFR2/Utilities/UFR II Printmonitor.app' '/Library/Printers/Canon/UFR2/Utilities/UFR II BackGrounder.app' '/Library/Printers/Canon/UFR2/cores/mcc.app' '/Library/Printers/Canon/CUPSPS2/Utilities/Canon CUPS PS2 Printmonitor.app' '/Library/Printers/Canon/CUPSPS2/BackGrounder/Canon PS2 BackGrounder.app' '/Library/Printers/Canon/BJPrinter/Utilities/CIJAutoSetupTool.app' '/Library/Printers/Canon/BJPrinter/Utilities/CanonIJPrinterUtility.app' '/Library/Printers/Canon/BJPrinter/Utilities/BJPrinterUtility2.app' '/Library/Application Support/Adobe/Installers/R1/Setup.app' )
|
data/config/devtools.yml
ADDED
data/config/flay.yml
CHANGED
data/config/flog.yml
CHANGED
data/config/reek.yml
CHANGED
data/config/rubocop.yml
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
AllCops:
|
2
2
|
Includes:
|
3
3
|
- '../**/*.rake'
|
4
|
+
- 'Gemfile'
|
5
|
+
- 'Guardfile'
|
6
|
+
- 'Rakefile'
|
4
7
|
Excludes:
|
5
|
-
- '
|
8
|
+
- 'spec/setup/**/*'
|
6
9
|
|
7
10
|
# Avoid parameter lists longer than five parameters.
|
8
11
|
ParameterLists:
|
@@ -28,29 +31,28 @@ CollectionMethods:
|
|
28
31
|
# level I think it sort of blends in with the def keywords and makes it harder
|
29
32
|
# to scan the code and see where the sections are.
|
30
33
|
AccessControl:
|
31
|
-
Enabled:
|
34
|
+
Enabled: true
|
32
35
|
|
33
36
|
HashSyntax:
|
34
|
-
Enabled:
|
37
|
+
Enabled: true
|
35
38
|
|
36
39
|
StringLiterals:
|
37
|
-
Enabled:
|
40
|
+
Enabled: true
|
38
41
|
|
39
42
|
Void:
|
40
|
-
Enabled:
|
43
|
+
Enabled: true
|
41
44
|
|
42
45
|
LineLength:
|
43
|
-
Enabled:
|
44
|
-
|
45
|
-
SpaceAroundBraces:
|
46
|
-
Enabled: false
|
46
|
+
Enabled: true
|
47
|
+
Max: 120
|
47
48
|
|
48
49
|
SpaceInsideHashLiteralBraces:
|
49
|
-
Enabled:
|
50
|
+
Enabled: true
|
50
51
|
|
51
52
|
AlignParameters:
|
52
|
-
Enabled:
|
53
|
+
Enabled: true
|
53
54
|
|
55
|
+
# I don't agree with this
|
54
56
|
Blocks:
|
55
57
|
Enabled: false
|
56
58
|
|
@@ -58,37 +60,33 @@ SymbolName:
|
|
58
60
|
Enabled: false
|
59
61
|
|
60
62
|
NumericLiterals:
|
61
|
-
Enabled:
|
63
|
+
Enabled: true
|
62
64
|
|
63
65
|
SpaceInsideBrackets:
|
64
|
-
Enabled:
|
66
|
+
Enabled: true
|
65
67
|
|
66
68
|
WordArray:
|
67
|
-
Enabled:
|
69
|
+
Enabled: true
|
68
70
|
|
69
71
|
Lambda:
|
70
|
-
Enabled:
|
72
|
+
Enabled: true
|
71
73
|
|
72
74
|
RegexpLiteral:
|
73
|
-
Enabled:
|
75
|
+
Enabled: true
|
74
76
|
|
77
|
+
# Don't agree
|
75
78
|
ConstantName:
|
76
79
|
Enabled: false
|
77
80
|
|
78
|
-
AvoidPerlisms:
|
79
|
-
Enabled: false
|
80
|
-
|
81
|
-
AvoidPerlBackrefs:
|
82
|
-
Enabled: false
|
83
|
-
|
84
81
|
TrivialAccessors:
|
85
|
-
Enabled:
|
82
|
+
Enabled: true
|
83
|
+
ExactNameMatch: true
|
86
84
|
|
87
85
|
Alias:
|
88
|
-
Enabled:
|
86
|
+
Enabled: true
|
89
87
|
|
90
88
|
Loop:
|
91
|
-
Enabled:
|
89
|
+
Enabled: true
|
92
90
|
|
93
91
|
# Do not agree at all
|
94
92
|
AndOr:
|
data/lib/ashikawa-core.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'ashikawa-core/collection'
|
3
|
+
require 'ashikawa-core/connection'
|
4
|
+
require 'ashikawa-core/database'
|
5
|
+
require 'ashikawa-core/document'
|
6
|
+
require 'ashikawa-core/version'
|
6
7
|
|
7
8
|
# Ashikawa is a project dedicated to connect Ruby and ArangoDB
|
8
9
|
module Ashikawa
|
@@ -1,13 +1,14 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'ashikawa-core/document'
|
3
|
+
require 'ashikawa-core/edge'
|
4
|
+
require 'ashikawa-core/index'
|
5
|
+
require 'ashikawa-core/cursor'
|
6
|
+
require 'ashikawa-core/query'
|
7
|
+
require 'ashikawa-core/status'
|
8
|
+
require 'ashikawa-core/figure'
|
9
|
+
require 'ashikawa-core/key_options'
|
10
|
+
require 'forwardable'
|
11
|
+
require 'equalizer'
|
11
12
|
|
12
13
|
module Ashikawa
|
13
14
|
module Core
|
@@ -23,8 +24,8 @@ module Ashikawa
|
|
23
24
|
}
|
24
25
|
|
25
26
|
CONTENT_CLASS = {
|
26
|
-
:
|
27
|
-
:
|
27
|
+
document: Document,
|
28
|
+
edge: Edge
|
28
29
|
}
|
29
30
|
|
30
31
|
# The name of the collection, must be unique
|
@@ -32,19 +33,19 @@ module Ashikawa
|
|
32
33
|
# @return [String]
|
33
34
|
# @api public
|
34
35
|
# @example Change the name of a collection
|
35
|
-
# database = Ashikawa::Core::Database.new(
|
36
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
36
37
|
# raw_collection = {
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
38
|
+
# 'name' => 'example_1',
|
39
|
+
# 'waitForSync' => true,
|
40
|
+
# 'id' => 4588,
|
41
|
+
# 'status' => 3,
|
42
|
+
# 'error' => false,
|
43
|
+
# 'code' => 200
|
43
44
|
# }
|
44
45
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
45
|
-
# collection.name # =>
|
46
|
-
# collection.name =
|
47
|
-
# collection.name # =>
|
46
|
+
# collection.name # => 'example_1'
|
47
|
+
# collection.name = 'example_2'
|
48
|
+
# collection.name # => 'example_2'
|
48
49
|
attr_reader :name
|
49
50
|
|
50
51
|
# The ID of the collection. Is set by the database and unique
|
@@ -52,14 +53,14 @@ module Ashikawa
|
|
52
53
|
# @return [Fixnum]
|
53
54
|
# @api public
|
54
55
|
# @example Get the id of the collection
|
55
|
-
# database = Ashikawa::Core::Database.new(
|
56
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
56
57
|
# raw_collection = {
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
58
|
+
# 'name' => 'example_1',
|
59
|
+
# 'waitForSync' => true,
|
60
|
+
# 'id' => 4588,
|
61
|
+
# 'status' => 3,
|
62
|
+
# 'error' => false,
|
63
|
+
# 'code' => 200
|
63
64
|
# }
|
64
65
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
65
66
|
# collection.id #=> 4588
|
@@ -70,14 +71,14 @@ module Ashikawa
|
|
70
71
|
# @return [Status]
|
71
72
|
# @api public
|
72
73
|
# @example
|
73
|
-
# database = Ashikawa::Core::Database.new(
|
74
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
74
75
|
# raw_collection = {
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
76
|
+
# 'name' => 'example_1',
|
77
|
+
# 'waitForSync' => true,
|
78
|
+
# 'id' => 4588,
|
79
|
+
# 'status' => 3,
|
80
|
+
# 'error' => false,
|
81
|
+
# 'code' => 200
|
81
82
|
# }
|
82
83
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
83
84
|
# collection.status.loaded? #=> true
|
@@ -89,14 +90,14 @@ module Ashikawa
|
|
89
90
|
# @return [Database]
|
90
91
|
# @api public
|
91
92
|
# @example
|
92
|
-
# database = Ashikawa::Core::Database.new(
|
93
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
93
94
|
# raw_collection = {
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
95
|
+
# 'name' => 'example_1',
|
96
|
+
# 'waitForSync' => true,
|
97
|
+
# 'id' => 4588,
|
98
|
+
# 'status' => 3,
|
99
|
+
# 'error' => false,
|
100
|
+
# 'code' => 200
|
100
101
|
# }
|
101
102
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
102
103
|
# collection.database #=> #<Database: ...>
|
@@ -107,14 +108,14 @@ module Ashikawa
|
|
107
108
|
# @return [:document, :edge]
|
108
109
|
# @api public
|
109
110
|
# @example
|
110
|
-
# database = Ashikawa::Core::Database.new(
|
111
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
111
112
|
# raw_collection = {
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
113
|
+
# 'name' => 'example_1',
|
114
|
+
# 'waitForSync' => true,
|
115
|
+
# 'id' => 4588,
|
116
|
+
# 'status' => 3,
|
117
|
+
# 'error' => false,
|
118
|
+
# 'code' => 200
|
118
119
|
# }
|
119
120
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
120
121
|
# collection.content_type #=> :document
|
@@ -129,14 +130,14 @@ module Ashikawa
|
|
129
130
|
# @param [Hash] raw_collection The raw collection returned from the server
|
130
131
|
# @api public
|
131
132
|
# @example Create a Collection object from scratch
|
132
|
-
# database = Ashikawa::Core::Database.new(
|
133
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
133
134
|
# raw_collection = {
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
135
|
+
# 'name' => 'example_1',
|
136
|
+
# 'waitForSync' => true,
|
137
|
+
# 'id' => 4588,
|
138
|
+
# 'status' => 3,
|
139
|
+
# 'error' => false,
|
140
|
+
# 'code' => 200
|
140
141
|
# }
|
141
142
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
142
143
|
def initialize(database, raw_collection)
|
@@ -151,19 +152,19 @@ module Ashikawa
|
|
151
152
|
# @return [String] New Name
|
152
153
|
# @api public
|
153
154
|
# @example Change the name of a collection
|
154
|
-
# database = Ashikawa::Core::Database.new(
|
155
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
155
156
|
# raw_collection = {
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
157
|
+
# 'name' => 'example_1',
|
158
|
+
# 'waitForSync' => true,
|
159
|
+
# 'id' => 4588,
|
160
|
+
# 'status' => 3,
|
161
|
+
# 'error' => false,
|
162
|
+
# 'code' => 200
|
162
163
|
# }
|
163
164
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
164
|
-
# collection.name # =>
|
165
|
-
# collection.name =
|
166
|
-
# collection.name # =>
|
165
|
+
# collection.name # => 'example_1'
|
166
|
+
# collection.name = 'example_2'
|
167
|
+
# collection.name # => 'example_2'
|
167
168
|
def name=(new_name)
|
168
169
|
send_information_to_server(:rename, :name, new_name)
|
169
170
|
@name = new_name
|
@@ -174,14 +175,14 @@ module Ashikawa
|
|
174
175
|
# @return [Boolean]
|
175
176
|
# @api public
|
176
177
|
# @example Does the collection wait for file synchronization?
|
177
|
-
# database = Ashikawa::Core::Database.new(
|
178
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
178
179
|
# raw_collection = {
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
180
|
+
# 'name' => 'example_1',
|
181
|
+
# 'waitForSync' => true,
|
182
|
+
# 'id' => 4588,
|
183
|
+
# 'status' => 3,
|
184
|
+
# 'error' => false,
|
185
|
+
# 'code' => 200
|
185
186
|
# }
|
186
187
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
187
188
|
# collection.wait_for_sync? #=> false
|
@@ -194,14 +195,14 @@ module Ashikawa
|
|
194
195
|
# @return [String] Response from the server
|
195
196
|
# @api public
|
196
197
|
# @example Tell the collection to wait for file synchronization
|
197
|
-
# database = Ashikawa::Core::Database.new(
|
198
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
198
199
|
# raw_collection = {
|
199
|
-
#
|
200
|
-
#
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
200
|
+
# 'name' => 'example_1',
|
201
|
+
# 'waitForSync' => true,
|
202
|
+
# 'id' => 4588,
|
203
|
+
# 'status' => 3,
|
204
|
+
# 'error' => false,
|
205
|
+
# 'code' => 200
|
205
206
|
# }
|
206
207
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
207
208
|
# collection.wait_for_sync = true
|
@@ -215,7 +216,7 @@ module Ashikawa
|
|
215
216
|
# @api public
|
216
217
|
# @example Check if this collection has autoincrementing keys
|
217
218
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
218
|
-
# collection.key_options.type # =>
|
219
|
+
# collection.key_options.type # => 'autoincrement'
|
219
220
|
def key_options
|
220
221
|
KeyOptions.new(get_information_from_server(:properties, :keyOptions))
|
221
222
|
end
|
@@ -225,14 +226,14 @@ module Ashikawa
|
|
225
226
|
# @return [Fixnum] Number of documents
|
226
227
|
# @api public
|
227
228
|
# @example How many documents are in the collection?
|
228
|
-
# database = Ashikawa::Core::Database.new(
|
229
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
229
230
|
# raw_collection = {
|
230
|
-
#
|
231
|
-
#
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
231
|
+
# 'name' => 'example_1',
|
232
|
+
# 'waitForSync' => true,
|
233
|
+
# 'id' => 4588,
|
234
|
+
# 'status' => 3,
|
235
|
+
# 'error' => false,
|
236
|
+
# 'code' => 200
|
236
237
|
# }
|
237
238
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
238
239
|
# collection.length # => 0
|
@@ -245,14 +246,14 @@ module Ashikawa
|
|
245
246
|
# @return [Figure]
|
246
247
|
# @api public
|
247
248
|
# @example Get the datafile count for a collection
|
248
|
-
# database = Ashikawa::Core::Database.new(
|
249
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
249
250
|
# raw_collection = {
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
#
|
255
|
-
#
|
251
|
+
# 'name' => 'example_1',
|
252
|
+
# 'waitForSync' => true,
|
253
|
+
# 'id' => 4588,
|
254
|
+
# 'status' => 3,
|
255
|
+
# 'error' => false,
|
256
|
+
# 'code' => 200
|
256
257
|
# }
|
257
258
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
258
259
|
# collection.figure.datafiles_count #=> 0
|
@@ -266,19 +267,19 @@ module Ashikawa
|
|
266
267
|
# @return [String] Response from the server
|
267
268
|
# @api public
|
268
269
|
# @example Delete a collection
|
269
|
-
# database = Ashikawa::Core::Database.new(
|
270
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
270
271
|
# raw_collection = {
|
271
|
-
#
|
272
|
-
#
|
273
|
-
#
|
274
|
-
#
|
275
|
-
#
|
276
|
-
#
|
272
|
+
# 'name' => 'example_1',
|
273
|
+
# 'waitForSync' => true,
|
274
|
+
# 'id' => 4588,
|
275
|
+
# 'status' => 3,
|
276
|
+
# 'error' => false,
|
277
|
+
# 'code' => 200
|
277
278
|
# }
|
278
279
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
279
280
|
# collection.delete
|
280
281
|
def delete
|
281
|
-
send_request_for_this_collection(
|
282
|
+
send_request_for_this_collection('', delete: {})
|
282
283
|
end
|
283
284
|
|
284
285
|
# Load the collection into memory
|
@@ -286,14 +287,14 @@ module Ashikawa
|
|
286
287
|
# @return [String] Response from the server
|
287
288
|
# @api public
|
288
289
|
# @example Load a collection into memory
|
289
|
-
# database = Ashikawa::Core::Database.new(
|
290
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
290
291
|
# raw_collection = {
|
291
|
-
#
|
292
|
-
#
|
293
|
-
#
|
294
|
-
#
|
295
|
-
#
|
296
|
-
#
|
292
|
+
# 'name' => 'example_1',
|
293
|
+
# 'waitForSync' => true,
|
294
|
+
# 'id' => 4588,
|
295
|
+
# 'status' => 3,
|
296
|
+
# 'error' => false,
|
297
|
+
# 'code' => 200
|
297
298
|
# }
|
298
299
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
299
300
|
# collection.load
|
@@ -306,14 +307,14 @@ module Ashikawa
|
|
306
307
|
# @return [String] Response from the server
|
307
308
|
# @api public
|
308
309
|
# @example Unload a collection into memory
|
309
|
-
# database = Ashikawa::Core::Database.new(
|
310
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
310
311
|
# raw_collection = {
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
312
|
+
# 'name' => 'example_1',
|
313
|
+
# 'waitForSync' => true,
|
314
|
+
# 'id' => 4588,
|
315
|
+
# 'status' => 3,
|
316
|
+
# 'error' => false,
|
317
|
+
# 'code' => 200
|
317
318
|
# }
|
318
319
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
319
320
|
# collection.unload
|
@@ -326,14 +327,14 @@ module Ashikawa
|
|
326
327
|
# @return [String] Response from the server
|
327
328
|
# @api public
|
328
329
|
# @example Remove all documents from a collection
|
329
|
-
# database = Ashikawa::Core::Database.new(
|
330
|
+
# database = Ashikawa::Core::Database.new('http://localhost:8529')
|
330
331
|
# raw_collection = {
|
331
|
-
#
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
#
|
336
|
-
#
|
332
|
+
# 'name' => 'example_1',
|
333
|
+
# 'waitForSync' => true,
|
334
|
+
# 'id' => 4588,
|
335
|
+
# 'status' => 3,
|
336
|
+
# 'error' => false,
|
337
|
+
# 'code' => 200
|
337
338
|
# }
|
338
339
|
# collection = Ashikawa::Core::Collection.new(database, raw_collection)
|
339
340
|
# collection.truncate!
|
@@ -376,21 +377,7 @@ module Ashikawa
|
|
376
377
|
# @example Replace the document with the key 12345
|
377
378
|
# collection.replace(12345, document)
|
378
379
|
def replace(document_key, raw_document)
|
379
|
-
send_request_for_content_key(document_key, :
|
380
|
-
end
|
381
|
-
|
382
|
-
# Replace a document by its key
|
383
|
-
#
|
384
|
-
# @param [Integer] document_key the key of the document
|
385
|
-
# @param [Hash] raw_document the data you want to replace it with
|
386
|
-
# @return [Hash] parsed JSON response from the server
|
387
|
-
# @api public
|
388
|
-
# @deprecated Use {#replace} instead.
|
389
|
-
# @example Replace the document with the key 12345
|
390
|
-
# collection.replace(12345, document)
|
391
|
-
def []=(document_key, raw_document)
|
392
|
-
warn "`[]=` is deprecated, please use `replace`"
|
393
|
-
replace(document_key, raw_document)
|
380
|
+
send_request_for_content_key(document_key, put: raw_document)
|
394
381
|
end
|
395
382
|
|
396
383
|
# Create a new document with given attributes
|
@@ -402,21 +389,8 @@ module Ashikawa
|
|
402
389
|
# collection.create_document(attributes)
|
403
390
|
def create_document(attributes)
|
404
391
|
raise "Can't create a document in an edge collection" if @content_type == :edge
|
405
|
-
response = send_request_for_content(:
|
406
|
-
Document.new(@database, response)
|
407
|
-
end
|
408
|
-
|
409
|
-
# Create a new document with given attributes
|
410
|
-
#
|
411
|
-
# @param [Hash] attributes
|
412
|
-
# @return [Document] The created document
|
413
|
-
# @api public
|
414
|
-
# @deprecated Use {#create_document} instead.
|
415
|
-
# @example Create a new document from raw data
|
416
|
-
# collection << attributes
|
417
|
-
def <<(attributes)
|
418
|
-
warn "`<<` is deprecated, please use `create_document`"
|
419
|
-
create_document(attributes)
|
392
|
+
response = send_request_for_content(post: attributes)
|
393
|
+
Document.new(@database, response, attributes)
|
420
394
|
end
|
421
395
|
|
422
396
|
# Create a new edge between two documents with certain attributes
|
@@ -427,26 +401,29 @@ module Ashikawa
|
|
427
401
|
# @return [Edge] The created edge
|
428
402
|
# @api public
|
429
403
|
# @example Create a new document from raw data
|
430
|
-
# collection.create_edge(node_a, node_b, {
|
404
|
+
# collection.create_edge(node_a, node_b, {'name' => 'incredible edge'})
|
431
405
|
def create_edge(from, to, attributes)
|
432
406
|
raise "Can't create an edge in a document collection" if @content_type == :document
|
433
|
-
response = send_request("edge?collection=#{@id}&from=#{from.id}&to=#{to.id}", :
|
434
|
-
Edge.new(@database, response)
|
407
|
+
response = send_request("edge?collection=#{@id}&from=#{from.id}&to=#{to.id}", post: attributes)
|
408
|
+
Edge.new(@database, response, attributes)
|
435
409
|
end
|
436
410
|
|
437
411
|
# Add an index to the collection
|
438
412
|
#
|
439
413
|
# @param [Symbol] type specify the type of the index, for example `:hash`
|
440
414
|
# @option opts [Array<Symbol>] on fields on which to apply the index
|
415
|
+
# @option opts [Boolean] unique Should the index be unique? Default is false
|
441
416
|
# @return Index
|
442
417
|
# @api public
|
443
418
|
# @example Add a hash-index to the fields :name and :profession of a collection
|
444
419
|
# people = database['people']
|
445
420
|
# people.add_index(:hash, :on => [:name, :profession])
|
446
421
|
def add_index(type, opts)
|
447
|
-
|
448
|
-
|
449
|
-
|
422
|
+
unique = opts[:unique] || false
|
423
|
+
response = send_request("index?collection=#{@id}", post: {
|
424
|
+
'type' => type.to_s,
|
425
|
+
'fields' => opts[:on].map { |field| field.to_s },
|
426
|
+
'unique' => unique
|
450
427
|
})
|
451
428
|
|
452
429
|
Index.new(self, response)
|
@@ -475,7 +452,7 @@ module Ashikawa
|
|
475
452
|
def indices
|
476
453
|
response = send_request("index?collection=#{@id}")
|
477
454
|
|
478
|
-
response[
|
455
|
+
response['indexes'].map do |raw_index|
|
479
456
|
Index.new(self, raw_index)
|
480
457
|
end
|
481
458
|
end
|
@@ -512,7 +489,7 @@ module Ashikawa
|
|
512
489
|
# @return [Object] The result
|
513
490
|
# @api private
|
514
491
|
def send_information_to_server(path, key, value)
|
515
|
-
send_request_for_this_collection("#{path}", :
|
492
|
+
send_request_for_this_collection("#{path}", put: { key.to_s => value })
|
516
493
|
end
|
517
494
|
|
518
495
|
# Send a put request with the given command
|
@@ -521,7 +498,7 @@ module Ashikawa
|
|
521
498
|
# @return [Object] The result
|
522
499
|
# @api private
|
523
500
|
def send_command_to_server(command)
|
524
|
-
send_request_for_this_collection("#{command}", :
|
501
|
+
send_request_for_this_collection("#{command}", put: {})
|
525
502
|
end
|
526
503
|
|
527
504
|
# Send a get request to the server and return a certain attribute
|
@@ -552,7 +529,7 @@ module Ashikawa
|
|
552
529
|
@name = raw_collection['name']
|
553
530
|
@id = raw_collection['id']
|
554
531
|
@content_type = CONTENT_TYPES[raw_collection['type']] || :document
|
555
|
-
@status = Status.new(raw_collection['status'].to_i) if raw_collection.
|
532
|
+
@status = Status.new(raw_collection['status'].to_i) if raw_collection.key?('status')
|
556
533
|
self
|
557
534
|
end
|
558
535
|
|