agoo 2.15.6 → 2.15.8
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 +18 -0
- data/bin/agoo +47 -39
- data/ext/agoo/bind.c +209 -198
- data/ext/agoo/rgraphql.c +7 -4
- data/ext/agoo/rserver.c +689 -688
- data/ext/agoo/sdl.c +13 -2
- data/ext/agoo/server.c +255 -253
- data/lib/agoo/version.rb +1 -1
- data/lib/rack/handler/agoo.rb +130 -128
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02abdb9101a03fc778a6cac9b0ee843e1ba5d174faf33737dec99953f9950651
|
4
|
+
data.tar.gz: 2a59de84f142434913db679a6ea0cbe696f7681b5ff748da8f20cbced2f7358b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4126df37e2339f76d007c0d96d5929b4ba50dc0ea65e4a50d7a3577403fe641eaf8054cc48e975b18786b321eddfe022a0994556784c5b33dd93504d9981d00
|
7
|
+
data.tar.gz: 9072e8a005ce5fbc1b033c14cd05990096371d4d885a65a7e1af2684ab5cd13cf745de71ce1b846f1655b7176b179d254aa9369c79200adfe15cfdcc9975e2fc
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,24 @@
|
|
2
2
|
|
3
3
|
All changes to the Agoo gem are documented here. Releases follow semantic versioning.
|
4
4
|
|
5
|
+
## [2.15.8] - 2023-10-07
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- Fixed race condition on starting a thread count set to 1.
|
10
|
+
|
11
|
+
- Fixed crash with invalid bindings.
|
12
|
+
|
13
|
+
### Added
|
14
|
+
|
15
|
+
- Added command line options for TLS.
|
16
|
+
|
17
|
+
## [2.15.7] - 2023-07-10
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- Support for Apollo style POST requests fixed (again).
|
22
|
+
|
5
23
|
## [2.15.6] - 2023-07-07
|
6
24
|
|
7
25
|
### Fixed
|
data/bin/agoo
CHANGED
@@ -52,6 +52,9 @@ Example:
|
|
52
52
|
@workers = 0
|
53
53
|
@first = false
|
54
54
|
@graphql = nil
|
55
|
+
@ssl_cert = nil
|
56
|
+
@ssl_key = nil
|
57
|
+
|
55
58
|
|
56
59
|
@opts = OptionParser.new(usage)
|
57
60
|
@opts.on('-h', '--help', 'Show this display.') { puts @opts.help; Process.exit!(0) }
|
@@ -65,6 +68,8 @@ Example:
|
|
65
68
|
@opts.on('-r', '--require FILE', String, 'Ruby require.') { |r| require r }
|
66
69
|
@opts.on('-t', '--threads COUNT', Integer, 'Number of threads to use.') { |t| @threads = t }
|
67
70
|
@opts.on('-w', '--workers COUNT', Integer, 'Number of workers to use.') { |w| @workers = w }
|
71
|
+
@opts.on('--ssl_cert', String, 'SSL certificate.') { |c| @ssl_cert = c }
|
72
|
+
@opts.on('--ssl_key', String, 'SSL key.') { |k| @ssl_key = k }
|
68
73
|
@opts.on('--log-dir DIR', String, 'Log file directory.') { |d| @log_dir = d }
|
69
74
|
@opts.on('--[no-]log-classic', 'Classic log entries instead of JSON.') { |b| @classic = b }
|
70
75
|
@opts.on('--[no-]log-console', 'Display log entries on the console.') { |b| @console = b }
|
@@ -74,7 +79,6 @@ handler_paths = @opts.parse(ARGV)
|
|
74
79
|
|
75
80
|
@threads = 0 if @threads < 0
|
76
81
|
@workers = 1 if @workers < 1
|
77
|
-
@ran = false
|
78
82
|
@run_file = nil
|
79
83
|
|
80
84
|
if handler_paths.empty?
|
@@ -93,28 +97,30 @@ else
|
|
93
97
|
end
|
94
98
|
|
95
99
|
if @run_file.nil?
|
96
|
-
@port = 6464 if 0 == @port
|
100
|
+
@port = 6464 if 0 == @port && @binds.empty?
|
97
101
|
Agoo::Log.configure(dir: @log_dir,
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
102
|
+
console: @console,
|
103
|
+
classic: @classic,
|
104
|
+
colorize: @colorize,
|
105
|
+
states: {
|
106
|
+
INFO: 1 <= @verbose,
|
107
|
+
DEBUG: 3 <= @verbose,
|
108
|
+
connect: 2 <= @verbose,
|
109
|
+
request: 2 <= @verbose,
|
110
|
+
response: 2 <= @verbose,
|
111
|
+
eval: 2 <= @verbose,
|
112
|
+
push: 2 <= @verbose,
|
113
|
+
})
|
110
114
|
|
111
115
|
Agoo::Server.init(@port,
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
116
|
+
@root,
|
117
|
+
bind: @binds,
|
118
|
+
thread_count: @threads,
|
119
|
+
worker_count: @workers,
|
120
|
+
root_first: @first,
|
121
|
+
ssl_cert: @ssl_cert,
|
122
|
+
ssl_key: @ssl_key,
|
123
|
+
graphql: @graphql)
|
118
124
|
|
119
125
|
puts "Agoo #{Agoo::VERSION} is listening on port #{@port}. Path mappings are:" if 1 <= @verbose
|
120
126
|
|
@@ -133,7 +139,7 @@ if @run_file.nil?
|
|
133
139
|
}
|
134
140
|
|
135
141
|
puts "Agoo is only serving static files in '#{@root}'." if handler_paths.empty?
|
136
|
-
Agoo::Server.start()
|
142
|
+
Agoo::Server.start()
|
137
143
|
|
138
144
|
else
|
139
145
|
@port = 9292 if 0 == @port
|
@@ -143,49 +149,51 @@ else
|
|
143
149
|
options[:workers] = @workers unless options.has_key?(:workers) || options.has_key?(:wc)
|
144
150
|
options[:root_first] = @first unless options.has_key?(:root_first) || options.has_key?(:f) || options.has_key?(:rmux)
|
145
151
|
options[:graphql] = @graphql unless options.has_key?(:graphql) || options.has_key?(:g)
|
152
|
+
options[:ssl_cert] = @ssl_cert unless options.has_key?(:ssl_cert) || options.has_key?(:ssl_cert)
|
153
|
+
options[:ssl_key] = @ssl_key unless options.has_key?(:ssl_key) || options.has_key?(:ssl_key)
|
146
154
|
unless @binds.empty?
|
147
155
|
if options.has_key?(:b)
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
156
|
+
b2 = options[:b]
|
157
|
+
b2 = b2.split(',') if b2.is_a?(String)
|
158
|
+
@binds = @binds + b2
|
159
|
+
options.delete(:b)
|
152
160
|
elsif options.has_key?(:bind)
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
161
|
+
b2 = options[:bind]
|
162
|
+
b2 = b2.split(',') if b2.is_a?(String)
|
163
|
+
@binds = @binds + b2
|
164
|
+
options.delete(:bind)
|
157
165
|
end
|
158
166
|
options[:bind] = @binds
|
159
167
|
end
|
160
168
|
unless options.has_key?(:silent) || options.has_key?(:verbose) || options.has_key?(:debug)
|
161
169
|
if 0 == @verbose
|
162
|
-
|
170
|
+
options[:silent] = true
|
163
171
|
elsif 2 == @verbose
|
164
|
-
|
172
|
+
options[:verbose] = true
|
165
173
|
elsif 3 <= @verbose
|
166
|
-
|
174
|
+
options[:debug] = true
|
167
175
|
end
|
168
176
|
end
|
169
177
|
options[:log_dir] = @log_dir unless options.has_key?(:log_dir)
|
170
178
|
unless options.has_key?(:log_classic) || options.has_key?(:no_log_classic)
|
171
179
|
if @classic
|
172
|
-
|
180
|
+
options[:log_classic] = true
|
173
181
|
else
|
174
|
-
|
182
|
+
options[:no_log_classic] = true
|
175
183
|
end
|
176
184
|
end
|
177
185
|
unless options.has_key?(:log_console) || options.has_key?(:no_log_console)
|
178
186
|
if @console
|
179
|
-
|
187
|
+
options[:log_console] = true
|
180
188
|
else
|
181
|
-
|
189
|
+
options[:no_log_console] = true
|
182
190
|
end
|
183
191
|
end
|
184
192
|
unless options.has_key?(:log_colorize) || options.has_key?(:no_log_colorize)
|
185
193
|
if @colorize
|
186
|
-
|
194
|
+
options[:log_colorize] = true
|
187
195
|
else
|
188
|
-
|
196
|
+
options[:no_log_colorize] = true
|
189
197
|
end
|
190
198
|
end
|
191
199
|
::Rack::Handler::Agoo.run(handler, options)
|
@@ -197,7 +205,7 @@ else
|
|
197
205
|
require 'rack'
|
198
206
|
puts " Racking #{@run_file}" if 1 <= @verbose
|
199
207
|
app = Rack::Builder.new {
|
200
|
-
|
208
|
+
eval(File.open(path).read)
|
201
209
|
}
|
202
210
|
run app
|
203
211
|
rescue LoadError
|