Sha256: 84e3cae089496be1e97eb4718a9dd4bd6214f762712f0a437a77790720b543f4

Contents?: true

Size: 986 Bytes

Versions: 43

Compression:

Stored size: 986 Bytes

Contents


module Pod
  class Podfile
    USE_BINARIES = 'use_binaries'
    USE_SOURCE_PODS = 'use_source_pods'
    USE_BINARIES_SELECTOR = 'use_binaries_selector'
    ALLOW_PRERELEASE = 'allow_prerelease'
    USE_PLUGINS = 'use_plugins'
    CONFIGURATION_ENV = 'configuration_env'

    module ENVExecutor
      def execute_with_bin_plugin(&block)
        execute_with_key(USE_PLUGINS, -> { 'cocoapods-bb-bin' }, &block)
      end

      def execute_with_allow_prerelease(allow_prerelease, &block)
        execute_with_key(ALLOW_PRERELEASE, -> { allow_prerelease ? 'true' : 'false' }, &block)
      end

      def execute_with_use_binaries(use_binaries, &block)
        execute_with_key(USE_BINARIES, -> { use_binaries ? 'true' : 'false' }, &block)
      end

      def execute_with_key(key, value_returner)
        origin_value = ENV[key]
        ENV[key] = value_returner.call

        yield if block_given?

        ENV[key] = origin_value
      end
    end

    extend ENVExecutor
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
cocoapods-bb-bin-0.2.10.3 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.10.2 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.10.1 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.10.0 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.9.0 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.8.1 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.8 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.13 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.12 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.11 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.10 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.9 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.8 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.7 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.6 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.5 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.4 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.3 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.2 lib/cocoapods-bb-bin/native/podfile_env.rb
cocoapods-bb-bin-0.2.7.1 lib/cocoapods-bb-bin/native/podfile_env.rb