This commit is contained in:
Dominik Richter 2015-10-26 04:39:16 +01:00
parent c326e08739
commit 45f7057f30
4 changed files with 10 additions and 13 deletions

View file

@ -27,10 +27,7 @@ Metrics/CyclomaticComplexity:
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Max: 10 Max: 10
Metrics/AbcSize: Metrics/AbcSize:
Max: 29 Max: 33
Style/DotPosition:
EnforcedStyle: trailing
Enabled: true
Style/PercentLiteralDelimiters: Style/PercentLiteralDelimiters:
PreferredDelimiters: PreferredDelimiters:
'%': '{}' '%': '{}'

View file

@ -45,11 +45,11 @@ class PostgresSession
end end
end end
else else
lines = cmd.stdout.
# remove the whole header (i.e. up to the first ^-----+------+------$) # remove the whole header (i.e. up to the first ^-----+------+------$)
sub(/(.*\n)+([-]+[+])*[-]+\n/, '').
# remove the tail # remove the tail
sub(/\n[^\n]*\n\n$/, '') lines = cmd.stdout
.sub(/(.*\n)+([-]+[+])*[-]+\n/, '')
.sub(/\n[^\n]*\n\n$/, '')
l = Lines.new(lines.strip, "PostgreSQL query: #{query}") l = Lines.new(lines.strip, "PostgreSQL query: #{query}")
RSpec.__send__('describe', l, &block) RSpec.__send__('describe', l, &block)
end end

View file

@ -28,9 +28,9 @@ module FindFiles
exit_status = result.exit_status exit_status = result.exit_status
return [nil, exit_status] unless exit_status == 0 return [nil, exit_status] unless exit_status == 0
files = result.stdout.split("\n"). files = result.stdout.split("\n")
map(&:strip). .map(&:strip)
find_all { |x| !x.empty? } .find_all { |x| !x.empty? }
[files, exit_status] [files, exit_status]
end end
end end

View file

@ -140,7 +140,7 @@ module Vulcano
private private
# Idio(ma)tic unindent # Idio(ma)tic unindent
# TODO replace this # TODO: replace this
# #
# @param [String] text string which needs to be unindented # @param [String] text string which needs to be unindented
# @return [String] input with indentation removed # @return [String] input with indentation removed