devcycle-ruby-server-sdk 2.2.1 → 2.3.1

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
  SHA256:
3
- metadata.gz: 55cd81c5ce333954bd7627ac9c0e49bba0043a4ef206e7b41c922202d77b07db
4
- data.tar.gz: e95e958de7af9fae690a597a5646f0a0113a0a0ff8ddb87aadda8639f0d49cd4
3
+ metadata.gz: e3292b534fec4f8c89f4d664af580c470134e26b2850d539ee1772025e83f3f9
4
+ data.tar.gz: 5a7819b140352a167dc579301760cb94e9b6d37ac3072c7d56424899a1495adb
5
5
  SHA512:
6
- metadata.gz: 6c49a7d485435a9cc2fce7a964980892dc515ad6a6c348d255408779a5ac05bb511d1bd4796b5e0775c4fecf0eaba61acec180bf80461491e1b18bd88902e659
7
- data.tar.gz: 534ef29f1564b1297c463b91be326e43833bcdd74ead2c40d3b22be99e3fea108600eaef5a2511b3dbe49e019b3601f30de189ce3576ba3c7169545934546c64
6
+ metadata.gz: b0cf6025b840e4c49130288f888c0b5ffba60ea00ac4784cb39fadf0e6f0bfe2ce3f6870dc4e8f392a9ca4b28093270ac3a7aecb722f7086240475a172e2a2b2
7
+ data.tar.gz: 73131a61afa91700b109f00524760521b23624d9a2653411398af60d25d565afa21432b5f494b6b27f6810818004071f81eb090400e024b5d31d35b6a5cca8ae
@@ -58,24 +58,27 @@ module DevCycle
58
58
  end
59
59
 
60
60
  @max_config_retries.times do
61
+ @logger.debug("Requesting a new config for #{get_config_url}, etag: #{@config_e_tag}")
61
62
  resp = req.run
63
+ @logger.debug("Config request complete, status: #{resp.code}")
62
64
  case resp.code
63
65
  when 304
64
- @logger.debug("Config not modified, using cache, etag: #{this.configEtag}")
65
- return
66
+ @logger.debug("Config not modified, using cache, etag: #{@config_e_tag}")
67
+ break
66
68
  when 200
69
+ @logger.debug("Config downloaded, etag: #{resp.headers['Etag']}")
67
70
  set_config(resp.body, resp.headers['Etag'])
68
- return
71
+ break
69
72
  when 403
70
73
  stop_polling
71
74
  @logger.error("Failed to download DevCycle config; Invalid SDK Key.")
72
- return
75
+ break
73
76
  when 500...599
74
77
  @logger.error("Failed to download DevCycle config. Status: #{resp.code}")
75
78
  else
76
79
  stop_polling
77
80
  @logger.error("Unexpected response code - DevCycle Response: #{Oj.dump(resp)}")
78
- return
81
+ break
79
82
  end
80
83
  end
81
84
 
@@ -89,6 +92,7 @@ module DevCycle
89
92
 
90
93
  @local_bucketing.store_config(config)
91
94
  @config_e_tag = etag
95
+ @logger.debug("Config stored, etag: #{@config_e_tag}")
92
96
  @local_bucketing.has_config = true
93
97
  end
94
98
 
@@ -2,10 +2,10 @@ syntax = "proto3";
2
2
  package proto;
3
3
 
4
4
  enum VariableType_PB {
5
- Boolean = 0;
6
- Number = 1;
7
- String = 2;
8
- JSON = 3;
5
+ Boolean = 0;
6
+ Number = 1;
7
+ String = 2;
8
+ JSON = 3;
9
9
  }
10
10
 
