foobara-remote-imports 0.0.12 → 0.0.14
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13478ddf352d2b4ec575ec3a3575550f02fca154036570c5f6209a4c7860dc8d
|
4
|
+
data.tar.gz: e94e39347ed584ad1703ebb9ff835e9da594ac178a28d0d21156469576f8e93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8774a942cb9ea0a768282883b6a3221e29005ca01c072ee4e7411264d2402c8ab012167f8e4b32c7dc292e8484d903d5c45361ce9db7561a8c223a073b5ecea5
|
7
|
+
data.tar.gz: 627a4df57f8eaa948728150c7615e851127f16076f3b23c7191af43a7a92289b0dbb3d02d188d0fc998077692dce7197e22f2cf326a7e1db1d3652517cc7711f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.0.14] - 2025-05-11
|
2
|
+
|
3
|
+
- Fix bug that incorrectly leaves a model class anonymous if there's a custom type named "model"
|
4
|
+
|
5
|
+
## [0.0.13] - 2025-05-07
|
6
|
+
|
7
|
+
- Change :authenticate_with_header to be shorter and a tuple
|
8
|
+
|
1
9
|
## [0.0.12] - 2025-05-05
|
2
10
|
|
3
11
|
- Add AuthenticatedRemoteCommand
|
@@ -3,18 +3,18 @@ require_relative "remote_command"
|
|
3
3
|
module Foobara
|
4
4
|
class AuthenticatedRemoteCommand < RemoteCommand
|
5
5
|
class << self
|
6
|
-
attr_accessor :
|
6
|
+
attr_accessor :auth_header_name, :auth_header_value
|
7
7
|
|
8
|
-
def subclass(
|
8
|
+
def subclass(auth_header:, **opts)
|
9
9
|
super(base: AuthenticatedRemoteCommand, **opts).tap do |klass|
|
10
|
-
klass.
|
11
|
-
klass.
|
10
|
+
klass.auth_header_name = auth_header[0]
|
11
|
+
klass.auth_header_value = auth_header[1]
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
def build_request_headers
|
17
|
-
value = self.class.
|
17
|
+
value = self.class.auth_header_value
|
18
18
|
|
19
19
|
if value.is_a?(Proc)
|
20
20
|
value = if value.lambda? && value.arity == 0
|
@@ -24,7 +24,7 @@ module Foobara
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
self.request_headers = super.merge(self.class.
|
27
|
+
self.request_headers = super.merge(self.class.auth_header_name => value)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -10,10 +10,9 @@ module Foobara
|
|
10
10
|
|
11
11
|
add_inputs do
|
12
12
|
base_command_class :duck, :allow_nil
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
end
|
13
|
+
auth_header :tuple,
|
14
|
+
element_type_declarations: [:string, :duck],
|
15
|
+
description: "A header name, header value/proc pair."
|
17
16
|
end
|
18
17
|
|
19
18
|
depends_on ImportDomain, ImportType, ImportError
|
@@ -88,7 +87,7 @@ module Foobara
|
|
88
87
|
}
|
89
88
|
|
90
89
|
if determine_base_command_class == AuthenticatedRemoteCommand
|
91
|
-
subclass_args.merge!(
|
90
|
+
subclass_args.merge!(auth_header:)
|
92
91
|
end
|
93
92
|
|
94
93
|
determine_base_command_class.subclass(**subclass_args)
|
@@ -98,7 +97,7 @@ module Foobara
|
|
98
97
|
@determine_base_command_class ||= if base_command_class
|
99
98
|
base_command_class
|
100
99
|
elsif manifest_to_import.requires_authentication? &&
|
101
|
-
|
100
|
+
auth_header
|
102
101
|
AuthenticatedRemoteCommand
|
103
102
|
else
|
104
103
|
RemoteCommand
|
@@ -82,7 +82,7 @@ module Foobara
|
|
82
82
|
|
83
83
|
type = domain.foobara_type_from_strict_stringified_declaration(declaration_data)
|
84
84
|
|
85
|
-
if deanonymize_models? && type.
|
85
|
+
if deanonymize_models? && type.extends_type?(BuiltinTypes[:model])
|
86
86
|
Foobara::Model.deanonymize_class(type.target_class)
|
87
87
|
end
|
88
88
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-remote-imports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-05-
|
10
|
+
date: 2025-05-11 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara
|