Skip to content

Commit

Permalink
more typing
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Aug 22, 2023
1 parent ae22958 commit 4504d13
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ target :lib do

repo_path "vendor/rbs"
library "ddtrace"
library "gem"
library "open3"
library "rspec"
end
2 changes: 0 additions & 2 deletions lib/datadog/ci/ext/environment.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

p "DATADOG CI ENVIRONMENT"

require "datadog/core/git/ext"

require "open3"
Expand Down
3 changes: 2 additions & 1 deletion sig/datadog/ci/contrib/rspec/integration.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module Datadog

def self.loaded?: () -> untyped

def self.compatible?: () -> untyped
def compatible?: () -> bool

def auto_instrument?: () -> false

def new_configuration: () -> untyped
Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/ci/ext/environment.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module Datadog

TAG_CI_ENV_VARS: String

# PROVIDERS: ::Array[::Array["APPVEYOR" | :extract_appveyor] | ::Array["TF_BUILD" | :extract_azure_pipelines] | ::Array["BITBUCKET_COMMIT" | :extract_bitbucket] | ::Array["BUDDY" | :extract_buddy] | ::Array["BUILDKITE" | :extract_buildkite] | ::Array["CIRCLECI" | :extract_circle_ci] | ::Array["GITHUB_SHA" | :extract_github_actions] | ::Array["GITLAB_CI" | :extract_gitlab] | ::Array["JENKINS_URL" | :extract_jenkins] | ::Array["TEAMCITY_VERSION" | :extract_teamcity] | ::Array["TRAVIS" | :extract_travis] | ::Array["BITRISE_BUILD_SLUG" | :extract_bitrise] | ::Array["CF_BUILD_ID" | :extract_codefresh]]
PROVIDERS: ::Array[Array[String | Symbol]]

def self?.tags: (untyped env) -> untyped

Expand Down
23 changes: 23 additions & 0 deletions vendor/rbs/ddtrace/0/datadog/core/environment/ext.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Datadog
module Core
module Environment
module Ext
LANG: untyped

LANG_ENGINE: untyped

LANG_INTERPRETER: untyped

LANG_PLATFORM: untyped

LANG_VERSION: untyped

RUBY_ENGINE: untyped

TRACER_VERSION: untyped

ENGINE_VERSION: untyped
end
end
end
end
23 changes: 23 additions & 0 deletions vendor/rbs/ddtrace/0/datadog/core/utils/forking.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Datadog
module Core
module Utils
module Forking
def self.included: (untyped base) -> untyped

def self.extended: (untyped base) -> untyped

def after_fork!: () { () -> untyped } -> untyped

def forked?: () -> untyped

def update_fork_pid!: () -> untyped

def fork_pid: () -> untyped

module ClassExtensions
def initialize: (*untyped args) { () -> untyped } -> untyped
end
end
end
end
end
1 change: 1 addition & 0 deletions vendor/rbs/ddtrace/0/datadog/tracing.rbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module Datadog
module Tracing
def self.active_trace: () -> Datadog::Tracing::TraceSegment
end
end
4 changes: 4 additions & 0 deletions vendor/rbs/ddtrace/0/datadog/tracing/contrib/integration.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ module Datadog
module Contrib
module Integration
def self.included: (untyped base) -> untyped

def compatible?: () -> bool

def register_as: (Symbol key, Hash options) -> untyped
end
end
end
Expand Down
72 changes: 72 additions & 0 deletions vendor/rbs/ddtrace/0/datadog/tracing/trace_segment.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
module Datadog
module Tracing
class TraceSegment
TAG_NAME: ::String
TAG_RESOURCE: ::String
TAG_SERVICE: ::String

attr_reader id: untyped
attr_reader spans: untyped
attr_reader agent_sample_rate: untyped
attr_reader hostname: untyped
attr_reader lang: untyped
attr_reader name: untyped
attr_reader origin: untyped
attr_reader process_id: untyped
attr_reader rate_limiter_rate: untyped
attr_reader resource: untyped
attr_reader rule_sample_rate: untyped
attr_reader runtime_id: untyped
attr_reader sample_rate: untyped
attr_reader sampling_decision_maker: untyped
attr_reader sampling_priority: untyped
attr_reader service: untyped

def initialize: (untyped spans, ?agent_sample_rate: untyped?, ?hostname: untyped?, ?id: untyped?, ?lang: untyped?, ?name: untyped?, ?origin: untyped?, ?process_id: untyped?, ?rate_limiter_rate: untyped?, ?resource: untyped?, ?root_span_id: untyped?, ?rule_sample_rate: untyped?, ?runtime_id: untyped?, ?sample_rate: untyped?, ?sampling_priority: untyped?, ?service: untyped?, ?tags: untyped?, ?metrics: untyped?) -> void
def any?: () -> untyped
def count: () -> untyped
def empty?: () -> untyped
def length: () -> untyped
def size: () -> untyped

def keep!: () -> void
def reject!: () -> void
def sampled?: () -> untyped

attr_reader root_span_id: untyped
attr_reader meta: untyped
attr_reader metrics: untyped

private

attr_writer agent_sample_rate: untyped
attr_writer hostname: untyped
attr_writer lang: untyped
attr_writer name: untyped
attr_writer origin: untyped
attr_writer process_id: untyped
attr_writer rate_limiter_rate: untyped
attr_writer resource: untyped
attr_writer rule_sample_rate: untyped
attr_writer runtime_id: untyped
attr_writer sample_rate: untyped
attr_writer sampling_priority: untyped
attr_writer service: untyped

def agent_sample_rate_tag: () -> untyped
def hostname_tag: () -> untyped
def lang_tag: () -> untyped
def name_tag: () -> untyped
def origin_tag: () -> untyped
def process_id_tag: () -> untyped
def rate_limiter_rate_tag: () -> untyped
def resource_tag: () -> untyped
def rule_sample_rate_tag: () -> untyped
def runtime_id_tag: () -> untyped
def sample_rate_tag: () -> untyped
def sampling_decision_maker_tag: () -> untyped
def sampling_priority_tag: () -> untyped
def service_tag: () -> untyped
end
end
end
15 changes: 15 additions & 0 deletions vendor/rbs/gem/0/gem.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class Gem::Platform
def self.local: () -> Gem::Platform

def os: () -> String
def cpu: () -> String
def version: () -> String
end

class Gem::Platform
end

class Gem::BasicSpecification
def platform: () -> Gem::Platform
def version: () -> String
end
3 changes: 3 additions & 0 deletions vendor/rbs/open3/0/open3.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Open3
def self.capture2e: (String cmd) -> [String, Process::Status]
end
8 changes: 8 additions & 0 deletions vendor/rbs/rspec/0/rspec.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class RSpec
end

class RSpec::Core
end

class RSpec::Core::Example
end

0 comments on commit 4504d13

Please sign in to comment.