Sha256: db8a29b9745e6f566140da1fbd84281f3faa95bff8fb4a4d0e866abd6108dd19

Contents?: true

Size: 986 Bytes

Versions: 31

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-fy-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

31 entries across 31 versions & 1 rubygems

Version Path
cocoapods-fy-bin-0.3.1 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.3.0 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.9 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.8 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.7 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.6 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.5 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.4 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.3 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.2 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.1 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.2.0 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.9 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.8 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.7 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.6 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.5 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.4 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.3 lib/cocoapods-fy-bin/native/podfile_env.rb
cocoapods-fy-bin-0.1.2 lib/cocoapods-fy-bin/native/podfile_env.rb