Commit 7fdca423 authored by André Kerkhoff's avatar André Kerkhoff
Browse files

Make cookstyle happier

parent f2643719
......@@ -69,23 +69,23 @@ if @version >= Gem::Version.new('1.0.3')
'%MAKETEXT{"Discover the details, and how to start your own site with ' \
'Foswiki"}% - %MAKETEXT{"The Free and Open Source Wiki."}%'
if @version >= Gem::Version.new('2.1.1')
default['foswiki']['web_preferences']['System']['WEBCOPYRIGHT'] =
'<span class="foswikiRight"> <a href="https://foswiki.org/"><img ' \
'src="%PUBURLPATH%/%SYSTEMWEB%/ProjectLogos/foswiki-badge.png" ' \
'height="42" alt="This site is powered by Foswiki" title="This ' \
'site is powered by Foswiki" /></a></span>%MAKETEXT{"Copyright ' \
'&&copy; by the contributing authors. All material on this site ' \
'is the property of the contributing authors." args="1999-%GMTIME' \
'{$year}%"}% <br /> %MAKETEXT{"Ideas, requests, problems ' \
'regarding [_1]? <a href=\'[_2]\'>Send feedback</a>" args="<nop>' \
'%WIKITOOLNAME%,mailto:%WIKIWEBMASTER%?subject=%WIKITOOLNAME%%20' \
'Feedback%20on%20%BASEWEB%.%BASETOPIC%"}% %IF{"$ WEB= $ ' \
'SYSTEMWEB" then=""}%'
end
if @version >= Gem::Version.new('1.2.0')
default['foswiki']['web_preferences']['System']['NOAUTOLINK'] = 'off'
if @version >= Gem::Version.new('2.1.1')
default['foswiki']['web_preferences']['System']['WEBCOPYRIGHT'] =
'<span class="foswikiRight"> <a href="https://foswiki.org/"><img ' \
'src="%PUBURLPATH%/%SYSTEMWEB%/ProjectLogos/foswiki-badge.png" ' \
'height="42" alt="This site is powered by Foswiki" title="This ' \
'site is powered by Foswiki" /></a></span>%MAKETEXT{"Copyright ' \
'&&copy; by the contributing authors. All material on this site ' \
'is the property of the contributing authors." args="1999-%GMTIME' \
'{$year}%"}% <br /> %MAKETEXT{"Ideas, requests, problems ' \
'regarding [_1]? <a href=\'[_2]\'>Send feedback</a>" args="<nop>' \
'%WIKITOOLNAME%,mailto:%WIKIWEBMASTER%?subject=%WIKITOOLNAME%%20' \
'Feedback%20on%20%BASEWEB%.%BASETOPIC%"}% %IF{"$ WEB= $ ' \
'SYSTEMWEB" then=""}%'
end
end
end
end
......@@ -70,8 +70,8 @@ module Foswiki
def foswiki_resolve(value, tools_dir = nil)
return nil if value.nil?
while value =~ /\$Foswiki::cfg{/
value = value.gsub(/\$Foswiki::cfg({[A-Za-z}{]+})/) do
foswiki_get($1, tools_dir)
value = value.gsub(/\$Foswiki::cfg({[A-Za-z}{]+})/) do |_|
foswiki_get(Regexp.last_match[1], tools_dir)
end
end
value
......
......@@ -78,9 +78,9 @@ action_class do
def value_to_string(value)
if value.is_a?(String) && value.delete("\n") =~ /^{.*}$/
v = value.delete("\n").gsub(/\$/, '\$').gsub(/ +/, ' ')
v = v.gsub(/^{\s*/, '{').gsub(/\s}$/, '}')
return "\"#{v}\""
value = value.delete("\n").gsub(/\$/, '\$').gsub(/ +/, ' ')
value = value.gsub(/^{\s*/, '{').gsub(/\s}$/, '}')
return "\"#{value}\""
end
return "'#{value}'" if value.is_a? String
return '0' if value == false
......
Vagrant.configure(2) do |config|
# install the Debian-provided Chef package
config.vm.provision "shell", inline: <<-SHELL
config.vm.provision 'shell', inline: <<-SHELL
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install chef git
SHELL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment