mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
7a2704455f
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33978 This Diff moves part of the utilities from the `react_native_pods` file to a specific `utils.rb` file. It adds tests for these utils and improve our test mocks. The goal is to simplify the `react_native_pods.rb` so it's easier to work with it. I decided to split this diff in 2 because it was becoming quite big. ## Changelog [iOS][Changed] - Refactoring part of the react_native_pods.rb script Reviewed By: cortinico Differential Revision: D37004347 fbshipit-source-id: a5156f7c199d082d5d895a58af80948556c51c2a
22 lines
501 B
Ruby
22 lines
501 B
Ruby
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
# Mock object for the Environment
|
|
class Environment
|
|
@@RUBY_PLATFORM = "arm64-darwin21"
|
|
|
|
def ruby_platform
|
|
return @@RUBY_PLATFORM
|
|
end
|
|
|
|
def self.set_ruby_platform(newPlatform)
|
|
@@RUBY_PLATFORM = newPlatform
|
|
end
|
|
|
|
def self.reset()
|
|
@@RUBY_PLATFORM = "arm64-darwin21"
|
|
end
|
|
end
|