Sha256: 5711f1255e382bc6074dcb9578550a9659abe2ff3261416f86d79a953f3cdb74

Contents?: true

Size: 988 Bytes

Versions: 35

Compression:

Stored size: 988 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-aomi-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

35 entries across 35 versions & 1 rubygems

Version Path
cocoapods-aomi-bin-0.1.28 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.27 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.26 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.25 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.24 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.23 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.22 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.21 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.20 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.19 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.18 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.17 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.16 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.15 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.14 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.13 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.12 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.11 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.10 lib/cocoapods-lhj-bin/native/podfile_env.rb
cocoapods-aomi-bin-0.1.9 lib/cocoapods-lhj-bin/native/podfile_env.rb