Skip to content

Commit f3b30c6

Browse files
Update configuration for frozen-string-literal (#1971)
In a future Ruby version strings will be frozen by default. You can simulate the new behavior with RUBYOPT="--enable-frozen-string-literal". With this enabled the url from configuration is mutated by gsub!. We can avoid this by marking these strings as mutable. Co-authored-by: jack-edmonds-dd <jack.edmonds@datadoghq.com>
1 parent d16a6a3 commit f3b30c6

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

lib/datadog_api_client/configuration.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def auth_settings
346346
def server_settings
347347
[
348348
{
349-
url: "https://{subdomain}.{site}",
349+
url: +"https://{subdomain}.{site}",
350350
description: "No description provided",
351351
variables: {
352352
site: {
@@ -368,7 +368,7 @@ def server_settings
368368
}
369369
},
370370
{
371-
url: "{protocol}://{name}",
371+
url: +"{protocol}://{name}",
372372
description: "No description provided",
373373
variables: {
374374
name: {
@@ -382,7 +382,7 @@ def server_settings
382382
}
383383
},
384384
{
385-
url: "https://{subdomain}.{site}",
385+
url: +"https://{subdomain}.{site}",
386386
description: "No description provided",
387387
variables: {
388388
site: {
@@ -402,7 +402,7 @@ def operation_server_settings
402402
{
403403
"v1.get_ip_ranges": [
404404
{
405-
url: "https://{subdomain}.{site}",
405+
url: +"https://{subdomain}.{site}",
406406
description: "No description provided",
407407
variables: {
408408
site: {
@@ -424,7 +424,7 @@ def operation_server_settings
424424
}
425425
},
426426
{
427-
url: "{protocol}://{name}",
427+
url: +"{protocol}://{name}",
428428
description: "No description provided",
429429
variables: {
430430
name: {
@@ -438,19 +438,19 @@ def operation_server_settings
438438
}
439439
},
440440
{
441-
url: "https://{subdomain}.datadoghq.com",
441+
url: +"https://{subdomain}.datadoghq.com",
442442
description: "No description provided",
443443
variables: {
444444
subdomain: {
445445
description: "The subdomain where the API is deployed.",
446446
default_value: "ip-ranges",
447447
}
448448
}
449-
}
449+
}
450450
],
451451
"v1.submit_log": [
452452
{
453-
url: "https://{subdomain}.{site}",
453+
url: +"https://{subdomain}.{site}",
454454
description: "No description provided",
455455
variables: {
456456
site: {
@@ -472,7 +472,7 @@ def operation_server_settings
472472
}
473473
},
474474
{
475-
url: "{protocol}://{name}",
475+
url: +"{protocol}://{name}",
476476
description: "No description provided",
477477
variables: {
478478
name: {
@@ -486,7 +486,7 @@ def operation_server_settings
486486
}
487487
},
488488
{
489-
url: "https://{subdomain}.{site}",
489+
url: +"https://{subdomain}.{site}",
490490
description: "No description provided",
491491
variables: {
492492
site: {
@@ -498,11 +498,11 @@ def operation_server_settings
498498
default_value: "http-intake.logs",
499499
}
500500
}
501-
}
501+
}
502502
],
503503
"v2.submit_log": [
504504
{
505-
url: "https://{subdomain}.{site}",
505+
url: +"https://{subdomain}.{site}",
506506
description: "No description provided",
507507
variables: {
508508
site: {
@@ -524,7 +524,7 @@ def operation_server_settings
524524
}
525525
},
526526
{
527-
url: "{protocol}://{name}",
527+
url: +"{protocol}://{name}",
528528
description: "No description provided",
529529
variables: {
530530
name: {
@@ -538,7 +538,7 @@ def operation_server_settings
538538
}
539539
},
540540
{
541-
url: "https://{subdomain}.{site}",
541+
url: +"https://{subdomain}.{site}",
542542
description: "No description provided",
543543
variables: {
544544
site: {
@@ -550,7 +550,7 @@ def operation_server_settings
550550
default_value: "http-intake.logs",
551551
}
552552
}
553-
}
553+
}
554554
],
555555
}
556556
end
@@ -603,4 +603,4 @@ def to_hash
603603
end
604604
end
605605

606-
end
606+
end

0 commit comments

Comments
 (0)