Sha256: e9cd086f6b4340d300e580341657ecdaba28ee03b47206c33fd6de64fe31a8da

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

module PodPrebuild
  class Env
    @stage_idx = 0

    class << self
      def reset!
        @stage_idx = 0
        @stages = nil
      end

      def next_stage!
        @stage_idx += 1 if @stage_idx < stages.count - 1
      end

      def stages
        @stages ||= Pod::Podfile::DSL.prebuild_job? ? [:prebuild, :integration] : [:integration]
      end

      def current_stage
        stages[@stage_idx]
      end

      def prebuild_stage?
        current_stage == :prebuild
      end

      def integration_stage?
        current_stage == :integration
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.6 lib/cocoapods-binary-cache/env.rb
cocoapods-binary-cache-0.1.5 lib/cocoapods-binary-cache/env.rb