Sha256: e7b576bdb4a2f88ff6b1db782f9445879a82f25754d7294ff3b2a9ab9b1b58b8

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

module  Tdfire
	class BinaryStateStore
		public

		class << self
			# attr_accessor :unpublished_pods
			attr_accessor :use_source_pods
			attr_reader :printed_pods
		end
		# @unpublished_pods = []
		@use_source_pods = []
		@printed_pods = []

		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.force_use_source?
			ENV[FORCE_USE_SOURCE_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'
		USE_SURE_VALUE = '1'
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocoapods-tdfire-binary-0.1.8 lib/cocoapods-tdfire-binary/binary_state_store.rb
cocoapods-tdfire-binary-0.1.7 lib/cocoapods-tdfire-binary/binary_state_store.rb