Sha256: 89c32ad3a81ed530aa82778c8bb4e583db9f39bf30bd70769cdb091a44b0b4df

Contents?: true

Size: 1.27 KB

Versions: 7

Compression:

Stored size: 1.27 KB

Contents

require_relative 'module.rb'

module Qricker
  def Qricker.findPodspecs(path)
    podspecs = []
    path = Pathname(path)
    if not path.absolute?
      path = path.realpath
    end
    path.entries.each { |entry|
      if (entry.extname == '.podspec' || entry.to_s.end_with?('.podspec.json'))
        if path.basename.to_path == "Local Podspecs"
          next
        end
        podspecs.push(path.join(entry))
      end
    }
    if podspecs.count != 0
      return podspecs
    else
      path.entries.each {  |entry|
        next if entry.to_path == "."
        next if entry.to_path == ".."
        next if entry.to_path == ".git"
        next if entry.to_path == ".repo"
        next if entry.to_path.start_with?("cocoapods-")
        next if entry.to_path.start_with?("hive-deploy")
        if File.directory?(path.join(entry))
          subpath = path.join(entry)
          ps = findPodspecs(subpath)
          podspecs = podspecs + ps
        end
      }
    end
    return podspecs
  end

  def Qricker.allPodSpecs(path)
    podspecs = findPodspecs(path)
    transSpecs = []
    if not podspecs.nil?
      podspecs.each { |specpath|
        spec = RickerSpec.new(File.basename(specpath,".podspec"), specpath.dirname)
        transSpecs << spec
      }
    end
    return transSpecs
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qricker-0.1.13 lib/qricker/podspecs.rb
qricker-0.0.12 lib/qricker/podspecs.rb
qricker-0.0.10 lib/qricker/podspecs.rb
qricker-0.0.9 lib/qricker/podspecs.rb
qricker-0.0.8 lib/qricker/podspecs.rb
qricker-0.0.7 lib/qricker/podspecs.rb
qricker-0.0.6 lib/qricker/podspecs.rb