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.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +0 -4
  5. data/Gemfile +1 -1
  6. data/Gemfile.devtools +24 -18
  7. data/README.md +6 -11
  8. data/ashikawa-core.gemspec +7 -6
  9. data/config/flay.yml +2 -2
  10. data/config/flog.yml +2 -1
  11. data/config/reek.yml +68 -84
  12. data/config/rubocop.yml +99 -0
  13. data/config/yardstick.yml +1 -1
  14. data/lib/ashikawa-core/collection.rb +74 -21
  15. data/lib/ashikawa-core/configuration.rb +26 -0
  16. data/lib/ashikawa-core/connection.rb +5 -2
  17. data/lib/ashikawa-core/cursor.rb +28 -16
  18. data/lib/ashikawa-core/database.rb +89 -12
  19. data/lib/ashikawa-core/document.rb +32 -5
  20. data/lib/ashikawa-core/edge.rb +3 -0
  21. data/lib/ashikawa-core/exceptions/client_error.rb +3 -3
  22. data/lib/ashikawa-core/exceptions/server_error.rb +3 -3
  23. data/lib/ashikawa-core/figure.rb +17 -5
  24. data/lib/ashikawa-core/index.rb +4 -0
  25. data/lib/ashikawa-core/key_options.rb +54 -0
  26. data/lib/ashikawa-core/query.rb +39 -74
  27. data/lib/ashikawa-core/request_preprocessor.rb +2 -2
  28. data/lib/ashikawa-core/response_preprocessor.rb +21 -12
  29. data/lib/ashikawa-core/transaction.rb +113 -0
  30. data/lib/ashikawa-core/version.rb +1 -1
  31. data/spec/acceptance/basic_spec.rb +40 -12
  32. data/spec/acceptance/index_spec.rb +2 -1
  33. data/spec/acceptance/query_spec.rb +18 -17
  34. data/spec/acceptance/transactions_spec.rb +30 -0
  35. data/spec/fixtures/collections/all.json +90 -30
  36. data/spec/fixtures/cursor/edges.json +23 -0
  37. data/spec/setup/arangodb.sh +7 -6
  38. data/spec/unit/collection_spec.rb +89 -13
  39. data/spec/unit/connection_spec.rb +23 -14
  40. data/spec/unit/cursor_spec.rb +15 -4
  41. data/spec/unit/database_spec.rb +58 -17
  42. data/spec/unit/document_spec.rb +24 -4
  43. data/spec/unit/edge_spec.rb +1 -1
  44. data/spec/unit/exception_spec.rb +4 -2
  45. data/spec/unit/figure_spec.rb +17 -10
  46. data/spec/unit/index_spec.rb +1 -1
  47. data/spec/unit/key_options_spec.rb +25 -0
  48. data/spec/unit/query_spec.rb +1 -1
  49. data/spec/unit/spec_helper.rb +20 -2
  50. data/spec/unit/transaction_spec.rb +153 -0
  51. data/tasks/adjustments.rake +23 -14
  52. metadata +31 -41
  53. data/.rvmrc +0 -1
  54. data/config/roodi.yml +0 -17
  55. 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