prefab-cloud-ruby 1.8.8.pre.1 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.github/pull_request_template.md +8 -0
 - data/.github/workflows/ruby.yml +1 -1
 - data/.tool-versions +1 -1
 - data/CHANGELOG.md +94 -81
 - data/VERSION +1 -1
 - data/compile_protos.sh +4 -2
 - data/lib/prefab/caching_http_connection.rb +95 -0
 - data/lib/prefab/config_client.rb +7 -8
 - data/lib/prefab/context.rb +1 -8
 - data/lib/prefab/criteria_evaluator.rb +182 -9
 - data/lib/prefab/fixed_size_hash.rb +14 -0
 - data/lib/prefab/http_connection.rb +10 -6
 - data/lib/prefab/semver.rb +132 -0
 - data/lib/prefab-cloud-ruby.rb +3 -0
 - data/lib/prefab_pb.rb +4 -23
 - data/prefab-cloud-ruby.gemspec +27 -39
 - data/test/support/common_helpers.rb +17 -13
 - data/test/test_caching_http_connection.rb +218 -0
 - data/test/test_context.rb +0 -15
 - data/test/test_context_shape.rb +1 -1
 - data/test/test_criteria_evaluator.rb +333 -0
 - data/test/test_evaluation_summary_aggregator.rb +69 -69
 - data/test/test_fixed_size_hash.rb +119 -0
 - data/test/test_semver.rb +108 -0
 - metadata +12 -5
 
| 
         @@ -21,7 +21,7 @@ module Prefab 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                def evaluate(properties)
         
     | 
| 
       23 
23 
     | 
    
         
             
                  rtn = evaluate_for_env(@project_env_id, properties) ||
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
      
 24 
     | 
    
         
            +
                    evaluate_for_env(0, properties)
         
     | 
| 
       25 
25 
     | 
    
         
             
                  LOG.trace {
         
     | 
| 
       26 
26 
     | 
    
         
             
                    "Eval Key #{@config.key} Result #{rtn&.reportable_value} with #{properties.to_h}"
         
     | 
| 
       27 
27 
     | 
    
         
             
                  } unless @config.config_type == :LOG_LEVEL
         
     | 
| 
         @@ -86,21 +86,140 @@ module Prefab 
     | 
|
| 
       86 
86 
     | 
    
         
             
                end
         
     | 
| 
       87 
87 
     | 
    
         | 
| 
       88 
88 
     | 
    
         
             
                def IN_INT_RANGE(criterion, properties)
         
     | 
| 
       89 
     | 
    
         
            -
                  value =  
     | 
| 
       90 
     | 
    
         
            -
                            Time.now.utc.to_i * 1000
         
     | 
| 
       91 
     | 
    
         
            -
                          else
         
     | 
| 
       92 
     | 
    
         
            -
                            value_from_properties(criterion, properties)
         
     | 
| 
       93 
     | 
    
         
            -
                          end
         
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
      
 89 
     | 
    
         
            +
                  value = value_from_properties(criterion, properties)
         
     | 
| 
       95 
90 
     | 
    
         
             
                  value && value >= criterion.value_to_match.int_range.start && value < criterion.value_to_match.int_range.end
         
     | 
| 
       96 
91 
     | 
    
         
             
                end
         
     | 
| 
       97 
92 
     | 
    
         | 
| 
      
 93 
     | 
    
         
            +
                def PROP_MATCHES(criterion, properties)
         
     | 
| 
      
 94 
     | 
    
         
            +
                  result = check_regex_match(criterion, properties)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  if result.error
         
     | 
| 
      
 96 
     | 
    
         
            +
                    false
         
     | 
| 
      
 97 
     | 
    
         
            +
                  else
         
     | 
| 
      
 98 
     | 
    
         
            +
                    result.matched
         
     | 
| 
      
 99 
     | 
    
         
            +
                  end
         
     | 
| 
      
 100 
     | 
    
         
            +
                end
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                def PROP_DOES_NOT_MATCH(criterion, properties)
         
     | 
| 
      
 103 
     | 
    
         
            +
                  result = check_regex_match(criterion, properties)
         
     | 
| 
      
 104 
     | 
    
         
            +
                  if result.error
         
     | 
| 
      
 105 
     | 
    
         
            +
                    false
         
     | 
| 
      
 106 
     | 
    
         
            +
                  else
         
     | 
| 
      
 107 
     | 
    
         
            +
                    !result.matched
         
     | 
| 
      
 108 
     | 
    
         
            +
                  end
         
     | 
| 
      
 109 
     | 
    
         
            +
                end
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                def PROP_LESS_THAN(criterion, properties)
         
     | 
| 
      
 112 
     | 
    
         
            +
                  evaluate_number_comparison(criterion, properties, COMPARE_TO_OPERATORS[:less_than]).matched
         
     | 
| 
      
 113 
     | 
    
         
            +
                end
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
      
 115 
     | 
    
         
            +
                def PROP_LESS_THAN_OR_EQUAL(criterion, properties)
         
     | 
| 
      
 116 
     | 
    
         
            +
                  evaluate_number_comparison(criterion, properties, COMPARE_TO_OPERATORS[:less_than_or_equal]).matched
         
     | 
| 
      
 117 
     | 
    
         
            +
                end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
                def PROP_GREATER_THAN(criterion, properties)
         
     | 
| 
      
 120 
     | 
    
         
            +
                  evaluate_number_comparison(criterion, properties, COMPARE_TO_OPERATORS[:greater_than]).matched
         
     | 
| 
      
 121 
     | 
    
         
            +
                end
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
      
 123 
     | 
    
         
            +
                def PROP_GREATER_THAN_OR_EQUAL(criterion, properties)
         
     | 
| 
      
 124 
     | 
    
         
            +
                  evaluate_number_comparison(criterion, properties,COMPARE_TO_OPERATORS[:greater_than_or_equal]) .matched
         
     | 
| 
      
 125 
     | 
    
         
            +
                end
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
                def PROP_BEFORE(criterion, properties)
         
     | 
| 
      
 128 
     | 
    
         
            +
                  evaluate_date_comparison(criterion, properties, COMPARE_TO_OPERATORS[:less_than]).matched
         
     | 
| 
      
 129 
     | 
    
         
            +
                end
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
                def PROP_AFTER(criterion, properties)
         
     | 
| 
      
 132 
     | 
    
         
            +
                  evaluate_date_comparison(criterion, properties, COMPARE_TO_OPERATORS[:greater_than]).matched
         
     | 
| 
      
 133 
     | 
    
         
            +
                end
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
                def PROP_SEMVER_LESS_THAN(criterion, properties)
         
     | 
| 
      
 136 
     | 
    
         
            +
                  evaluate_semver_comparison(criterion, properties, COMPARE_TO_OPERATORS[:less_than]).matched
         
     | 
| 
      
 137 
     | 
    
         
            +
                end
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
                def PROP_SEMVER_EQUAL(criterion, properties)
         
     | 
| 
      
 140 
     | 
    
         
            +
                  evaluate_semver_comparison(criterion, properties, COMPARE_TO_OPERATORS[:equal_to]).matched
         
     | 
| 
      
 141 
     | 
    
         
            +
                end
         
     | 
| 
      
 142 
     | 
    
         
            +
             
     | 
| 
      
 143 
     | 
    
         
            +
                def PROP_SEMVER_GREATER_THAN(criterion, properties)
         
     | 
| 
      
 144 
     | 
    
         
            +
                  evaluate_semver_comparison(criterion, properties, COMPARE_TO_OPERATORS[:greater_than]).matched
         
     | 
| 
      
 145 
     | 
    
         
            +
                end
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
       98 
147 
     | 
    
         
             
                def value_from_properties(criterion, properties)
         
     | 
| 
       99 
     | 
    
         
            -
                   
     | 
| 
      
 148 
     | 
    
         
            +
                  case criterion.property_name
         
     | 
| 
      
 149 
     | 
    
         
            +
                  when NAMESPACE_KEY
         
     | 
| 
      
 150 
     | 
    
         
            +
                    @namespace
         
     | 
| 
      
 151 
     | 
    
         
            +
                  when 'prefab.current-time'
         
     | 
| 
      
 152 
     | 
    
         
            +
                    Time.now.utc.to_i * 1000
         
     | 
| 
      
 153 
     | 
    
         
            +
                  else
         
     | 
| 
      
 154 
     | 
    
         
            +
                    properties.get(criterion.property_name)
         
     | 
| 
      
 155 
     | 
    
         
            +
                  end
         
     | 
| 
       100 
156 
     | 
    
         
             
                end
         
     | 
| 
       101 
157 
     | 
    
         | 
| 
      
 158 
     | 
    
         
            +
                COMPARE_TO_OPERATORS = {
         
     | 
| 
      
 159 
     | 
    
         
            +
                  less_than_or_equal: -> cmp {  cmp <= 0 },
         
     | 
| 
      
 160 
     | 
    
         
            +
                  less_than: -> cmp {  cmp < 0 },
         
     | 
| 
      
 161 
     | 
    
         
            +
                  equal_to: -> cmp {  cmp == 0 },
         
     | 
| 
      
 162 
     | 
    
         
            +
                  greater_than: -> cmp {  cmp > 0 },
         
     | 
| 
      
 163 
     | 
    
         
            +
                  greater_than_or_equal: -> cmp {  cmp >= 0 },
         
     | 
| 
      
 164 
     | 
    
         
            +
                }
         
     | 
| 
      
 165 
     | 
    
         
            +
             
     | 
| 
       102 
166 
     | 
    
         
             
                private
         
     | 
| 
       103 
167 
     | 
    
         | 
| 
      
 168 
     | 
    
         
            +
                def evaluate_semver_comparison(criterion, properties, predicate)
         
     | 
| 
      
 169 
     | 
    
         
            +
                  context_version = value_from_properties(criterion, properties)&.then { |v| SemanticVersion.parse_quietly(v) }
         
     | 
| 
      
 170 
     | 
    
         
            +
                  config_version = criterion.value_to_match&.string&.then {|v| SemanticVersion.parse_quietly(criterion.value_to_match.string) }
         
     | 
| 
      
 171 
     | 
    
         
            +
             
     | 
| 
      
 172 
     | 
    
         
            +
                  unless context_version && config_version
         
     | 
| 
      
 173 
     | 
    
         
            +
                    return MatchResult.error
         
     | 
| 
      
 174 
     | 
    
         
            +
                  end
         
     | 
| 
      
 175 
     | 
    
         
            +
                  predicate.call(context_version <=> config_version) ? MatchResult.matched : MatchResult.not_matched
         
     | 
| 
      
 176 
     | 
    
         
            +
                end
         
     | 
| 
      
 177 
     | 
    
         
            +
             
     | 
| 
      
 178 
     | 
    
         
            +
                def evaluate_date_comparison(criterion, properties, predicate)
         
     | 
| 
      
 179 
     | 
    
         
            +
                  context_millis = as_millis(value_from_properties(criterion, properties))
         
     | 
| 
      
 180 
     | 
    
         
            +
                  config_millis = as_millis(Prefab::ConfigValueUnwrapper.deepest_value(criterion.value_to_match, @config,
         
     | 
| 
      
 181 
     | 
    
         
            +
                                                                                       properties, @resolver).unwrap)
         
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
                  unless config_millis && context_millis
         
     | 
| 
      
 184 
     | 
    
         
            +
                    return MatchResult.error
         
     | 
| 
      
 185 
     | 
    
         
            +
                  end
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
      
 187 
     | 
    
         
            +
                  predicate.call(context_millis <=> config_millis) ? MatchResult.matched : MatchResult.not_matched
         
     | 
| 
      
 188 
     | 
    
         
            +
                end
         
     | 
| 
      
 189 
     | 
    
         
            +
             
     | 
| 
      
 190 
     | 
    
         
            +
                def evaluate_number_comparison(criterion, properties, predicate)
         
     | 
| 
      
 191 
     | 
    
         
            +
                  context_value = value_from_properties(criterion, properties)
         
     | 
| 
      
 192 
     | 
    
         
            +
                  value_to_match = extract_numeric_value(criterion.value_to_match)
         
     | 
| 
      
 193 
     | 
    
         
            +
             
     | 
| 
      
 194 
     | 
    
         
            +
                  return MatchResult.error if value_to_match.nil?
         
     | 
| 
      
 195 
     | 
    
         
            +
                  return MatchResult.error unless context_value.is_a?(Numeric)
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
                  # Compare the values and apply the predicate method
         
     | 
| 
      
 198 
     | 
    
         
            +
                  comparison_result = context_value <=> value_to_match
         
     | 
| 
      
 199 
     | 
    
         
            +
                  return MatchResult.error if comparison_result.nil?
         
     | 
| 
      
 200 
     | 
    
         
            +
             
     | 
| 
      
 201 
     | 
    
         
            +
                  predicate.call(comparison_result) ? MatchResult.matched : MatchResult.not_matched
         
     | 
| 
      
 202 
     | 
    
         
            +
                end
         
     | 
| 
      
 203 
     | 
    
         
            +
             
     | 
| 
      
 204 
     | 
    
         
            +
                def extract_numeric_value(config_value)
         
     | 
| 
      
 205 
     | 
    
         
            +
                  case config_value.type
         
     | 
| 
      
 206 
     | 
    
         
            +
                  when :int
         
     | 
| 
      
 207 
     | 
    
         
            +
                    config_value.int
         
     | 
| 
      
 208 
     | 
    
         
            +
                  when :double
         
     | 
| 
      
 209 
     | 
    
         
            +
                    config_value.double
         
     | 
| 
      
 210 
     | 
    
         
            +
                  end
         
     | 
| 
      
 211 
     | 
    
         
            +
                end
         
     | 
| 
      
 212 
     | 
    
         
            +
             
     | 
| 
      
 213 
     | 
    
         
            +
                def as_millis(obj)
         
     | 
| 
      
 214 
     | 
    
         
            +
                  if obj.is_a?(Numeric)
         
     | 
| 
      
 215 
     | 
    
         
            +
                    return obj.to_int if obj.respond_to?(:to_int)
         
     | 
| 
      
 216 
     | 
    
         
            +
                  end
         
     | 
| 
      
 217 
     | 
    
         
            +
                  if obj.is_a?(String)
         
     | 
| 
      
 218 
     | 
    
         
            +
                    Time.iso8601(obj).utc.to_i * 1000 rescue nil
         
     | 
| 
      
 219 
     | 
    
         
            +
                  end
         
     | 
| 
      
 220 
     | 
    
         
            +
                end
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
             
     | 
| 
       104 
223 
     | 
    
         
             
                def evaluate_for_env(env_id, properties)
         
     | 
| 
       105 
224 
     | 
    
         
             
                  @config.rows.each_with_index do |row, index|
         
     | 
| 
       106 
225 
     | 
    
         
             
                    next unless row.project_env_id == env_id
         
     | 
| 
         @@ -131,7 +250,7 @@ module Prefab 
     | 
|
| 
       131 
250 
     | 
    
         
             
                end
         
     | 
| 
       132 
251 
     | 
    
         | 
| 
       133 
252 
     | 
    
         
             
                def matches?(criterion, value, properties)
         
     | 
