Conversation
seankross
left a comment
There was a problem hiding this comment.
How do we expect this function to work? I am concerned because the functionality is not congruent:
> upper_camel_case("thisisatest")
[1] "Thisisatest"
> snakecase::to_upper_camel_case("thisisatest")
[1] "Thisisatest"
> upper_camel_case("this is a test")
[1] "This is a test"
> snakecase::to_upper_camel_case("this is a test")
[1] "ThisIsATest"
> upper_camel_case("this_is_a_test")
[1] "This_is_a_test"
> snakecase::to_upper_camel_case("this_is_a_test")
[1] "ThisIsATest"
> upper_camel_case("this-is-a-test")
[1] "This-is-a-test"
> snakecase::to_upper_camel_case("this-is-a-test")
[1] "ThisIsATest"
> upper_camel_case("this-is a_test")
[1] "This-is a_test"
> snakecase::to_upper_camel_case("this-is a_test")
[1] "ThisIsATest"|
Good catch. So here's the bucket naming policy https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html Having said that, this function is only used in the internal function And so we're only using the bucket name to create a policy name that includes the bucket name. So we're not trying to stick to some spec/standard/etc. In commit I just pushed, changed the function and now sixtyfour:::upper_camel_case("thisisatest")
#> [1] "Thisisatest"
snakecase::to_upper_camel_case("thisisatest")
#> [1] "Thisisatest"
sixtyfour:::upper_camel_case(string="this is a test")
#> [1] "Thisisatest"
snakecase::to_upper_camel_case("this is a test")
#> [1] "ThisIsATest"
sixtyfour:::upper_camel_case("this_is_a_test")
#> [1] "Thisisatest"
snakecase::to_upper_camel_case("this_is_a_test")
#> [1] "ThisIsATest"
sixtyfour:::upper_camel_case("this-is-a-test")
#> [1] "Thisisatest"
snakecase::to_upper_camel_case("this-is-a-test")
#> [1] "ThisIsATest"
sixtyfour:::upper_camel_case("this-is a_test")
#> [1] "Thisisatest"
snakecase::to_upper_camel_case("this-is a_test")
#> [1] "ThisIsATest"
sixtyfour:::upper_camel_case("this.is.a_test")
#> [1] "Thisisatest"
snakecase::to_upper_camel_case("this.is.a_test")
#> [1] "ThisIsATest"Created on 2025-02-28 with reprex v2.1.1 So in my mind this is good as we just want a single string with all whitespace and spearators removed to go into the policy name. Sound good? |
fix #100