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 +4 -4
- data/lib/arrow-flight/client.rb +51 -0
- data/lib/arrow-flight/loader.rb +1 -0
- data/lib/arrow-flight/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a44bdaa6680107b75b3728b454ffd69bf4f67985b157645d80dd2e51d15aa076
|
4
|
+
data.tar.gz: 8ead6d2b01f97b49bbe29eaa5ca8bf5b1cce08b584cadc37530d91d98e791cf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/arrow-flight/loader.rb
CHANGED
data/lib/arrow-flight/version.rb
CHANGED
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:
|
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-
|
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:
|
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:
|
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
|