oozie-client 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oozie-client (0.0.1)
4
+ oozie-client (0.2.1)
5
5
  builder
6
6
  rest-client
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- builder (3.0.0)
11
+ builder (3.0.3)
12
12
  mime-types (1.19)
13
13
  rest-client (1.6.7)
14
14
  mime-types (>= 1.16)
@@ -13,8 +13,8 @@ require 'rest-client'
13
13
  class OozieClient
14
14
  attr_reader :config
15
15
 
16
- def initialize(oozie_url)
17
- @config = Config.new(oozie_url)
16
+ def initialize(oozie_url, options={})
17
+ @config = Config.new(oozie_url, options)
18
18
  end
19
19
 
20
20
  def admin
@@ -4,9 +4,12 @@ class OozieClient
4
4
  attr_reader :oozie_url
5
5
  attr_reader :client
6
6
 
7
- def initialize oozie_url
7
+ def initialize(oozie_url, options={})
8
8
  @oozie_url = oozie_url
9
- @client = RestClient::Resource.new "#{oozie_url}/v1"
9
+ net_options = options.select { |key| [:user, :password, :headers, :timeout, :open_timeout].member? key }
10
+ net_options[:timeout] ||= 20
11
+ net_options[:open_timeout] ||= 5
12
+ @client = RestClient::Resource.new "#{oozie_url}/v1", net_options
10
13
  end
11
14
  end
12
15
 
@@ -1,3 +1,3 @@
1
1
  class OozieClient
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oozie-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-23 00:00:00.000000000 Z
12
+ date: 2012-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client