foobara-http-command-connector 0.0.26 → 1.1.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/CHANGELOG.md +4 -0
- data/src/http/commands/help/presenter.rb +16 -10
- data/src/http/commands/help.rb +6 -14
- data/src/http/cookie.rb +1 -1
- data/src/http.rb +4 -4
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36ab57af0c0d65f450500790ed68ba268c1bd5862fbaec71cfb83f4a00fc514a
|
4
|
+
data.tar.gz: 93cbb5d98e08155a605be8481a3dd9a092d051e4b7d642b0df13af65d9c5f489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09d292eba68a1d214d65035c8df665b69aadfdfaf9aeb4964d9d9941e4b3aedc35bacf8a86b28ee5691b9578a853e65b7ee32fcfd1937a37063d976c3b87e541'
|
7
|
+
data.tar.gz: 8ad52d666aefd12f21bc71f52f7a1639c4d7c63700e18f8c1a9f015f93d42bf1ebf73948f603d90f10afdca204e7f686a92bf99afb19a9368ddde5bec7b06e97
|
data/CHANGELOG.md
CHANGED
@@ -125,18 +125,24 @@ module Foobara
|
|
125
125
|
html << render_html_list({ element_type: data.element_type }, skip_wrapper: true)
|
126
126
|
html << "</ul>" unless skip_wrapper
|
127
127
|
when Manifest::TypeDeclaration
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
128
|
+
manifest = data.relevant_manifest
|
129
|
+
|
130
|
+
if manifest.is_a?(::Symbol)
|
131
|
+
html << foobara_reference_link(data.to_type)
|
132
|
+
else
|
133
|
+
html << "<ul>" unless skip_wrapper
|
134
|
+
data.relevant_manifest.each_pair do |key, value|
|
135
|
+
if key.to_s == "type"
|
136
|
+
value = root_manifest.lookup_path(key, value)
|
137
|
+
end
|
138
|
+
html << "<li>#{key}"
|
139
|
+
html << "<ul>"
|
140
|
+
html << render_html_list(value, skip_wrapper: true)
|
141
|
+
html << "</ul>"
|
142
|
+
html << "</li>"
|
132
143
|
end
|
133
|
-
html << "
|
134
|
-
html << "<ul>"
|
135
|
-
html << render_html_list(value, skip_wrapper: true)
|
136
|
-
html << "</ul>"
|
137
|
-
html << "</li>"
|
144
|
+
html << "</ul>" unless skip_wrapper
|
138
145
|
end
|
139
|
-
html << "</ul>" unless skip_wrapper
|
140
146
|
when Manifest::Type, Manifest::Command, Manifest::Error
|
141
147
|
html << foobara_reference_link(data)
|
142
148
|
when Manifest::PossibleError
|
data/src/http/commands/help.rb
CHANGED
@@ -31,21 +31,13 @@ module Foobara
|
|
31
31
|
|
32
32
|
if result
|
33
33
|
self.object_to_help_with = result
|
34
|
+
elsif mode == Namespace::LookupMode::ABSOLUTE
|
35
|
+
determine_object_to_help_with(mode: Namespace::LookupMode::GENERAL)
|
36
|
+
elsif mode == Namespace::LookupMode::GENERAL
|
37
|
+
determine_object_to_help_with(mode: Namespace::LookupMode::RELAXED)
|
34
38
|
else
|
35
|
-
# TODO:
|
36
|
-
|
37
|
-
|
38
|
-
if result && root_manifest.contains?(result.foobara_manifest_reference,
|
39
|
-
result.scoped_category)
|
40
|
-
self.object_to_help_with = result
|
41
|
-
elsif mode == Namespace::LookupMode::ABSOLUTE
|
42
|
-
determine_object_to_help_with(mode: Namespace::LookupMode::GENERAL)
|
43
|
-
elsif mode == Namespace::LookupMode::GENERAL
|
44
|
-
determine_object_to_help_with(mode: Namespace::LookupMode::RELAXED)
|
45
|
-
else
|
46
|
-
# TODO: add an input error instead for missing record to trigger 404
|
47
|
-
add_runtime_error(CommandConnector::NotFoundError.for(arg))
|
48
|
-
end
|
39
|
+
# TODO: add an input error instead for missing record to trigger 404
|
40
|
+
add_runtime_error(CommandConnector::NotFoundError.for(arg))
|
49
41
|
end
|
50
42
|
else
|
51
43
|
self.object_to_help_with = root_manifest
|
data/src/http/cookie.rb
CHANGED
@@ -4,7 +4,7 @@ module Foobara
|
|
4
4
|
class Cookie
|
5
5
|
attr_accessor :name, :value, :opts
|
6
6
|
|
7
|
-
ALLOWED_OPTIONS =
|
7
|
+
ALLOWED_OPTIONS = [:path, :httponly, :secure, :same_site, :domain, :expires, :max_age].freeze
|
8
8
|
|
9
9
|
def initialize(name, value, **opts)
|
10
10
|
invalid_options = opts.keys - ALLOWED_OPTIONS
|
data/src/http.rb
CHANGED
@@ -143,10 +143,10 @@ module Foobara
|
|
143
143
|
|
144
144
|
def static_headers
|
145
145
|
@static_headers ||= ENV.each_with_object({}) do |(key, value), headers|
|
146
|
-
next if
|
147
|
-
FOOBARA_HTTP_RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_HEADERS
|
148
|
-
FOOBARA_HTTP_RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_METHODS
|
149
|
-
FOOBARA_HTTP_RESPONSE_HEADER_ACCESS_CONTROL_MAX_AGE
|
146
|
+
next if [
|
147
|
+
"FOOBARA_HTTP_RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_HEADERS",
|
148
|
+
"FOOBARA_HTTP_RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_METHODS",
|
149
|
+
"FOOBARA_HTTP_RESPONSE_HEADER_ACCESS_CONTROL_MAX_AGE"
|
150
150
|
].include?(key)
|
151
151
|
|
152
152
|
match = key.match(/\AFOOBARA_HTTP_RESPONSE_HEADER_(.*)\z/)
|
metadata
CHANGED
@@ -1,28 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-http-command-connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0.
|
18
|
+
version: 0.1.1
|
19
|
+
- - "<"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.0.0
|
19
22
|
type: :runtime
|
20
23
|
prerelease: false
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
22
25
|
requirements:
|
23
|
-
- - "
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 0.1.1
|
29
|
+
- - "<"
|
24
30
|
- !ruby/object:Gem::Version
|
25
|
-
version: 0.0
|
31
|
+
version: 2.0.0
|
26
32
|
email:
|
27
33
|
- azimux@gmail.com
|
28
34
|
executables: []
|
@@ -95,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
97
103
|
requirements: []
|
98
|
-
rubygems_version: 3.6.
|
104
|
+
rubygems_version: 3.6.9
|
99
105
|
specification_version: 4
|
100
106
|
summary: No description. Add one.
|
101
107
|
test_files: []
|