| 
       134 
     | 
    
         
            -
                  criterion_value_or_values = Prefab::ConfigValueUnwrapper.deepest_value(criterion.value_to_match, @config 
     | 
| 
      
 253 
     | 
    
         
            +
                  criterion_value_or_values = Prefab::ConfigValueUnwrapper.deepest_value(criterion.value_to_match, @config,
         
     | 
| 
       135 
254 
     | 
    
         
             
                                                                                         properties, @resolver).unwrap
         
     | 
| 
       136 
255 
     | 
    
         | 
| 
       137 
256 
     | 
    
         
             
                  case criterion_value_or_values
         
     | 
| 
         @@ -167,6 +286,60 @@ module Prefab 
     | 
|
| 
       167 
286 
     | 
    
         
             
                    value.include?(substring)
         
     | 
| 
       168 
287 
     | 
    
         
             
                  end
         
     | 
| 
       169 
288 
     | 
    
         
             
                end
         
     | 
| 
      
 289 
     | 
    
         
            +
             
     | 
| 
      
 290 
     | 
    
         
            +
                def check_regex_match(criterion, properties)
         
     | 
| 
      
 291 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 292 
     | 
    
         
            +
                    regex_definition = Prefab::ConfigValueUnwrapper.deepest_value(criterion.value_to_match, @config.key,
         
     | 
| 
      
 293 
     | 
    
         
            +
                                                                                  properties, @resolver).unwrap
         
     | 
| 
      
 294 
     | 
    
         
            +
             
     | 
| 
      
 295 
     | 
    
         
            +
                    return MatchResult.error unless regex_definition.is_a?(String)
         
     | 
| 
      
 296 
     | 
    
         
            +
             
     | 
| 
      
 297 
     | 
    
         
            +
                    value = value_from_properties(criterion, properties)
         
     | 
| 
      
 298 
     | 
    
         
            +
             
     | 
| 
      
 299 
     | 
    
         
            +
                    regex = compile_regex_safely(ensure_anchored_regex(regex_definition))
         
     | 
| 
      
 300 
     | 
    
         
            +
                    return MatchResult.error unless regex
         
     | 
| 
      
 301 
     | 
    
         
            +
             
     | 
| 
      
 302 
     | 
    
         
            +
                    matches = regex.match?(value.to_s)
         
     | 
| 
      
 303 
     | 
    
         
            +
                    matches ? MatchResult.matched : MatchResult.not_matched
         
     | 
| 
      
 304 
     | 
    
         
            +
                  rescue RegexpError
         
     | 
| 
      
 305 
     | 
    
         
            +
                    MatchResult.error
         
     | 
| 
      
 306 
     | 
    
         
            +
                  end
         
     | 
| 
      
 307 
     | 
    
         
            +
                end
         
     | 
| 
      
 308 
     | 
    
         
            +
             
     | 
| 
      
 309 
     | 
    
         
            +
                def compile_regex_safely(pattern)
         
     | 
| 
      
 310 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 311 
     | 
    
         
            +
                    Regexp.new(pattern)
         
     | 
| 
      
 312 
     | 
    
         
            +
                  rescue RegexpError
         
     | 
| 
      
 313 
     | 
    
         
            +
                    nil
         
     | 
| 
      
 314 
     | 
    
         
            +
                  end
         
     | 
| 
      
 315 
     | 
    
         
            +
                end
         
     | 
| 
      
 316 
     | 
    
         
            +
             
     | 
| 
      
 317 
     | 
    
         
            +
                def ensure_anchored_regex(pattern)
         
     | 
| 
      
 318 
     | 
    
         
            +
                  return pattern if pattern.start_with?("^") && pattern.end_with?("$")
         
     | 
| 
      
 319 
     | 
    
         
            +
             
     | 
| 
      
 320 
     | 
    
         
            +
                  "^#{pattern}$"
         
     | 
| 
      
 321 
     | 
    
         
            +
                end
         
     | 
| 
      
 322 
     | 
    
         
            +
             
     | 
| 
      
 323 
     | 
    
         
            +
                class MatchResult
         
     | 
| 
      
 324 
     | 
    
         
            +
                  attr_reader :matched, :error
         
     | 
| 
      
 325 
     | 
    
         
            +
             
     | 
| 
      
 326 
     | 
    
         
            +
                  def self.matched
         
     | 
| 
      
 327 
     | 
    
         
            +
                    new(matched: true)
         
     | 
| 
      
 328 
     | 
    
         
            +
                  end
         
     | 
| 
      
 329 
     | 
    
         
            +
             
     | 
| 
      
 330 
     | 
    
         
            +
                  def self.not_matched
         
     | 
| 
      
 331 
     | 
    
         
            +
                    new(matched: false)
         
     | 
| 
      
 332 
     | 
    
         
            +
                  end
         
     | 
| 
      
 333 
     | 
    
         
            +
             
     | 
| 
      
 334 
     | 
    
         
            +
                  def self.error
         
     | 
| 
      
 335 
     | 
    
         
            +
                    new(matched: false, error: true)
         
     | 
| 
      
 336 
     | 
    
         
            +
                  end
         
     | 
| 
      
 337 
     | 
    
         
            +
             
     | 
| 
      
 338 
     | 
    
         
            +
                  def initialize(matched:, error: false)
         
     | 
| 
      
 339 
     | 
    
         
            +
                    @matched = matched
         
     | 
| 
      
 340 
     | 
    
         
            +
                    @error = error
         
     | 
| 
      
 341 
     | 
    
         
            +
                  end
         
     | 
| 
      
 342 
     | 
    
         
            +
                end
         
     | 
| 
       170 
343 
     | 
    
         
             
              end
         
     | 
| 
       171 
344 
     | 
    
         
             
            end
         
     | 
| 
       172 
345 
     | 
    
         
             
            # rubocop:enable Naming/MethodName
         
     | 
| 
         @@ -0,0 +1,14 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
            module Prefab
         
     | 
| 
      
 3 
     | 
    
         
            +
              class FixedSizeHash < Hash
         
     | 
| 
      
 4 
     | 
    
         
            +
                def initialize(max_size)
         
     | 
| 
      
 5 
     | 
    
         
            +
                  @max_size = max_size
         
     | 
| 
      
 6 
     | 
    
         
            +
                  super()
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def []=(key, value)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  shift if size >= @max_size && !key?(key) # Only evict if adding a new key
         
     | 
| 
      
 11 
     | 
    
         
            +
                  super
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -9,13 +9,17 @@ module Prefab 
     | 
|
| 
       9 
9 
     | 
    
         
             
                  'X-PrefabCloud-Client-Version' => "prefab-cloud-ruby-#{Prefab::VERSION}"
         
     | 
| 
       10 
10 
     | 
    
         
             
                }.freeze
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                def initialize( 
     | 
| 
       13 
     | 
    
         
            -
                  @ 
     | 
| 
      
 12 
     | 
    
         
            +
                def initialize(uri, api_key)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @uri = uri
         
     | 
| 
       14 
14 
     | 
    
         
             
                  @api_key = api_key
         
     | 
| 
       15 
15 
     | 
    
         
             
                end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
                def  
     | 
| 
       18 
     | 
    
         
            -
                   
     | 
| 
      
 17 
     | 
    
         
            +
                def uri
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @uri
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def get(path, headers = {})
         
     | 
| 
      
 22 
     | 
    
         
            +
                  connection(PROTO_HEADERS.merge(headers)).get(path)
         
     | 
| 
       19 
23 
     | 
    
         
             
                end
         
     | 
| 
       20 
24 
     | 
    
         | 
| 
       21 
25 
     | 
    
         
             
                def post(path, body)
         
     | 
| 
         @@ -24,13 +28,13 @@ module Prefab 
     | 
|
| 
       24 
28 
     | 
    
         | 
| 
       25 
29 
     | 
    
         
             
                def connection(headers = {})
         
     | 
| 
       26 
30 
     | 
    
         
             
                  if Faraday::VERSION[0].to_i >= 2
         
     | 
| 
       27 
     | 
    
         
            -
                    Faraday.new(@ 
     | 
| 
      
 31 
     | 
    
         
            +
                    Faraday.new(@uri) do |conn|
         
     | 
| 
       28 
32 
     | 
    
         
             
                      conn.request :authorization, :basic, AUTH_USER, @api_key
         
     | 
| 
       29 
33 
     | 
    
         | 
| 
       30 
34 
     | 
    
         
             
                      conn.headers.merge!(headers)
         
     | 
| 
       31 
35 
     | 
    
         
             
                    end
         
     | 
| 
       32 
36 
     | 
    
         
             
                  else
         
     | 
| 
       33 
     | 
    
         
            -
                    Faraday.new(@ 
     | 
| 
      
 37 
     | 
    
         
            +
                    Faraday.new(@uri) do |conn|
         
     | 
| 
       34 
38 
     | 
    
         
             
                      conn.request :basic_auth, AUTH_USER, @api_key
         
     | 
| 
       35 
39 
     | 
    
         | 
| 
       36 
40 
     | 
    
         
             
                      conn.headers.merge!(headers)
         
     | 
| 
         @@ -0,0 +1,132 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class SemanticVersion
         
     | 
| 
      
 4 
     | 
    
         
            +
              include Comparable
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              SEMVER_PATTERN = /
         
     | 
| 
      
 7 
     | 
    
         
            +
                ^
         
     | 
| 
      
 8 
     | 
    
         
            +
                (?<major>0|[1-9]\d*)
         
     | 
| 
      
 9 
     | 
    
         
            +
                \.
         
     | 
| 
      
 10 
     | 
    
         
            +
                (?<minor>0|[1-9]\d*)
         
     | 
| 
      
 11 
     | 
    
         
            +
                \.
         
     | 
| 
      
 12 
     | 
    
         
            +
                (?<patch>0|[1-9]\d*)
         
     | 
| 
      
 13 
     | 
    
         
            +
                (?:-(?<prerelease>
         
     | 
| 
      
 14 
     | 
    
         
            +
                  (?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  (?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*
         
     | 
| 
      
 16 
     | 
    
         
            +
                ))?
         
     | 
| 
      
 17 
     | 
    
         
            +
                (?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?
         
     | 
| 
      
 18 
     | 
    
         
            +
                $
         
     | 
| 
      
 19 
     | 
    
         
            +
              /x
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              attr_reader :major, :minor, :patch, :prerelease, :build_metadata
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              def self.parse(version_string)
         
     | 
| 
      
 24 
     | 
    
         
            +
                raise ArgumentError, "version string cannot be nil" if version_string.nil?
         
     | 
| 
      
 25 
     | 
    
         
            +
                raise ArgumentError, "version string cannot be empty" if version_string.empty?
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                match = SEMVER_PATTERN.match(version_string)
         
     | 
| 
      
 28 
     | 
    
         
            +
                raise ArgumentError, "invalid semantic version format: #{version_string}" unless match
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                new(
         
     | 
| 
      
 31 
     | 
    
         
            +
                  major: match[:major].to_i,
         
     | 
| 
      
 32 
     | 
    
         
            +
                  minor: match[:minor].to_i,
         
     | 
| 
      
 33 
     | 
    
         
            +
                  patch: match[:patch].to_i,
         
     | 
| 
      
 34 
     | 
    
         
            +
                  prerelease: match[:prerelease],
         
     | 
| 
      
 35 
     | 
    
         
            +
                  build_metadata: match[:buildmetadata]
         
     | 
| 
      
 36 
     | 
    
         
            +
                )
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
              def self.parse_quietly(version_string)
         
     | 
| 
      
 40 
     | 
    
         
            +
                parse(version_string)
         
     | 
| 
      
 41 
     | 
    
         
            +
              rescue ArgumentError
         
     | 
| 
      
 42 
     | 
    
         
            +
                nil
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
              def initialize(major:, minor:, patch:, prerelease: nil, build_metadata: nil)
         
     | 
| 
      
 46 
     | 
    
         
            +
                @major = major
         
     | 
| 
      
 47 
     | 
    
         
            +
                @minor = minor
         
     | 
| 
      
 48 
     | 
    
         
            +
                @patch = patch
         
     | 
| 
      
 49 
     | 
    
         
            +
                @prerelease = prerelease
         
     | 
| 
      
 50 
     | 
    
         
            +
                @build_metadata = build_metadata
         
     | 
| 
      
 51 
     | 
    
         
            +
              end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
              def <=>(other)
         
     | 
| 
      
 54 
     | 
    
         
            +
                return nil unless other.is_a?(SemanticVersion)
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                # Compare major.minor.patch
         
     | 
| 
      
 57 
     | 
    
         
            +
                return major <=> other.major if major != other.major
         
     | 
| 
      
 58 
     | 
    
         
            +
                return minor <=> other.minor if minor != other.minor
         
     | 
| 
      
 59 
     | 
    
         
            +
                return patch <=> other.patch if patch != other.patch
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                # Compare pre-release versions
         
     | 
| 
      
 62 
     | 
    
         
            +
                compare_prerelease(prerelease, other.prerelease)
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
              def ==(other)
         
     | 
| 
      
 66 
     | 
    
         
            +
                return false unless other.is_a?(SemanticVersion)
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                major == other.major &&
         
     | 
| 
      
 69 
     | 
    
         
            +
                  minor == other.minor &&
         
     | 
| 
      
 70 
     | 
    
         
            +
                  patch == other.patch &&
         
     | 
| 
      
 71 
     | 
    
         
            +
                  prerelease == other.prerelease
         
     | 
| 
      
 72 
     | 
    
         
            +
                # Build metadata is ignored in equality checks
         
     | 
| 
      
 73 
     | 
    
         
            +
              end
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
              def eql?(other)
         
     | 
| 
      
 76 
     | 
    
         
            +
                self == other
         
     | 
| 
      
 77 
     | 
    
         
            +
              end
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
              def hash
         
     | 
| 
      
 80 
     | 
    
         
            +
                [major, minor, patch, prerelease].hash
         
     | 
| 
      
 81 
     | 
    
         
            +
              end
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
              def to_s
         
     | 
| 
      
 84 
     | 
    
         
            +
                result = "#{major}.#{minor}.#{patch}"
         
     | 
| 
      
 85 
     | 
    
         
            +
                result += "-#{prerelease}" if prerelease
         
     | 
| 
      
 86 
     | 
    
         
            +
                result += "+#{build_metadata}" if build_metadata
         
     | 
| 
      
 87 
     | 
    
         
            +
                result
         
     | 
| 
      
 88 
     | 
    
         
            +
              end
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
              private
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
              def self.numeric?(str)
         
     | 
| 
      
 93 
     | 
    
         
            +
                str.to_i.to_s == str
         
     | 
| 
      
 94 
     | 
    
         
            +
              end
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
              def compare_prerelease(pre1, pre2)
         
     | 
| 
      
 97 
     | 
    
         
            +
                # If both are empty, they're equal
         
     | 
| 
      
 98 
     | 
    
         
            +
                return 0 if pre1.nil? && pre2.nil?
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
                # A version without prerelease has higher precedence
         
     | 
| 
      
 101 
     | 
    
         
            +
                return 1 if pre1.nil?
         
     | 
| 
      
 102 
     | 
    
         
            +
                return -1 if pre2.nil?
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                # Split into identifiers
         
     | 
| 
      
 105 
     | 
    
         
            +
                ids1 = pre1.split('.')
         
     | 
| 
      
 106 
     | 
    
         
            +
                ids2 = pre2.split('.')
         
     | 
| 
      
 107 
     | 
    
         
            +
             
     | 
| 
      
 108 
     | 
    
         
            +
                # Compare each identifier until we find a difference
         
     | 
| 
      
 109 
     | 
    
         
            +
                [ids1.length, ids2.length].min.times do |i|
         
     | 
| 
      
 110 
     | 
    
         
            +
                  cmp = compare_prerelease_identifiers(ids1[i], ids2[i])
         
     | 
| 
      
 111 
     | 
    
         
            +
                  return cmp if cmp != 0
         
     | 
| 
      
 112 
     | 
    
         
            +
                end
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
                # If all identifiers match up to the length of the shorter one,
         
     | 
| 
      
 115 
     | 
    
         
            +
                # the longer one has higher precedence
         
     | 
| 
      
 116 
     | 
    
         
            +
                ids1.length <=> ids2.length
         
     | 
| 
      
 117 
     | 
    
         
            +
              end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
              def compare_prerelease_identifiers(id1, id2)
         
     | 
| 
      
 120 
     | 
    
         
            +
                # If both are numeric, compare numerically
         
     | 
| 
      
 121 
     | 
    
         
            +
                if self.class.numeric?(id1) && self.class.numeric?(id2)
         
     | 
| 
      
 122 
     | 
    
         
            +
                  return id1.to_i <=> id2.to_i
         
     | 
| 
      
 123 
     | 
    
         
            +
                end
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
                # If only one is numeric, numeric ones have lower precedence
         
     | 
| 
      
 126 
     | 
    
         
            +
                return -1 if self.class.numeric?(id1)
         
     | 
| 
      
 127 
     | 
    
         
            +
                return 1 if self.class.numeric?(id2)
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                # Neither is numeric, compare as strings
         
     | 
| 
      
 130 
     | 
    
         
            +
                id1 <=> id2
         
     | 
| 
      
 131 
     | 
    
         
            +
              end
         
     | 
| 
      
 132 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/prefab-cloud-ruby.rb
    CHANGED
    
    
    
        data/lib/prefab_pb.rb
    CHANGED
    
    | 
         @@ -5,31 +5,10 @@ 
     | 
|
| 
       5 
5 
     | 
    
         
             
            require 'google/protobuf'
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
            descriptor_data = "\n\x0cprefab.proto\x12\x06prefab\"W\n\x14\x43onfigServicePointer\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x13\n\x0bstart_at_id\x18\x02 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x03 \x01(\x03\"\x8f\x04\n\x0b\x43onfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x62ytes\x18\x03 \x01(\x0cH\x00\x12\x10\n\x06\x64ouble\x18\x04 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x05 \x01(\x08H\x00\x12\x31\n\x0fweighted_values\x18\x06 \x01(\x0b\x32\x16.prefab.WeightedValuesH\x00\x12\x33\n\x10limit_definition\x18\x07 \x01(\x0b\x32\x17.prefab.LimitDefinitionH\x00\x12%\n\tlog_level\x18\t \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\n \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x0b \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12$\n\x08provided\x18\x0c \x01(\x0b\x32\x10.prefab.ProvidedH\x00\x12\'\n\x08\x64uration\x18\x0f \x01(\x0b\x32\x13.prefab.IsoDurationH\x00\x12\x1c\n\x04json\x18\x10 \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12\x19\n\x0c\x63onfidential\x18\r \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x64\x65\x63rypt_with\x18\x0e \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04typeB\x0f\n\r_confidentialB\x0f\n\r_decrypt_with\"\x14\n\x04Json\x12\x0c\n\x04json\x18\x01 \x01(\t\"!\n\x0bIsoDuration\x12\x12\n\ndefinition\x18\x01 \x01(\t\"b\n\x08Provided\x12+\n\x06source\x18\x01 \x01(\x0e\x32\x16.prefab.ProvidedSourceH\x00\x88\x01\x01\x12\x13\n\x06lookup\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_sourceB\t\n\x07_lookup\"B\n\x08IntRange\x12\x12\n\x05start\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\t\"C\n\rWeightedValue\x12\x0e\n\x06weight\x18\x01 \x01(\x05\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"~\n\x0eWeightedValues\x12.\n\x0fweighted_values\x18\x01 \x03(\x0b\x32\x15.prefab.WeightedValue\x12\"\n\x15hash_by_property_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x18\n\x16_hash_by_property_name\"X\n\x0e\x41piKeyMetadata\x12\x13\n\x06key_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07user_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_key_idB\n\n\x08_user_idJ\x04\x08\x02\x10\x03\"\xa0\x02\n\x07\x43onfigs\x12\x1f\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x0e.prefab.Config\x12<\n\x16\x63onfig_service_pointer\x18\x02 \x01(\x0b\x32\x1c.prefab.ConfigServicePointer\x12\x34\n\x0f\x61pikey_metadata\x18\x03 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x12\x17\n\nkeep_alive\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_contextB\r\n\x0b_keep_alive\"\xfc\x03\n\x06\x43onfig\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x12\n\nproject_id\x18\x02 \x01(\x03\x12\x0b\n\x03key\x18\x03 \x01(\t\x12%\n\nchanged_by\x18\x04 \x01(\x0b\x32\x11.prefab.ChangedBy\x12\x1f\n\x04rows\x18\x05 \x03(\x0b\x32\x11.prefab.ConfigRow\x12-\n\x10\x61llowable_values\x18\x06 \x03(\x0b\x32\x13.prefab.ConfigValue\x12\'\n\x0b\x63onfig_type\x18\x07 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x15\n\x08\x64raft_id\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12,\n\nvalue_type\x18\t \x01(\x0e\x32\x18.prefab.Config.ValueType\x12\x1a\n\x12send_to_client_sdk\x18\n \x01(\x08\"\xb6\x01\n\tValueType\x12\x16\n\x12NOT_SET_VALUE_TYPE\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05\x42YTES\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x12\x08\n\x04\x42OOL\x10\x05\x12\x14\n\x10LIMIT_DEFINITION\x10\x07\x12\r\n\tLOG_LEVEL\x10\t\x12\x0f\n\x0bSTRING_LIST\x10\n\x12\r\n\tINT_RANGE\x10\x0b\x12\x0c\n\x08\x44URATION\x10\x0c\x12\x08\n\x04JSON\x10\rB\x0b\n\t_draft_id\"?\n\tChangedBy\x12\x0f\n\x07user_id\x18\x01 \x01(\x03\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x12\n\napi_key_id\x18\x03 \x01(\t\"\xe4\x01\n\tConfigRow\x12\x1b\n\x0eproject_env_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12(\n\x06values\x18\x02 \x03(\x0b\x32\x18.prefab.ConditionalValue\x12\x35\n\nproperties\x18\x03 \x03(\x0b\x32!.prefab.ConfigRow.PropertiesEntry\x1a\x46\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x11\n\x0f_project_env_id\"[\n\x10\x43onditionalValue\x12#\n\x08\x63riteria\x18\x01 \x03(\x0b\x32\x11.prefab.Criterion\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x9b\x05\n\tCriterion\x12\x15\n\rproperty_name\x18\x01 \x01(\t\x12\x35\n\x08operator\x18\x02 \x01(\x0e\x32#.prefab.Criterion.CriterionOperator\x12+\n\x0evalue_to_match\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x92\x04\n\x11\x43riterionOperator\x12\x0b\n\x07NOT_SET\x10\x00\x12\x11\n\rLOOKUP_KEY_IN\x10\x01\x12\x15\n\x11LOOKUP_KEY_NOT_IN\x10\x02\x12\n\n\x06IN_SEG\x10\x03\x12\x0e\n\nNOT_IN_SEG\x10\x04\x12\x0f\n\x0b\x41LWAYS_TRUE\x10\x05\x12\x12\n\x0ePROP_IS_ONE_OF\x10\x06\x12\x16\n\x12PROP_IS_NOT_ONE_OF\x10\x07\x12\x19\n\x15PROP_ENDS_WITH_ONE_OF\x10\x08\x12!\n\x1dPROP_DOES_NOT_END_WITH_ONE_OF\x10\t\x12\x16\n\x12HIERARCHICAL_MATCH\x10\n\x12\x10\n\x0cIN_INT_RANGE\x10\x0b\x12\x1b\n\x17PROP_STARTS_WITH_ONE_OF\x10\x0c\x12#\n\x1fPROP_DOES_NOT_START_WITH_ONE_OF\x10\r\x12\x18\n\x14PROP_CONTAINS_ONE_OF\x10\x0e\x12 \n\x1cPROP_DOES_NOT_CONTAIN_ONE_OF\x10\x0f\x12\x12\n\x0ePROP_LESS_THAN\x10\x10\x12\x1b\n\x17PROP_LESS_THAN_OR_EQUAL\x10\x11\x12\x15\n\x11PROP_GREATER_THAN\x10\x12\x12\x1e\n\x1aPROP_GREATER_THAN_OR_EQUAL\x10\x13\x12\x0f\n\x0bPROP_BEFORE\x10\x14\x12\x0e\n\nPROP_AFTER\x10\x15\"\x89\x01\n\x07Loggers\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\x12\x15\n\rinstance_hash\x18\x04 \x01(\t\x12\x16\n\tnamespace\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\xd9\x01\n\x06Logger\x12\x13\n\x0blogger_name\x18\x01 \x01(\t\x12\x13\n\x06traces\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06\x64\x65\x62ugs\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05infos\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05warns\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06\x65rrors\x18\x06 \x01(\x03H\x04\x88\x01\x01\x12\x13\n\x06\x66\x61tals\x18\x07 \x01(\x03H\x05\x88\x01\x01\x42\t\n\x07_tracesB\t\n\x07_debugsB\x08\n\x06_infosB\x08\n\x06_warnsB\t\n\x07_errorsB\t\n\x07_fatals\"\x16\n\x14LoggerReportResponse\"\xdb\x03\n\rLimitResponse\x12\x0e\n\x06passed\x18\x01 \x01(\x08\x12\x12\n\nexpires_at\x18\x02 \x01(\x03\x12\x16\n\x0e\x65nforced_group\x18\x03 \x01(\t\x12\x16\n\x0e\x63urrent_bucket\x18\x04 \x01(\x03\x12\x14\n\x0cpolicy_group\x18\x05 \x01(\t\x12;\n\x0bpolicy_name\x18\x06 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\x14\n\x0cpolicy_limit\x18\x07 \x01(\x05\x12\x0e\n\x06\x61mount\x18\x08 \x01(\x03\x12\x16\n\x0elimit_reset_at\x18\t \x01(\x03\x12\x39\n\x0csafety_level\x18\n \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"\xa9\x01\n\x10LimitPolicyNames\x12\x0b\n\x07NOT_SET\x10\x00\x12\x14\n\x10SECONDLY_ROLLING\x10\x01\x12\x14\n\x10MINUTELY_ROLLING\x10\x03\x12\x12\n\x0eHOURLY_ROLLING\x10\x05\x12\x11\n\rDAILY_ROLLING\x10\x07\x12\x13\n\x0fMONTHLY_ROLLING\x10\x08\x12\x0c\n\x08INFINITE\x10\t\x12\x12\n\x0eYEARLY_ROLLING\x10\n\"\x99\x02\n\x0cLimitRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x61\x63quire_amount\x18\x02 \x01(\x05\x12\x0e\n\x06groups\x18\x03 \x03(\t\x12:\n\x0elimit_combiner\x18\x04 \x01(\x0e\x32\".prefab.LimitRequest.LimitCombiner\x12\x1e\n\x16\x61llow_partial_response\x18\x05 \x01(\x08\x12\x39\n\x0csafety_level\x18\x06 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"6\n\rLimitCombiner\x12\x0b\n\x07NOT_SET\x10\x00\x12\x0b\n\x07MINIMUM\x10\x01\x12\x0b\n\x07MAXIMUM\x10\x02\"/\n\nContextSet\x12!\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32\x0f.prefab.Context\"\x96\x01\n\x07\x43ontext\x12\x11\n\x04type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12+\n\x06values\x18\x02 \x03(\x0b\x32\x1b.prefab.Context.ValuesEntry\x1a\x42\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x07\n\x05_type\"\x93\x01\n\x08Identity\x12\x13\n\x06lookup\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x34\n\nattributes\x18\x02 \x03(\x0b\x32 .prefab.Identity.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_lookup\"\xd6\x02\n\x18\x43onfigEvaluationMetaData\x12\x1d\n\x10\x63onfig_row_index\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12%\n\x04type\x18\x04 \x01(\x0e\x32\x12.prefab.ConfigTypeH\x03\x88\x01\x01\x12\x0f\n\x02id\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x31\n\nvalue_type\x18\x06 \x01(\x0e\x32\x18.prefab.Config.ValueTypeH\x05\x88\x01\x01\x42\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_indexB\x07\n\x05_typeB\x05\n\x03_idB\r\n\x0b_value_type\"\x8b\x03\n\x11\x43lientConfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x04 \x01(\x08H\x00\x12%\n\tlog_level\x18\x05 \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\x07 \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x08 \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12*\n\x08\x64uration\x18\t \x01(\x0b\x32\x16.prefab.ClientDurationH\x00\x12\x1c\n\x04json\x18\n \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12I\n\x1a\x63onfig_evaluation_metadata\x18\x06 \x01(\x0b\x32 .prefab.ConfigEvaluationMetaDataH\x01\x88\x01\x01\x42\x06\n\x04typeB\x1d\n\x1b_config_evaluation_metadata\"D\n\x0e\x43lientDuration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x12\x12\n\ndefinition\x18\x03 \x01(\t\"\xa4\x02\n\x11\x43onfigEvaluations\x12\x35\n\x06values\x18\x01 \x03(\x0b\x32%.prefab.ConfigEvaluations.ValuesEntry\x12\x34\n\x0f\x61pikey_metadata\x18\x02 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x03 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x1aH\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.prefab.ClientConfigValue:\x02\x38\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_context\"\xa8\x02\n\x0fLimitDefinition\x12;\n\x0bpolicy_name\x18\x02 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\r\n\x05\x62urst\x18\x04 \x01(\x05\x12\x12\n\naccount_id\x18\x05 \x01(\x03\x12\x15\n\rlast_modified\x18\x06 \x01(\x03\x12\x12\n\nreturnable\x18\x07 \x01(\x08\x12\x39\n\x0csafety_level\x18\x08 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"@\n\x0bSafetyLevel\x12\x0b\n\x07NOT_SET\x10\x00\x12\x12\n\x0eL4_BEST_EFFORT\x10\x04\x12\x10\n\x0cL5_BOMBPROOF\x10\x05\"@\n\x10LimitDefinitions\x12,\n\x0b\x64\x65\x66initions\x18\x01 \x03(\x0b\x32\x17.prefab.LimitDefinition\"\x8a\x01\n\x0f\x42ufferedRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x14\n\x0c\x63ontent_type\x18\x06 \x01(\t\x12\x0c\n\x04\x66ifo\x18\x07 \x01(\x08\"\x94\x01\n\x0c\x42\x61tchRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x16\n\x0e\x62\x61tch_template\x18\x06 \x01(\t\x12\x17\n\x0f\x62\x61tch_separator\x18\x07 \x01(\t\" \n\rBasicResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"3\n\x10\x43reationResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06new_id\x18\x02 \x01(\x03\"h\n\x07IdBlock\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\r\n\x05start\x18\x04 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x05 \x01(\x03\"a\n\x0eIdBlockRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\x0c\n\x04size\x18\x04 \x01(\x03\"\x8a\x01\n\x0c\x43ontextShape\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x0b\x66ield_types\x18\x02 \x03(\x0b\x32$.prefab.ContextShape.FieldTypesEntry\x1a\x31\n\x0f\x46ieldTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"[\n\rContextShapes\x12$\n\x06shapes\x18\x01 \x03(\x0b\x32\x14.prefab.ContextShape\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"C\n\rEvaluatedKeys\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\x93\x01\n\x0f\x45valuatedConfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0e\x63onfig_version\x18\x02 \x01(\x03\x12#\n\x06result\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\x12#\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSet\x12\x11\n\ttimestamp\x18\x05 \x01(\x03\"<\n\x10\x45valuatedConfigs\x12(\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x17.prefab.EvaluatedConfig\"\xc4\x03\n\x17\x43onfigEvaluationCounter\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x16\n\tconfig_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1b\n\x0eselected_index\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x0eselected_value\x18\x04 \x01(\x0b\x32\x13.prefab.ConfigValueH\x02\x88\x01\x01\x12\x1d\n\x10\x63onfig_row_index\x18\x05 \x01(\rH\x03\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x06 \x01(\rH\x04\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x36\n\x06reason\x18\x08 \x01(\x0e\x32&.prefab.ConfigEvaluationCounter.Reason\"\x15\n\x06Reason\x12\x0b\n\x07UNKNOWN\x10\x00\x42\x0c\n\n_config_idB\x11\n\x0f_selected_indexB\x11\n\x0f_selected_valueB\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_index\"{\n\x17\x43onfigEvaluationSummary\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x31\n\x08\x63ounters\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationCounter\"k\n\x19\x43onfigEvaluationSummaries\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x32\n\tsummaries\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationSummary\"Z\n\x15LoggersTelemetryEvent\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\"\x98\x02\n\x0eTelemetryEvent\x12\x36\n\tsummaries\x18\x02 \x01(\x0b\x32!.prefab.ConfigEvaluationSummariesH\x00\x12\x33\n\x10\x65xample_contexts\x18\x03 \x01(\x0b\x32\x17.prefab.ExampleContextsH\x00\x12+\n\x0c\x63lient_stats\x18\x04 \x01(\x0b\x32\x13.prefab.ClientStatsH\x00\x12\x30\n\x07loggers\x18\x05 \x01(\x0b\x32\x1d.prefab.LoggersTelemetryEventH\x00\x12/\n\x0e\x63ontext_shapes\x18\x06 \x01(\x0b\x32\x15.prefab.ContextShapesH\x00\x42\t\n\x07payload\"P\n\x0fTelemetryEvents\x12\x15\n\rinstance_hash\x18\x01 \x01(\t\x12&\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x16.prefab.TelemetryEvent\"*\n\x17TelemetryEventsResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\";\n\x0f\x45xampleContexts\x12(\n\x08\x65xamples\x18\x01 \x03(\x0b\x32\x16.prefab.ExampleContext\"K\n\x0e\x45xampleContext\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12&\n\ncontextSet\x18\x02 \x01(\x0b\x32\x12.prefab.ContextSet\"F\n\x0b\x43lientStats\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x1b\n\x13\x64ropped_event_count\x18\x03 \x01(\x04*:\n\x0eProvidedSource\x12\x1b\n\x17PROVIDED_SOURCE_NOT_SET\x10\x00\x12\x0b\n\x07\x45NV_VAR\x10\x01*\x82\x01\n\nConfigType\x12\x17\n\x13NOT_SET_CONFIG_TYPE\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x10\n\x0c\x46\x45\x41TURE_FLAG\x10\x02\x12\r\n\tLOG_LEVEL\x10\x03\x12\x0b\n\x07SEGMENT\x10\x04\x12\x14\n\x10LIMIT_DEFINITION\x10\x05\x12\x0b\n\x07\x44\x45LETED\x10\x06*a\n\x08LogLevel\x12\x15\n\x11NOT_SET_LOG_LEVEL\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\t\n\x05\x46\x41TAL\x10\t*G\n\tOnFailure\x12\x0b\n\x07NOT_SET\x10\x00\x12\x10\n\x0cLOG_AND_PASS\x10\x01\x12\x10\n\x0cLOG_AND_FAIL\x10\x02\x12\t\n\x05THROW\x10\x03\x42L\n\x13\x63loud.prefab.domainB\x06PrefabZ-github.com/prefab-cloud/prefab-cloud-go/protob\x06proto3"
         
     | 
| 
      
 8 
     | 
    
         
            +
            descriptor_data = "\n\x0cprefab.proto\x12\x06prefab\"W\n\x14\x43onfigServicePointer\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x13\n\x0bstart_at_id\x18\x02 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x03 \x01(\x03\"\xb1\x04\n\x0b\x43onfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x62ytes\x18\x03 \x01(\x0cH\x00\x12\x10\n\x06\x64ouble\x18\x04 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x05 \x01(\x08H\x00\x12\x31\n\x0fweighted_values\x18\x06 \x01(\x0b\x32\x16.prefab.WeightedValuesH\x00\x12\x33\n\x10limit_definition\x18\x07 \x01(\x0b\x32\x17.prefab.LimitDefinitionH\x00\x12%\n\tlog_level\x18\t \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\n \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x0b \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12$\n\x08provided\x18\x0c \x01(\x0b\x32\x10.prefab.ProvidedH\x00\x12\'\n\x08\x64uration\x18\x0f \x01(\x0b\x32\x13.prefab.IsoDurationH\x00\x12\x1c\n\x04json\x18\x10 \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12 \n\x06schema\x18\x11 \x01(\x0b\x32\x0e.prefab.SchemaH\x00\x12\x19\n\x0c\x63onfidential\x18\r \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x64\x65\x63rypt_with\x18\x0e \x01(\tH\x02\x88\x01\x01\x42\x06\n\x04typeB\x0f\n\r_confidentialB\x0f\n\r_decrypt_with\"\x14\n\x04Json\x12\x0c\n\x04json\x18\x01 \x01(\t\"!\n\x0bIsoDuration\x12\x12\n\ndefinition\x18\x01 \x01(\t\"b\n\x08Provided\x12+\n\x06source\x18\x01 \x01(\x0e\x32\x16.prefab.ProvidedSourceH\x00\x88\x01\x01\x12\x13\n\x06lookup\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_sourceB\t\n\x07_lookup\"B\n\x08IntRange\x12\x12\n\x05start\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\t\"C\n\rWeightedValue\x12\x0e\n\x06weight\x18\x01 \x01(\x05\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"~\n\x0eWeightedValues\x12.\n\x0fweighted_values\x18\x01 \x03(\x0b\x32\x15.prefab.WeightedValue\x12\"\n\x15hash_by_property_name\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x18\n\x16_hash_by_property_name\"X\n\x0e\x41piKeyMetadata\x12\x13\n\x06key_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x14\n\x07user_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_key_idB\n\n\x08_user_idJ\x04\x08\x02\x10\x03\"\xa0\x02\n\x07\x43onfigs\x12\x1f\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x0e.prefab.Config\x12<\n\x16\x63onfig_service_pointer\x18\x02 \x01(\x0b\x32\x1c.prefab.ConfigServicePointer\x12\x34\n\x0f\x61pikey_metadata\x18\x03 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x12\x17\n\nkeep_alive\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_contextB\r\n\x0b_keep_alive\"\xa4\x04\n\x06\x43onfig\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x12\n\nproject_id\x18\x02 \x01(\x03\x12\x0b\n\x03key\x18\x03 \x01(\t\x12%\n\nchanged_by\x18\x04 \x01(\x0b\x32\x11.prefab.ChangedBy\x12\x1f\n\x04rows\x18\x05 \x03(\x0b\x32\x11.prefab.ConfigRow\x12-\n\x10\x61llowable_values\x18\x06 \x03(\x0b\x32\x13.prefab.ConfigValue\x12\'\n\x0b\x63onfig_type\x18\x07 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x15\n\x08\x64raft_id\x18\x08 \x01(\x03H\x00\x88\x01\x01\x12,\n\nvalue_type\x18\t \x01(\x0e\x32\x18.prefab.Config.ValueType\x12\x1a\n\x12send_to_client_sdk\x18\n \x01(\x08\x12\x17\n\nschema_key\x18\x0b \x01(\tH\x01\x88\x01\x01\"\xb6\x01\n\tValueType\x12\x16\n\x12NOT_SET_VALUE_TYPE\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05\x42YTES\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x12\x08\n\x04\x42OOL\x10\x05\x12\x14\n\x10LIMIT_DEFINITION\x10\x07\x12\r\n\tLOG_LEVEL\x10\t\x12\x0f\n\x0bSTRING_LIST\x10\n\x12\r\n\tINT_RANGE\x10\x0b\x12\x0c\n\x08\x44URATION\x10\x0c\x12\x08\n\x04JSON\x10\rB\x0b\n\t_draft_idB\r\n\x0b_schema_key\"?\n\tChangedBy\x12\x0f\n\x07user_id\x18\x01 \x01(\x03\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x12\n\napi_key_id\x18\x03 \x01(\t\"\xe4\x01\n\tConfigRow\x12\x1b\n\x0eproject_env_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12(\n\x06values\x18\x02 \x03(\x0b\x32\x18.prefab.ConditionalValue\x12\x35\n\nproperties\x18\x03 \x03(\x0b\x32!.prefab.ConfigRow.PropertiesEntry\x1a\x46\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x11\n\x0f_project_env_id\"[\n\x10\x43onditionalValue\x12#\n\x08\x63riteria\x18\x01 \x03(\x0b\x32\x11.prefab.Criterion\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x96\x06\n\tCriterion\x12\x15\n\rproperty_name\x18\x01 \x01(\t\x12\x35\n\x08operator\x18\x02 \x01(\x0e\x32#.prefab.Criterion.CriterionOperator\x12+\n\x0evalue_to_match\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\"\x8d\x05\n\x11\x43riterionOperator\x12\x0b\n\x07NOT_SET\x10\x00\x12\x11\n\rLOOKUP_KEY_IN\x10\x01\x12\x15\n\x11LOOKUP_KEY_NOT_IN\x10\x02\x12\n\n\x06IN_SEG\x10\x03\x12\x0e\n\nNOT_IN_SEG\x10\x04\x12\x0f\n\x0b\x41LWAYS_TRUE\x10\x05\x12\x12\n\x0ePROP_IS_ONE_OF\x10\x06\x12\x16\n\x12PROP_IS_NOT_ONE_OF\x10\x07\x12\x19\n\x15PROP_ENDS_WITH_ONE_OF\x10\x08\x12!\n\x1dPROP_DOES_NOT_END_WITH_ONE_OF\x10\t\x12\x16\n\x12HIERARCHICAL_MATCH\x10\n\x12\x10\n\x0cIN_INT_RANGE\x10\x0b\x12\x1b\n\x17PROP_STARTS_WITH_ONE_OF\x10\x0c\x12#\n\x1fPROP_DOES_NOT_START_WITH_ONE_OF\x10\r\x12\x18\n\x14PROP_CONTAINS_ONE_OF\x10\x0e\x12 \n\x1cPROP_DOES_NOT_CONTAIN_ONE_OF\x10\x0f\x12\x12\n\x0ePROP_LESS_THAN\x10\x10\x12\x1b\n\x17PROP_LESS_THAN_OR_EQUAL\x10\x11\x12\x15\n\x11PROP_GREATER_THAN\x10\x12\x12\x1e\n\x1aPROP_GREATER_THAN_OR_EQUAL\x10\x13\x12\x0f\n\x0bPROP_BEFORE\x10\x14\x12\x0e\n\nPROP_AFTER\x10\x15\x12\x10\n\x0cPROP_MATCHES\x10\x16\x12\x17\n\x13PROP_DOES_NOT_MATCH\x10\x17\x12\x19\n\x15PROP_SEMVER_LESS_THAN\x10\x18\x12\x15\n\x11PROP_SEMVER_EQUAL\x10\x19\x12\x1c\n\x18PROP_SEMVER_GREATER_THAN\x10\x1a\"\x89\x01\n\x07Loggers\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\x12\x15\n\rinstance_hash\x18\x04 \x01(\t\x12\x16\n\tnamespace\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\xd9\x01\n\x06Logger\x12\x13\n\x0blogger_name\x18\x01 \x01(\t\x12\x13\n\x06traces\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06\x64\x65\x62ugs\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05infos\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05warns\x18\x05 \x01(\x03H\x03\x88\x01\x01\x12\x13\n\x06\x65rrors\x18\x06 \x01(\x03H\x04\x88\x01\x01\x12\x13\n\x06\x66\x61tals\x18\x07 \x01(\x03H\x05\x88\x01\x01\x42\t\n\x07_tracesB\t\n\x07_debugsB\x08\n\x06_infosB\x08\n\x06_warnsB\t\n\x07_errorsB\t\n\x07_fatals\"\x16\n\x14LoggerReportResponse\"\xdb\x03\n\rLimitResponse\x12\x0e\n\x06passed\x18\x01 \x01(\x08\x12\x12\n\nexpires_at\x18\x02 \x01(\x03\x12\x16\n\x0e\x65nforced_group\x18\x03 \x01(\t\x12\x16\n\x0e\x63urrent_bucket\x18\x04 \x01(\x03\x12\x14\n\x0cpolicy_group\x18\x05 \x01(\t\x12;\n\x0bpolicy_name\x18\x06 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\x14\n\x0cpolicy_limit\x18\x07 \x01(\x05\x12\x0e\n\x06\x61mount\x18\x08 \x01(\x03\x12\x16\n\x0elimit_reset_at\x18\t \x01(\x03\x12\x39\n\x0csafety_level\x18\n \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"\xa9\x01\n\x10LimitPolicyNames\x12\x0b\n\x07NOT_SET\x10\x00\x12\x14\n\x10SECONDLY_ROLLING\x10\x01\x12\x14\n\x10MINUTELY_ROLLING\x10\x03\x12\x12\n\x0eHOURLY_ROLLING\x10\x05\x12\x11\n\rDAILY_ROLLING\x10\x07\x12\x13\n\x0fMONTHLY_ROLLING\x10\x08\x12\x0c\n\x08INFINITE\x10\t\x12\x12\n\x0eYEARLY_ROLLING\x10\n\"\x99\x02\n\x0cLimitRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x16\n\x0e\x61\x63quire_amount\x18\x02 \x01(\x05\x12\x0e\n\x06groups\x18\x03 \x03(\t\x12:\n\x0elimit_combiner\x18\x04 \x01(\x0e\x32\".prefab.LimitRequest.LimitCombiner\x12\x1e\n\x16\x61llow_partial_response\x18\x05 \x01(\x08\x12\x39\n\x0csafety_level\x18\x06 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"6\n\rLimitCombiner\x12\x0b\n\x07NOT_SET\x10\x00\x12\x0b\n\x07MINIMUM\x10\x01\x12\x0b\n\x07MAXIMUM\x10\x02\"/\n\nContextSet\x12!\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32\x0f.prefab.Context\"\x96\x01\n\x07\x43ontext\x12\x11\n\x04type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12+\n\x06values\x18\x02 \x03(\x0b\x32\x1b.prefab.Context.ValuesEntry\x1a\x42\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\"\n\x05value\x18\x02 \x01(\x0b\x32\x13.prefab.ConfigValue:\x02\x38\x01\x42\x07\n\x05_type\"\x93\x01\n\x08Identity\x12\x13\n\x06lookup\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x34\n\nattributes\x18\x02 \x03(\x0b\x32 .prefab.Identity.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_lookup\"\xd6\x02\n\x18\x43onfigEvaluationMetaData\x12\x1d\n\x10\x63onfig_row_index\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12%\n\x04type\x18\x04 \x01(\x0e\x32\x12.prefab.ConfigTypeH\x03\x88\x01\x01\x12\x0f\n\x02id\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x31\n\nvalue_type\x18\x06 \x01(\x0e\x32\x18.prefab.Config.ValueTypeH\x05\x88\x01\x01\x42\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_indexB\x07\n\x05_typeB\x05\n\x03_idB\r\n\x0b_value_type\"\x8b\x03\n\x11\x43lientConfigValue\x12\r\n\x03int\x18\x01 \x01(\x03H\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x04 \x01(\x08H\x00\x12%\n\tlog_level\x18\x05 \x01(\x0e\x32\x10.prefab.LogLevelH\x00\x12)\n\x0bstring_list\x18\x07 \x01(\x0b\x32\x12.prefab.StringListH\x00\x12%\n\tint_range\x18\x08 \x01(\x0b\x32\x10.prefab.IntRangeH\x00\x12*\n\x08\x64uration\x18\t \x01(\x0b\x32\x16.prefab.ClientDurationH\x00\x12\x1c\n\x04json\x18\n \x01(\x0b\x32\x0c.prefab.JsonH\x00\x12I\n\x1a\x63onfig_evaluation_metadata\x18\x06 \x01(\x0b\x32 .prefab.ConfigEvaluationMetaDataH\x01\x88\x01\x01\x42\x06\n\x04typeB\x1d\n\x1b_config_evaluation_metadata\"D\n\x0e\x43lientDuration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\x12\x12\n\ndefinition\x18\x03 \x01(\t\"\xa4\x02\n\x11\x43onfigEvaluations\x12\x35\n\x06values\x18\x01 \x03(\x0b\x32%.prefab.ConfigEvaluations.ValuesEntry\x12\x34\n\x0f\x61pikey_metadata\x18\x02 \x01(\x0b\x32\x16.prefab.ApiKeyMetadataH\x00\x88\x01\x01\x12\x30\n\x0f\x64\x65\x66\x61ult_context\x18\x03 \x01(\x0b\x32\x12.prefab.ContextSetH\x01\x88\x01\x01\x1aH\n\x0bValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.prefab.ClientConfigValue:\x02\x38\x01\x42\x12\n\x10_apikey_metadataB\x12\n\x10_default_context\"\xa8\x02\n\x0fLimitDefinition\x12;\n\x0bpolicy_name\x18\x02 \x01(\x0e\x32&.prefab.LimitResponse.LimitPolicyNames\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\r\n\x05\x62urst\x18\x04 \x01(\x05\x12\x12\n\naccount_id\x18\x05 \x01(\x03\x12\x15\n\rlast_modified\x18\x06 \x01(\x03\x12\x12\n\nreturnable\x18\x07 \x01(\x08\x12\x39\n\x0csafety_level\x18\x08 \x01(\x0e\x32#.prefab.LimitDefinition.SafetyLevel\"@\n\x0bSafetyLevel\x12\x0b\n\x07NOT_SET\x10\x00\x12\x12\n\x0eL4_BEST_EFFORT\x10\x04\x12\x10\n\x0cL5_BOMBPROOF\x10\x05\"@\n\x10LimitDefinitions\x12,\n\x0b\x64\x65\x66initions\x18\x01 \x03(\x0b\x32\x17.prefab.LimitDefinition\"\x8a\x01\n\x0f\x42ufferedRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x14\n\x0c\x63ontent_type\x18\x06 \x01(\t\x12\x0c\n\x04\x66ifo\x18\x07 \x01(\x08\"\x94\x01\n\x0c\x42\x61tchRequest\x12\x12\n\naccount_id\x18\x01 \x01(\x03\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x14\n\x0climit_groups\x18\x05 \x03(\t\x12\x16\n\x0e\x62\x61tch_template\x18\x06 \x01(\t\x12\x17\n\x0f\x62\x61tch_separator\x18\x07 \x01(\t\" \n\rBasicResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"3\n\x10\x43reationResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0e\n\x06new_id\x18\x02 \x01(\x03\"h\n\x07IdBlock\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\r\n\x05start\x18\x04 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x05 \x01(\x03\"a\n\x0eIdBlockRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x16\n\x0eproject_env_id\x18\x02 \x01(\x03\x12\x15\n\rsequence_name\x18\x03 \x01(\t\x12\x0c\n\x04size\x18\x04 \x01(\x03\"\x8a\x01\n\x0c\x43ontextShape\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x0b\x66ield_types\x18\x02 \x03(\x0b\x32$.prefab.ContextShape.FieldTypesEntry\x1a\x31\n\x0f\x46ieldTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"[\n\rContextShapes\x12$\n\x06shapes\x18\x01 \x03(\x0b\x32\x14.prefab.ContextShape\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"C\n\rEvaluatedKeys\x12\x0c\n\x04keys\x18\x01 \x03(\t\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_namespace\"\x93\x01\n\x0f\x45valuatedConfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x16\n\x0e\x63onfig_version\x18\x02 \x01(\x03\x12#\n\x06result\x18\x03 \x01(\x0b\x32\x13.prefab.ConfigValue\x12#\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x12.prefab.ContextSet\x12\x11\n\ttimestamp\x18\x05 \x01(\x03\"<\n\x10\x45valuatedConfigs\x12(\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\x17.prefab.EvaluatedConfig\"\xc4\x03\n\x17\x43onfigEvaluationCounter\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x16\n\tconfig_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1b\n\x0eselected_index\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x30\n\x0eselected_value\x18\x04 \x01(\x0b\x32\x13.prefab.ConfigValueH\x02\x88\x01\x01\x12\x1d\n\x10\x63onfig_row_index\x18\x05 \x01(\rH\x03\x88\x01\x01\x12$\n\x17\x63onditional_value_index\x18\x06 \x01(\rH\x04\x88\x01\x01\x12!\n\x14weighted_value_index\x18\x07 \x01(\rH\x05\x88\x01\x01\x12\x36\n\x06reason\x18\x08 \x01(\x0e\x32&.prefab.ConfigEvaluationCounter.Reason\"\x15\n\x06Reason\x12\x0b\n\x07UNKNOWN\x10\x00\x42\x0c\n\n_config_idB\x11\n\x0f_selected_indexB\x11\n\x0f_selected_valueB\x13\n\x11_config_row_indexB\x1a\n\x18_conditional_value_indexB\x17\n\x15_weighted_value_index\"{\n\x17\x43onfigEvaluationSummary\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.prefab.ConfigType\x12\x31\n\x08\x63ounters\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationCounter\"k\n\x19\x43onfigEvaluationSummaries\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x32\n\tsummaries\x18\x03 \x03(\x0b\x32\x1f.prefab.ConfigEvaluationSummary\"Z\n\x15LoggersTelemetryEvent\x12\x1f\n\x07loggers\x18\x01 \x03(\x0b\x32\x0e.prefab.Logger\x12\x10\n\x08start_at\x18\x02 \x01(\x03\x12\x0e\n\x06\x65nd_at\x18\x03 \x01(\x03\"\x98\x02\n\x0eTelemetryEvent\x12\x36\n\tsummaries\x18\x02 \x01(\x0b\x32!.prefab.ConfigEvaluationSummariesH\x00\x12\x33\n\x10\x65xample_contexts\x18\x03 \x01(\x0b\x32\x17.prefab.ExampleContextsH\x00\x12+\n\x0c\x63lient_stats\x18\x04 \x01(\x0b\x32\x13.prefab.ClientStatsH\x00\x12\x30\n\x07loggers\x18\x05 \x01(\x0b\x32\x1d.prefab.LoggersTelemetryEventH\x00\x12/\n\x0e\x63ontext_shapes\x18\x06 \x01(\x0b\x32\x15.prefab.ContextShapesH\x00\x42\t\n\x07payload\"P\n\x0fTelemetryEvents\x12\x15\n\rinstance_hash\x18\x01 \x01(\t\x12&\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x16.prefab.TelemetryEvent\"*\n\x17TelemetryEventsResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\";\n\x0f\x45xampleContexts\x12(\n\x08\x65xamples\x18\x01 \x03(\x0b\x32\x16.prefab.ExampleContext\"K\n\x0e\x45xampleContext\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12&\n\ncontextSet\x18\x02 \x01(\x0b\x32\x12.prefab.ContextSet\"F\n\x0b\x43lientStats\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\x12\x1b\n\x13\x64ropped_event_count\x18\x03 \x01(\x04\"}\n\x06Schema\x12\x0e\n\x06schema\x18\x01 \x01(\t\x12.\n\x0bschema_type\x18\x02 \x01(\x0e\x32\x19.prefab.Schema.SchemaType\"3\n\nSchemaType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03ZOD\x10\x01\x12\x0f\n\x0bJSON_SCHEMA\x10\x02*:\n\x0eProvidedSource\x12\x1b\n\x17PROVIDED_SOURCE_NOT_SET\x10\x00\x12\x0b\n\x07\x45NV_VAR\x10\x01*\x8e\x01\n\nConfigType\x12\x17\n\x13NOT_SET_CONFIG_TYPE\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\x10\n\x0c\x46\x45\x41TURE_FLAG\x10\x02\x12\r\n\tLOG_LEVEL\x10\x03\x12\x0b\n\x07SEGMENT\x10\x04\x12\x14\n\x10LIMIT_DEFINITION\x10\x05\x12\x0b\n\x07\x44\x45LETED\x10\x06\x12\n\n\x06SCHEMA\x10\x07*a\n\x08LogLevel\x12\x15\n\x11NOT_SET_LOG_LEVEL\x10\x00\x12\t\n\x05TRACE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\x08\n\x04WARN\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\t\n\x05\x46\x41TAL\x10\t*G\n\tOnFailure\x12\x0b\n\x07NOT_SET\x10\x00\x12\x10\n\x0cLOG_AND_PASS\x10\x01\x12\x10\n\x0cLOG_AND_FAIL\x10\x02\x12\t\n\x05THROW\x10\x03\x42L\n\x13\x63loud.prefab.domainB\x06PrefabZ-github.com/prefab-cloud/prefab-cloud-go/protob\x06proto3"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            pool = Google::Protobuf::DescriptorPool.generated_pool
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            begin
         
     | 
| 
       13 
     | 
    
         
            -
              pool.add_serialized_file(descriptor_data)
         
     | 
| 
       14 
     | 
    
         
            -
            rescue TypeError
         
     | 
| 
       15 
     | 
    
         
            -
              # Compatibility code: will be removed in the next major version.
         
     | 
| 
       16 
     | 
    
         
            -
              require 'google/protobuf/descriptor_pb'
         
     | 
| 
       17 
     | 
    
         
            -
              parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
         
     | 
| 
       18 
     | 
    
         
            -
              parsed.clear_dependency
         
     | 
| 
       19 
     | 
    
         
            -
              serialized = parsed.class.encode(parsed)
         
     | 
| 
       20 
     | 
    
         
            -
              file = pool.add_serialized_file(serialized)
         
     | 
| 
       21 
     | 
    
         
            -
              warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
         
     | 
| 
       22 
     | 
    
         
            -
              imports = [
         
     | 
| 
       23 
     | 
    
         
            -
              ]
         
     | 
| 
       24 
     | 
    
         
            -
              imports.each do |type_name, expected_filename|
         
     | 
| 
       25 
     | 
    
         
            -
                import_file = pool.lookup(type_name).file_descriptor
         
     | 
| 
       26 
     | 
    
         
            -
                if import_file.name != expected_filename
         
     | 
| 
       27 
     | 
    
         
            -
                  warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
         
     | 
| 
       28 
     | 
    
         
            -
                end
         
     | 
| 
       29 
     | 
    
         
            -
              end
         
     | 
| 
       30 
     | 
    
         
            -
              warn "Each proto file must use a consistent fully-qualified name."
         
     | 
| 
       31 
     | 
    
         
            -
              warn "This will become an error in the next major version."
         
     | 
| 
       32 
     | 
    
         
            -
            end
         
     | 
| 
      
 11 
     | 
    
         
            +
            pool.add_serialized_file(descriptor_data)
         
     | 
| 
       33 
12 
     | 
    
         | 
| 
       34 
13 
     | 
    
         
             
            module PrefabProto
         
     | 
| 
       35 
14 
     | 
    
         
             
              ConfigServicePointer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ConfigServicePointer").msgclass
         
     | 
| 
         @@ -89,6 +68,8 @@ module PrefabProto 
     | 
|
| 
       89 
68 
     | 
    
         
             
              ExampleContexts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ExampleContexts").msgclass
         
     | 
| 
       90 
69 
     | 
    
         
             
              ExampleContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ExampleContext").msgclass
         
     | 
| 
       91 
70 
     | 
    
         
             
              ClientStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ClientStats").msgclass
         
     | 
| 
      
 71 
     | 
    
         
            +
              Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.Schema").msgclass
         
     | 
| 
      
 72 
     | 
    
         
            +
              Schema::SchemaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.Schema.SchemaType").enummodule
         
     | 
| 
       92 
73 
     | 
    
         
             
              ProvidedSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ProvidedSource").enummodule
         
     | 
| 
       93 
74 
     | 
    
         
             
              ConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.ConfigType").enummodule
         
     | 
| 
       94 
75 
     | 
    
         
             
              LogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("prefab.LogLevel").enummodule
         
     | 
    
        data/prefab-cloud-ruby.gemspec
    CHANGED
    
    | 
         @@ -2,16 +2,16 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # DO NOT EDIT THIS FILE DIRECTLY
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
         
     | 
| 
       4 
4 
     | 
    
         
             
            # -*- encoding: utf-8 -*-
         
     | 
| 
       5 
     | 
    
         
            -
            # stub: prefab-cloud-ruby 1.8. 
     | 
| 
      
 5 
     | 
    
         
            +
            # stub: prefab-cloud-ruby 1.8.9 ruby lib
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       8 
8 
     | 
    
         
             
              s.name = "prefab-cloud-ruby".freeze
         
     | 
| 
       9 
     | 
    
         
            -
              s.version = "1.8. 
     | 
| 
      
 9 
     | 
    
         
            +
              s.version = "1.8.9"
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
              s.required_rubygems_version = Gem::Requirement.new(" 
     | 
| 
      
 11 
     | 
    
         
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
         
     | 
| 
       12 
12 
     | 
    
         
             
              s.require_paths = ["lib".freeze]
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.authors = ["Jeff Dwyer".freeze]
         
     | 
| 
       14 
     | 
    
         
            -
              s.date = " 
     | 
| 
      
 14 
     | 
    
         
            +
              s.date = "2025-04-15"
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.description = "Feature Flags, Live Config, and Dynamic Log Levels as a service".freeze
         
     | 
| 
       16 
16 
     | 
    
         
             
              s.email = "jdwyer@prefab.cloud".freeze
         
     | 
| 
       17 
17 
     | 
    
         
             
              s.extra_rdoc_files = [
         
     | 
| 
         @@ -21,6 +21,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       21 
21 
     | 
    
         
             
              ]
         
     | 
| 
       22 
22 
     | 
    
         
             
              s.files = [
         
     | 
| 
       23 
23 
     | 
    
         
             
                ".envrc.sample",
         
     | 
| 
      
 24 
     | 
    
         
            +
                ".github/pull_request_template.md",
         
     | 
| 
       24 
25 
     | 
    
         
             
                ".github/workflows/ruby.yml",
         
     | 
| 
       25 
26 
     | 
    
         
             
                ".gitmodules",
         
     | 
| 
       26 
27 
     | 
    
         
             
                ".rubocop.yml",
         
     | 
| 
         @@ -39,6 +40,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       39 
40 
     | 
    
         
             
                "dev/console",
         
     | 
| 
       40 
41 
     | 
    
         
             
                "dev/script_setup.rb",
         
     | 
| 
       41 
42 
     | 
    
         
             
                "lib/prefab-cloud-ruby.rb",
         
     | 
| 
      
 43 
     | 
    
         
            +
                "lib/prefab/caching_http_connection.rb",
         
     | 
| 
       42 
44 
     | 
    
         
             
                "lib/prefab/client.rb",
         
     | 
| 
       43 
45 
     | 
    
         
             
                "lib/prefab/config_client.rb",
         
     | 
| 
       44 
46 
     | 
    
         
             
                "lib/prefab/config_client_presenter.rb",
         
     | 
| 
         @@ -64,6 +66,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       64 
66 
     | 
    
         
             
                "lib/prefab/example_contexts_aggregator.rb",
         
     | 
| 
       65 
67 
     | 
    
         
             
                "lib/prefab/exponential_backoff.rb",
         
     | 
| 
       66 
68 
     | 
    
         
             
                "lib/prefab/feature_flag_client.rb",
         
     | 
| 
      
 69 
     | 
    
         
            +
                "lib/prefab/fixed_size_hash.rb",
         
     | 
| 
       67 
70 
     | 
    
         
             
                "lib/prefab/http_connection.rb",
         
     | 
| 
       68 
71 
     | 
    
         
             
                "lib/prefab/internal_logger.rb",
         
     | 
| 
       69 
72 
     | 
    
         
             
                "lib/prefab/javascript_stub.rb",
         
     | 
| 
         @@ -76,6 +79,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       76 
79 
     | 
    
         
             
                "lib/prefab/prefab.rb",
         
     | 
| 
       77 
80 
     | 
    
         
             
                "lib/prefab/rate_limit_cache.rb",
         
     | 
| 
       78 
81 
     | 
    
         
             
                "lib/prefab/resolved_config_presenter.rb",
         
     | 
| 
      
 82 
     | 
    
         
            +
                "lib/prefab/semver.rb",
         
     | 
| 
       79 
83 
     | 
    
         
             
                "lib/prefab/sse_config_client.rb",
         
     | 
| 
       80 
84 
     | 
    
         
             
                "lib/prefab/time_helpers.rb",
         
     | 
| 
       81 
85 
     | 
    
         
             
                "lib/prefab/weighted_value_resolver.rb",
         
     | 
| 
         @@ -91,6 +95,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       91 
95 
     | 
    
         
             
                "test/support/mock_base_client.rb",
         
     | 
| 
       92 
96 
     | 
    
         
             
                "test/support/mock_config_client.rb",
         
     | 
| 
       93 
97 
     | 
    
         
             
                "test/support/mock_config_loader.rb",
         
     | 
| 
      
 98 
     | 
    
         
            +
                "test/test_caching_http_connection.rb",
         
     | 
| 
       94 
99 
     | 
    
         
             
                "test/test_client.rb",
         
     | 
| 
       95 
100 
     | 
    
         
             
                "test/test_config_client.rb",
         
     | 
| 
       96 
101 
     | 
    
         
             
                "test/test_config_loader.rb",
         
     | 
| 
         @@ -107,6 +112,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       107 
112 
     | 
    
         
             
                "test/test_example_contexts_aggregator.rb",
         
     | 
| 
       108 
113 
     | 
    
         
             
                "test/test_exponential_backoff.rb",
         
     | 
| 
       109 
114 
     | 
    
         
             
                "test/test_feature_flag_client.rb",
         
     | 
| 
      
 115 
     | 
    
         
            +
                "test/test_fixed_size_hash.rb",
         
     | 
| 
       110 
116 
     | 
    
         
             
                "test/test_helper.rb",
         
     | 
| 
       111 
117 
     | 
    
         
             
                "test/test_integration.rb",
         
     | 
| 
       112 
118 
     | 
    
         
             
                "test/test_internal_logger.rb",
         
     | 
| 
         @@ -118,48 +124,30 @@ Gem::Specification.new do |s| 
     | 
|
| 
       118 
124 
     | 
    
         
             
                "test/test_options.rb",
         
     | 
| 
       119 
125 
     | 
    
         
             
                "test/test_prefab.rb",
         
     | 
| 
       120 
126 
     | 
    
         
             
                "test/test_rate_limit_cache.rb",
         
     | 
| 
      
 127 
     | 
    
         
            +
                "test/test_semver.rb",
         
     | 
| 
       121 
128 
     | 
    
         
             
                "test/test_sse_config_client.rb",
         
     | 
| 
       122 
129 
     | 
    
         
             
                "test/test_weighted_value_resolver.rb"
         
     | 
| 
       123 
130 
     | 
    
         
             
              ]
         
     | 
| 
       124 
131 
     | 
    
         
             
              s.homepage = "http://github.com/prefab-cloud/prefab-cloud-ruby".freeze
         
     | 
| 
       125 
132 
     | 
    
         
             
              s.licenses = ["MIT".freeze]
         
     | 
| 
       126 
     | 
    
         
            -
              s.rubygems_version = "3. 
     | 
| 
      
 133 
     | 
    
         
            +
              s.rubygems_version = "3.4.19".freeze
         
     | 
| 
       127 
134 
     | 
    
         
             
              s.summary = "Prefab Ruby Infrastructure".freeze
         
     | 
| 
       128 
135 
     | 
    
         | 
| 
       129 
     | 
    
         
            -
               
     | 
| 
       130 
     | 
    
         
            -
                s.specification_version = 4
         
     | 
| 
       131 
     | 
    
         
            -
              end
         
     | 
| 
      
 136 
     | 
    
         
            +
              s.specification_version = 4
         
     | 
| 
       132 
137 
     | 
    
         | 
| 
       133 
     | 
    
         
            -
               
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
             
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
                s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
         
     | 
| 
       148 
     | 
    
         
            -
              else
         
     | 
| 
       149 
     | 
    
         
            -
                s.add_dependency(%q<concurrent-ruby>.freeze, ["~> 1.0", ">= 1.0.5"])
         
     | 
| 
       150 
     | 
    
         
            -
                s.add_dependency(%q<faraday>.freeze, [">= 0"])
         
     | 
| 
       151 
     | 
    
         
            -
                s.add_dependency(%q<googleapis-common-protos-types>.freeze, [">= 0"])
         
     | 
| 
       152 
     | 
    
         
            -
                s.add_dependency(%q<google-protobuf>.freeze, [">= 0"])
         
     | 
| 
       153 
     | 
    
         
            -
                s.add_dependency(%q<ld-eventsource>.freeze, [">= 0"])
         
     | 
| 
       154 
     | 
    
         
            -
                s.add_dependency(%q<uuid>.freeze, [">= 0"])
         
     | 
| 
       155 
     | 
    
         
            -
                s.add_dependency(%q<activesupport>.freeze, [">= 4"])
         
     | 
| 
       156 
     | 
    
         
            -
                s.add_dependency(%q<semantic_logger>.freeze, ["!= 4.16.0"])
         
     | 
| 
       157 
     | 
    
         
            -
                s.add_dependency(%q<allocation_stats>.freeze, [">= 0"])
         
     | 
| 
       158 
     | 
    
         
            -
                s.add_dependency(%q<benchmark-ips>.freeze, [">= 0"])
         
     | 
| 
       159 
     | 
    
         
            -
                s.add_dependency(%q<bundler>.freeze, [">= 0"])
         
     | 
| 
       160 
     | 
    
         
            -
                s.add_dependency(%q<juwelier>.freeze, ["~> 2.4.9"])
         
     | 
| 
       161 
     | 
    
         
            -
                s.add_dependency(%q<rdoc>.freeze, [">= 0"])
         
     | 
| 
       162 
     | 
    
         
            -
                s.add_dependency(%q<simplecov>.freeze, [">= 0"])
         
     | 
| 
       163 
     | 
    
         
            -
              end
         
     | 
| 
      
 138 
     | 
    
         
            +
              s.add_runtime_dependency(%q<concurrent-ruby>.freeze, ["~> 1.0", ">= 1.0.5"])
         
     | 
| 
      
 139 
     | 
    
         
            +
              s.add_runtime_dependency(%q<faraday>.freeze, [">= 0"])
         
     | 
| 
      
 140 
     | 
    
         
            +
              s.add_runtime_dependency(%q<googleapis-common-protos-types>.freeze, [">= 0"])
         
     | 
| 
      
 141 
     | 
    
         
            +
              s.add_runtime_dependency(%q<google-protobuf>.freeze, [">= 0"])
         
     | 
| 
      
 142 
     | 
    
         
            +
              s.add_runtime_dependency(%q<ld-eventsource>.freeze, [">= 0"])
         
     | 
| 
      
 143 
     | 
    
         
            +
              s.add_runtime_dependency(%q<uuid>.freeze, [">= 0"])
         
     | 
| 
      
 144 
     | 
    
         
            +
              s.add_runtime_dependency(%q<activesupport>.freeze, [">= 4"])
         
     | 
| 
      
 145 
     | 
    
         
            +
              s.add_runtime_dependency(%q<semantic_logger>.freeze, ["!= 4.16.0"])
         
     | 
| 
      
 146 
     | 
    
         
            +
              s.add_development_dependency(%q<allocation_stats>.freeze, [">= 0"])
         
     | 
| 
      
 147 
     | 
    
         
            +
              s.add_development_dependency(%q<benchmark-ips>.freeze, [">= 0"])
         
     | 
| 
      
 148 
     | 
    
         
            +
              s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
         
     | 
| 
      
 149 
     | 
    
         
            +
              s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.4.9"])
         
     | 
| 
      
 150 
     | 
    
         
            +
              s.add_development_dependency(%q<rdoc>.freeze, [">= 0"])
         
     | 
| 
      
 151 
     | 
    
         
            +
              s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
         
     | 
| 
       164 
152 
     | 
    
         
             
            end
         
     | 
| 
       165 
153 
     | 
    
         |