ashikawa-core 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +0 -4
- data/Gemfile +1 -1
- data/Gemfile.devtools +24 -18
- data/README.md +6 -11
- data/ashikawa-core.gemspec +7 -6
- data/config/flay.yml +2 -2
- data/config/flog.yml +2 -1
- data/config/reek.yml +68 -84
- data/config/rubocop.yml +99 -0
- data/config/yardstick.yml +1 -1
- data/lib/ashikawa-core/collection.rb +74 -21
- data/lib/ashikawa-core/configuration.rb +26 -0
- data/lib/ashikawa-core/connection.rb +5 -2
- data/lib/ashikawa-core/cursor.rb +28 -16
- data/lib/ashikawa-core/database.rb +89 -12
- data/lib/ashikawa-core/document.rb +32 -5
- data/lib/ashikawa-core/edge.rb +3 -0
- data/lib/ashikawa-core/exceptions/client_error.rb +3 -3
- data/lib/ashikawa-core/exceptions/server_error.rb +3 -3
- data/lib/ashikawa-core/figure.rb +17 -5
- data/lib/ashikawa-core/index.rb +4 -0
- data/lib/ashikawa-core/key_options.rb +54 -0
- data/lib/ashikawa-core/query.rb +39 -74
- data/lib/ashikawa-core/request_preprocessor.rb +2 -2
- data/lib/ashikawa-core/response_preprocessor.rb +21 -12
- data/lib/ashikawa-core/transaction.rb +113 -0
- data/lib/ashikawa-core/version.rb +1 -1
- data/spec/acceptance/basic_spec.rb +40 -12
- data/spec/acceptance/index_spec.rb +2 -1
- data/spec/acceptance/query_spec.rb +18 -17
- data/spec/acceptance/transactions_spec.rb +30 -0
- data/spec/fixtures/collections/all.json +90 -30
- data/spec/fixtures/cursor/edges.json +23 -0
- data/spec/setup/arangodb.sh +7 -6
- data/spec/unit/collection_spec.rb +89 -13
- data/spec/unit/connection_spec.rb +23 -14
- data/spec/unit/cursor_spec.rb +15 -4
- data/spec/unit/database_spec.rb +58 -17
- data/spec/unit/document_spec.rb +24 -4
- data/spec/unit/edge_spec.rb +1 -1
- data/spec/unit/exception_spec.rb +4 -2
- data/spec/unit/figure_spec.rb +17 -10
- data/spec/unit/index_spec.rb +1 -1
- data/spec/unit/key_options_spec.rb +25 -0
- data/spec/unit/query_spec.rb +1 -1
- data/spec/unit/spec_helper.rb +20 -2
- data/spec/unit/transaction_spec.rb +153 -0
- data/tasks/adjustments.rake +23 -14
- metadata +31 -41
- data/.rvmrc +0 -1
- data/config/roodi.yml +0 -17
- data/spec/spec_helper.rb +0 -27
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use @$(basename `pwd`) --create
|
data/config/roodi.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
AbcMetricMethodCheck: { score: 10.0 }
|
2
|
-
AssignmentInConditionalCheck: { }
|
3
|
-
ClassLineCountCheck: { line_count: 1000 }
|
4
|
-
ClassNameCheck:
|
5
|
-
pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/
|
6
|
-
ClassVariableCheck: { }
|
7
|
-
CyclomaticComplexityBlockCheck: { complexity: 1 }
|
8
|
-
CyclomaticComplexityMethodCheck: { complexity: 6 }
|
9
|
-
EmptyRescueBodyCheck: { }
|
10
|
-
ForLoopCheck: { }
|
11
|
-
MethodLineCountCheck: { line_count: 9 }
|
12
|
-
MethodNameCheck:
|
13
|
-
pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/
|
14
|
-
ModuleLineCountCheck: { line_count: 500 }
|
15
|
-
ModuleNameCheck:
|
16
|
-
pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/
|
17
|
-
ParameterNumberCheck: { parameter_count: 5 }
|
data/spec/spec_helper.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
if ENV['COVERAGE'] == 'true'
|
4
|
-
require 'simplecov'
|
5
|
-
|
6
|
-
SimpleCov.start do
|
7
|
-
command_name 'spec:unit'
|
8
|
-
add_filter 'config'
|
9
|
-
add_filter 'spec'
|
10
|
-
minimum_coverage 100
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
require 'ashikawa-core'
|
15
|
-
require 'rspec'
|
16
|
-
|
17
|
-
if RUBY_VERSION < '1.9'
|
18
|
-
require 'rspec/autorun'
|
19
|
-
end
|
20
|
-
|
21
|
-
# require spec support files and shared behavior
|
22
|
-
Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each do |file|
|
23
|
-
require file
|
24
|
-
end
|
25
|
-
|
26
|
-
RSpec.configure do |config|
|
27
|
-
end
|