Sha256: acc84291f4200117681ae1d986ea2df4030f5bf0b2a070f00f10887a06b66c59

Contents?: true

Size: 439 Bytes

Versions: 5

Compression:

Stored size: 439 Bytes

Contents

module ShopifyCLI
  module Utilities
    def self.version_dropping_pre_and_build(version)
      Semantic::Version.new("#{version.major}.#{version.minor}.#{version.patch}")
    end

    def self.directory(pattern, curr)
      loop do
        return nil if curr == "/" || /^[A-Z]:\/$/.match?(curr)
        file = File.join(curr, pattern)
        return curr if File.exist?(file)
        curr = File.dirname(curr)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shopify-cli-2.27.0 lib/shopify_cli/utilities.rb
shopify-cli-2.26.0 lib/shopify_cli/utilities.rb
shopify-cli-2.25.0 lib/shopify_cli/utilities.rb
shopify-cli-2.24.0 lib/shopify_cli/utilities.rb
shopify-cli-2.23.0 lib/shopify_cli/utilities.rb