riak-client 2.4.1 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.document +5 -5
  3. data/.gitignore +3 -0
  4. data/Gemfile +17 -17
  5. data/Guardfile +20 -20
  6. data/LICENSE.md +16 -16
  7. data/RELNOTES.md +4 -0
  8. data/Rakefile +6 -1
  9. data/lib/riak/client/beefcake/crdt/counter_loader.rb +18 -18
  10. data/lib/riak/client/beefcake/crdt/hyper_log_log_loader.rb +18 -0
  11. data/lib/riak/client/beefcake/crdt/map_loader.rb +64 -64
  12. data/lib/riak/client/beefcake/crdt_loader.rb +4 -1
  13. data/lib/riak/client/beefcake/crdt_operator.rb +13 -0
  14. data/lib/riak/client/beefcake/footer +4 -4
  15. data/lib/riak/client/beefcake/header +6 -6
  16. data/lib/riak/client/beefcake/messages.rb +67 -10
  17. data/lib/riak/client/decaying.rb +36 -36
  18. data/lib/riak/client/feature_detection.rb +120 -120
  19. data/lib/riak/client/instrumentation.rb +19 -19
  20. data/lib/riak/client/node.rb +49 -49
  21. data/lib/riak/client/search.rb +27 -27
  22. data/lib/riak/conflict.rb +13 -13
  23. data/lib/riak/core_ext.rb +7 -7
  24. data/lib/riak/core_ext/blank.rb +53 -53
  25. data/lib/riak/core_ext/extract_options.rb +7 -7
  26. data/lib/riak/core_ext/json.rb +15 -15
  27. data/lib/riak/core_ext/slice.rb +18 -18
  28. data/lib/riak/core_ext/stringify_keys.rb +10 -10
  29. data/lib/riak/core_ext/symbolize_keys.rb +10 -10
  30. data/lib/riak/core_ext/to_param.rb +31 -31
  31. data/lib/riak/crdt.rb +23 -21
  32. data/lib/riak/crdt/base.rb +1 -1
  33. data/lib/riak/crdt/hyper_log_log.rb +97 -0
  34. data/lib/riak/crdt/operation.rb +19 -19
  35. data/lib/riak/encoding.rb +6 -6
  36. data/lib/riak/errors/backend_creation.rb +9 -9
  37. data/lib/riak/errors/connection_error.rb +50 -50
  38. data/lib/riak/errors/protobuffs_error.rb +11 -11
  39. data/lib/riak/i18n.rb +7 -7
  40. data/lib/riak/instrumentation.rb +6 -6
  41. data/lib/riak/json.rb +52 -52
  42. data/lib/riak/list_buckets.rb +28 -28
  43. data/lib/riak/locale/en.yml +1 -0
  44. data/lib/riak/locale/fr.yml +51 -51
  45. data/lib/riak/map_reduce/results.rb +49 -49
  46. data/lib/riak/map_reduce_error.rb +7 -7
  47. data/lib/riak/multiget.rb +122 -122
  48. data/lib/riak/robject.rb +17 -1
  49. data/lib/riak/search/result_document.rb +9 -0
  50. data/lib/riak/stamp.rb +77 -77
  51. data/lib/riak/tombstone.rb +13 -0
  52. data/lib/riak/util/tcp_socket_extensions.rb +58 -58
  53. data/lib/riak/version.rb +1 -1
  54. data/spec/failover/failover.rb +59 -59
  55. data/spec/fixtures/bitcask.txt +25 -25
  56. data/spec/fixtures/multipart-basic-conflict.txt +15 -15
  57. data/spec/fixtures/multipart-blank.txt +7 -7
  58. data/spec/fixtures/multipart-mapreduce.txt +10 -10
  59. data/spec/fixtures/multipart-with-body.txt +16 -16
  60. data/spec/fixtures/multipart-with-marked-tombstones.txt +17 -17
  61. data/spec/fixtures/multipart-with-unmarked-tombstone.txt +16 -16
  62. data/spec/fixtures/server.cert.crt +15 -15
  63. data/spec/fixtures/server.cert.key +15 -15
  64. data/spec/fixtures/test.pem +1 -1
  65. data/spec/integration/riak/bucket_types_spec.rb +38 -0
  66. data/spec/integration/riak/crdt/configuration_spec.rb +4 -3
  67. data/spec/integration/riak/crdt_spec.rb +70 -0
  68. data/spec/integration/riak/encodings/crdt_spec.rb +29 -3
  69. data/spec/integration/riak/encodings/yz_spec.rb +2 -1
  70. data/spec/integration/riak/preflist_spec.rb +15 -3
  71. data/spec/integration/riak/protobuffs/timeouts_spec.rb +1 -1
  72. data/spec/integration/riak/security_spec.rb +11 -6
  73. data/spec/integration/riak/threading_spec.rb +154 -150
  74. data/spec/integration/yokozuna/index_spec.rb +61 -61
  75. data/spec/integration/yokozuna/queries_spec.rb +1 -1
  76. data/spec/integration/yokozuna/schema_spec.rb +49 -49
  77. data/spec/riak/beefcake_protobuffs_backend/crdt_operator_spec.rb +22 -0
  78. data/spec/riak/core_ext/to_param_spec.rb +15 -15
  79. data/spec/riak/crdt/hyper_log_log_spec.rb +56 -0
  80. data/spec/riak/crdt/inner_counter_spec.rb +21 -21
  81. data/spec/riak/crdt/inner_set_spec.rb +33 -33
  82. data/spec/riak/crdt/set_spec.rb +61 -61
  83. data/spec/riak/crdt/shared_examples.rb +14 -0
  84. data/spec/riak/escape_spec.rb +72 -72
  85. data/spec/riak/feature_detection_spec.rb +77 -77
  86. data/spec/riak/index_collection_spec.rb +53 -53
  87. data/spec/riak/instrumentation_spec.rb +124 -124
  88. data/spec/riak/link_spec.rb +85 -85
  89. data/spec/riak/list_buckets_spec.rb +41 -41
  90. data/spec/riak/node_spec.rb +26 -26
  91. data/spec/riak/robject_spec.rb +45 -0
  92. data/spec/support/certs/README.md +12 -12
  93. data/spec/support/certs/ca.crt +21 -21
  94. data/spec/support/certs/client.crl +13 -13
  95. data/spec/support/certs/client.crt +94 -94
  96. data/spec/support/certs/client.csr +18 -18
  97. data/spec/support/certs/client.key +27 -27
  98. data/spec/support/certs/empty_ca.crt +21 -21
  99. data/spec/support/certs/server.crl +13 -13
  100. data/spec/support/certs/server.crt +94 -94
  101. data/spec/support/certs/server.key +27 -27
  102. data/spec/support/crdt_search_fixtures.rb +1 -1
  103. data/spec/support/integration_setup.rb +10 -10
  104. data/spec/support/test_client.rb +1 -1
  105. data/spec/support/test_client.yml.example +10 -10
  106. metadata +10 -3
