Sha256: 038bf68933f14066245e7b404300a349f93d3743a678e9b9dad370f36271f2b4

Contents?: true

Size: 736 Bytes

Versions: 19

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

require_relative "../ext/environment"
require_relative "../git/local_repository"

module Datadog
  module CI
    module Utils
      module Bundle
        def self.location
          require "bundler"
          bundle_path = Bundler.bundle_path.to_s
          bundle_path if bundle_path&.start_with?(Datadog::CI::Git::LocalRepository.root)
        rescue => e
          Datadog.logger.warn("Failed to find bundled gems location: #{e}")

          Ext::Environment::POSSIBLE_BUNDLE_LOCATIONS.each do |location|
            path = File.join(Datadog::CI::Git::LocalRepository.root, location)
            return path if File.directory?(path)
          end
          nil
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
datadog-ci-1.14.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.13.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.12.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.11.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.10.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.9.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.8.1 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.8.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.7.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.6.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.5.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.4.1 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.4.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.3.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.2.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.1.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.0.1 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.0.0 lib/datadog/ci/utils/bundle.rb
datadog-ci-1.0.0.beta6 lib/datadog/ci/utils/bundle.rb