rsence-pre 2.2.0.27 → 2.2.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/conf/default_conf.yaml +1 -1
- data/conf/rsence_command_strings.yaml +85 -67
- data/js/comm/queue/queue.js +1 -1
- data/js/core/elem/elem.coffee +1 -1
- data/lib/conf/argv.rb +31 -14
- data/plugins/client_pkg/client_pkg.rb +1 -1
- data/plugins/client_pkg/lib/client_pkg_build.rb +1 -1
- data/plugins/main/main.rb +2 -2
- data/plugins/main/tmpl/index.html +2 -9
- data/plugins/ticket/lib/common.rb +6 -3
- data/plugins/ticket/ticket.rb +2 -2
- metadata +66 -66
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.0.
|
1
|
+
2.2.0.28.pre
|
data/conf/default_conf.yaml
CHANGED
@@ -4,17 +4,17 @@
|
|
4
4
|
Invalid option for <%%= option_name.to_s %>:
|
5
5
|
Expected number, got: <%%= arg.inspect %>.
|
6
6
|
|
7
|
-
Type
|
7
|
+
Type ”rsence help <%%= @cmd.to_s %>” for usage.
|
8
8
|
:no_such_configuration_file: |+
|
9
9
|
No such configuration file:
|
10
10
|
<%%= arg.inspect %>
|
11
11
|
|
12
|
-
Type
|
12
|
+
Type ”rsence help <%%= @cmd.to_s %>” for usage.
|
13
13
|
:no_value_for_option: |+
|
14
14
|
No value for option:
|
15
15
|
<%%= option_name.to_s.inspect %>
|
16
16
|
|
17
|
-
Type
|
17
|
+
Type ”rsence help <%%= @cmd.to_s %>” for usage.
|
18
18
|
:no_such_directory: |
|
19
19
|
No such directory:
|
20
20
|
<%%= path.inspect %>
|
@@ -45,18 +45,18 @@
|
|
45
45
|
:invalid_environment: |
|
46
46
|
Invalid environment: <%%= env_path.inspect %>
|
47
47
|
|
48
|
-
Type
|
49
|
-
Type
|
48
|
+
Type ”rsence help <%%= @cmd.to_s %>” for usage.
|
49
|
+
Type ”rsence help init” for environment initialization usage.
|
50
50
|
:invalid_option_chr: |
|
51
51
|
Invalid option character for option character block <%%= arg.inspect %>:
|
52
52
|
<%%= chr.inspect %>
|
53
53
|
|
54
|
-
Type
|
54
|
+
Type ”rsence help <%%= @cmd.to_s %>” for usage.
|
55
55
|
:invalid_option: |
|
56
56
|
Invalid option:
|
57
57
|
<%%= arg.inspect %>.
|
58
58
|
|
59
|
-
Type
|
59
|
+
Type ”rsence help <%%= @cmd.to_s %>” for usage.
|
60
60
|
:no_pid: |
|
61
61
|
No PID, unable to check process status.
|
62
62
|
:no_pid_file: |
|
@@ -79,12 +79,18 @@
|
|
79
79
|
No process running.
|
80
80
|
:session_data_saved: |
|
81
81
|
Session data saved.
|
82
|
+
|
82
83
|
# Strings for the init command
|
83
84
|
:initenv:
|
85
|
+
:continue_question: "Do you want to continue, "
|
84
86
|
:env_already_initialized: |
|
85
87
|
Environment already initialized.
|
88
|
+
:env_not_clear: |
|
89
|
+
Environment directory <%%= @args[:env_path] %> is not empty,
|
90
|
+
and appears to be an RSence environment.
|
86
91
|
:env_not_empty: |
|
87
|
-
Environment directory <%%= @args[:env_path] %> is not empty
|
92
|
+
Environment directory <%%= @args[:env_path] %> is not empty,
|
93
|
+
but does not appear to be an RSence environment.
|
88
94
|
:creating_env: |+
|
89
95
|
|
90
96
|
Creating a new RSence environment at <%%= @args[:env_path] %>
|
@@ -111,7 +117,7 @@
|
|
111
117
|
|
112
118
|
|
113
119
|
Please specify the connection string for the session database to use.
|
114
|
-
By default, a local SQLite database is created in the
|
120
|
+
By default, a local SQLite database is created in the ”db” subdirectory
|
115
121
|
of the environment directory. Any database supported by Sequel is supported
|
116
122
|
by RSence.
|
117
123
|
|
@@ -171,16 +177,16 @@
|
|
171
177
|
|
172
178
|
:confirm_config: "Is the configuration correct, "
|
173
179
|
:creating_dirs: "Creating directories..."
|
174
|
-
:install_welcome: "Do you want to install the
|
180
|
+
:install_welcome: "Do you want to install the ”welcome” plugin as a starting point, "
|
175
181
|
:installing_welcome_plugin: |+
|
176
182
|
Installing the welcome plugin. To remove it, just delete this folder:
|
177
183
|
<%%= welcome_plugin_dst %>
|
178
184
|
:creating_files: "Creating files..."
|
179
185
|
:congratulations: |+
|
180
186
|
|
181
|
-
<%= '-='*39
|
187
|
+
<%= ('-='*39)+'-' %>
|
182
188
|
|
183
|
-
RSence project environment for
|
189
|
+
RSence project environment for <%%= config[:index_html][:title] %> created.
|
184
190
|
|
185
191
|
You may configure the environment by editing the file:
|
186
192
|
|
@@ -203,26 +209,26 @@
|
|
203
209
|
Congratulations!
|
204
210
|
|
205
211
|
:readme: |
|
206
|
-
This directory contains a RSence environment titled
|
212
|
+
This directory contains a RSence environment titled <%%= config[:index_html][:title] %>.
|
207
213
|
Visit http://rsence.org/ for further information.
|
208
|
-
# Help for the
|
214
|
+
# Help for the ”rsence” command line tool.
|
209
215
|
:help:
|
210
216
|
:head: |+
|
211
217
|
RSence command-line tool, version <%= @@version %>
|
212
218
|
|
213
219
|
:tail: |+
|
214
|
-
RSence is a self-contained
|
220
|
+
RSence is a self-contained web app framework.
|
215
221
|
For further information, see http://rsence.org/
|
216
222
|
:unknown: >
|
217
223
|
Unknown command:
|
218
224
|
|
219
225
|
:help_help: >
|
220
|
-
Type
|
226
|
+
Type ”rsence help” for usage.
|
221
227
|
|
222
228
|
:help_main: |+
|
223
229
|
usage: rsence <command> [options] [args]
|
224
230
|
|
225
|
-
Type
|
231
|
+
Type ”rsence help <command>” for help on a specific command.
|
226
232
|
|
227
233
|
Available commands:
|
228
234
|
<%= help_avail_cmds %>
|
@@ -253,8 +259,8 @@
|
|
253
259
|
--port <number> The port number the http server listens to.
|
254
260
|
|
255
261
|
--addr <ip address> The IP address or net mask the http server listens to.
|
256
|
-
|
257
|
-
|
262
|
+
”0.0.0.0” matches all interfaces.
|
263
|
+
”127.0.0.1” matches the local loopback interface.
|
258
264
|
|
259
265
|
--server <handler> The Rack handler to use. Defaults to mongrel
|
260
266
|
|
@@ -269,41 +275,50 @@
|
|
269
275
|
--latency <number> Sleeps <number> amount of milliseconds on every
|
270
276
|
request. Useful for testing slow connections.
|
271
277
|
|
272
|
-
--say (-S) Uses speech synthesis via the
|
278
|
+
--say (-S) Uses speech synthesis via the ”say” command to
|
273
279
|
provide audible feedback, when --auto-update is
|
274
|
-
enabled. Says
|
275
|
-
|
276
|
-
|
277
|
-
|
280
|
+
enabled. Says ”Autobuild complete.”,
|
281
|
+
”Loaded [plugin name].”, ”Unloaded [plugin name].”,
|
282
|
+
”Reloaded [plugin name].”, ”Reloading plugins.” and
|
283
|
+
”Plugins reloaded.”
|
278
284
|
Only available on Mac OS X and other systems with a
|
279
|
-
|
285
|
+
”say” command installed.
|
280
286
|
|
281
|
-
--
|
282
|
-
|
287
|
+
--delayed-start <secs> Waits for <secs> of seconds before starting
|
288
|
+
the HTTP Broker after starting the Transporter.
|
289
|
+
|
283
290
|
A value of -1 disables the broker completely.
|
284
291
|
Before waiting, the daemon starts all subsystems except the
|
285
292
|
http handling front-end (Broker).
|
286
293
|
Useful in situations where RSence itself configures the
|
287
294
|
network interfaces or the interfaces become available after
|
288
295
|
RSence is started.
|
296
|
+
|
297
|
+
--disable-gzip Disables client resource GZIP compression for every browser.
|
298
|
+
|
299
|
+
--disable-obfuscation Disables client resource compression (obfuscation).
|
300
|
+
|
301
|
+
--disable-jsmin Does not strip whitespace from client resources (jsmin).
|
302
|
+
|
303
|
+
--build-report Outputs verbose client resource actions.
|
289
304
|
|
290
305
|
|
291
306
|
:initenv: |+
|
292
|
-
Alias name of the
|
307
|
+
Alias name of the ”init” command.
|
293
308
|
|
294
309
|
See: rsence help init
|
295
310
|
|
296
311
|
:initialize: |+
|
297
|
-
Alias name of the
|
312
|
+
Alias name of the ”init” command.
|
298
313
|
|
299
314
|
See: rsence help init
|
300
315
|
|
301
316
|
:init: |+
|
302
|
-
usage:
|
317
|
+
usage: ”rsence init [options] [PATH]”
|
303
318
|
|
304
|
-
The
|
319
|
+
The ”init” command creates a new RSence environment.
|
305
320
|
|
306
|
-
The expected structure of a project environment (where
|
321
|
+
The expected structure of a project environment (where ”project_directory”
|
307
322
|
is the directory of your project) is:
|
308
323
|
|
309
324
|
[d] project_name : The name of your project.
|
@@ -316,7 +331,7 @@
|
|
316
331
|
[f] README : Description of the environment directory.
|
317
332
|
[f] VERSION : RSence version the environment was created with
|
318
333
|
|
319
|
-
The
|
334
|
+
The ”config.yaml” file contains patches specific to your project.
|
320
335
|
|
321
336
|
The configuration files are loaded and applied in this order:
|
322
337
|
1: [rsence_install_path]/conf/default_conf.yaml
|
@@ -334,8 +349,8 @@
|
|
334
349
|
--port <number> The port number the http server listens to.
|
335
350
|
|
336
351
|
--addr <ip address> The IP address or net mask the http server listens to.
|
337
|
-
|
338
|
-
|
352
|
+
”0.0.0.0” matches all interfaces.
|
353
|
+
”127.0.0.1” matches the local loopback interface.
|
339
354
|
Defaults to 0.0.0.0
|
340
355
|
|
341
356
|
--server <handler> The Rack handler to use. Defaults to mongrel
|
@@ -345,55 +360,55 @@
|
|
345
360
|
--database <conn_str> Use the Sequel connection string to configure the
|
346
361
|
default session database.
|
347
362
|
|
348
|
-
--uri-prefix <path> Configure RSence to use this http
|
363
|
+
--uri-prefix <path> Configure RSence to use this http ”directory” as
|
349
364
|
the prefix. It defaults to the root directory: /
|
350
365
|
|
351
|
-
--blank Doesn
|
366
|
+
--blank Doesn’t install the Welcome -plugin.
|
352
367
|
|
353
|
-
--non-interactive (-q) Doesn
|
368
|
+
--non-interactive (-q) Doesn’t ask anything, just creates the environment
|
354
369
|
with the options supplied.
|
355
370
|
|
356
371
|
For further configuration, edit the config.yaml file.
|
357
372
|
|
358
373
|
:run: |+
|
359
|
-
usage:
|
374
|
+
usage: ”rsence run [options] [PATH]”
|
360
375
|
|
361
|
-
The
|
376
|
+
The ”run” command starts RSence in foreground (no daemon). Exit with CTRL-C.
|
362
377
|
|
363
378
|
:start: |+
|
364
|
-
usage:
|
379
|
+
usage: ”rsence start [options] [PATH]”
|
365
380
|
|
366
|
-
The
|
381
|
+
The ”start” command starts RSence in the background (as a daemon).
|
367
382
|
|
368
|
-
Use the
|
383
|
+
Use the ”stop” command to stop RSence.
|
369
384
|
|
370
|
-
Use the
|
385
|
+
Use the ”restart” command to restart RSence in the background.
|
371
386
|
|
372
|
-
Use the
|
387
|
+
Use the ”status” command to see if RSence is running.
|
373
388
|
|
374
389
|
:stop: |+
|
375
|
-
usage:
|
390
|
+
usage: ”rsence stop [options] [PATH]”
|
376
391
|
|
377
|
-
The
|
392
|
+
The ”stop” command stops RSence running in the background (as a daemon).
|
378
393
|
|
379
|
-
Use the
|
394
|
+
Use the ”status” command to see if RSence is running.
|
380
395
|
|
381
396
|
:restart: |+
|
382
|
-
usage:
|
397
|
+
usage: ”rsence restart [options] [PATH]”
|
383
398
|
|
384
|
-
The
|
385
|
-
If RSence wasn
|
386
|
-
effect is the same as
|
399
|
+
The ”restart” command restarts RSence in the background (as a daemon).
|
400
|
+
If RSence wasn’t running before the ”restart” command was issued, the
|
401
|
+
effect is the same as ”start”.
|
387
402
|
|
388
|
-
Use the
|
403
|
+
Use the ”stop” command to stop RSence.
|
389
404
|
|
390
|
-
Use the
|
405
|
+
Use the ”status” command to see if RSence is running.
|
391
406
|
|
392
407
|
:status: |+
|
393
|
-
usage:
|
408
|
+
usage: ”rsence status [options] [PATH]”
|
394
409
|
|
395
|
-
The
|
396
|
-
If started with the
|
410
|
+
The ”status” command checks if RSence is running.
|
411
|
+
If started with the ”start”, ”run” or ”restart” command, a PID file is written.
|
397
412
|
Status checks if the PID file exists, if the RSence process responds and if
|
398
413
|
the configured TCP port responds in the configured IP address.
|
399
414
|
|
@@ -413,9 +428,9 @@
|
|
413
428
|
--addr <ip address> The IP address or net mask the http server listens to.
|
414
429
|
|
415
430
|
:save: |+
|
416
|
-
usage:
|
431
|
+
usage: ”rsence save [options] [PATH]”
|
417
432
|
|
418
|
-
The
|
433
|
+
The ”save” command signals the RSence process to tell the plugins to save their
|
419
434
|
data and the session manager to save its session database.
|
420
435
|
|
421
436
|
Available options:
|
@@ -430,9 +445,9 @@
|
|
430
445
|
--verbose (-v) More verbose output. Also enabled by --debug
|
431
446
|
|
432
447
|
:version: |+
|
433
|
-
usage:
|
448
|
+
usage: ”rsence version”
|
434
449
|
|
435
|
-
The
|
450
|
+
The ”version” command simply outputs the version number of RSence.
|
436
451
|
|
437
452
|
RSence follows the common three-numbered sequence-based version identification
|
438
453
|
scheme. The scheme is defined like: major.minor[.maintenance]
|
@@ -441,7 +456,7 @@
|
|
441
456
|
backwards compatibility with software written for previous versions.
|
442
457
|
|
443
458
|
The minor number designates minor changes in functionality, like minor or
|
444
|
-
moderate changes in functionality that usually don
|
459
|
+
moderate changes in functionality that usually don’t impact backwards
|
445
460
|
compatibilty of software written for a previous release with the same major
|
446
461
|
version.
|
447
462
|
|
@@ -452,14 +467,17 @@
|
|
452
467
|
requires an unique version for each gem released, so pre-releases usually
|
453
468
|
occupy the first package numbers of any release.
|
454
469
|
|
455
|
-
RSence also comes in a
|
456
|
-
anything between
|
470
|
+
RSence also comes in a ”-pre” variety. Consider RSence prereleases as
|
471
|
+
anything between ”Alpha”, ”Beta” and ”Release Candidate”. The prereleases
|
457
472
|
are have a fourth number in their version number string. That number
|
458
|
-
is the
|
473
|
+
is the ”package” or ”build” number.
|
459
474
|
|
460
475
|
Version number conventions in written text should include both major and
|
461
|
-
minor version numbers prefixed with
|
476
|
+
minor version numbers prefixed with ”RSence”. The maintennance number
|
462
477
|
is usally not mentioned unless an issue is fix or such is discussed.
|
463
478
|
|
464
|
-
|
479
|
+
Examples:
|
480
|
+
• ”RSence 2.0 is not fully backwards compatible with 1.2.1”
|
481
|
+
• ”RSence 2.1.4 has bugs fixed that were still present in 2.1.3”
|
482
|
+
• ”RSence 2.2 has major new features compared to 2.0 and 2.1”
|
465
483
|
|
data/js/comm/queue/queue.js
CHANGED
data/js/core/elem/elem.coffee
CHANGED
@@ -665,7 +665,7 @@ ELEM = HClass.extend({
|
|
665
665
|
Final phase of startup, when document is loaded
|
666
666
|
###
|
667
667
|
_init: ->
|
668
|
-
RSenceInit()
|
668
|
+
RSenceInit() if RSenceInit?
|
669
669
|
if BROWSER_TYPE.ie
|
670
670
|
@_getComputedStyle = @_getComputedStyleIE
|
671
671
|
@_setElementStyle = @_setElementStyleIE
|
data/lib/conf/argv.rb
CHANGED
@@ -83,23 +83,23 @@ module RSence
|
|
83
83
|
:http_delayed_start => nil, # --http-delayed-start
|
84
84
|
|
85
85
|
# client_pkg (not supported yet)
|
86
|
-
:client_pkg_no_gzip => false, # --
|
87
|
-
:client_pkg_no_obfuscation => false, # --
|
88
|
-
:client_pkg_no_whitespace_removal => false, # --
|
89
|
-
:
|
86
|
+
:client_pkg_no_gzip => false, # --disable-gzip
|
87
|
+
:client_pkg_no_obfuscation => false, # --disable-obfuscation
|
88
|
+
:client_pkg_no_whitespace_removal => false, # --disable-jsmin
|
89
|
+
:suppress_build_messages => true, # --build-report
|
90
90
|
|
91
91
|
}
|
92
92
|
end
|
93
93
|
|
94
94
|
def set_client_pkg_arg( arg_name )
|
95
|
-
if arg_name == '--
|
95
|
+
if arg_name == '--disable-gzip'
|
96
96
|
@args[:client_pkg_no_gzip] = true
|
97
|
-
elsif arg_name == '--
|
97
|
+
elsif arg_name == '--disable-obfuscation'
|
98
98
|
@args[:client_pkg_no_obfuscation] = true
|
99
|
-
elsif arg_name == '--
|
99
|
+
elsif arg_name == '--disable-jsmin'
|
100
100
|
@args[:client_pkg_no_whitespace_removel] = true
|
101
|
-
elsif arg_name == '--
|
102
|
-
@args[:
|
101
|
+
elsif arg_name == '--build-report'
|
102
|
+
@args[:suppress_build_messages] = false
|
103
103
|
else
|
104
104
|
invalid_option( arg_name )
|
105
105
|
end
|
@@ -152,7 +152,7 @@ module RSence
|
|
152
152
|
elsif arg == '--addr'
|
153
153
|
expect_option = true
|
154
154
|
option_name = :addr
|
155
|
-
elsif arg == '--http-delayed-start'
|
155
|
+
elsif arg == '--http-delayed-start' or arg == '--delayed-start'
|
156
156
|
expect_option = true
|
157
157
|
option_name = :http_delayed_start
|
158
158
|
elsif arg == '--server'
|
@@ -220,7 +220,7 @@ module RSence
|
|
220
220
|
@args[:autoupdate] = true
|
221
221
|
@args[:client_pkg_no_obfuscation] = true
|
222
222
|
@args[:client_pkg_no_whitespace_removal] = true
|
223
|
-
@args[:
|
223
|
+
@args[:suppress_build_messages] = false
|
224
224
|
end
|
225
225
|
|
226
226
|
# Set the verbose argument on
|
@@ -633,9 +633,26 @@ module RSence
|
|
633
633
|
end
|
634
634
|
conf_file = File.expand_path( File.join( @args[:env_path], 'conf', 'config.yaml' ) )
|
635
635
|
if File.exists?(@args[:env_path])
|
636
|
-
|
636
|
+
env_empty = true # true while entries start with a dot
|
637
|
+
env_clear = true # true while entries don't contain RSence project files
|
638
|
+
env_entries = ['conf', 'db', 'log', 'plugins', 'run', 'README', 'VERSION']
|
639
|
+
Dir.entries(@args[:env_path]).each do |entry|
|
640
|
+
next if entry.start_with?('.')
|
641
|
+
env_empty = false
|
642
|
+
if env_entries.include? entry
|
643
|
+
env_clear = false
|
644
|
+
break
|
645
|
+
end
|
646
|
+
end
|
647
|
+
unless env_clear
|
648
|
+
puts ERB.new( @@strs[:initenv][:env_not_clear] ).result( binding )
|
649
|
+
print @@strs[:initenv][:continue_question]
|
650
|
+
exit unless yesno
|
651
|
+
end
|
652
|
+
unless env_empty
|
637
653
|
puts ERB.new( @@strs[:initenv][:env_not_empty] ).result( binding )
|
638
|
-
|
654
|
+
print @@strs[:initenv][:continue_question]
|
655
|
+
exit unless yesno
|
639
656
|
end
|
640
657
|
end
|
641
658
|
|
@@ -723,7 +740,7 @@ module RSence
|
|
723
740
|
Dir.mkdir( run_dir )
|
724
741
|
unless create_blank
|
725
742
|
print @@strs[:initenv][:install_welcome]
|
726
|
-
if yesno
|
743
|
+
if yesno
|
727
744
|
welcome_plugin_dir = File.join( SERVER_PATH, 'setup', 'welcome' )
|
728
745
|
welcome_plugin_dst = File.join( plugins_dir, 'welcome' )
|
729
746
|
puts ERB.new( @@strs[:initenv][:installing_welcome_plugin] ).result( binding )
|
@@ -599,7 +599,7 @@ class ClientPkgBuild
|
|
599
599
|
@no_obfuscation = config[:no_obfuscation]
|
600
600
|
@no_whitespace_removal = config[:no_whitespace_removal]
|
601
601
|
@debug = RSence.args[:debug]
|
602
|
-
@quiet = (not RSence.args[:verbose])
|
602
|
+
@quiet = (not RSence.args[:verbose] and RSence.args[:suppress_build_messages])
|
603
603
|
@compound_config = config[:compound_packages]
|
604
604
|
end
|
605
605
|
|
data/plugins/main/main.rb
CHANGED
@@ -121,9 +121,9 @@ class MainPlugin < Plugin
|
|
121
121
|
|
122
122
|
# @private Internal structures, matches the "hello/goodbye" session termination POST request and the "/" index html page GET request
|
123
123
|
def match( uri, method )
|
124
|
-
if uri == ::RSence.config[:index_html][:respond_address] and method == :get
|
124
|
+
if uri == ::RSence.config[:index_html][:respond_address] and ( method == :get or method == :head )
|
125
125
|
return true
|
126
|
-
elsif
|
126
|
+
elsif method == :post and uri == @goodbye_uri
|
127
127
|
return true
|
128
128
|
else
|
129
129
|
return false
|
@@ -5,12 +5,5 @@
|
|
5
5
|
<style type="text/css">body{margin:0;padding:0;background-color:#ddd;font-family:Arial,sans-serif;}</style>
|
6
6
|
__SCRIPT_DEPS__
|
7
7
|
<!--[if lt IE 7]><script src="__CLIENT_BASE__/js/iefix.js"></script><![endif]-->
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
var RSenceInit = function(){
|
12
|
-
/** Runtime configuration: **/
|
13
|
-
RSence.serverConf('__CLIENT_BASE__','__CLIENT_HELLO__');
|
14
|
-
};
|
15
|
-
|
16
|
-
</script></head><body id="body"><noscript>__NOSCRIPT__</noscript></body></html>
|
8
|
+
<script>RSence.serverConf('__CLIENT_BASE__','__CLIENT_HELLO__');</script></head>
|
9
|
+
<body id="body"><noscript>__NOSCRIPT__</noscript></body></html>
|
@@ -306,9 +306,12 @@ module Common
|
|
306
306
|
if @raw_uris.include?(file_id)
|
307
307
|
(content_type,content_size,content) = @raw_uris[file_id]
|
308
308
|
elsif @files[:by_id].include?(file_id)
|
309
|
-
(content_type,content_size,content,ses_id) = @files[:by_id][file_id]
|
310
|
-
if
|
311
|
-
|
309
|
+
(content_type,content_size,content,ses_id,filename) = @files[:by_id][file_id]
|
310
|
+
if filename != nil and filename != ''
|
311
|
+
res['Content-Disposition'] = "attachment; filename=#{filename}"
|
312
|
+
end
|
313
|
+
if req.header.has_key?('Keep-Alive') and req.header['Keep-Alive'].size > 0
|
314
|
+
keep_alive = req.header['Keep-Alive'][0].to_i
|
312
315
|
keep_alive = 10 if keep_alive < 10
|
313
316
|
keep_alive = 600 if keep_alive > 600
|
314
317
|
push_keepalive_file( file_id, keep_alive )
|
data/plugins/ticket/ticket.rb
CHANGED
@@ -68,7 +68,7 @@ class TicketPlugin < Plugin
|
|
68
68
|
if request_type == :post
|
69
69
|
upload_match = uri.start_with?( broker_urls[:u] + '/')
|
70
70
|
return true if upload_match
|
71
|
-
elsif request_type == :get
|
71
|
+
elsif request_type == :get or request_type == :head
|
72
72
|
if uri.match( /^#{broker_urls[:i]}/ )
|
73
73
|
return true
|
74
74
|
elsif uri.match( /^#{broker_urls[:d]}/ )
|
@@ -219,7 +219,7 @@ class TicketPlugin < Plugin
|
|
219
219
|
# @param [String] filename The filename of the download (not the url)
|
220
220
|
#
|
221
221
|
# @return [String] Disposable URL. Destroyed after being requested.
|
222
|
-
def serve_file( msg, content='', content_type='text/plain', filename=
|
222
|
+
def serve_file( msg, content='', content_type='text/plain', filename=nil )
|
223
223
|
@ticketserve.serve_file( msg, content, content_type, filename )
|
224
224
|
end
|
225
225
|
|
metadata
CHANGED
@@ -1,75 +1,61 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence-pre
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 71
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- 28
|
11
|
+
version: 2.2.0.28
|
6
12
|
platform: ruby
|
7
|
-
authors:
|
13
|
+
authors:
|
8
14
|
- Riassence Inc.
|
9
15
|
- Juha-Jarmo Heinonen
|
10
16
|
autorequire:
|
11
17
|
bindir: bin
|
12
18
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
19
|
+
|
20
|
+
date: 2011-11-29 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
16
23
|
name: rsence-deps
|
17
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
26
|
none: false
|
19
|
-
requirements:
|
20
|
-
- - =
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
|
27
|
+
requirements:
|
28
|
+
- - "="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 1931
|
31
|
+
segments:
|
32
|
+
- 964
|
33
|
+
version: "964"
|
23
34
|
type: :runtime
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
but tigtly integrated data- and user interface frameworks.
|
29
|
-
|
30
|
-
|
35
|
+
version_requirements: *id001
|
36
|
+
description: |-
|
37
|
+
RSence is a different and unique development model and software frameworks designed first-hand for real-time web applications. RSence consists of separate, but tigtly integrated data- and user interface frameworks.
|
38
|
+
|
31
39
|
RSence could be classified as a thin server - thick client system.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
The
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
The data framework of RSence is a event-driven system, which synchronized shared
|
46
|
-
values between the client and server. It''s like a realtime bidirectional form-submission
|
47
|
-
engine that handles data changes intelligently. On the client, changed values trigger
|
48
|
-
events on user interface widgets. On the server, changed values trigger events on
|
49
|
-
value responder methods of server plugin modules. It doesn''t matter if the change
|
50
|
-
originates on client or server, it''s all synchronized and propagated automatically.
|
51
|
-
|
52
|
-
|
53
|
-
The server framework is implemented as a high-level, modular data-event-driven system,
|
54
|
-
which handles delegation of tasks impossible to implement using a client-only approach.
|
55
|
-
|
56
|
-
Client sessions are selectively connected to other client sessions and legacy back-ends
|
57
|
-
via the server by using the data framework.
|
58
|
-
|
59
|
-
|
60
|
-
The client is written in Javascript and the server is written in Ruby. The client
|
61
|
-
also supports CoffeeScript for custom logic. In many cases, no custom client logic
|
62
|
-
is needed; the user interfaces can be defined in tree-like data models. By default,
|
63
|
-
the models are parsed from YAML files, and other structured data formats are possible,
|
64
|
-
including XML, JSON, databases or any custom logic capable of producing similar
|
65
|
-
objects. The server can connect to custom environments and legacy backends accessible
|
66
|
-
on the server, including software written in other languages.'
|
40
|
+
|
41
|
+
Applications and submobules are installed as indepenent plugin bundles into the plugins folder of a RSence environment, which in itself is a self-contained bundle. A big part of RSence itself is implemented as shared plugin bundles.
|
42
|
+
|
43
|
+
The user interface framework of RSence is implemented in high-level user interface widget classes. The widget classes share a common foundation API and access the browser's native API's using an abstracted event- and element layer, which provides exceptional cross-browser compatibility.
|
44
|
+
|
45
|
+
The data framework of RSence is a event-driven system, which synchronized shared values between the client and server. It's like a realtime bidirectional form-submission engine that handles data changes intelligently. On the client, changed values trigger events on user interface widgets. On the server, changed values trigger events on value responder methods of server plugin modules. It doesn't matter if the change originates on client or server, it's all synchronized and propagated automatically.
|
46
|
+
|
47
|
+
The server framework is implemented as a high-level, modular data-event-driven system, which handles delegation of tasks impossible to implement using a client-only approach.
|
48
|
+
Client sessions are selectively connected to other client sessions and legacy back-ends via the server by using the data framework.
|
49
|
+
|
50
|
+
The client is written in Javascript and the server is written in Ruby. The client also supports CoffeeScript for custom logic. In many cases, no custom client logic is needed; the user interfaces can be defined in tree-like data models. By default, the models are parsed from YAML files, and other structured data formats are possible, including XML, JSON, databases or any custom logic capable of producing similar objects. The server can connect to custom environments and legacy backends accessible on the server, including software written in other languages.
|
67
51
|
email: info@rsence.org
|
68
|
-
executables:
|
52
|
+
executables:
|
69
53
|
- rsence-pre
|
70
54
|
extensions: []
|
55
|
+
|
71
56
|
extra_rdoc_files: []
|
72
|
-
|
57
|
+
|
58
|
+
files:
|
73
59
|
- lib/conf/argv.rb
|
74
60
|
- lib/conf/default.rb
|
75
61
|
- lib/daemon/daemon.rb
|
@@ -347,28 +333,42 @@ files:
|
|
347
333
|
- .yardopts
|
348
334
|
- bin/rsence-pre
|
349
335
|
homepage: http://www.rsence.org/
|
350
|
-
licenses:
|
336
|
+
licenses:
|
351
337
|
- GPL-3
|
352
338
|
post_install_message:
|
353
339
|
rdoc_options: []
|
354
|
-
|
340
|
+
|
341
|
+
require_paths:
|
355
342
|
- lib
|
356
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
343
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
357
344
|
none: false
|
358
|
-
requirements:
|
359
|
-
- -
|
360
|
-
- !ruby/object:Gem::Version
|
345
|
+
requirements:
|
346
|
+
- - ">="
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
hash: 57
|
349
|
+
segments:
|
350
|
+
- 1
|
351
|
+
- 8
|
352
|
+
- 7
|
361
353
|
version: 1.8.7
|
362
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
354
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
363
355
|
none: false
|
364
|
-
requirements:
|
365
|
-
- -
|
366
|
-
- !ruby/object:Gem::Version
|
356
|
+
requirements:
|
357
|
+
- - ">"
|
358
|
+
- !ruby/object:Gem::Version
|
359
|
+
hash: 25
|
360
|
+
segments:
|
361
|
+
- 1
|
362
|
+
- 3
|
363
|
+
- 1
|
367
364
|
version: 1.3.1
|
368
365
|
requirements: []
|
366
|
+
|
369
367
|
rubyforge_project: rsence-
|
370
368
|
rubygems_version: 1.8.10
|
371
369
|
signing_key:
|
372
370
|
specification_version: 3
|
373
371
|
summary: Pre-Release 2.2 version of RSence.
|
374
372
|
test_files: []
|
373
|
+
|
374
|
+
has_rdoc:
|