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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b37f1fbad737a5141060feae03a0d99b98b20d42
4
- data.tar.gz: f72a505eaf75bf1f24be63de334b63ecd955c881
3
+ metadata.gz: 6f1a1cdf8bd14192dc38eff8bf739b08291c89f2
4
+ data.tar.gz: ccdc4706b15ef09c52c991bb1a3043fbe86d72b6
5
5
  SHA512:
6
- metadata.gz: 6f22ebbaa54bcf735a58235c9485342763aa8bcff593d292b6d055897db79a9963ffae44d71bdd9612f20cce76de77d2f6dbcdb04c0fc2b8369fd33734cf2f98
7
- data.tar.gz: e7088d77e6e03bb90445f0424a72532fc264ef87503f17fb7e4468bd7d481de3b17fc9994c06b4aa042d66dcbde00c40cf6d68497748028e3c2102b7e61ba1dc
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
@@ -1,5 +1,5 @@
1
1
  module Kiba
2
2
  module Plus
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiba-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hooopo