11
11
  message NullableString {
@@ -16,7 +16,6 @@ message NullableString {
16
16
  message NullableDouble {
17
17
  double value = 1;
18
18
  bool isNull = 2;
19
- string dummy = 3;
20
19
  }
21
20
 
22
21
  enum CustomDataType {
@@ -39,11 +38,11 @@ message NullableCustomData {
39
38
  }
40
39
 
41
40
  message VariableForUserParams_PB {
42
- string sdkKey = 1;
43
- string variableKey = 2;
44
- VariableType_PB variableType = 3;
45
- DVCUser_PB user = 4;
46
- bool shouldTrackEvent = 5;
41
+ string sdkKey = 1;
42
+ string variableKey = 2;
43
+ VariableType_PB variableType = 3;
44
+ DVCUser_PB user = 4;
45
+ bool shouldTrackEvent = 5;
47
46
  }
48
47
 
49
48
  message DVCUser_PB {
@@ -60,11 +59,11 @@ message DVCUser_PB {
60
59
  }
61
60
 
62
61
  message SDKVariable_PB {
63
- string _id = 1;
64
- VariableType_PB type = 2;
65
- string key = 3;
66
- bool boolValue = 4;
67
- double doubleValue = 5;
68
- string stringValue = 6;
69
- NullableString evalReason = 7;
70
- }
62
+ string _id = 1;
63
+ VariableType_PB type = 2;
64
+ string key = 3;
65
+ bool boolValue = 4;
66
+ double doubleValue = 5;
67
+ string stringValue = 6;
68
+ NullableString evalReason = 7;
69
+ }
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: variableForUser.proto
2
+ # source: variableForUserParams.proto
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("variableForUser.proto", :syntax => :proto3) do
7
+ add_file("variableForUserParams.proto", :syntax => :proto3) do
8
8
  add_message "proto.NullableString" do
9
9
  optional :value, :string, 1
10
10
  optional :isNull, :bool, 2
@@ -12,7 +12,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_message "proto.NullableDouble" do
13
13
  optional :value, :double, 1
14
14
  optional :isNull, :bool, 2
15
- optional :dummy, :string, 3
16
15
  end
17
16
  add_message "proto.CustomDataValue" do
18
17
  optional :type, :enum, 1, "proto.CustomDataType"
@@ -216,6 +216,10 @@ module DevCycle
216
216
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
217
217
  end
218
218
 
219
+ if !@user_id.is_a?(String)
220
+ invalid_properties.push('invalid value for "user_id", user_id must be a string.')
221
+ end
222
+
219
223
  if !@language.nil? && @language.to_s.length > 2
220
224
  invalid_properties.push('invalid value for "language", the character length must be smaller than or equal to 2.')
221
225
  end
@@ -231,6 +235,7 @@ module DevCycle
231
235
  # @return true if the model is valid
232
236
  def valid?
233
237
  return false if @user_id.nil?
238
+ return false if !@user_id.is_a?(String)
234
239
  return false if !@language.nil? && @language.to_s.length > 2
235
240
  return false if !@country.nil? && @country.to_s.length > 2
236
241
  sdk_type_validator = EnumAttributeValidator.new('String', ["api", "server"])
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.3.0
11
11
  =end
12
12
 
13
13
  module DevCycle
14
- VERSION = '2.2.1'
14
+ VERSION = '2.3.1'
15
15
  end
@@ -34,7 +34,7 @@ require 'devcycle-ruby-server-sdk/localbucketing/platform_data'
34
34
  require 'devcycle-ruby-server-sdk/localbucketing/bucketed_user_config'
35
35
  require 'devcycle-ruby-server-sdk/localbucketing/event_queue'
36
36
  require 'devcycle-ruby-server-sdk/localbucketing/event_types'
37
- require 'devcycle-ruby-server-sdk/localbucketing/proto/variableForUser_pb'
37
+ require 'devcycle-ruby-server-sdk/localbucketing/proto/variableForUserParams_pb'
38
38
  require 'devcycle-ruby-server-sdk/localbucketing/proto/helpers'
39
39
 
40
40
  module DevCycle
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devcycle-ruby-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DevCycleHQ
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-24 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -147,8 +147,8 @@ files:
147
147
  - lib/devcycle-ruby-server-sdk/localbucketing/local_bucketing.rb
148
148
  - lib/devcycle-ruby-server-sdk/localbucketing/platform_data.rb
149
149
  - lib/devcycle-ruby-server-sdk/localbucketing/proto/helpers.rb
150
- - lib/devcycle-ruby-server-sdk/localbucketing/proto/variableForUser.proto
151
- - lib/devcycle-ruby-server-sdk/localbucketing/proto/variableForUser_pb.rb
150
+ - lib/devcycle-ruby-server-sdk/localbucketing/proto/variableForUserParams.proto
151
+ - lib/devcycle-ruby-server-sdk/localbucketing/proto/variableForUserParams_pb.rb
152
152
  - lib/devcycle-ruby-server-sdk/models/error_response.rb
153
153
  - lib/devcycle-ruby-server-sdk/models/event.rb
154
154
  - lib/devcycle-ruby-server-sdk/models/feature.rb