bricolage 5.27.1 → 5.27.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/bricolage/psqldatasource.rb +17 -13
- data/lib/bricolage/version.rb +1 -1
- data/test/test_psqldatasource.rb +12 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5b910f08fd3e77241f8ac067c9f129f2b33a7b98bcd1d017a72149fbf228fa8a
|
4
|
+
data.tar.gz: 91f21bf4953bfbf1299df94700db1c7adf49000cb724b338da5a9b09e92da17e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a80f093c8db79a91b1d10419b29a00043ec1f54893654365e4b8c7c7bae421ced67a1516ddb0bc69cd30e9426611be3e0c6480d1f819add3973689789ffd5154
|
7
|
+
data.tar.gz: 48861ccd45aff5c927e9b2f51587ac13e97b4c62a15de51d8ff181d38f1a606ed3e15c0dbc27259bc0010f554844aa0831864cc08ff20e39cdc1c99e144603e4
|
@@ -483,21 +483,25 @@ module Bricolage
|
|
483
483
|
|
484
484
|
# Make polymorphic?
|
485
485
|
def to_s
|
486
|
-
|
487
|
-
when true # acceptanydate
|
488
|
-
@name
|
489
|
-
when false # compupdate false
|
490
|
-
"#{@name} false"
|
491
|
-
when 'on', 'off'
|
486
|
+
if @name == 'encoding' # encoding utf16le
|
492
487
|
"#{@name} #{@value}"
|
493
|
-
when String # json 'auto'
|
494
|
-
"#{@name} '#{@value}'"
|
495
|
-
when Integer # maxerror 10
|
496
|
-
"#{@name} #{@value}"
|
497
|
-
when nil # (explicitly disable boolean options)
|
498
|
-
''
|
499
488
|
else
|
500
|
-
|
489
|
+
case @value
|
490
|
+
when true # acceptanydate
|
491
|
+
@name
|
492
|
+
when false # compupdate false
|
493
|
+
"#{@name} false"
|
494
|
+
when 'on', 'off'
|
495
|
+
"#{@name} #{@value}"
|
496
|
+
when String # json 'auto'
|
497
|
+
"#{@name} '#{@value}'"
|
498
|
+
when Integer # maxerror 10
|
499
|
+
"#{@name} #{@value}"
|
500
|
+
when nil # (explicitly disable boolean options)
|
501
|
+
''
|
502
|
+
else
|
503
|
+
raise ParameterError, "unsupported option value type for #{@name}: #{@value.inspect}"
|
504
|
+
end
|
501
505
|
end
|
502
506
|
end
|
503
507
|
end
|
data/lib/bricolage/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'bricolage/psqldatasource'
|
3
|
+
|
4
|
+
module Bricolage
|
5
|
+
class TestPSQLLoadOptions < Test::Unit::TestCase
|
6
|
+
test "load option is correctly formatted" do
|
7
|
+
assert_equal 'gzip', PSQLLoadOptions::Option.new('gzip', true).to_s
|
8
|
+
assert_equal "json 'auto'", PSQLLoadOptions::Option.new('json', 'auto').to_s
|
9
|
+
assert_equal 'encoding utf16le', PSQLLoadOptions::Option.new('encoding', 'utf16le').to_s
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricolage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.27.
|
4
|
+
version: 5.27.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -294,6 +294,7 @@ files:
|
|
294
294
|
- test/test_filesystem.rb
|
295
295
|
- test/test_logfilepath.rb
|
296
296
|
- test/test_parameters.rb
|
297
|
+
- test/test_psqldatasource.rb
|
297
298
|
- test/test_s3datasource.rb
|
298
299
|
- test/test_variables.rb
|
299
300
|
- test/vacuum-test.rb
|
@@ -317,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
317
318
|
version: '0'
|
318
319
|
requirements: []
|
319
320
|
rubyforge_project:
|
320
|
-
rubygems_version: 2.6
|
321
|
+
rubygems_version: 2.7.6
|
321
322
|
signing_key:
|
322
323
|
specification_version: 4
|
323
324
|
summary: SQL Batch Framework
|