kiba-plus 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kiba/plus/job.rb +2 -1
- data/lib/kiba/plus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f1a1cdf8bd14192dc38eff8bf739b08291c89f2
|
4
|
+
data.tar.gz: ccdc4706b15ef09c52c991bb1a3043fbe86d72b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b84053566ac09a919756801fd9edc193b06decdafec0d671eda0663a0a4c2ed658581e778c734c77c5afd56e72d0991297b6c76def3bcbab9f628be86d5d0994
|
7
|
+
data.tar.gz: 95036ece396cbee056b591279baeb05d52d255677d664a83078ffde6a815a2fe61012080bf2822466b2ae77da4069ea025c46cff3f94ccfea75b4c8645e04aed
|
data/lib/kiba/plus/job.rb
CHANGED
@@ -12,12 +12,13 @@ module Kiba
|
|
12
12
|
attr_reader :options, :client
|
13
13
|
def initialize(options)
|
14
14
|
@options = options
|
15
|
-
@options.assert_valid_keys(:connect_url, :job_id, :job_name, :start_at, :completed_at)
|
15
|
+
@options.assert_valid_keys(:connect_url, :job_id, :job_name, :start_at, :completed_at, :schema)
|
16
16
|
url = URI.parse(connect_url)
|
17
17
|
if url.scheme =~ /mysql/i
|
18
18
|
@client = Mysql2::Client.new(mysql2_connect_hash(connect_url))
|
19
19
|
elsif url.scheme =~ /postgres/i
|
20
20
|
@client = PG.connect(connect_url)
|
21
|
+
@client.exec "SET search_path TO %s" % [ options.fetch(:schema) ] unless options.fetch(:schema).empty?
|
21
22
|
else
|
22
23
|
raise 'No Imp!'
|
23
24
|
end
|
data/lib/kiba/plus/version.rb
CHANGED