Module: RSpec::Buildkite::Analytics
- Defined in:
- lib/rspec/buildkite/analytics/version.rb,
lib/rspec/buildkite/analytics/reporter.rb,
lib/rspec/buildkite/analytics/uploader.rb,
lib/rspec/buildkite/analytics/socket_connection.rb,
lib/rspec/buildkite/analytics/session.rb,
lib/rspec/buildkite/analytics/network.rb,
lib/rspec/buildkite/analytics/tracer.rb,
lib/rspec/buildkite/analytics/object.rb,
lib/rspec/buildkite/analytics.rb
Defined Under Namespace
Classes: CI, Error, Network, Object, Reporter, Session, SocketConnection, TimeoutError, Tracer, Uploader
Constant Summary collapse
- VERSION =
"0.8.2"
- NAME =
"rspec-buildkite"
- DEFAULT_URL =
"https://analytics-api.buildkite.com/v1/uploads"
Class Attribute Summary collapse
-
.api_token ⇒ Object
Returns the value of attribute api_token.
-
.debug_enabled ⇒ Object
Returns the value of attribute debug_enabled.
-
.debug_filepath ⇒ Object
Returns the value of attribute debug_filepath.
-
.session ⇒ Object
Returns the value of attribute session.
-
.uploader ⇒ Object
Returns the value of attribute uploader.
-
.url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
- .annotate(content) ⇒ Object
- .configure(token: nil, url: nil, debug_enabled: false, debug_filepath: nil) ⇒ Object
Class Attribute Details
.api_token ⇒ Object
Returns the value of attribute api_token.
15 16 17 |
# File 'lib/rspec/buildkite/analytics.rb', line 15 def api_token @api_token end |
.debug_enabled ⇒ Object
Returns the value of attribute debug_enabled.
19 20 21 |
# File 'lib/rspec/buildkite/analytics.rb', line 19 def debug_enabled @debug_enabled end |
.debug_filepath ⇒ Object
Returns the value of attribute debug_filepath.
20 21 22 |
# File 'lib/rspec/buildkite/analytics.rb', line 20 def debug_filepath @debug_filepath end |
.session ⇒ Object
Returns the value of attribute session.
18 19 20 |
# File 'lib/rspec/buildkite/analytics.rb', line 18 def session @session end |
.uploader ⇒ Object
Returns the value of attribute uploader.
17 18 19 |
# File 'lib/rspec/buildkite/analytics.rb', line 17 def uploader @uploader end |
.url ⇒ Object
Returns the value of attribute url.
16 17 18 |
# File 'lib/rspec/buildkite/analytics.rb', line 16 def url @url end |
Class Method Details
.annotate(content) ⇒ Object
36 37 38 39 40 |
# File 'lib/rspec/buildkite/analytics.rb', line 36 def self.annotate(content) tracer = RSpec::Buildkite::Analytics::Uploader.tracer tracer&.enter("annotation", **{ content: content }) tracer&.leave end |
.configure(token: nil, url: nil, debug_enabled: false, debug_filepath: nil) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rspec/buildkite/analytics.rb', line 23 def self.configure(token: nil, url: nil, debug_enabled: false, debug_filepath: nil) self.api_token = token || ENV["BUILDKITE_ANALYTICS_TOKEN"] self.url = url || DEFAULT_URL self.debug_enabled = debug_enabled || !!(ENV["BUILDKITE_ANALYTICS_DEBUG_ENABLED"]) self.debug_filepath = debug_filepath || ENV["BUILDKITE_ANALYTICS_DEBUG_FILEPATH"] || Dir.tmpdir Kernel.warn "UNSUPPORTED: The rspec-buildkite-analytics gem has been renamed to buildkite-test_collector. rspec-buildkite-analytics will not receive any further maintenance. Please follow our docs https://buildkite.com/docs/test-analytics/ruby-collectors to upgrade to the new gem: https://rubygems.org/gems/buildkite-test_collector. Thank you!" require_relative "analytics/uploader" self::Uploader.configure end |