-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix modifying of frozen strings via config files and tests #8562
Conversation
Oh wow, interesting, so turns out in Ruby 2.3.0
while in Ruby 2.4.0
Good thing the unit tests got this before we merged the change |
Alright, updated to work with all versions of Ruby 👍 |
By the way in current CI environments, the tests run only on Ruby 2.3.1. |
we had that topic a few times i think right now circle does not support matrix runs, @dantoml still right? |
expect(config[:app_identifier]).to eq(app_identifier) | ||
config[:app_identifier].gsub!("yolo", "yoLiveTwice") | ||
expect(config[:app_identifier]).to eq("com.krausefx.yoLiveTwice") | ||
ENV.delete("SOMETHING_RANDOM_APP_IDENTIFIER") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For unit tests we have a helper, with_env_values
that will ensure that we don't forget to delete the ENV value at the end. Let's keep using that 👍
with_env_values('SOMETHING_RANDOM_IOS_VERSION' -> ios_version) do
config = FastlaneCore::Configuration.create(options, {})
config.load_configuration_file('ConfigFileEnv')
expect(config[:ios_version]).to eq(ios_version)
config[:ios_version].gsub!(".1", ".2")
expect(config[:ios_version]).to eq("9.2")
end
expect(config[:ios_version]).to eq(ios_version) | ||
config[:ios_version].gsub!(".1", ".2") | ||
expect(config[:ios_version]).to eq("9.2") | ||
ENV.delete("SOMETHING_RANDOM_IOS_VERSION") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use with_env_values(hash, &block)
@hjanuschka still correct |
Congratulations! 🎉 This was released as part of fastlane 2.21.0 🚀 |
Fixes #8548