moesif_rack 1.4.9 → 1.4.10

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: 91724c174f328bf7a8a4b988ee09b3d18438c043a1a64d321d779b21956f6be3
4
- data.tar.gz: d5e702b86d078fd0655c13d2fc570e9403c91a6014f5c9c7f7705e2d22e4d1fd
3
+ metadata.gz: e9862b7c7e3a113f37599bff78bf6fbca9bd1edd439dac103f26ec54354dc862
4
+ data.tar.gz: 507fe6d85365f8588063e656d3085e34c8b6b7b5a9e17ec7b993dc8f31af60ac
5
5
  SHA512:
6
- metadata.gz: a94ea5d908d57e8e148c126212d9470b17f4ceff266c3bdf3b02950517e5b77a4e544128ca7f7cfdbe01c12c975fdedad6694947a77d1e274e9bf301a3ca6f58
7
- data.tar.gz: 829537f2b578b9b3f555cd4d3988f3799db3bd0d4ed11e6b98f49bffbaa4d7e557e88030f523622784546348b1b5151819148e52d20870bfb33bb0fe5d96c013
6
+ metadata.gz: ef060aca2101ec875908456975537dba773fbbf4d721ed0a0797c0a03c23604e750a98fff8ec4d9b836b4aba6ba5b090ffa4aed1866d25ef0d49d36d5cad94fd
7
+ data.tar.gz: c7a845885a3fc2171e904e08c05f553b025037e72027e9dfea2c52a2b186266ea93d26ce51d091f14a9d514c8afe084e3dddab5886d7d70400669418a083cba8
@@ -24,15 +24,15 @@ module MoesifCaptureOutgoing
24
24
  @skip_outgoing = options['skip_outgoing']
25
25
  @mask_data_outgoing = options['mask_data_outgoing']
26
26
  @log_body_outgoing = options.fetch('log_body_outgoing', true)
27
- @app_config = AppConfig.new
28
- @config = @app_config.get_config(@api_controller, @debug)
27
+ @app_config = AppConfig.new(@debug)
29
28
  @config_etag = nil
30
29
  @sampling_percentage = 100
31
30
  @last_updated_time = Time.now.utc
32
31
  @config_dict = Hash.new
33
32
  begin
34
- if !@config.nil?
35
- @config_etag, @sampling_percentage, @last_updated_time = @app_config.parse_configuration(@config, @debug)
33
+ new_config = @app_config.get_config(@api_controller)
34
+ if !new_config.nil?
35
+ @config, @config_etag, @last_config_download_time = @app_config.parse_configuration(new_config)
36
36
  end
37
37
  rescue => exception
38
38
  if @debug
@@ -176,7 +176,7 @@ module MoesifCaptureOutgoing
176
176
  begin
177
177
  @random_percentage = Random.rand(0.00..100.00)
178
178
  begin
179
- @sampling_percentage = @app_config.get_sampling_percentage(@config, event_model.user_id, event_model.company_id, @debug)
179
+ @sampling_percentage = @app_config.get_sampling_percentage(@config, event_model.user_id, event_model.company_id)
180
180
  rescue => exception
181
181
  if @debug
182
182
  puts 'Error while getting sampling percentage, assuming default behavior'
@@ -196,8 +196,10 @@ module MoesifCaptureOutgoing
196
196
 
197
197
  if !event_response_config_etag.nil? && !@config_etag.nil? && @config_etag != event_response_config_etag && Time.now.utc > @last_updated_time + 300
198
198
  begin
199
- @config = @app_config.get_config(@api_controller, @debug)
200
- @config_etag, @sampling_percentage, @last_updated_time = @app_config.parse_configuration(@config, @debug)
199
+ new_config = @app_config.get_config(@api_controller)
200
+ if !new_config.nil?
201
+ @config, @config_etag, @last_config_download_time = @app_config.parse_configuration(new_config)
202
+ end
201
203
  rescue => exception
202
204
  if @debug
203
205
  puts 'Error while updating the application configuration'
@@ -222,7 +224,7 @@ module MoesifCaptureOutgoing
222
224
  puts e.response_code
223
225
  end
224
226
  rescue => e
225
- if debug
227
+ if @debug
226
228
  puts e.to_s
227
229
  end
228
230
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moesif_rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.9
4
+ version: 1.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moesif, Inc
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-01 00:00:00.000000000 Z
12
+ date: 2021-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement