hayabusa 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +4 -4
  3. data/Rakefile +0 -14
  4. data/bin/hayabusa_fcgi.fcgi +1 -0
  5. data/lib/hayabusa.rb +119 -117
  6. data/lib/hayabusa_database.rb +84 -84
  7. data/lib/hayabusa_datarow.rb +873 -0
  8. data/lib/hayabusa_objects.rb +1455 -0
  9. data/lib/hayabusa_revision.rb +347 -0
  10. data/lib/models/log.rb +27 -27
  11. data/lib/models/log_access.rb +20 -20
  12. data/lib/models/log_data.rb +6 -6
  13. data/lib/models/log_data_link.rb +2 -2
  14. data/lib/models/log_data_value.rb +5 -5
  15. data/lib/models/log_link.rb +12 -12
  16. data/lib/models/session.rb +6 -6
  17. metadata +75 -57
  18. data/.document +0 -5
  19. data/.rspec +0 -1
  20. data/Gemfile +0 -25
  21. data/Gemfile.lock +0 -105
  22. data/VERSION +0 -1
  23. data/bin/hayabusa_fcgi.fcgi +0 -42
  24. data/conf/apache2_cgi_rhtml_conf.conf +0 -10
  25. data/conf/apache2_fcgi_rhtml_conf.conf +0 -22
  26. data/conf/apache2_hayabusa_conf.conf +0 -15
  27. data/hayabusa.gemspec +0 -171
  28. data/pages/benchmark.rhtml +0 -0
  29. data/pages/benchmark_print.rhtml +0 -14
  30. data/pages/benchmark_simple.rhtml +0 -3
  31. data/pages/benchmark_threadded_content.rhtml +0 -21
  32. data/pages/config_cgi.rb +0 -22
  33. data/pages/config_fcgi.rb +0 -22
  34. data/pages/debug_database_connections.rhtml +0 -46
  35. data/pages/debug_http_sessions.rhtml +0 -40
  36. data/pages/debug_memory_usage.rhtml +0 -39
  37. data/pages/error_notfound.rhtml +0 -12
  38. data/pages/image.png +0 -0
  39. data/pages/logs_latest.rhtml +0 -57
  40. data/pages/logs_show.rhtml +0 -32
  41. data/pages/spec.rhtml +0 -41
  42. data/pages/spec_exit.rhtml +0 -5
  43. data/pages/spec_multiple_threads.rhtml +0 -18
  44. data/pages/spec_sleeper.rhtml +0 -4
  45. data/pages/spec_test_multiple_clients.rhtml +0 -3
  46. data/pages/spec_thread_joins.rhtml +0 -29
  47. data/pages/spec_threadded_content.rhtml +0 -40
  48. data/pages/spec_vars_get.rhtml +0 -4
  49. data/pages/spec_vars_header.rhtml +0 -3
  50. data/pages/spec_vars_post.rhtml +0 -4
  51. data/pages/spec_vars_post_fileupload.rhtml +0 -19
  52. data/pages/testpic.jpeg +0 -0
  53. data/pages/tests.rhtml +0 -14
  54. data/pages/threadded_content_test.rhtml +0 -23
  55. data/spec/fcgi_multiple_processes_spec.rb +0 -104
  56. data/spec/hayabusa_spec.rb +0 -423
  57. data/spec/spec_helper.rb +0 -12
  58. data/spec/test_upload.xlsx +0 -0
