Sha256: a0b441a9f49dbdec101447f17ef207bb34995b8f594582b5494385101127dbb1

Contents?: true

Size: 791 Bytes

Versions: 45

Compression:

Stored size: 791 Bytes

Contents

require 'big_keeper/dependency/dep_operator'
require 'big_keeper/dependency/dep_pod_operator'
require 'big_keeper/dependency/dep_gradle_operator'
require 'big_keeper/util/file_operator'

module BigKeeper
  module DepType
    NONE = 0
    COCOAPODS = 1
    GRADLE = 2

    def self.type(path)
      if FileOperator.definitely_exists?("#{path}/Podfile")
        COCOAPODS
      elsif FileOperator.definitely_exists?("#{path}/build.gradle")
        GRADLE
      else
        NONE
      end
    end

    def self.operator(path, user)
      operator_type = type(path)
      if COCOAPODS == operator_type
        DepPodOperator.new(path, user)
      elsif GRADLE == operator_type
        DepGradleOperator.new(path, user)
      else
        DepOperator.new(path, user)
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
shkeeper-1.0.0 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.1.2 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.1.0 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.9 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.8 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.7 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.6 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.5 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.4 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.3 lib/big_keeper/dependency/dep_type.rb
kookeeper-3.0.0 lib/big_keeper/dependency/dep_type.rb
kookeeper-2.0.0 lib/big_keeper/dependency/dep_type.rb
kookeeper-1.0.0 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.21 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.20 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.19 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.18 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.17 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.16 lib/big_keeper/dependency/dep_type.rb
bigkeeper-0.9.15 lib/big_keeper/dependency/dep_type.rb