@@ -1,27 +1,27 @@
1
- -----BEGIN RSA PRIVATE KEY-----
2
- MIIEpAIBAAKCAQEAypRqVLZb7lby1uEBe4fvkfVKpVGvEWlu/FMcwnNJcg+Aa0fU
3
- PLkDH/pRhdwd0FKszZc3C4b99zz2nK23BlQU8zyhz/5XshSR3hdZX8GGgS8VisWF
4
- 3svUiJr4BEXcaun1WJbxKspd1+P06h33NK6YwpQFdN7Dcl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fqQd
26
+ R1Xw38QGYIhQV8hnLGFRUAa+71jlLdQDfogOpwFS96ZL4yFX6rDX+Q==
27
+ -----END RSA PRIVATE KEY-----
@@ -4,7 +4,7 @@ module CrdtSearchFixtures
4
4
  end
5
5
 
6
6
  def maps_type_name
7
- 'maps'
7
+ Riak::Crdt::DEFAULT_BUCKET_TYPES[:map]
8
8
  end
9
9
 
10
10
  def maps_bucket_type
@@ -1,10 +1,10 @@
1
- # auto-tag all integration specs with :integration => true
2
- module IntegrationSpecs
3
- def self.included(klass)
4
- klass.metadata[:integration] = true
5
- end
6
- end
7
-
8
- RSpec.configure do |config|
9
- config.include IntegrationSpecs, file_path: %r{spec/integration}
10
- end
1
+ # auto-tag all integration specs with :integration => true
2
+ module IntegrationSpecs
3
+ def self.included(klass)
4
+ klass.metadata[:integration] = true
5
+ end
6
+ end
7
+
8
+ RSpec.configure do |config|
9
+ config.include IntegrationSpecs, file_path: %r{spec/integration}
10
+ end
@@ -26,7 +26,7 @@ module TestClient
26
26
  rescue Errno::ENOENT => ex
27
27
  $stderr.puts("WARNING: could not find file: #{config_path}, exception: #{ex}")
28
28
  config = {}
