webhdfs 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/webhdfs/client_v1.rb +6 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe61592c6a1b28d0497ea08996b040ba33719e6e
4
- data.tar.gz: 1135cf158e61e2573d2826b8f829a92c3959c02c
3
+ metadata.gz: 0aaffe6666d27987225f7ad4fc5241e5738ad607
4
+ data.tar.gz: cae048c194c8bf07c997b06568b094451e858d3c
5
5
  SHA512:
6
- metadata.gz: 10c759c0cc5a166062c0f5bc07493c1142f08e4cfa16a083513738c423149dd534bb52ec96deb9175c2939bf9589c4d0f4a3c9ca14001e2baa805cf530b905fa
7
- data.tar.gz: 2e3b950209b09c194a7ba11ca5158c63f9e5400c92af06bdf197bba38a36c1f3851f4e1667a0e424f959eea75bc8b7fa156fafd24ab1e43ed289ed7319cfdd1b
6
+ metadata.gz: b07e48879542583cee1174096dac9a23bf8898f467366fb4ffe56549a1e15e77cbadfa9b5492da2804680ee0b6afe9f1e64f8ec7b58d50f9a66b600e5cd34e6e
7
+ data.tar.gz: f7b049e808de61113e534d9ffc77d98a9fd5aa4544c9bc42b12c69d9adca655f27a992b400d40dc2e70cfe5f1570d7396759a3f25e3c2c02d5cd9b1044fadae3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -24,6 +24,7 @@ module WebHDFS
24
24
  attr_accessor :ssl_ca_file
25
25
  attr_reader :ssl_verify_mode
26
26
  attr_accessor :kerberos, :kerberos_keytab
27
+ attr_accessor :http_headers
27
28
 
28
29
  SSL_VERIFY_MODES = [:none, :peer]
29
30
  def ssl_verify_mode=(mode)
@@ -33,7 +34,7 @@ module WebHDFS
33
34
  @ssl_verify_mode = mode
34
35
  end
35
36
 
36
- def initialize(host='localhost', port=50070, username=nil, doas=nil, proxy_address=nil, proxy_port=nil)
37
+ def initialize(host='localhost', port=50070, username=nil, doas=nil, proxy_address=nil, proxy_port=nil, http_headers={})
37
38
  @host = host
38
39
  @port = port
39
40
  @username = username
@@ -52,6 +53,7 @@ module WebHDFS
52
53
 
53
54
  @kerberos = false
54
55
  @kerberos_keytab = nil
56
+ @http_headers = http_headers
55
57
  end
56
58
 
57
59
  # curl -i -X PUT "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=CREATE
@@ -316,6 +318,9 @@ module WebHDFS
316
318
  else
317
319
  header = {'Authorization' => "Negotiate #{Base64.strict_encode64(token)}"}
318
320
  end
321
+ else
322
+ header = {} if header.nil?
323
+ header = @http_headers.merge(header)
319
324
  end
320
325
 
321
326
  res = nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webhdfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuki Ohta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-18 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake