Module: Datadog::CI::Utils::Bundle
- Defined in:
- lib/datadog/ci/utils/bundle.rb
Class Method Summary collapse
Class Method Details
.location ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/datadog/ci/utils/bundle.rb', line 10 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 |
.rswag_present? ⇒ Boolean
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/datadog/ci/utils/bundle.rb', line 24 def self.rswag_present? return @rswag_present if defined?(@rswag_present) @rswag_present = begin Gem.loaded_specs.key?("rswag-specs") rescue => e Datadog.logger.debug do "Bundle: Unable to detect rswag-specs: #{e.class} #{e.}" end false end end |