29
- config[:pb_port] = 10017
29
+ config[:pb_port] = ENV['RIAK_PORT'] || 10017
30
30
  end
31
31
 
32
32
  if config[:nodes]
@@ -1,10 +1,10 @@
1
- # This file is used for configuring test_client used by
2
- # many of the integration tests.
3
- #
4
- # Simply set the arguments you'd normally pass to
5
- # Riak::Client.new in the file.
6
- #
7
- # Don't run multiple nodes, integration tests include
8
- # quorum checks that may result in race conditions.
9
-
10
- pb_port: 10017
1
+ # This file is used for configuring test_client used by
2
+ # many of the integration tests.
3
+ #
4
+ # Simply set the arguments you'd normally pass to
5
+ # Riak::Client.new in the file.
6
+ #
7
+ # Don't run multiple nodes, integration tests include
8
+ # quorum checks that may result in race conditions.
9
+
10
+ pb_port: 8087
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riak-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryce Kerley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -218,6 +218,7 @@ files:
218
218
  - lib/riak/client.rb
219
219
  - lib/riak/client/beefcake/bucket_properties_operator.rb
220
220
  - lib/riak/client/beefcake/crdt/counter_loader.rb
221
+ - lib/riak/client/beefcake/crdt/hyper_log_log_loader.rb
221
222
  - lib/riak/client/beefcake/crdt/map_loader.rb
222
223
  - lib/riak/client/beefcake/crdt/set_loader.rb
223
224
  - lib/riak/client/beefcake/crdt_loader.rb
@@ -261,6 +262,7 @@ files:
261
262
  - lib/riak/crdt/batch_counter.rb
262
263
  - lib/riak/crdt/batch_map.rb
263
264
  - lib/riak/crdt/counter.rb
265
+ - lib/riak/crdt/hyper_log_log.rb
264
266
  - lib/riak/crdt/inner_counter.rb
265
267
  - lib/riak/crdt/inner_flag.rb
266
268
  - lib/riak/crdt/inner_map.rb
@@ -313,6 +315,7 @@ files:
313
315
  - lib/riak/time_series/read.rb
314
316
  - lib/riak/time_series/row.rb
315
317
  - lib/riak/time_series/submission.rb
318
+ - lib/riak/tombstone.rb
316
319
  - lib/riak/util/escape.rb
317
320
  - lib/riak/util/gzip.rb
318
321
  - lib/riak/util/string.rb
@@ -372,6 +375,7 @@ files:
372
375
  - spec/riak/core_ext/to_param_spec.rb
373
376
  - spec/riak/counter_spec.rb
374
377
  - spec/riak/crdt/counter_spec.rb
378
+ - spec/riak/crdt/hyper_log_log_spec.rb
375
379
  - spec/riak/crdt/inner_counter_spec.rb
376
380
  - spec/riak/crdt/inner_flag_spec.rb
377
381
  - spec/riak/crdt/inner_map_spec.rb
@@ -424,6 +428,7 @@ files:
424
428
  - spec/support/search_config.rb
425
429
  - spec/support/search_corpus_setup.rb
426
430
  - spec/support/test_client.rb
431
+ - spec/support/test_client.yml
427
432
  - spec/support/test_client.yml.example
428
433
  - spec/support/unified_backend_examples.rb
429
434
  - spec/support/version_filter.rb
@@ -448,7 +453,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
448
453
  version: '0'
449
454
  requirements: []
450
455
  rubyforge_project:
451
- rubygems_version: 2.6.6
456
+ rubygems_version: 2.6.8
452
457
  signing_key:
453
458
  specification_version: 4
454
459
  summary: riak-client is a rich client for Riak, the distributed database by Basho.
@@ -504,6 +509,7 @@ test_files:
504
509
  - spec/riak/core_ext/to_param_spec.rb
505
510
  - spec/riak/counter_spec.rb
506
511
  - spec/riak/crdt/counter_spec.rb
512
+ - spec/riak/crdt/hyper_log_log_spec.rb
507
513
  - spec/riak/crdt/inner_counter_spec.rb
508
514
  - spec/riak/crdt/inner_flag_spec.rb
509
515
  - spec/riak/crdt/inner_map_spec.rb
@@ -556,6 +562,7 @@ test_files:
556
562
  - spec/support/search_config.rb
557
563
  - spec/support/search_corpus_setup.rb
558
564
  - spec/support/test_client.rb
565
+ - spec/support/test_client.yml
559
566
  - spec/support/test_client.yml.example
560
567
  - spec/support/unified_backend_examples.rb
561
568
  - spec/support/version_filter.rb