data/hayabusa.gemspec DELETED
@@ -1,171 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: hayabusa 0.0.28 ruby lib
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "hayabusa"
9
- s.version = "0.0.28"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Kasper Johansen"]
14
- s.date = "2016-05-03"
15
- s.description = "A threadded web/app-server that focuses on threadding, shared ressources, speed and more."
16
- s.email = "k@spernj.org"
17
- s.executables = ["check_running.rb", "hayabusa_benchmark.rb", "hayabusa_cgi.rb", "hayabusa_fcgi.fcgi", "hayabusa_fcgi.rb", "hayabusa_fcgi_server.rb", "hayabusa_spec_restart.rb", "knjappserver_start.rb"]
18
- s.extra_rdoc_files = [
19
- "LICENSE.txt",
20
- "README.md"
21
- ]
22
- s.files = [
23
- ".document",
24
- ".rspec",
25
- "Gemfile",
26
- "Gemfile.lock",
27
- "LICENSE.txt",
28
- "README.md",
29
- "Rakefile",
30
- "VERSION",
31
- "bin/check_running.rb",
32
- "bin/hayabusa_benchmark.rb",
33
- "bin/hayabusa_cgi.rb",
34
- "bin/hayabusa_fcgi.fcgi",
35
- "bin/hayabusa_fcgi.rb",
36
- "bin/hayabusa_fcgi_server.rb",
37
- "bin/hayabusa_spec_restart.rb",
38
- "bin/knjappserver_start.rb",
39
- "conf/apache2_cgi_rhtml_conf.conf",
40
- "conf/apache2_fcgi_rhtml_conf.conf",
41
- "conf/apache2_hayabusa_conf.conf",
42
- "hayabusa.gemspec",
43
- "lib/hayabusa.rb",
44
- "lib/hayabusa_cgi.rb",
45
- "lib/hayabusa_cgi_session.rb",
46
- "lib/hayabusa_cgi_tools.rb",
47
- "lib/hayabusa_client_session.rb",
48
- "lib/hayabusa_custom_io.rb",
49
- "lib/hayabusa_database.rb",
50
- "lib/hayabusa_erb_handler.rb",
51
- "lib/hayabusa_ext/cleaner.rb",
52
- "lib/hayabusa_ext/cmdline.rb",
53
- "lib/hayabusa_ext/errors.rb",
54
- "lib/hayabusa_ext/logging.rb",
55
- "lib/hayabusa_ext/mailing.rb",
56
- "lib/hayabusa_ext/sessions.rb",
57
- "lib/hayabusa_ext/threadding.rb",
58
- "lib/hayabusa_ext/threadding_timeout.rb",
59
- "lib/hayabusa_ext/translations.rb",
60
- "lib/hayabusa_ext/web.rb",
61
- "lib/hayabusa_fcgi.rb",
62
- "lib/hayabusa_fcgi_server.rb",
63
- "lib/hayabusa_http_server.rb",
64
- "lib/hayabusa_http_session.rb",
65
- "lib/hayabusa_http_session_contentgroup.rb",
66
- "lib/hayabusa_http_session_page_environment.rb",
67
- "lib/hayabusa_http_session_post_multipart.rb",
68
- "lib/hayabusa_http_session_request.rb",
69
- "lib/hayabusa_http_session_response.rb",
70
- "lib/hayabusa_models.rb",
71
- "lib/kernel_ext/gettext_methods.rb",
72
- "lib/kernel_ext/magic_methods.rb",
73
- "lib/models/log.rb",
74
- "lib/models/log_access.rb",
75
- "lib/models/log_data.rb",
76
- "lib/models/log_data_link.rb",
77
- "lib/models/log_data_value.rb",
78
- "lib/models/log_link.rb",
79
- "lib/models/session.rb",
80
- "pages/benchmark.rhtml",
81
- "pages/benchmark_print.rhtml",
82
- "pages/benchmark_simple.rhtml",
83
- "pages/benchmark_threadded_content.rhtml",
84
- "pages/config_cgi.rb",
85
- "pages/config_fcgi.rb",
86
- "pages/debug_database_connections.rhtml",
87
- "pages/debug_http_sessions.rhtml",
88
- "pages/debug_memory_usage.rhtml",
89
- "pages/error_notfound.rhtml",
90
- "pages/image.png",
91
- "pages/logs_latest.rhtml",
92
- "pages/logs_show.rhtml",
93
- "pages/spec.rhtml",
94
- "pages/spec_exit.rhtml",
95
- "pages/spec_multiple_threads.rhtml",
96
- "pages/spec_sleeper.rhtml",
97
- "pages/spec_test_multiple_clients.rhtml",
98
- "pages/spec_thread_joins.rhtml",
99
- "pages/spec_threadded_content.rhtml",
100
- "pages/spec_vars_get.rhtml",
101
- "pages/spec_vars_header.rhtml",
102
- "pages/spec_vars_post.rhtml",
103
- "pages/spec_vars_post_fileupload.rhtml",
104
- "pages/testpic.jpeg",
105
- "pages/tests.rhtml",
106
- "pages/threadded_content_test.rhtml",
107
- "spec/fcgi_multiple_processes_spec.rb",
108
- "spec/hayabusa_spec.rb",
109
- "spec/spec_helper.rb",
110
- "spec/test_upload.xlsx"
111
- ]
112
- s.homepage = "http://github.com/kaspernj/hayabusa"
113
- s.licenses = ["MIT"]
114
- s.rubygems_version = "2.2.2"
115
- s.summary = "A threadded web/app-server that supports stand-alone, CGI and FCGI-modes."
116
-
117
- if s.respond_to? :specification_version then
118
- s.specification_version = 4
119
-
120
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
121
- s.add_runtime_dependency(%q<knjrbfw>, ["= 0.0.110"])
122
- s.add_runtime_dependency(%q<wref>, ["= 0.0.6"])
123
- s.add_runtime_dependency(%q<erubis>, [">= 0"])
124
- s.add_runtime_dependency(%q<mail>, [">= 0"])
125
- s.add_runtime_dependency(%q<datet>, [">= 0"])
126
- s.add_runtime_dependency(%q<http2>, [">= 0"])
127
- s.add_runtime_dependency(%q<tpool>, [">= 0"])
128
- s.add_runtime_dependency(%q<ruby_process>, [">= 0"])
129
- s.add_development_dependency(%q<json>, [">= 0"])
130
- s.add_development_dependency(%q<rspec>, [">= 2.3.0"])
131
- s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
132
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.8"])
133
- s.add_development_dependency(%q<rmagick>, [">= 0"])
134
- s.add_development_dependency(%q<sqlite3>, [">= 0"])
135
- s.add_development_dependency(%q<php4r>, [">= 0"])
136
- else
137
- s.add_dependency(%q<knjrbfw>, ["= 0.0.110"])
138
- s.add_dependency(%q<wref>, ["= 0.0.6"])
139
- s.add_dependency(%q<erubis>, [">= 0"])
140
- s.add_dependency(%q<mail>, [">= 0"])
141
- s.add_dependency(%q<datet>, [">= 0"])
142
- s.add_dependency(%q<http2>, [">= 0"])
143
- s.add_dependency(%q<tpool>, [">= 0"])
144
- s.add_dependency(%q<ruby_process>, [">= 0"])
145
- s.add_dependency(%q<json>, [">= 0"])
146
- s.add_dependency(%q<rspec>, [">= 2.3.0"])
147
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
148
- s.add_dependency(%q<jeweler>, ["~> 1.8.8"])
149
- s.add_dependency(%q<rmagick>, [">= 0"])
150
- s.add_dependency(%q<sqlite3>, [">= 0"])
151
- s.add_dependency(%q<php4r>, [">= 0"])
152
- end
153
- else
154
- s.add_dependency(%q<knjrbfw>, ["= 0.0.110"])
155
- s.add_dependency(%q<wref>, ["= 0.0.6"])
156
- s.add_dependency(%q<erubis>, [">= 0"])
157
- s.add_dependency(%q<mail>, [">= 0"])
158
- s.add_dependency(%q<datet>, [">= 0"])
159
- s.add_dependency(%q<http2>, [">= 0"])
160
- s.add_dependency(%q<tpool>, [">= 0"])
161
- s.add_dependency(%q<ruby_process>, [">= 0"])
162
- s.add_dependency(%q<json>, [">= 0"])
163
- s.add_dependency(%q<rspec>, [">= 2.3.0"])
164
- s.add_dependency(%q<bundler>, [">= 1.0.0"])
165
- s.add_dependency(%q<jeweler>, ["~> 1.8.8"])
166
- s.add_dependency(%q<rmagick>, [">= 0"])
167
- s.add_dependency(%q<sqlite3>, [">= 0"])
168
- s.add_dependency(%q<php4r>, [">= 0"])
169
- end
170
- end
171
-
File without changes
@@ -1,14 +0,0 @@
1
- <%
2
- 0.upto(100) do
3
- print "Test 1<br />\n"
4
- print "Test 2<br />\n"
5
- print "Test 3<br />\n"
6
- print "Test 4<br />\n"
7
- print "Test 5<br />\n"
8
- print "Test 6<br />\n"
9
- print "Test 7<br />\n"
10
- print "Test 8<br />\n"
11
- print "Test 9<br />\n"
12
- print "Test 10<br />\n"
13
- end
14
- %>
@@ -1,3 +0,0 @@
1
- <%
2
- Php4r.print_r([_get, _post, _meta])
3
- %>
@@ -1,21 +0,0 @@
1
- <%
2
- print "1"
3
-
4
- _hb.threadded_content do
5
- sleep 0.1
6
- print "2"
7
- end
8
-
9
- _hb.threadded_content do
10
- print "3"
11
- end
12
-
13
- print "4"
14
-
15
- _hb.threadded_content do
16
- sleep 0.1
17
- print "5"
18
- end
19
-
20
- print "6"
21
- %>
data/pages/config_cgi.rb DELETED
@@ -1,22 +0,0 @@
1
- require "rubygems"
2
- require "RMagick"
3
-
4
- Hayabusa::CGI_CONF = {
5
- :hayabusa => {
6
- :title => "Cgi_test",
7
- :doc_root => File.realpath(File.dirname(__FILE__)),
8
- :handlers_extra => [{
9
- :regex => /^\/Kasper$/,
10
- :callback => proc{|data|
11
- data[:httpsession].page_path = nil
12
-
13
- eruby = data[:httpsession].eruby
14
- eruby.connect(:on_error) do |e|
15
- _hb.handle_error(e)
16
- end
17
-
18
- eruby.import("#{File.dirname(__FILE__)}/../pages/spec.rhtml")
19
- }
20
- }]
21
- }
22
- }
data/pages/config_fcgi.rb DELETED
@@ -1,22 +0,0 @@
1
- require "rubygems"
2
- require "RMagick"
3
-
4
- Hayabusa::FCGI_CONF = {
5
- :hayabusa => {
6
- :title => "Fcgi_test",
7
- :doc_root => File.realpath(File.dirname(__FILE__)),
8
- :handlers_extra => [{
9
- :regex => /^\/Kasper$/,
10
- :callback => proc{|data|
11
- data[:httpsession].page_path = nil
12
-
13
- eruby = data[:httpsession].eruby
14
- eruby.connect(:on_error) do |e|
15
- _hb.handle_error(e)
16
- end
17
-
18
- eruby.import("#{File.dirname(__FILE__)}/../pages/spec.rhtml")
19
- }
20
- }]
21
- }
22
- }
@@ -1,46 +0,0 @@
1
- <h1>Database connections</h1>
2
-
3
- <table>
4
- <thead>
5
- <tr>
6
- <th>Key</th>
7
- <th>Free</th>
8
- </tr>
9
- </thead>
10
- <tbody>
11
- <%
12
- thread_handler = _hb.db_handler.conns
13
- if !thread_handler.is_a?(Knj::Threadhandler)
14
- print "A threadhandler has not been spawned for this instance."
15
- exit
16
- end
17
-
18
- objects = thread_handler.objects.clone
19
-
20
- objects.each_index do |key|
21
- val = objects[key]
22
-
23
- %>
24
- <tr>
25
- <td>
26
- <%=key%>
27
- </td>
28
- <td>
29
- <%=Knj::Strings.yn_str(val[:free])%>
30
- </td>
31
- </tr>
32
- <%
33
- end
34
-
35
- if objects.empty?
36
- %>
37
- <tr>
38
- <td colspan="2">
39
- Thread handler was spawned but no active connections was spawned?
40
- </td>
41
- </tr>
42
- <%
43
- end
44
- %>
45
- </tbody>
46
- </table>
@@ -1,40 +0,0 @@
1
- <h1>HTTP sessions</h1>
2
-
3
- <table>
4
- <thead>
5
- <tr>
6
- <th>Key</th>
7
- <th>Working</th>
8
- </tr>
9
- </thead>
10
- <tbody>
11
- <%
12
- sessions = _hb.httpserv.http_sessions.clone
13
-
14
- sessions.each_index do |key|
15
- http_session = sessions[key]
16
-
17
- %>
18
- <tr>
19
- <td>
20
- <%=key%>
21
- </td>
22
- <td>
23
- <%=Knj::Strings.yn_str(http_session.working)%>
24
- </td>
25
- </tr>
26
- <%
27
- end
28
-
29
- if sessions.empty?
30
- %>
31
- <tr>
32
- <td colspan="2">
33
- No HTTP-sessions has been spawned.
34
- </td>
35
- </tr>
36
- <%
37
- end
38
- %>
39
- </tbody>
40
- </table>
@@ -1,39 +0,0 @@
1
- <%
2
- if _get["choice"] == "dogarbagecollect"
3
- _hb.clean
4
- GC.start
5
-
6
- #Clean all Knj::Objects used in the application.
7
- ObjectSpace.each_object(Knj::Objects) do |objects|
8
- objects.clean_all
9
- end
10
-
11
- Knj::Web.redirect("?show=debug_memory_usage")
12
- end
13
- %>
14
-
15
- <h1>Memory usage</h1>
16
-
17
- <div style="padding-bottom: 15px;">
18
- <input type="button" value="Garbage collect" onclick="location.href='?show=debug_memory_usage&amp;choice=dogarbagecollect';" />
19
- </div>
20
-
21
- <h1>Hayabusa sessions</h1>
22
- <table style="width: 600px;">
23
- <tbody>
24
- <tr>
25
- <td>Active sessions</td>
26
- <td><%=_hb.num(_hb.sessions.length, 0)%></td>
27
- </tr>
28
- <tr>
29
- <td>Total sessions</td>
30
- <td><%=_hb.num(_hb.ob.list(:Session, "count" => true), 0)%>
31
- </tr>
32
- </tbody>
33
- </table>
34
-
35
- <br />
36
-
37
- <%
38
- Knj::Memory_analyzer.new.write
39
- %>
@@ -1,12 +0,0 @@
1
- <%
2
- _httpsession.resp.status = 404
3
- %>
4
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
5
- <html><head>
6
- <title>404 Not Found</title>
7
- </head><body>
8
- <h1>Not Found</h1>
9
- <p>The requested URL <%=_meta["REQUEST_URI"]%> was not found on this server.</p>
10
- <hr>
11
- <address>Hayabusa at <%=_meta["HTTP_HOST"]%></address>
12
- </body></html>
data/pages/image.png DELETED
Binary file
@@ -1,57 +0,0 @@
1
- <%
2
- access = _hb.events.call(:check_page_access, {:page => :logs_latest})
3
- if !access
4
- print _("You do not have access to this page.")
5
- exit
6
- end
7
-
8
- ob = _hb.events.call(:ob)
9
- %>
10
-
11
- <table class="list">
12
- <thead>
13
- <tr>
14
- <th><%=_("ID")%></th>
15
- <th><%=_("Log")%></th>
16
- <%if ob%>
17
- <th><%=_("Object")%></th>
18
- <%end%>
19
- </tr>
20
- </thead>
21
- <tbody>
22
- <%
23
- logs = _hb.ob.list(:Log, {
24
- "orderby" => [["date_saved", "desc"]],
25
- "limit" => 200
26
- })
27
-
28
- logs.each do |log|
29
- %>
30
- <tr>
31
- <td>
32
- <a href="logs_show.rhtml?log_id=<%=log.id%>"><%=log.id%></a>
33
- </td>
34
- <td>
35
- <%=log.first_line%>
36
- </td>
37
- <%if ob%>
38
- <td>
39
- <%=log.objects_html(ob)%>
40
- </td>
41
- <%end%>
42
- </tr>
43
- <%
44
- end
45
-
46
- if logs.empty?
47
- %>
48
- <tr>
49
- <td class="error">
50
- <%=_("No logs were found.")%>
51
- </td>
52
- </tr>
53
- <%
54
- end
55
- %>
56
- </tbody>
57
- </table>
@@ -1,32 +0,0 @@
1
- <%
2
- access = _hb.events.call(:check_page_access, {:page => :logs_show})
3
- if !access
4
- print _("You do not have access to this page.")
5
- exit
6
- end
7
-
8
- ob = _hb.events.call(:ob)
9
- log = _hb.ob.get(:Log, _get["log_id"])
10
- %>
11
-
12
- <table class="form">
13
- <%
14
- print Knj::Web.inputs([{
15
- :title => _("Date"),
16
- :type => :info,
17
- :value => Datet.in(log[:date_saved]).out
18
- }])
19
-
20
- if ob
21
- print Knj::Web.input(
22
- :title => _("Objects"),
23
- :type => :info,
24
- :value => log.objects_html(ob)
25
- )
26
- end
27
- %>
28
- </table>
29
-
30
- <div style="padding-top: 10px;">
31
- <%=log.text%>
32
- </div>
data/pages/spec.rhtml DELETED
@@ -1,41 +0,0 @@
1
- <%
2
- require "json"
3
-
4
- if _get["choice"] == "test_cookie"
5
- _hb.cookie(
6
- "name" => "TestCookie",
7
- "value" => "TestValue",
8
- "expires" => Time.new + 3600 #add an hour
9
- )
10
- _hb.cookie(
11
- "name" => "TestCookie2",
12
- "value" => "TestValue2",
13
- "expires" => Time.new + 7200 #add an hour
14
- )
15
- _hb.cookie(
16
- "name" => "TestCookie3",
17
- "value" => "TestValue 3 ",
18
- "expires" => Time.new + 1200
19
- )
20
- exit
21
- elsif _get["choice"] == "dopostconvert"
22
- print JSON.generate(_post)
23
- exit
24
- end
25
-
26
- if _get["choice"] == "get_cookies"
27
- print JSON.generate(_cookie)
28
- exit
29
- end
30
-
31
- _hb.header("TestHeader", "NormalHeader")
32
- _hb.header_raw("TestRaw: RawHeader")
33
-
34
- if _meta["REQUEST_METHOD"] == "POST"
35
- print _post["postdata"]
36
- elsif _get["choice"] == "check_get_parse"
37
- print _get["value"]
38
- else
39
- print "Test"
40
- end
41
- %>
@@ -1,5 +0,0 @@
1
- <%
2
- _httpsession.resp.status = 304
3
- puts "ExitOutput"
4
- exit
5
- %>
@@ -1,18 +0,0 @@
1
- <%
2
- require "json"
3
-
4
- if !_session.key?(:request_count)
5
- _session[:request_count] = 1
6
- else
7
- _session[:request_count] = _session[:request_count].to_i + 1
8
- end
9
-
10
- print JSON.generate(
11
- :pid => Process.pid,
12
- :session_id => _session_obj.id,
13
- :session_hash_id => _session.__id__,
14
- :request_count => _session[:request_count],
15
- :cookie => _cookie,
16
- :meta => _meta
17
- )
18
- %>
@@ -1,4 +0,0 @@
1
- <%
2
- sleep 0.7
3
- print Process.pid
4
- %>
@@ -1,3 +0,0 @@
1
- <%
2
-
3
- %>
@@ -1,29 +0,0 @@
1
- <%
2
- #Knj.p _hb.config
3
- #exit
4
-
5
- print "1"
6
-
7
- cont = "2"
8
- t1 = _hb.thread(:id => 4) do
9
- sleep 0.5
10
- cont << "4"
11
- end
12
-
13
- t2 = _hb.thread(:id => 3) do
14
- sleep 0.3
15
- cont << "3"
16
- end
17
-
18
- sleep 0.1
19
-
20
- raise "Expected thread 1 to be running but it wasnt." if !t1.running?
21
- raise "Expected thread 2 to be running but it wasnt." if !t2.running?
22
-
23
- t1.join
24
- t2.join_error
25
-
26
- cont << "5"
27
-
28
- print cont
29
- %>
@@ -1,40 +0,0 @@
1
- <%
2
- _hb.threadded_content do
3
- sleep 0.2
4
- print "1"
5
- end
6
-
7
- print "2"
8
-
9
- _hb.threadded_content do
10
- sleep 0.1
11
-
12
- _hb.threadded_content do
13
- sleep 0.1
14
- print "3"
15
-
16
- sleep 0.1
17
-
18
- _hb.threadded_content do
19
- print "4"
20
- sleep 0.1
21
- print "5"
22
- end
23
-
24
- _hb.threadded_content do
25
- print "6"
26
- print "7"
27
- end
28
- end
29
-
30
- print "8"
31
- end
32
-
33
- #This will first finish after the printing has starter - it should still be printed correct.
34
- _hb.threadded_content do
35
- sleep 1
36
- print "9"
37
- end
38
-
39
- print "10"
40
- %>
@@ -1,4 +0,0 @@
1
- <%
2
- require "json"
3
- print JSON.generate(_get)
4
- %>
@@ -1,3 +0,0 @@
1
- <%
2
- _hb.header("TestHeader", "TestValue")
3
- %>
@@ -1,4 +0,0 @@
1
- <%
2
- require "json"
3
- print JSON.generate(_post)
4
- %>
@@ -1,19 +0,0 @@
1
- <%
2
- pdata = {}
3
- _post.each do |key, val|
4
- data = {
5
- "class" => val.class.name
6
- }
7
-
8
- if val.is_a?(Hayabusa::Http_session::Post_multipart::File_upload)
9
- data["val"] = val.to_s
10
- else
11
- data["val"] = val
12
- end
13
-
14
- pdata[key] = data
15
- end
16
-
17
- require "json"
18
- print Marshal.dump(pdata)
19
- %>