Sha256: 28b740aec7d185a772d946f2ebc2bf387fb2ac4e20a1424ceb871c4c8ef01f6a

Contents?: true

Size: 1.91 KB

Versions: 4

Compression:

Stored size: 1.91 KB

Contents

module Pod
  module Tdfire
    class BinaryStateStore
      public

      class << self
        # attr_accessor :unpublished_pods
        attr_accessor :use_source_pods
        attr_reader :printed_pods
        attr_accessor :use_frameworks
        attr_accessor :use_source
        attr_accessor :lib_lint_binary_pod
        attr_accessor :limit_platform
      end

      @use_source_pods = []
      @use_binary_pods = []
      @printed_pods = []
      @use_frameworks = false
      @limit_platform = false

      def self.real_use_source_pods
        (@use_source_pods + unpublished_pods).uniq
      end

      def self.unpublished_pods
        String(ENV[UNPBLISHED_PODS]).split('|').uniq
      end

      def self.unpublished_pods=(pods)
        ENV[UNPBLISHED_PODS] = Array(pods).uniq.join('|')
      end

      def self.use_binary?
        ENV[USE_BINARY_KEY] == USE_SURE_VALUE
      end

      def self.set_use_binary
        ENV[USE_BINARY_KEY] = USE_SURE_VALUE
      end

      def self.force_use_binary?
        ENV[FORCE_USE_BINARY_KEY] == USE_SURE_VALUE
      end

      def self.set_force_use_binary
        ENV[FORCE_USE_BINARY_KEY] = USE_SURE_VALUE
      end

      def self.unset_force_use_binary
        ENV[FORCE_USE_BINARY_KEY] = '0'
      end

      def self.force_use_source?
        ENV[FORCE_USE_SOURCE_KEY] == USE_SURE_VALUE
      end

      def self.set_third_party_use_binary
        ENV[THIRD_PARTY_USE_BINARY_KEY] = USE_SURE_VALUE
      end

      def self.third_party_use_binary?
        ENV[THIRD_PARTY_USE_BINARY_KEY] == USE_SURE_VALUE
      end

      private

      UNPBLISHED_PODS = "tdfire_unpublished_pods"
      FORCE_USE_SOURCE_KEY = 'tdfire_force_use_source'
      FORCE_USE_BINARY_KEY = 'tdfire_force_use_binary'
      USE_BINARY_KEY = 'tdfire_use_binary'
      THIRD_PARTY_USE_BINARY_KEY = 'tdfire_third_party_use_binary'
      LIMIT_PLATFORM_KEY = 'tdfire_limit_platform'
      USE_SURE_VALUE = '1'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cocoapods-tdfire-binary-1.3.9 lib/cocoapods-tdfire-binary/binary_state_store.rb
cocoapods-tdfire-binary-1.3.8 lib/cocoapods-tdfire-binary/binary_state_store.rb
cocoapods-tdfire-binary-1.3.7 lib/cocoapods-tdfire-binary/binary_state_store.rb
cocoapods-tdfire-binary-1.3.6 lib/cocoapods-tdfire-binary/binary_state_store.rb