forked from DataDog/dd-trace-rb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatadog.gemspec
More file actions
99 lines (83 loc) · 4.29 KB
/
Copy pathdatadog.gemspec
File metadata and controls
99 lines (83 loc) · 4.29 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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 = ["dev@datadoghq.com"]
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
.reject { |fn| %w[AGENTS.md CLAUDE.md].include?(File.basename(fn)) } # Developer tooling; not useful to gem consumers
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.5", ">= 3.5.4"
# Used by appsec
spec.add_dependency "libddwaf", "~> 1.30.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", "~> 36.0.0.1.0"
# Will no longer be a default gem on Ruby 4.0, see
# https://github.com/ruby/ruby/commit/d7e558e3c48c213d0e8bedca4fb547db55613f7c and
# https://stdgems.org/ .
# We support all versions of this gem and don't particularly require any version restriction.
spec.add_dependency "logger"
# Will no longer be a default gem on Ruby 4.1, see
# https://github.com/ruby/ruby/commit/600c616507b258cdf9dbfbc822deb267f3202325 and
# https://stdgems.org/ .
# We support all versions of this gem and don't particularly require any version restriction.
spec.add_dependency "cgi"
# Tip: When adding or removing dependencies, search the codebase for the string
# ADD NEW DEPENDENCIES HERE
# to find out a few more places that need to be kept in-sync.
# DEV-3.0 Remove this message
spec.post_install_message =
"JRuby support in the datadog gem is deprecated. Details: https://dtdg.co/jruby-deprecation"
spec.extensions = [
"ext/datadog_profiling_native_extension/extconf.rb",
"ext/libdatadog_api/extconf.rb"
]
end