lib/tasks/instrumentation_generator/instrumentation.thor in newrelic_rpm-8.16.0 vs lib/tasks/instrumentation_generator/instrumentation.thor in newrelic_rpm-9.0.0
- old
+ new
@@ -12,11 +12,11 @@
MULTIVERSE_SUITE_ROOT = 'test/multiverse/suites/'
DEFAULT_SOURCE_LOCATION = 'lib/new_relic/agent/configuration/default_source.rb'
NEWRELIC_YML_LOCATION = 'newrelic.yml'
desc('scaffold NAME', 'Scaffold the required files for adding new instrumentation')
- long_desc <<-LONGDESC
+ long_desc <<~LONGDESC
`instrumentation scaffold` requires one parameter by default: the name of the
library or class you are instrumenting. This task generates the basic
file structure needed to add new instrumentation to the Ruby agent.
LONGDESC
@@ -94,11 +94,11 @@
after: "# instrumentation.bunny: auto\n"
)
end
def config_block(name)
- <<-CONFIG
+ <<~CONFIG
:'instrumentation.#{name.downcase}' => {
:default => 'auto',
:public => true,
:type => String,
:dynamic_name => true,
@@ -106,19 +106,16 @@
:description => 'Controls auto-instrumentation of the #{name} library at start up. May be one of [auto|prepend|chain|disabled].'
},
CONFIG
end
- # TODO: OLD RUBIES - RUBY_VERSION 2.2
- # When we only support 2.3+ this can be changed to a sqiggle heredoc (<<~)
- # and use standard indentation
def yaml_block(name)
-<<HEREDOC # rubocop:disable Layout/IndentationWidth
+ <<~HEREDOC
- # Controls auto-instrumentation of #{name} at start up.
- # May be one of [auto|prepend|chain|disabled]
- # instrumentation.#{name.downcase}: auto
-HEREDOC
+ # Controls auto-instrumentation of #{name} at start up.
+ # May be one of [auto|prepend|chain|disabled]
+ # instrumentation.#{name.downcase}: auto
+ HEREDOC
end
end
Instrumentation.start(ARGV)