arangorb 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d54851cdef40b35916f72673a1501f5d5f74871a
4
- data.tar.gz: 4b453ff4829696fa34e9b8d5db2c09ce73069a95
3
+ metadata.gz: 3194dbef462d90449c67ec230d959dae501cada9
4
+ data.tar.gz: 1cbc3970d660b05de9a0c00452d9b71113b559ca
5
5
  SHA512:
6
- metadata.gz: dca119efd2bdc23accf16a0e3169f3a67e95fb1cee43924d2156aa3a6f205d8c6890751b2508afc10971694195ef944bc493250a51d1703dee2c1b6779ac85af
7
- data.tar.gz: 14b701df1c161236be807c53e67e9a52a9bab3d13e8f51035ebabdbe38731bd5e2fa140b8f6187ac2ba28aaf342b30a7b2995ee336f70d50f97352715caa9403
6
+ metadata.gz: e457014e24277735b1822cfb8d89e2b8b66d489b1b9dc5c7ee98b3a27d5535e5474f8c7553fdebbac72da1437af0649f74ff36647a9397210d008acaa94fb5d3
7
+ data.tar.gz: c8528ae92c500cc2b4468e7f1a62d78e41933ed6246280284ff589bb2f30b0f9132a42d86c840b134a5ebdc9606ce2cde4fe3525608e8fb00b3723cf051ccd33
@@ -4,7 +4,7 @@ require "rake"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'arangorb'
7
- s.version = '1.3.0'
7
+ s.version = '1.4.0'
8
8
  s.authors = ['Stefano Martin']
9
9
  s.email = ['stefano@seluxit.com']
10
10
  s.homepage = 'https://github.com/StefanoMartin/ArangoRB'
data/README.md CHANGED
@@ -4,7 +4,9 @@ ArangoRB [![Gem Version](https://badge.fury.io/rb/arangorb.svg)](https://badge.f
4
4
  [ArangoDatabase](https://www.arangodb.com/) is a native multi-model database with flexible data models for document, graphs, and key-values.
5
5
  ArangoRB is a Gem to use ArangoDatabase with Ruby. ArangoRB is based on the [HTTP API of ArangoDB](https://docs.arangodb.com/3.0/HTTP/index.html).
6
6
 
7
- ArangoRB has been tested with ArangoDatabase 3.0 on Ruby 2.3.1. It requires the gem "HTTParty"
7
+ ArangoRB 0.1.0 - 1.3.0 have been tested with ArangoDB 3.0 with Ruby 2.3.1
8
+ ArangoRB 1.4.0 have been tested with ArangoDB 3.1 with Ruby 2.3.3
9
+ It requires the gem "HTTParty"
8
10
 
9
11
  To install ArangoRB: `gem install arangorb`
10
12
 
@@ -362,7 +362,7 @@ class ArangoCollection < ArangoServer
362
362
  # === EXPORT ===
363
363
 
364
364
  def export(count: nil, restrict: nil, batchSize: nil, flush: nil, limit: nil, ttl: nil) # TESTED
365
- query = { "collection": @collection }
365
+ query = { "collection" => @collection }
366
366
  body = {
367
367
  "count" => count,
368
368
  "restrict" => restrict,
@@ -394,7 +394,7 @@ class ArangoCollection < ArangoServer
394
394
  else
395
395
  query = { "collection": @collection }
396
396
  request = @@request.merge({ :query => query })
397
- result = self.class.put("/_db/#{@database}/_api/cursor/#{@idExport}", request)
397
+ result = self.class.put("/_db/#{@database}/_api/export/#{@idExport}", request)
398
398
  return result.headers["x-arango-async-id"] if @@async == "store"
399
399
  return true if @@async
400
400
  result = result.parsed_response
@@ -355,7 +355,7 @@ class ArangoServer
355
355
  end
356
356
 
357
357
  def self.propertyWAL # TESTED
358
- result = put("/_admin/wal/properties", @@request)
358
+ result = get("/_admin/wal/properties", @@request)
359
359
  return_result result: result
360
360
  end
361
361
 
Binary file
@@ -27,7 +27,7 @@ describe ArangoCollection do
27
27
 
28
28
  it "create a duplicate Collection" do
29
29
  myCollection = @myCollection.create
30
- expect(myCollection).to eq "cannot create collection: duplicate name"
30
+ expect(myCollection).to eq "duplicate name: duplicate name"
31
31
  end
32
32
 
33
33
  it "create a new Edge Collection" do
@@ -71,7 +71,7 @@ describe ArangoCollection do
71
71
 
72
72
  it "statistics" do
73
73
  info = @myCollection.statistics
74
- expect(info["lastTick"]).to eq "0"
74
+ expect(info["lastTick"]).to eq 0
75
75
  end
76
76
 
77
77
  it "checksum" do
@@ -3,7 +3,7 @@ require_relative './../../spec_helper'
3
3
  describe ArangoCollection do
4
4
  context "#get" do
5
5
  it "revision" do
6
- expect(@myCollection.revision.to_i).to be >= 1
6
+ expect(@myCollection.revision.class).to be String
7
7
  end
8
8
 
9
9
  it "collection" do
@@ -35,12 +35,12 @@ describe ArangoCollection do
35
35
 
36
36
  context "#export" do
37
37
  it "export" do
38
- result = @myCollection.export
38
+ result = @myCollection.export flush: true
39
39
  expect(result[0].class).to be ArangoDocument
40
40
  end
41
41
 
42
42
  it "exportNext" do
43
- result = @myCollection.export batchSize: 3
43
+ result = @myCollection.export batchSize: 3, flush: true
44
44
  result = @myCollection.exportNext
45
45
  expect(result[0].class).to be ArangoDocument
46
46
  end
@@ -1,5 +1,6 @@
1
1
  require "rspec"
2
- require_relative File.expand_path('../../lib/arangorb', __FILE__)
2
+ require "arangorb"
3
+ # require_relative File.expand_path('../../lib/arangorb', __FILE__)
3
4
 
4
5
  RSpec.configure do |config|
5
6
  config.color = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arangorb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -59,6 +59,7 @@ files:
59
59
  - lib/arangorb.rb
60
60
  - spec/arangoRB_helper.rb
61
61
  - spec/arangoRestart_helper.rb
62
+ - spec/arangorb-1.3.0.gem
62
63
  - spec/lib/0.1.0/arangoAQL_helper.rb
63
64
  - spec/lib/0.1.0/arangoC_helper.rb
64
65
  - spec/lib/0.1.0/arangoDB_helper.rb