hayabusa 0.0.25 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +4 -4
- data/Rakefile +0 -14
- data/bin/hayabusa_fcgi.fcgi +1 -0
- data/lib/hayabusa.rb +119 -117
- data/lib/hayabusa_database.rb +84 -84
- data/lib/hayabusa_datarow.rb +873 -0
- data/lib/hayabusa_http_session_response.rb +30 -29
- data/lib/hayabusa_objects.rb +1455 -0
- data/lib/hayabusa_revision.rb +347 -0
- data/lib/models/log.rb +27 -27
- data/lib/models/log_access.rb +20 -20
- data/lib/models/log_data.rb +6 -6
- data/lib/models/log_data_link.rb +2 -2
- data/lib/models/log_data_value.rb +5 -5
- data/lib/models/log_link.rb +12 -12
- data/lib/models/session.rb +6 -6
- data/pages/config_cgi.rb +3 -3
- data/pages/config_fcgi.rb +3 -3
- metadata +85 -26
- data/.document +0 -5
- data/.rspec +0 -1
- data/Gemfile +0 -24
- data/Gemfile.lock +0 -101
- data/VERSION +0 -1
- data/bin/hayabusa_fcgi.fcgi +0 -42
- data/conf/apache2_cgi_rhtml_conf.conf +0 -10
- data/conf/apache2_fcgi_rhtml_conf.conf +0 -22
- data/conf/apache2_hayabusa_conf.conf +0 -15
- data/hayabusa.gemspec +0 -168
- data/spec/fcgi_multiple_processes_spec.rb +0 -104
- data/spec/hayabusa_spec.rb +0 -423
- data/spec/spec_helper.rb +0 -12
- data/spec/test_upload.xlsx +0 -0
data/lib/models/log_link.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
class Hayabusa::Models::Log_link <
|
1
|
+
class Hayabusa::Models::Log_link < Hayabusa::Datarow
|
2
2
|
has_one [
|
3
3
|
{:class => :Log, :col => :log_id, :method => :log}
|
4
4
|
]
|
5
|
-
|
5
|
+
|
6
6
|
def self.list(d, &block)
|
7
7
|
if d.args["count"]
|
8
8
|
sql = "SELECT COUNT(id) AS count FROM #{table} WHERE 1=1"
|
@@ -11,11 +11,11 @@ class Hayabusa::Models::Log_link < Knj::Datarow
|
|
11
11
|
else
|
12
12
|
sql = "SELECT * FROM #{table} WHERE 1=1"
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
q_args = nil
|
16
16
|
ret = self.list_helper(d)
|
17
17
|
sql << ret[:sql_joins]
|
18
|
-
|
18
|
+
|
19
19
|
d.args.each do |key, val|
|
20
20
|
case key
|
21
21
|
when "object_class"
|
@@ -28,17 +28,17 @@ class Hayabusa::Models::Log_link < Knj::Datarow
|
|
28
28
|
raise "Invalid key: #{key}."
|
29
29
|
end
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
sql << ret[:sql_where]
|
33
|
-
|
33
|
+
|
34
34
|
return d.db.query(sql).fetch[:count].to_i if count
|
35
|
-
|
35
|
+
|
36
36
|
sql << ret[:sql_order]
|
37
37
|
sql << ret[:sql_limit]
|
38
|
-
|
38
|
+
|
39
39
|
return d.ob.list_bysql(:Log_link, sql, q_args, &block)
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
def self.add(d)
|
43
43
|
if d.data.has_key?(:object)
|
44
44
|
class_data_id = d.ob.static(:Log_data_value, :force, d.data[:object].class.name)
|
@@ -46,10 +46,10 @@ class Hayabusa::Models::Log_link < Knj::Datarow
|
|
46
46
|
d.data[:object_id] = d.data[:object].id
|
47
47
|
d.data.delete(:object)
|
48
48
|
end
|
49
|
-
|
49
|
+
|
50
50
|
log = d.ob.get(:Log, d.data[:log_id]) #throws exception if it doesnt exist.
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
def object(ob_use)
|
54
54
|
begin
|
55
55
|
class_name = ob.get(:Log_data_value, self[:object_class_value_id])[:value].split("::").last
|
@@ -58,7 +58,7 @@ class Hayabusa::Models::Log_link < Knj::Datarow
|
|
58
58
|
return false
|
59
59
|
end
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
def object_class
|
63
63
|
return ob.get(:Log_data_value, self[:object_class_value_id])[:value]
|
64
64
|
end
|
data/lib/models/session.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
class Hayabusa::Models::Session <
|
1
|
+
class Hayabusa::Models::Session < Hayabusa::Datarow
|
2
2
|
attr_reader :edata
|
3
3
|
attr_accessor :sess_data
|
4
|
-
|
4
|
+
|
5
5
|
def initialize(*args, &block)
|
6
6
|
@edata = {}
|
7
7
|
super(*args, &block)
|
8
|
-
|
8
|
+
|
9
9
|
if self[:sess_data].to_s.length > 0
|
10
10
|
begin
|
11
11
|
@sess_data = Marshal.load(Base64.decode64(self[:sess_data]))
|
@@ -17,15 +17,15 @@ class Hayabusa::Models::Session < Knj::Datarow
|
|
17
17
|
@sess_data = {}
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
def self.add(d)
|
22
22
|
d.data[:date_added] = Time.now if !d.data[:date_added]
|
23
23
|
d.data[:date_lastused] = Time.now if !d.data[:date_lastused]
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def flush
|
27
27
|
flush_data = Base64.encode64(Marshal.dump(@sess_data))
|
28
|
-
|
28
|
+
|
29
29
|
if self[:sess_data] != flush_data
|
30
30
|
self.update(
|
31
31
|
:sess_data => flush_data,
|
data/pages/config_cgi.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require "rubygems"
|
2
|
-
require "
|
2
|
+
require "rmagick"
|
3
3
|
|
4
4
|
Hayabusa::CGI_CONF = {
|
5
5
|
:hayabusa => {
|
@@ -9,12 +9,12 @@ Hayabusa::CGI_CONF = {
|
|
9
9
|
:regex => /^\/Kasper$/,
|
10
10
|
:callback => proc{|data|
|
11
11
|
data[:httpsession].page_path = nil
|
12
|
-
|
12
|
+
|
13
13
|
eruby = data[:httpsession].eruby
|
14
14
|
eruby.connect(:on_error) do |e|
|
15
15
|
_hb.handle_error(e)
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
eruby.import("#{File.dirname(__FILE__)}/../pages/spec.rhtml")
|
19
19
|
}
|
20
20
|
}]
|
data/pages/config_fcgi.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require "rubygems"
|
2
|
-
require "
|
2
|
+
require "rmagick"
|
3
3
|
|
4
4
|
Hayabusa::FCGI_CONF = {
|
5
5
|
:hayabusa => {
|
@@ -9,12 +9,12 @@ Hayabusa::FCGI_CONF = {
|
|
9
9
|
:regex => /^\/Kasper$/,
|
10
10
|
:callback => proc{|data|
|
11
11
|
data[:httpsession].page_path = nil
|
12
|
-
|
12
|
+
|
13
13
|
eruby = data[:httpsession].eruby
|
14
14
|
eruby.connect(:on_error) do |e|
|
15
15
|
_hb.handle_error(e)
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
eruby.import("#{File.dirname(__FILE__)}/../pages/spec.rhtml")
|
19
19
|
}
|
20
20
|
}]
|
metadata
CHANGED
@@ -1,29 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hayabusa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Kasper
|
7
|
+
- Kasper Stöckel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: baza
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.38
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.38
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: knjrbfw
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
33
|
+
version: 0.0.114
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
40
|
+
version: 0.0.114
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: wref
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.6
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.6
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: erubis
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,21 +179,63 @@ dependencies:
|
|
151
179
|
- !ruby/object:Gem::Version
|
152
180
|
version: 1.0.0
|
153
181
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
182
|
+
name: rmagick
|
155
183
|
requirement: !ruby/object:Gem::Requirement
|
156
184
|
requirements:
|
157
|
-
- - "
|
185
|
+
- - ">="
|
158
186
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
187
|
+
version: '0'
|
160
188
|
type: :development
|
161
189
|
prerelease: false
|
162
190
|
version_requirements: !ruby/object:Gem::Requirement
|
163
191
|
requirements:
|
164
|
-
- - "
|
192
|
+
- - ">="
|
165
193
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
194
|
+
version: '0'
|
167
195
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
196
|
+
name: rubocop
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rubocop-performance
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rubocop-rake
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: rubocop-rspec
|
169
239
|
requirement: !ruby/object:Gem::Requirement
|
170
240
|
requirements:
|
171
241
|
- - ">="
|
@@ -223,14 +293,9 @@ extra_rdoc_files:
|
|
223
293
|
- LICENSE.txt
|
224
294
|
- README.md
|
225
295
|
files:
|
226
|
-
- ".document"
|
227
|
-
- ".rspec"
|
228
|
-
- Gemfile
|
229
|
-
- Gemfile.lock
|
230
296
|
- LICENSE.txt
|
231
297
|
- README.md
|
232
298
|
- Rakefile
|
233
|
-
- VERSION
|
234
299
|
- bin/check_running.rb
|
235
300
|
- bin/hayabusa_benchmark.rb
|
236
301
|
- bin/hayabusa_cgi.rb
|
@@ -239,10 +304,6 @@ files:
|
|
239
304
|
- bin/hayabusa_fcgi_server.rb
|
240
305
|
- bin/hayabusa_spec_restart.rb
|
241
306
|
- bin/knjappserver_start.rb
|
242
|
-
- conf/apache2_cgi_rhtml_conf.conf
|
243
|
-
- conf/apache2_fcgi_rhtml_conf.conf
|
244
|
-
- conf/apache2_hayabusa_conf.conf
|
245
|
-
- hayabusa.gemspec
|
246
307
|
- lib/hayabusa.rb
|
247
308
|
- lib/hayabusa_cgi.rb
|
248
309
|
- lib/hayabusa_cgi_session.rb
|
@@ -250,6 +311,7 @@ files:
|
|
250
311
|
- lib/hayabusa_client_session.rb
|
251
312
|
- lib/hayabusa_custom_io.rb
|
252
313
|
- lib/hayabusa_database.rb
|
314
|
+
- lib/hayabusa_datarow.rb
|
253
315
|
- lib/hayabusa_erb_handler.rb
|
254
316
|
- lib/hayabusa_ext/cleaner.rb
|
255
317
|
- lib/hayabusa_ext/cmdline.rb
|
@@ -271,6 +333,8 @@ files:
|
|
271
333
|
- lib/hayabusa_http_session_request.rb
|
272
334
|
- lib/hayabusa_http_session_response.rb
|
273
335
|
- lib/hayabusa_models.rb
|
336
|
+
- lib/hayabusa_objects.rb
|
337
|
+
- lib/hayabusa_revision.rb
|
274
338
|
- lib/kernel_ext/gettext_methods.rb
|
275
339
|
- lib/kernel_ext/magic_methods.rb
|
276
340
|
- lib/models/log.rb
|
@@ -307,10 +371,6 @@ files:
|
|
307
371
|
- pages/testpic.jpeg
|
308
372
|
- pages/tests.rhtml
|
309
373
|
- pages/threadded_content_test.rhtml
|
310
|
-
- spec/fcgi_multiple_processes_spec.rb
|
311
|
-
- spec/hayabusa_spec.rb
|
312
|
-
- spec/spec_helper.rb
|
313
|
-
- spec/test_upload.xlsx
|
314
374
|
homepage: http://github.com/kaspernj/hayabusa
|
315
375
|
licenses:
|
316
376
|
- MIT
|
@@ -330,8 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
390
|
- !ruby/object:Gem::Version
|
331
391
|
version: '0'
|
332
392
|
requirements: []
|
333
|
-
|
334
|
-
rubygems_version: 2.4.0
|
393
|
+
rubygems_version: 3.2.32
|
335
394
|
signing_key:
|
336
395
|
specification_version: 4
|
337
396
|
summary: A threadded web/app-server that supports stand-alone, CGI and FCGI-modes.
|
data/.document
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
data/Gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
# Example:
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
5
|
-
|
6
|
-
gem "knjrbfw"
|
7
|
-
gem "erubis"
|
8
|
-
gem "mail"
|
9
|
-
gem "datet"
|
10
|
-
gem "http2"
|
11
|
-
gem "tpool"
|
12
|
-
gem "ruby_process"
|
13
|
-
|
14
|
-
# Add dependencies to develop your gem here.
|
15
|
-
# Include everything needed to run rake, tests, features, etc.
|
16
|
-
group :development do
|
17
|
-
gem "json"
|
18
|
-
gem "rspec", ">= 2.3.0"
|
19
|
-
gem "bundler", ">= 1.0.0"
|
20
|
-
gem "jeweler", "~> 1.8.8"
|
21
|
-
gem "rmagick"
|
22
|
-
gem "sqlite3" if RUBY_ENGINE != "jruby"
|
23
|
-
gem "php4r"
|
24
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
addressable (2.3.6)
|
5
|
-
builder (3.2.2)
|
6
|
-
datet (0.0.25)
|
7
|
-
diff-lcs (1.2.4)
|
8
|
-
erubis (2.7.0)
|
9
|
-
faraday (0.8.9)
|
10
|
-
multipart-post (~> 1.2.0)
|
11
|
-
git (1.2.8)
|
12
|
-
github_api (0.10.1)
|
13
|
-
addressable
|
14
|
-
faraday (~> 0.8.1)
|
15
|
-
hashie (>= 1.2)
|
16
|
-
multi_json (~> 1.4)
|
17
|
-
nokogiri (~> 1.5.2)
|
18
|
-
oauth2
|
19
|
-
hashie (3.3.2)
|
20
|
-
highline (1.6.21)
|
21
|
-
http2 (0.0.22)
|
22
|
-
jeweler (1.8.8)
|
23
|
-
builder
|
24
|
-
bundler (~> 1.0)
|
25
|
-
git (>= 1.2.5)
|
26
|
-
github_api (= 0.10.1)
|
27
|
-
highline (>= 1.6.15)
|
28
|
-
nokogiri (= 1.5.10)
|
29
|
-
rake
|
30
|
-
rdoc
|
31
|
-
json (1.8.0)
|
32
|
-
jwt (1.2.0)
|
33
|
-
knjrbfw (0.0.107)
|
34
|
-
datet
|
35
|
-
http2
|
36
|
-
php4r
|
37
|
-
ruby_process
|
38
|
-
tsafe
|
39
|
-
wref
|
40
|
-
mail (2.5.4)
|
41
|
-
mime-types (~> 1.16)
|
42
|
-
treetop (~> 1.4.8)
|
43
|
-
mime-types (1.23)
|
44
|
-
multi_json (1.10.1)
|
45
|
-
multi_xml (0.5.5)
|
46
|
-
multipart-post (1.2.0)
|
47
|
-
nokogiri (1.5.10)
|
48
|
-
oauth2 (1.0.0)
|
49
|
-
faraday (>= 0.8, < 0.10)
|
50
|
-
jwt (~> 1.0)
|
51
|
-
multi_json (~> 1.3)
|
52
|
-
multi_xml (~> 0.5)
|
53
|
-
rack (~> 1.2)
|
54
|
-
php4r (0.0.4)
|
55
|
-
datet
|
56
|
-
http2
|
57
|
-
string-strtr
|
58
|
-
polyglot (0.3.3)
|
59
|
-
rack (1.5.2)
|
60
|
-
rake (10.4.2)
|
61
|
-
rdoc (4.1.2)
|
62
|
-
json (~> 1.4)
|
63
|
-
rmagick (2.13.2)
|
64
|
-
rspec (2.13.0)
|
65
|
-
rspec-core (~> 2.13.0)
|
66
|
-
rspec-expectations (~> 2.13.0)
|
67
|
-
rspec-mocks (~> 2.13.0)
|
68
|
-
rspec-core (2.13.1)
|
69
|
-
rspec-expectations (2.13.0)
|
70
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
71
|
-
rspec-mocks (2.13.1)
|
72
|
-
ruby_process (0.0.8)
|
73
|
-
tsafe
|
74
|
-
wref
|
75
|
-
sqlite3 (1.3.7)
|
76
|
-
string-strtr (0.0.3)
|
77
|
-
tpool (0.0.4)
|
78
|
-
treetop (1.4.14)
|
79
|
-
polyglot
|
80
|
-
polyglot (>= 0.3.1)
|
81
|
-
tsafe (0.0.11)
|
82
|
-
wref (0.0.6)
|
83
|
-
|
84
|
-
PLATFORMS
|
85
|
-
ruby
|
86
|
-
|
87
|
-
DEPENDENCIES
|
88
|
-
bundler (>= 1.0.0)
|
89
|
-
datet
|
90
|
-
erubis
|
91
|
-
http2
|
92
|
-
jeweler (~> 1.8.8)
|
93
|
-
json
|
94
|
-
knjrbfw
|
95
|
-
mail
|
96
|
-
php4r
|
97
|
-
rmagick
|
98
|
-
rspec (>= 2.3.0)
|
99
|
-
ruby_process
|
100
|
-
sqlite3
|
101
|
-
tpool
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.25
|
data/bin/hayabusa_fcgi.fcgi
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
|
3
|
-
#This scripts start an appserver, executes a CGI-request for every FCGI-request and terminates when FCGI terminates.
|
4
|
-
#Good for programming appserver-supported projects that doesnt need threadding without running an appserver all the time.
|
5
|
-
|
6
|
-
error_log_file = "/tmp/hayabusa_fcgi.log"
|
7
|
-
|
8
|
-
begin
|
9
|
-
File.unlink(error_log_file) if File.exists?(error_log_file)
|
10
|
-
rescue Errno::ENOENT
|
11
|
-
#ignore.
|
12
|
-
end
|
13
|
-
|
14
|
-
begin
|
15
|
-
require "rubygems"
|
16
|
-
require "fcgi"
|
17
|
-
require "fileutils"
|
18
|
-
|
19
|
-
#Try to load development-version to enable debugging without doing constant gem-installations.
|
20
|
-
begin
|
21
|
-
require "#{File.realpath(File.dirname(__FILE__))}/../../knjrbfw/lib/knjrbfw.rb"
|
22
|
-
rescue LoadError
|
23
|
-
require "knjrbfw"
|
24
|
-
end
|
25
|
-
|
26
|
-
#Load 'Hayabusa' and start the FCGI-loop to begin handeling requests.
|
27
|
-
require "#{File.dirname(Knj::Os.realpath(__FILE__))}/../lib/hayabusa.rb"
|
28
|
-
fcgi = Hayabusa::Fcgi.new
|
29
|
-
fcgi.fcgi_loop
|
30
|
-
rescue Exception => e
|
31
|
-
if !e.is_a?(Interrupt)
|
32
|
-
#Log error to the log-file if something happened.
|
33
|
-
File.open(error_log_file, "w") do |fp|
|
34
|
-
fp.puts e.inspect
|
35
|
-
fp.puts e.backtrace
|
36
|
-
fp.puts ""
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
#Just raise it normally as if a normal error occurred.
|
41
|
-
raise e
|
42
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Alias /hayabusa_cgi_test "/path/to/hayabusa/tests/cgi_test"
|
2
|
-
ScriptAlias /hayabusa/ "/path/to/hayabusa/bin/"
|
3
|
-
|
4
|
-
<Directory "/path/to/hayabusa/tests/cgi_test">
|
5
|
-
Options +FollowSymLinks +ExecCGI
|
6
|
-
RequestHeader set HAYABUSA_CGI_CONFIG "/path/to/hayabusa/tests/cgi_test/config_cgi.rb"
|
7
|
-
AddHandler application/x-hayabusa-cgi .rhtml
|
8
|
-
Action application/x-hayabusa-cgi /hayabusa/hayabusa_cgi.rb
|
9
|
-
DirectoryIndex index.cgi
|
10
|
-
</Directory>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
Alias /hayabusa_fcgi_test "/path/to/hayabusa/tests/fcgi_test"
|
2
|
-
Alias /hayabusa_fcgi_bin "/path/to/hayabusa/bin"
|
3
|
-
|
4
|
-
<IfModule mod_fcgid.c>
|
5
|
-
SocketPath /tmp/fcgi_socket
|
6
|
-
FcgidIdleTimeout 30
|
7
|
-
FcgidMinProcessesPerClass 0
|
8
|
-
FcgidIdleScanInterval 15
|
9
|
-
</IfModule>
|
10
|
-
|
11
|
-
<Directory "/path/to/hayabusa/tests/fcgi_test">
|
12
|
-
RewriteEngine On
|
13
|
-
RewriteRule ^(.*)\.rhtml$ /hayabusa_fcgi_bin/hayabusa_fcgi.fcgi
|
14
|
-
|
15
|
-
Options +FollowSymLinks
|
16
|
-
|
17
|
-
RequestHeader set HAYABUSA_FCGI_CONFIG "/path/to/hayabusa/tests/fcgi_test/config_fcgi.rb"
|
18
|
-
|
19
|
-
AddHandler fcgid-script .fgci
|
20
|
-
|
21
|
-
DirectoryIndex index.rhtml
|
22
|
-
</Directory>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<IfModule mod_fcgid.c>
|
2
|
-
SocketPath /tmp/fcgi_socket
|
3
|
-
FcgidIdleTimeout 30
|
4
|
-
FcgidMinProcessesPerClass 0
|
5
|
-
FcgidIdleScanInterval 15
|
6
|
-
</IfModule>
|
7
|
-
|
8
|
-
<Directory "/path/to/hayabusa/bin">
|
9
|
-
Options +FollowSymLinks +ExecCGI
|
10
|
-
Order allow,deny
|
11
|
-
Allow from all
|
12
|
-
AllowOverride none
|
13
|
-
</Directory>
|
14
|
-
|
15
|
-
Alias /hayabusa_fcgi_bin "/path/to/hayabusa/bin"
|