red-arrow-flight 12.0.0 → 13.0.0

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
  SHA256:
3
- metadata.gz: cb5bf5c78dab6b0677e9876df6d1fa9561eb66645f7eac2fb76f0f06ddc8db9d
4
- data.tar.gz: d84797823a9fa39dd6c5832aa148a5c502b297d5538daff8684133ecd79ed0e3
3
+ metadata.gz: a44bdaa6680107b75b3728b454ffd69bf4f67985b157645d80dd2e51d15aa076
4
+ data.tar.gz: 8ead6d2b01f97b49bbe29eaa5ca8bf5b1cce08b584cadc37530d91d98e791cf8
5
5
  SHA512:
6
- metadata.gz: 6c72e7d4a636dfdaf40269d9f81e7ff664b9fb42465194de97c07d4bd31fd7c87584fcddcf9e33c167d6007178a3caab9716e22105511232687bea7952738dcb
7
- data.tar.gz: afaa9ac4f56849882d1c367d3073d5f2a387c263b2af33a13e55778d21ab7cb827fd23cd2b30a9452d34a91ab24f4cbfa1df0898d6a9a18b4ce67d8b77ae4013
6
+ metadata.gz: f4893d6ef7b880f6399a1541e8f702689af8e0b07103e911859727d9f0e9cde9032d59fc2e85bda80a43b83c5e0ed52d3b284d20ed62c9c55cc93882db7ffc80
7
+ data.tar.gz: 3af100cde93ed5a6621f5aa99e59654b515f0dee8f455ee111c684929876372a1c16036acda07523f8972b987cce4f479fb879c4e9407be455a2f1fb675229e3
@@ -0,0 +1,51 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ module ArrowFlight
19
+ class Client
20
+ # Authenticates by Basic authentication.
21
+ #
22
+ # @param user [String] User name to be used.
23
+ # @param password [String] Password to be used.
24
+ # @param options [ArrowFlight::CallOptions, Hash, nil] (nil)
25
+ # The options to be used.
26
+ #
27
+ # @return [ArrowFlight::CallOptions] The options that can be used
28
+ # for following calls. It includes Bearer token for @user.
29
+ #
30
+ # If @options is an ArrowFlight::CallOptions, the given @options
31
+ # is returned with Bearer token.
32
+ #
33
+ # If @options isn't an ArrowFlight::CallOptions, a new
34
+ # ArrowFlight::CallOptions is created and it's returned.
35
+ #
36
+ # @since 13.0.0
37
+ def authenticate_basic(user, password, options=nil)
38
+ unless options.is_a?(CallOptions)
39
+ options = CallOptions.try_convert(options)
40
+ end
41
+ options ||= CallOptions.new
42
+ _success, bearer_name, bearer_value =
43
+ authenticate_basic_token(user, password, options)
44
+ invalid_bearer = (bearer_name.empty? or bearer_value.empty?)
45
+ unless invalid_bearer
46
+ options.add_header(bearer_name, bearer_value)
47
+ end
48
+ options
49
+ end
50
+ end
51
+ end
@@ -30,6 +30,7 @@ module ArrowFlight
30
30
 
31
31
  def require_libraries
32
32
  require "arrow-flight/call-options"
33
+ require "arrow-flight/client"
33
34
  require "arrow-flight/client-options"
34
35
  require "arrow-flight/location"
35
36
  require "arrow-flight/record-batch-reader"
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  module ArrowFlight
19
- VERSION = "12.0.0"
19
+ VERSION = "13.0.0"
20
20
 
21
21
  module Version
22
22
  numbers, TAG = VERSION.split("-")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-arrow-flight
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.0
4
+ version: 13.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Arrow Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-08 00:00:00.000000000 Z
11
+ date: 2023-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: red-arrow
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 12.0.0
19
+ version: 13.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 12.0.0
26
+ version: 13.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,6 +84,7 @@ files:
84
84
  - lib/arrow-flight.rb
85
85
  - lib/arrow-flight/call-options.rb
86
86
  - lib/arrow-flight/client-options.rb
87
+ - lib/arrow-flight/client.rb
87
88
  - lib/arrow-flight/loader.rb
88
89
  - lib/arrow-flight/location.rb
89
90
  - lib/arrow-flight/record-batch-reader.rb