launchdarkly-server-sdk 6.2.4 → 6.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/ldclient-rb/config.rb +3 -3
  4. data/lib/ldclient-rb/integrations/dynamodb.rb +1 -1
  5. data/lib/ldclient-rb/integrations/redis.rb +1 -1
  6. data/lib/ldclient-rb/interfaces.rb +1 -1
  7. data/lib/ldclient-rb/ldclient.rb +5 -5
  8. data/lib/ldclient-rb/version.rb +1 -1
  9. metadata +6 -121
  10. data/.circleci/config.yml +0 -43
  11. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -37
  12. data/.github/ISSUE_TEMPLATE/config.yml +0 -5
  13. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  14. data/.github/pull_request_template.md +0 -21
  15. data/.gitignore +0 -16
  16. data/.hound.yml +0 -2
  17. data/.ldrelease/build-docs.sh +0 -18
  18. data/.ldrelease/circleci/linux/execute.sh +0 -18
  19. data/.ldrelease/circleci/mac/execute.sh +0 -18
  20. data/.ldrelease/circleci/template/build.sh +0 -19
  21. data/.ldrelease/circleci/template/gems-setup.sh +0 -16
  22. data/.ldrelease/circleci/template/prepare.sh +0 -17
  23. data/.ldrelease/circleci/template/publish.sh +0 -19
  24. data/.ldrelease/circleci/template/test.sh +0 -10
  25. data/.ldrelease/circleci/template/update-version.sh +0 -8
  26. data/.ldrelease/circleci/windows/execute.ps1 +0 -19
  27. data/.ldrelease/config.yml +0 -29
  28. data/.rspec +0 -2
  29. data/.rubocop.yml +0 -600
  30. data/.simplecov +0 -4
  31. data/CHANGELOG.md +0 -371
  32. data/CODEOWNERS +0 -1
  33. data/CONTRIBUTING.md +0 -37
  34. data/Gemfile +0 -3
  35. data/azure-pipelines.yml +0 -51
  36. data/docs/Makefile +0 -26
  37. data/docs/index.md +0 -9
  38. data/launchdarkly-server-sdk.gemspec +0 -43
  39. data/spec/config_spec.rb +0 -63
  40. data/spec/diagnostic_events_spec.rb +0 -165
  41. data/spec/evaluation_detail_spec.rb +0 -135
  42. data/spec/event_sender_spec.rb +0 -197
  43. data/spec/event_summarizer_spec.rb +0 -63
  44. data/spec/events_spec.rb +0 -607
  45. data/spec/expiring_cache_spec.rb +0 -76
  46. data/spec/feature_store_spec_base.rb +0 -213
  47. data/spec/file_data_source_spec.rb +0 -283
  48. data/spec/fixtures/feature.json +0 -37
  49. data/spec/fixtures/feature1.json +0 -36
  50. data/spec/fixtures/user.json +0 -9
  51. data/spec/flags_state_spec.rb +0 -81
  52. data/spec/http_util.rb +0 -132
  53. data/spec/impl/evaluator_bucketing_spec.rb +0 -216
  54. data/spec/impl/evaluator_clause_spec.rb +0 -55
  55. data/spec/impl/evaluator_operators_spec.rb +0 -141
  56. data/spec/impl/evaluator_rule_spec.rb +0 -128
  57. data/spec/impl/evaluator_segment_spec.rb +0 -125
  58. data/spec/impl/evaluator_spec.rb +0 -349
  59. data/spec/impl/evaluator_spec_base.rb +0 -75
  60. data/spec/impl/event_factory_spec.rb +0 -108
  61. data/spec/impl/model/serialization_spec.rb +0 -41
  62. data/spec/in_memory_feature_store_spec.rb +0 -12
  63. data/spec/integrations/consul_feature_store_spec.rb +0 -40
  64. data/spec/integrations/dynamodb_feature_store_spec.rb +0 -103
  65. data/spec/integrations/store_wrapper_spec.rb +0 -276
  66. data/spec/launchdarkly-server-sdk_spec.rb +0 -13
  67. data/spec/launchdarkly-server-sdk_spec_autoloadtest.rb +0 -9
  68. data/spec/ldclient_end_to_end_spec.rb +0 -157
  69. data/spec/ldclient_spec.rb +0 -635
  70. data/spec/newrelic_spec.rb +0 -5
  71. data/spec/polling_spec.rb +0 -120
  72. data/spec/redis_feature_store_spec.rb +0 -121
  73. data/spec/requestor_spec.rb +0 -209
  74. data/spec/segment_store_spec_base.rb +0 -95
  75. data/spec/simple_lru_cache_spec.rb +0 -24
  76. data/spec/spec_helper.rb +0 -9
  77. data/spec/store_spec.rb +0 -10
  78. data/spec/stream_spec.rb +0 -45
  79. data/spec/user_filter_spec.rb +0 -91
  80. data/spec/util_spec.rb +0 -17
  81. data/spec/version_spec.rb +0 -7
@@ -1,91 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe LaunchDarkly::UserFilter do
4
- subject { LaunchDarkly::UserFilter }
5
-
6
- let(:base_config) { LaunchDarkly::Config.new }
7
- let(:config_with_all_attrs_private) { LaunchDarkly::Config.new({ all_attributes_private: true })}
8
- let(:config_with_some_attrs_private) { LaunchDarkly::Config.new({ private_attribute_names: ['firstName', 'bizzle'] })}
9
-
10
- # users to serialize
11
-
12
- let(:user) {
13
- { key: 'abc', firstName: 'Sue', custom: { bizzle: 'def', dizzle: 'ghi' }}
14
- }
15
-
16
- let(:user_specifying_own_private_attr) {
17
- u = user.clone
18
- u[:privateAttributeNames] = [ 'dizzle', 'unused' ]
19
- u
20
- }
21
-
22
- let(:user_with_unknown_top_level_attrs) {
23
- { key: 'abc', firstName: 'Sue', species: 'human', hatSize: 6, custom: { bizzle: 'def', dizzle: 'ghi' }}
24
- }
25
-
26
- let(:anon_user) {
27
- { key: 'abc', anonymous: 'true', custom: { bizzle: 'def', dizzle: 'ghi' }}
28
- }
29
-
30
- # expected results from serializing user
31
-
32
- let(:user_with_all_attrs_hidden) {
33
- { key: 'abc', custom: { }, privateAttrs: [ 'bizzle', 'dizzle', 'firstName' ]}
34
- }
35
-
36
- let(:user_with_some_attrs_hidden) {
37
- { key: 'abc', custom: { dizzle: 'ghi' }, privateAttrs: [ 'bizzle', 'firstName' ]}
38
- }
39
-
40
- let(:user_with_own_specified_attr_hidden) {
41
- { key: 'abc', firstName: 'Sue', custom: { bizzle: 'def' }, privateAttrs: [ 'dizzle' ]}
42
- }
43
-
44
- let(:anon_user_with_all_attrs_hidden) {
45
- { key: 'abc', anonymous: 'true', custom: { }, privateAttrs: [ 'bizzle', 'dizzle' ]}
46
- }
47
-
48
- describe "serialize_events" do
49
- it "includes all user attributes by default" do
50
- uf = LaunchDarkly::UserFilter.new(base_config)
51
- result = uf.transform_user_props(user)
52
- expect(result).to eq user
53
- end
54
-
55
- it "hides all except key if all_attributes_private is true" do
56
- uf = LaunchDarkly::UserFilter.new(config_with_all_attrs_private)
57
- result = uf.transform_user_props(user)
58
- expect(result).to eq user_with_all_attrs_hidden
59
- end
60
-
61
- it "hides some attributes if private_attribute_names is set" do
62
- uf = LaunchDarkly::UserFilter.new(config_with_some_attrs_private)
63
- result = uf.transform_user_props(user)
64
- expect(result).to eq user_with_some_attrs_hidden
65
- end
66
-
67
- it "hides attributes specified in per-user privateAttrs" do
68
- uf = LaunchDarkly::UserFilter.new(base_config)
69
- result = uf.transform_user_props(user_specifying_own_private_attr)
70
- expect(result).to eq user_with_own_specified_attr_hidden
71
- end
72
-
73
- it "looks at both per-user privateAttrs and global config" do
74
- uf = LaunchDarkly::UserFilter.new(config_with_some_attrs_private)
75
- result = uf.transform_user_props(user_specifying_own_private_attr)
76
- expect(result).to eq user_with_all_attrs_hidden
77
- end
78
-
79
- it "strips out any unknown top-level attributes" do
80
- uf = LaunchDarkly::UserFilter.new(base_config)
81
- result = uf.transform_user_props(user_with_unknown_top_level_attrs)
82
- expect(result).to eq user
83
- end
84
-
85
- it "leaves the anonymous attribute as is" do
86
- uf = LaunchDarkly::UserFilter.new(config_with_all_attrs_private)
87
- result = uf.transform_user_props(anon_user)
88
- expect(result).to eq anon_user_with_all_attrs_hidden
89
- end
90
- end
91
- end
data/spec/util_spec.rb DELETED
@@ -1,17 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe LaunchDarkly::Util do
4
- describe 'log_exception' do
5
- let(:logger) { double() }
6
-
7
- it "logs error data" do
8
- expect(logger).to receive(:error)
9
- expect(logger).to receive(:debug)
10
- begin
11
- raise StandardError.new 'asdf'
12
- rescue StandardError => exn
13
- LaunchDarkly::Util.log_exception(logger, "message", exn)
14
- end
15
- end
16
- end
17
- end
data/spec/version_spec.rb DELETED
@@ -1,7 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe LaunchDarkly do
4
- it "has a version" do
5
- expect(LaunchDarkly::VERSION).to be
6
- end
7
- end