mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Use %Q instead of bare % for string literals
This commit is contained in:
parent
04238cb040
commit
f90f9a03f5
4 changed files with 5 additions and 3 deletions
|
@ -3,6 +3,8 @@ AllCops:
|
||||||
DisplayStyleGuide: true
|
DisplayStyleGuide: true
|
||||||
TargetRubyVersion: 2.0
|
TargetRubyVersion: 2.0
|
||||||
|
|
||||||
|
Style/BarePercentLiterals:
|
||||||
|
EnforcedStyle: percent_q
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/DoubleNegation:
|
Style/DoubleNegation:
|
||||||
|
|
|
@ -12,7 +12,7 @@ module RemoteCommandHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
def exists?(type, path)
|
def exists?(type, path)
|
||||||
%{[ -#{type} "#{path}" ]}
|
%Q{[ -#{type} "#{path}" ]}
|
||||||
end
|
end
|
||||||
|
|
||||||
def safely_remove_file(_path)
|
def safely_remove_file(_path)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
validate :application do |_key, value|
|
validate :application do |_key, value|
|
||||||
changed_value = value.gsub(/[^A-Z0-9\.\-]/i, "_")
|
changed_value = value.gsub(/[^A-Z0-9\.\-]/i, "_")
|
||||||
if value != changed_value
|
if value != changed_value
|
||||||
warn %(The :application value "#{value}" is invalid!)
|
warn %Q(The :application value "#{value}" is invalid!)
|
||||||
warn "Use only letters, numbers, hyphens, dots, and underscores. For example:"
|
warn "Use only letters, numbers, hyphens, dots, and underscores. For example:"
|
||||||
warn " set :application, '#{changed_value}'"
|
warn " set :application, '#{changed_value}'"
|
||||||
raise Capistrano::ValidationError
|
raise Capistrano::ValidationError
|
||||||
|
|
|
@ -192,7 +192,7 @@ namespace :deploy do
|
||||||
task :log_revision do
|
task :log_revision do
|
||||||
on release_roles(:all) do
|
on release_roles(:all) do
|
||||||
within releases_path do
|
within releases_path do
|
||||||
execute :echo, %{"#{revision_log_message}" >> #{revision_log}}
|
execute :echo, %Q{"#{revision_log_message}" >> #{revision_log}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue