Skip to content

Commit b861433

Browse files
committed
use older syntax, when undefined version
1 parent 1d4202e commit b861433

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

spec/defines/collectd_plugin_write_graphite_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
it 'includes carbon configuration' do
6565
should contain_concat__fragment('collectd_plugin_write_graphite_conf_graphite_default_tcp_2003').with({
66-
:content => /<Node "graphite_default">/,
66+
:content => /<Carbon>/,
6767
:target => '/etc/collectd/conf.d/write_graphite-config.conf',
6868
})
6969

templates/plugin/write_graphite/carbon.conf.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<%- if @collectd_version and (scope.function_versioncmp([@collectd_version, '5.2']) <= 0) -%>
2-
<Carbon>
3-
<%- else -%>
1+
<%- if @collectd_version and (scope.function_versioncmp([@collectd_version, '5.3']) >= 0) -%>
42
<Node "<%= @title %>">
3+
<%- else -%>
4+
<Carbon>
55
<%- end -%>
66
Host "<%= @graphitehost %>"
77
Port "<%= @graphiteport %>"
@@ -17,8 +17,8 @@
1717
LogSendErrors <%= @logsenderrors %>
1818
Protocol "<%= @protocol %>"
1919
<%- end -%>
20-
<%- if @collectd_version and (scope.function_versioncmp([@collectd_version, '5.2']) <= 0) -%>
21-
</Carbon>
22-
<%- else -%>
20+
<%- if @collectd_version and (scope.function_versioncmp([@collectd_version, '5.3']) >= 0) -%>
2321
</Node>
22+
<%- else -%>
23+
</Carbon>
2424
<%- end -%>

0 commit comments

Comments
 (0)