-
Notifications
You must be signed in to change notification settings - Fork 374
/
datadog.gemspec
79 lines (67 loc) · 3.38 KB
/
datadog.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# frozen_string_literal: true
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
# DEV: Loading gem files here is undesirable because it pollutes the application namespace.
# DEV: In this case, `bundle exec ruby -e 'puts defined?(Datadog)'` will return `constant`
# DEV: even though `require 'datadog'` wasn't executed. But only the version file was loaded.
# DEV: We should avoid loading gem files to fetch the version here.
require 'datadog/version'
Gem::Specification.new do |spec|
spec.name = 'datadog'
spec.version = Datadog::VERSION::STRING
# required_ruby_version should be in a single line due to test-head workflow `sed` to unlock the version
spec.required_ruby_version = [">= #{Datadog::VERSION::MINIMUM_RUBY_VERSION}", "< #{Datadog::VERSION::MAXIMUM_RUBY_VERSION}"] # rubocop:disable Layout/LineLength
spec.required_rubygems_version = '>= 2.0.0'
spec.authors = ['Datadog, Inc.']
spec.email = ['[email protected]']
spec.summary = 'Datadog tracing code for your Ruby applications'
spec.description = <<-DESC.gsub(/^\s+/, '')
datadog is Datadog's client library for Ruby. It includes a suite of tools
which provide visibility into the performance and security of Ruby applications,
to enable Ruby developers to identify bottlenecks and other issues.
DESC
spec.homepage = 'https://github.com/DataDog/dd-trace-rb'
spec.licenses = ['BSD-3-Clause', 'Apache-2.0']
if spec.respond_to?(:metadata)
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata['changelog_uri'] = "https://github.com/DataDog/dd-trace-rb/blob/v#{spec.version}/CHANGELOG.md"
spec.metadata['source_code_uri'] = "https://github.com/DataDog/dd-trace-rb/tree/v#{spec.version}"
else
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
end
spec.files =
Dir[*%w[
CHANGELOG.md
LICENSE*
NOTICE
README.md
bin/**/*
ext/**/*
lib/**/*
]]
.select { |fn| File.file?(fn) } # We don't want directories, only files
.reject { |fn| fn.end_with?('.so', '.bundle') } # Exclude local profiler binary artifacts
.reject { |fn| fn.end_with?('skipped_reason.txt') } # Generated by profiler; should never be distributed
spec.executables = ['ddprofrb']
spec.require_paths = ['lib']
# Used to serialize traces to send them to the Datadog Agent.
#
# msgpack 1.4 fails for Ruby 2.1 (see https://github.com/msgpack/msgpack-ruby/issues/205)
# so a restriction needs to be manually added for the `Gemfile`.
#
# We can't add a restriction here, since there's no way to add it only for older
# rubies, see #1739 and #1336 for an extended discussion about this
spec.add_dependency 'msgpack'
# Used by the profiler native extension to support Ruby 2.5 and > 3.2, see NativeExtensionDesign.md for details
spec.add_dependency 'datadog-ruby_core_source', '~> 3.3', '>= 3.3.7'
# Used by appsec
spec.add_dependency 'libddwaf', '~> 1.18.0.0.0'
# When updating the version here, please also update the version in `libdatadog_extconf_helpers.rb`
# (and yes we have a test for it)
spec.add_dependency 'libdatadog', '~> 14.3.1.1.0'
spec.extensions = [
'ext/datadog_profiling_native_extension/extconf.rb',
'ext/datadog_profiling_loader/extconf.rb',
'ext/libdatadog_api/extconf.rb'
]
end