red-arrow-flight 12.0.1 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 825a0541eb702896528c3b7fb3389685f3800aa3200722bb54a1758f88430e48
4
- data.tar.gz: fe349d707b08784ec4a2a09fcd725142af72c04246ef17d24b359af1fa28724c
3
+ metadata.gz: a44bdaa6680107b75b3728b454ffd69bf4f67985b157645d80dd2e51d15aa076
4
+ data.tar.gz: 8ead6d2b01f97b49bbe29eaa5ca8bf5b1cce08b584cadc37530d91d98e791cf8
5
5
  SHA512:
6
- metadata.gz: 37e5bd787f1fc32b00534525346ab313fe94ee0815a1d976600c5265a191da2d0825d5fbad126c5178d7bf5672533da14eda7b0eb21297809b8ce596fd3c27d3
7
- data.tar.gz: 25ed57076ea0aca3c415a3999f585702ec35c94153eac95a7b1d7cde86e92de56a161de6f379496bc3c3f4225d1a89f91430583e4ace1ba156a04d7a8d339fa5
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.1"
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.1
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-06-15 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.1
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.1
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