@@ -48,15 +48,15 @@ def ansi_code( *attributes )
48
48
attributes = ANSI_ATTRIBUTES . values_at ( *attributes ) . compact . join ( ';' )
49
49
50
50
# $stderr.puts " attr is: %p" % [attributes]
51
- if attributes . empty?
51
+ if attributes . empty?
52
52
return ''
53
53
else
54
54
return "\e [%sm" % attributes
55
55
end
56
56
end
57
57
58
58
59
- ### Colorize the given +string+ with the specified +attributes+ and return it, handling
59
+ ### Colorize the given +string+ with the specified +attributes+ and return it, handling
60
60
### line-endings, color reset, etc.
61
61
def colorize ( *args )
62
62
string = ''
@@ -112,7 +112,7 @@ def run( *cmd )
112
112
113
113
NOFORK_PLATFORMS = %w{ java }
114
114
115
- ### Run the specified command +cmd+ after redirecting stdout and stderr to the specified
115
+ ### Run the specified command +cmd+ after redirecting stdout and stderr to the specified
116
116
### +logpath+, failing if the execution fails.
117
117
def log_and_run ( logpath , *cmd )
118
118
cmd . flatten!
@@ -244,9 +244,10 @@ def teardown_testing_db( conn )
244
244
config . filter_run_excluding :postgresql_90 unless
245
245
PG ::Connection . instance_methods . map ( &:to_sym ) . include? ( :escape_literal )
246
246
247
- unless PG . respond_to? ( :library_version )
248
- config . filter_run_excluding ( :postgresql_91 )
249
- config . filter_run_excluding ( :postgresql_92 ) unless PG . library_version >= '90200'
247
+ if !PG . respond_to? ( :library_version )
248
+ config . filter_run_excluding ( :postgresql_91 , :postgresql_92 )
249
+ elsif PG . library_version < 90200
250
+ config . filter_run_excluding ( :postgresql_92 )
250
251
end
251
252
end
252
253
0 commit comments