rsence-pre 2.1.0.21 → 2.1.8.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.
Files changed (43) hide show
  1. data/INSTALL.rdoc +61 -46
  2. data/README.rdoc +17 -1
  3. data/VERSION +1 -1
  4. data/conf/rsence_command_strings.yaml +16 -16
  5. data/js/comm/sessionwatcher/sessionwatcher.js +5 -4
  6. data/js/comm/transporter/transporter.js +62 -4
  7. data/js/comm/values/values.js +62 -0
  8. data/js/controls/button/themes/default/button.css +7 -7
  9. data/js/controls/imageview/imageview.js +15 -6
  10. data/js/controls/stringview/stringview.js +16 -2
  11. data/js/controls/textcontrol/textcontrol.js +56 -3
  12. data/js/core/elem/elem.js +38 -12
  13. data/js/datetime/timesheet/timesheet.js +141 -32
  14. data/js/datetime/timesheet_item/timesheet_item.js +82 -22
  15. data/js/foundation/application/application.js +10 -4
  16. data/js/foundation/control/control.js +5 -3
  17. data/js/foundation/control/dyncontrol/dyncontrol.js +17 -3
  18. data/js/foundation/control/eventresponder/eventresponder.js +31 -2
  19. data/js/foundation/eventmanager/eventmanager.js +202 -74
  20. data/js/foundation/json_renderer/json_renderer.js +5 -2
  21. data/js/foundation/system/system.js +13 -11
  22. data/js/foundation/view/morphanimation/morphanimation.js +9 -5
  23. data/js/foundation/view/view.js +22 -10
  24. data/js/lists/propertylist/propertylist.js +5 -0
  25. data/js/menus/minimenu/minimenu.js +3 -8
  26. data/lib/conf/default.rb +0 -3
  27. data/lib/http/broker.rb +6 -5
  28. data/lib/http/rackup.rb +3 -3
  29. data/lib/http/response.rb +28 -2
  30. data/lib/session/msg.rb +30 -18
  31. data/lib/transporter/transporter.rb +4 -0
  32. data/lib/values/hvalue.rb +4 -134
  33. data/lib/values/valuemanager.rb +36 -22
  34. data/plugins/client_pkg/lib/client_pkg_serve.rb +195 -152
  35. data/plugins/main/main.rb +8 -10
  36. data/plugins/ticket/lib/common.rb +4 -4
  37. data/plugins/ticket/lib/favicon.rb +1 -1
  38. data/plugins/ticket/lib/rsrc.rb +1 -1
  39. data/plugins/ticket/lib/upload.rb +2 -2
  40. data/plugins/ticket/ticket.rb +3 -3
  41. data/setup/welcome/gui/welcome.yaml +1 -1
  42. metadata +10 -11
  43. data/lib/util/ruby19_fixes.rb +0 -18
@@ -21,195 +21,238 @@ module ClientPkgServe
21
21
  return time.gmtime.strftime('%a, %d %b %Y %H:%M:%S %Z')
22
22
  end
23
23
 
24
- ## Responds to get-requests
25
- def get( request, response, session )
26
-
24
+ def build_busy_wait
25
+ while @build_busy
26
+ puts "-- build not finished, waiting.. --"
27
+ sleep 0.1
28
+ end
29
+ end
30
+
31
+ def set_headers( response )
27
32
  # Sets the response date header to the current time:
28
33
  response['Date'] = httime( Time.now )
29
34
 
30
35
  # Controls caching with headers based on the configuration
31
36
  if ::RSence.config[:cache_maximize]
32
37
  response['Expires'] = httime(Time.now+::RSence.config[:cache_expire])
33
-
34
38
  else
35
39
  response['Cache-Control'] = 'no-cache'
36
40
  end
37
-
38
- support_gzip = (request.header.has_key?('accept-encoding') and request.header['accept-encoding'].include?('gzip'))
41
+ end
42
+
43
+ def check_ua( request )
44
+ support_gzip = (request.header.has_key?('Accept-Encoding') and request.header['Accept-Encoding'].include?('gzip'))
39
45
  support_gzip = false if ::RSence.config[:no_gzip]
40
- if request.header.has_key?('user-agent')
41
- ua = request.header['user-agent']
46
+ if request.header.has_key?('User-Agent')
47
+ ua = request.header['User-Agent']
42
48
  is_symbian = ua.include?("SymbianOS")
43
49
  is_safari = ((not is_symbian) and ua.include?("WebKit"))
44
50
  is_msie = ((not ua.include?("Opera")) and ua.include?("MSIE"))
45
51
  is_msie6 = ((not ua.include?("Opera")) and ua.include?("MSIE 6.0"))
46
52
  end
47
-
48
- ## Split path into an array for determining what to serve
49
- request_uri = '/'+request.path.match( /^#{::RSence.config[:broker_urls][:h]}(.*)$/ )[1]
50
-
51
- request_path = request_uri.split( '/' )
52
-
53
- ## Requested type of client resource (js/themes)
54
- req_type = request_path[2]
55
-
56
- if not ['js','themes'].include? req_type
57
- req_rev = req_type
58
- req_type = request_path[3]
59
- request_path.delete_at(2)
53
+ if is_safari
54
+ version = ua.split( 'WebKit/' )[1].split('.')[0].to_i
55
+ else
56
+ version = 0 # not used for others
60
57
  end
58
+ return {
59
+ :symbian => is_symbian,
60
+ :safari => is_safari,
61
+ :msie => is_msie,
62
+ :msie6 => is_msie6,
63
+ :version => version
64
+ }
65
+ end
66
+
67
+ def support_gzip?( ua )
68
+ doesnt_support = ( ua[:msie6] or ua[:symbian] or (ua[:safari] and ua[:version] < 533) )
69
+ return ( not doesnt_support )
70
+ end
71
+
72
+ def serve_htc( request, response, request_path )
73
+ req_file = request_path[3]
61
74
 
62
- ## Special rules for the special browser
63
- if request.path.include?('.htc')
64
- req_file = request_path[3]
75
+ # this file is a part of iefix, it injects calls to
76
+ # the ie rendering engine to override stupid behavior
77
+ # when changing element properties
78
+ if request_path.include?('ie_css_element.htc')
79
+ response.status = 200
80
+ response['Content-Type'] = 'text/x-component'
81
+ ## Usually, we don't need it, because the client framework does calls when needed
82
+ response.body = %{<PUBLIC:COMPONENT lightWeight="true"></PUBLIC:COMPONENT>}
65
83
 
66
- # this file is a part of iefix, it injects calls to
67
- # the ie rendering engine to override stupid behavior
68
- # when changing element properties
69
- if request_path.include?('ie_css_element.htc')
70
- response.status = 200
71
- response['Content-Type'] = 'text/x-component'
72
- ## Usually, we don't need it, because the client framework does calls when needed
73
- response.body = %{<PUBLIC:COMPONENT lightWeight="true"></PUBLIC:COMPONENT>}
74
-
75
- ## Enable it to call iefix automatically whenever element properties are changed
76
- #response.body = %{<PUBLIC:COMPONENT lightWeight="true">\r\n<script type="text/javascript">\r\ntry{element.attachEvent("onpropertychange",iefix.htcElementEntry);}catch(e){}\r\n</script>\r\n</PUBLIC:COMPONENT>}
84
+ ## Enable it to call iefix automatically whenever element properties are changed
85
+ #response.body = %{<PUBLIC:COMPONENT lightWeight="true">\r\n<script type="text/javascript">\r\ntry{element.attachEvent("onpropertychange",iefix.htcElementEntry);}catch(e){}\r\n</script>\r\n</PUBLIC:COMPONENT>}
86
+
87
+ # this file is a part of iefix, it injects calls to
88
+ # the ie rendering engine to override stupid behavior
89
+ # when changing style properties
90
+ elsif request_path.include?('ie_css_style.htc')
91
+ response.status = 200
92
+ response['Content-Type'] = 'text/x-component'
77
93
 
78
- # this file is a part of iefix, it injects calls to
79
- # the ie rendering engine to override stupid behavior
80
- # when changing style properties
81
- elsif request_path.include?('ie_css_style.htc')
82
- response.status = 200
83
- response['Content-Type'] = 'text/x-component'
84
-
85
- ## Usually, we don't need it, because the client framework does calls when needed
86
- response.body = %{<PUBLIC:COMPONENT lightWeight="true"></PUBLIC:COMPONENT>}
87
-
88
- ## Enable it to call iefix automatically whenever element properties are changed
89
- #response.body = %{<PUBLIC:COMPONENT lightWeight="true">\r\n<script type="text/javascript">\r\ntry{element.attachEvent("onreadystatechange",iefix.htcStyleEntry);}catch(e){}\r\n</script>\r\n</PUBLIC:COMPONENT>}
94
+ ## Usually, we don't need it, because the client framework does calls when needed
95
+ response.body = %{<PUBLIC:COMPONENT lightWeight="true"></PUBLIC:COMPONENT>}
90
96
 
91
- # Other htc requests are invalid
92
- else
93
- response.status = 503
94
- response.body = '503 - Invalid Request'
95
- end
96
-
97
- ## Serve compiled client javascript component files:
98
- elsif req_type == 'js'
97
+ ## Enable it to call iefix automatically whenever element properties are changed
98
+ #response.body = %{<PUBLIC:COMPONENT lightWeight="true">\r\n<script type="text/javascript">\r\ntry{element.attachEvent("onreadystatechange",iefix.htcStyleEntry);}catch(e){}\r\n</script>\r\n</PUBLIC:COMPONENT>}
99
+
100
+ # Other htc requests are invalid
101
+ else
102
+ response.status = 503
103
+ response.body = '503 - Invalid Request'
104
+ end
105
+ end
106
+
107
+ def serve_js( request, response, request_path, ua )
108
+ # the file-specific identifier ('core', 'basic' etc)
109
+ req_file = request_path[3][0..-4]
110
+
111
+ if not @client_cache.js_cache.has_key?( req_file )
112
+ response.status = 404
113
+ response.body = '/* 404 - Not Found */'
114
+ else
99
115
 
116
+ response.status = 200
117
+ response['Content-Type'] = 'text/javascript; charset=utf-8'
100
118
 
101
- # the file-specific identifier ('core', 'basic' etc)
102
- req_file = request_path[3][0..-4]
119
+ # these browsers have issues with gzipped js content
120
+ support_gzip = support_gzip?( ua )
103
121
 
104
- if not @client_cache.js_cache.has_key?( req_file )
105
- response.status = 404
106
- response.body = '/* 404 - Not Found */'
122
+ if support_gzip
123
+ #response['Transfer-Encoding'] = 'chunked,gzip'
124
+ response['Last-Modified'] = @client_cache.last_modified
125
+ body = @client_cache.gz_cache[ req_file ]+"\r\n\r\n"
126
+ response['Content-Length'] = body.bytesize.to_s
127
+ response['Content-Encoding'] = 'gzip'
128
+ response.body = body
107
129
  else
108
130
 
109
- response.status = 200
110
- response.content_type = 'text/javascript; charset=utf-8'
111
-
112
- # these browsers have issues with gzipped js content
113
- support_gzip = false if (is_safari or is_msie or is_symbian)
131
+ response['Last-Modified'] = @client_cache.last_modified
132
+ body = @client_cache.js_cache[ req_file ]
133
+ response['Content-Length'] = body.bytesize.to_s
134
+ response.body = body
114
135
 
115
- if support_gzip
116
- #response['Transfer-Encoding'] = 'chunked,gzip'
117
- response['Last-Modified'] = @client_cache.last_modified
118
- body = @client_cache.gz_cache[ req_file ]+"\r\n\r\n"
119
- response['Content-Length'] = body.length.to_s
120
- response['Content-Encoding'] = 'gzip'
121
- response.body = body
122
- else
123
-
124
- response['Last-Modified'] = @client_cache.last_modified
125
- body = @client_cache.js_cache[ req_file ]
126
- response['Content-Length'] = body.length.to_s
127
- response.body = body
128
-
129
- end
130
136
  end
137
+ end
138
+ end
139
+
140
+ def serve_theme( request, response, request_path, ua )
141
+ # Get the name of the theme
142
+ theme_name = request_path[3]
131
143
 
132
- ## Serve client theme files
133
- elsif req_type == 'themes'
134
-
135
- # Get the name of the theme
136
- theme_name = request_path[3]
137
-
138
- # Get the theme resource type (html/css/gfx)
139
- theme_part = request_path[4].to_sym
140
-
141
- # Get the theme resource identifier
142
- req_file = request_path[5]
143
-
144
- # checks for theme name
145
- has_theme = @client_cache.theme_cache.has_key?( theme_name )
146
-
147
- # checks for theme part (css/html/gfx)
148
- has_theme_part = has_theme and @client_cache.theme_cache[theme_name].has_key?( theme_part )
149
-
144
+ # Get the theme resource type (html/css/gfx)
145
+ theme_part = request_path[4].to_sym
146
+
147
+ # Get the theme resource identifier
148
+ req_file = request_path[5]
149
+
150
+ # checks for theme name
151
+ has_theme = @client_cache.theme_cache.has_key?( theme_name )
152
+
153
+ # checks for theme part (css/html/gfx)
154
+ has_theme_part = ( has_theme and @client_cache.theme_cache[theme_name].has_key?( theme_part ) )
155
+
156
+ # checks for theme file
157
+ has_theme_file = ( has_theme_part and @client_cache.theme_cache[theme_name][theme_part].has_key?( req_file ) )
158
+
159
+ if not has_theme_file and req_file == 'common.css'
160
+ response.status = 200
161
+ response['Content-Type'] = 'text/css'
162
+ response.body = ''
163
+ end
164
+
165
+ if not has_theme
166
+ response.status = 404
167
+ response.body = '404 - Theme Not Found'
168
+ puts "Theme #{theme_name} not found, avail: #{@client_cache.theme_cache.keys.join(', ')}" if RSence.args[:verbose]
169
+ elsif not has_theme_part
170
+ response.status = 503
171
+ response.body = '503 - Invalid Theme Part Request'
172
+ elsif not has_theme_file
173
+ response.status = 404
174
+ response.body = '404 - Theme Resource Not Found'
175
+ puts "File not found, avail: #{@client_cache.theme_cache[theme_name][theme_part].keys.join(', ')}" if RSence.args[:verbose]
176
+ else
150
177
 
151
- # puts "has_theme_part: #{@client_cache.theme_cache[theme_name][theme_part.to_sym].inspect}"
152
- # checks for theme file
153
- has_theme_file = has_theme_part and @client_cache.theme_cache[theme_name][theme_part].has_key?( req_file )
178
+ response.status = 200
154
179
 
180
+ file_ext = req_file.split('.')[-1]
181
+ response['Content-Type'] = {
182
+ 'html' => 'text/html; charset=utf-8',
183
+ 'css' => 'text/css; charset=utf-8',
184
+ 'png' => 'image/png',
185
+ 'jpg' => 'image/jpeg',
186
+ 'gif' => 'image/gif',
187
+ 'swf' => 'application/x-shockwave-flash'
188
+ }[file_ext]
155
189
 
156
- if not has_theme_file and req_file == 'common.css'
157
- response.status = 200
158
- response.content_type = 'text/css'
159
- response.body = ''
190
+ if theme_part == :gfx
191
+ support_gzip = false
192
+ else
193
+ support_gzip = support_gzip?( ua )
160
194
  end
161
195
 
162
- if not has_theme
163
- response.status = 404
164
- response.body = '404 - Theme Not Found'
165
- puts "Theme #{theme_name} not found, avail: #{@client_cache.theme_cache.keys.join(', ')}" if RSence.args[:verbose]
166
- elsif not has_theme_part
167
- response.status = 503
168
- response.body = '503 - Invalid Theme Part Request'
169
- elsif not has_theme_file
170
- response.status = 404
171
- response.body = '404 - Theme Resource Not Found'
172
- puts "File not found, avail: #{@client_cache.theme_cache[theme_name][theme_part].keys.join(', ')}" if RSence.args[:verbose]
196
+ if support_gzip
197
+ response['Last-Modified'] = @client_cache.last_modified
198
+ body = @client_cache.theme_cache[theme_name][theme_part][ req_file+'.gz' ]
199
+ response['Content-Length'] = body.bytesize.to_s
200
+ response['Content-Encoding'] = 'gzip'
201
+ response.body = body
173
202
  else
174
203
 
175
- response.status = 200
176
-
177
- file_ext = req_file.split('.')[-1]
178
- response.content_type = {
179
- 'html' => 'text/html; charset=utf-8',
180
- 'css' => 'text/css; charset=utf-8',
181
- 'png' => 'image/png',
182
- 'jpg' => 'image/jpeg',
183
- 'gif' => 'image/gif',
184
- 'swf' => 'application/x-shockwave-flash'
185
- }[file_ext]
186
-
187
- support_gzip = false if theme_part == :gfx
188
- support_gzip = false if (is_safari or is_msie or is_symbian)
189
-
190
- if support_gzip
191
- response['Last-Modified'] = @client_cache.last_modified
192
- body = @client_cache.theme_cache[theme_name][theme_part][ req_file+'.gz' ]
193
- response['Content-Length'] = body.length.to_s
194
- response['Content-Encoding'] = 'gzip'
195
- response.body = body
196
- else
197
-
198
- # Special IE6 condition to serve gifs instead of png's, because it works much better
199
- # than using the ActiveX alpha filter hack
200
- if is_msie6 and req_file[-4..-1] == '.png'
201
- ie6_req_png2gif = req_file.gsub('.png','-ie6.gif')
202
- req_file = ie6_req_png2gif if @client_cache.theme_cache[theme_name][theme_part].include?(ie6_req_png2gif)
203
- end
204
-
205
- response['Last-Modified'] = @client_cache.last_modified
206
- body = @client_cache.theme_cache[theme_name][theme_part][ req_file ]
207
- response['Content-Length'] = body.length.to_s
208
- response.body = body
209
-
204
+ # Special IE6 condition to serve gifs instead of png's, because it works much better
205
+ # than using the ActiveX alpha filter hack
206
+ if ua[:msie6] and req_file[-4..-1] == '.png'
207
+ ie6_req_png2gif = req_file.gsub('.png','-ie6.gif')
208
+ req_file = ie6_req_png2gif if @client_cache.theme_cache[theme_name][theme_part].include?(ie6_req_png2gif)
210
209
  end
211
- end
212
210
 
211
+ response['Last-Modified'] = @client_cache.last_modified
212
+ body = @client_cache.theme_cache[theme_name][theme_part][ req_file ]
213
+ if body.nil?
214
+ warn "ClientPkgServe#get: empty body for #{request.path}"
215
+ body = ''
216
+ end
217
+ response['Content-Length'] = body.bytesize.to_s
218
+ response.body = body
219
+
220
+ end
221
+ end
222
+ end
223
+
224
+ ## Responds to get-requests
225
+ def get( request, response, session )
226
+
227
+ build_busy_wait
228
+
229
+ ua = check_ua( request )
230
+
231
+ set_headers( response )
232
+
233
+ ## Split path into an array for determining what to serve
234
+ request_uri = '/'+request.path.match( /^#{::RSence.config[:broker_urls][:h]}(.*)$/ )[1]
235
+
236
+ request_path = request_uri.split( '/' )
237
+
238
+ ## Requested type of client resource (js/themes)
239
+ req_type = request_path[2]
240
+
241
+ unless ['js','themes'].include? req_type
242
+ req_rev = req_type
243
+ req_type = request_path[3]
244
+ request_path.delete_at(2)
245
+ end
246
+
247
+ ## Special rules for the special browser
248
+ if request.path.end_with?('.htc')
249
+ serve_htc( request, response, request_path )
250
+ ## Serve compiled client javascript component files:
251
+ elsif req_type == 'js'
252
+ serve_js( request, response, request_path, ua )
253
+ ## Serve client theme files
254
+ elsif req_type == 'themes'
255
+ serve_theme( request, response, request_path, ua )
213
256
  end
214
257
 
215
258
  end
data/plugins/main/main.rb CHANGED
@@ -154,11 +154,11 @@ class MainPlugin < Plugin
154
154
  gzwriter = Zlib::GzipWriter.new( index_gzip, 9 )
155
155
  gzwriter.write( index_html )
156
156
  gzwriter.close
157
- response['Content-Length'] = index_gzip.length
157
+ response['Content-Length'] = index_gzip.bytesize.to_s
158
158
  response['Content-Encoding'] = 'gzip'
159
159
  response.body = index_gzip
160
160
  else
161
- response['Content-Length'] = index_html.length
161
+ response['Content-Length'] = index_html.bytesize.to_s
162
162
  response.body = index_html
163
163
  end
164
164
  end
@@ -229,14 +229,14 @@ class MainPlugin < Plugin
229
229
 
230
230
 
231
231
  # New session initialization, called just once per session.
232
- def init_ses(msg)
232
+ def init_ses( msg )
233
233
  super
234
234
  restore_ses( msg )
235
235
  end
236
236
 
237
237
 
238
238
  # Called once when a session is restored or cloned using the cookie's ses_key
239
- def restore_ses(msg)
239
+ def restore_ses( msg )
240
240
  super
241
241
  ## Resets session data to defaults
242
242
  ses = get_ses( msg )
@@ -282,16 +282,15 @@ class MainPlugin < Plugin
282
282
  ## url_responder is bound in the client-space
283
283
  ## to tell the server its status by updating its value
284
284
  location_href_id = ses[:location_href].val_id.to_json
285
- msg.reply "COMM.Values.values[#{location_href_id}].bind(COMM.urlResponder);"
285
+ msg.reply "try{COMM.Values.values[#{location_href_id}].bind(COMM.urlResponder);}catch(e){console.log('urlResponder failed, reason:',e);}"
286
286
 
287
- ## This enables SesWatcher that changes :client_time every 60 seconds.
288
- ## It makes the client to poll the server on regular intervals, when polling mode
289
- ## is disabled.
287
+ ## This enables SesWatcher that changes :client_time every n seconds, which depends on the server_poll_interval configuration setting.
288
+ ## It makes the client to poll the server on regular intervals, when polling mode is disabled.
290
289
  # 5000ms = 5secs
291
290
 
292
291
  client_time_id = ses[:client_time].val_id.to_json
293
292
  poll_interval = ::RSence.config[:main_plugin][:server_poll_interval]
294
- msg.reply "sesWatcher = COMM.SessionWatcher.nu(#{poll_interval},#{client_time_id});"
293
+ msg.reply "try{window.sesWatcher=COMM.SessionWatcher.nu(#{poll_interval},#{client_time_id});}catch(e){console.log('sesWatcher failed, reason:',e);}"
295
294
 
296
295
  end
297
296
 
@@ -392,7 +391,6 @@ class MainPlugin < Plugin
392
391
  def idle(msg)
393
392
 
394
393
  ses = get_ses( msg )
395
-
396
394
  if ses[:boot] == 0
397
395
  boot0( msg, ses )
398
396
  elsif ses[:boot] == 1
@@ -156,7 +156,7 @@ module Common
156
156
  (content_type, filename) = format
157
157
 
158
158
  # content size for the header
159
- content_size = content.size.to_s
159
+ content_size = content.bytesize.to_s
160
160
 
161
161
  storage_hash = @files
162
162
  storage_arr = [content_type,content_size,content,msg.ses_id,filename]
@@ -270,7 +270,7 @@ module Common
270
270
  }
271
271
 
272
272
  # content size for the header
273
- content_size = content.size.to_s
273
+ content_size = content.bytesize.to_s
274
274
 
275
275
  # content type for the header
276
276
  content_type = @content_types[format]
@@ -335,12 +335,12 @@ module Common
335
335
  end
336
336
  if @raw_uris.include?(blobobj_id)
337
337
  content_type = @raw_uris[blobobj_id].mime
338
- content_size = @raw_uris[blobobj_id].size
338
+ content_size = @raw_uris[blobobj_id].bytesize
339
339
  content = @raw_uris[blobobj_id].data
340
340
  elsif @blob_objs[:by_id].include?(blobobj_id)
341
341
  (ses_id, blobobj) = @blob_objs[:by_id][blobobj_id]
342
342
  content_type = blobobj.mime
343
- content_size = blobobj.size
343
+ content_size = blobobj.bytesize
344
344
  content = blobobj.data
345
345
  if req.header.has_key?('keep-alive') and req.header['keep-alive'].size > 0
346
346
  keep_alive = req.header['keep-alive'][0].to_i
@@ -30,7 +30,7 @@ module Favicon
30
30
  # Sets favicon. First parameter is favicon data and the second one is content type which defaults to false.
31
31
  def set_favicon( ico_data, content_type=false )
32
32
  @raw_uris['favicon.ico'][0] = content_type if content_type
33
- @raw_uris['favicon.ico'][1] = ico_data.size.to_s
33
+ @raw_uris['favicon.ico'][1] = ico_data.bytesize.to_s
34
34
  @raw_uris['favicon.ico'][2] = ico_data
35
35
 
36
36
  end
@@ -23,7 +23,7 @@ module Rsrc
23
23
  rsrc_id = @randgen.gen
24
24
  #puts "rsrc_id: #{rsrc_id.inspect}"
25
25
 
26
- content_size = content.size.to_s
26
+ content_size = content.bytesize.to_s
27
27
 
28
28
  @raw_uris[rsrc_id] = [content_type,content_size,content]
29
29
 
@@ -176,8 +176,8 @@ create table rsence_uploads (
176
176
  }
177
177
 
178
178
  response.status = 200
179
- response['content-type'] = 'text/html; charset=UTF-8'
180
- response['content-length'] = response_body.size.to_s
179
+ response['Content-Type'] = 'text/html; charset=UTF-8'
180
+ response['Content-Length'] = response_body.bytesize.to_s
181
181
  response.body = response_body
182
182
  end
183
183
 
@@ -110,8 +110,8 @@ class TicketPlugin < Plugin
110
110
  puts "/U/iframe_html: #{uri.inspect}" if RSence.args[:verbose]
111
111
  res.status = 200
112
112
  http_body = '<html><head><title>Empty Iframe for Uploading</title></head><body></body></html>'
113
- res['content-type'] = 'text/html; charset=UTF-8'
114
- res['content-length'] = http_body.size.to_s
113
+ res['Content-Type'] = 'text/html; charset=UTF-8'
114
+ res['Content-Length'] = http_body.bytesize.to_s
115
115
  res.body = http_body
116
116
  end
117
117
  end
@@ -158,7 +158,7 @@ class TicketPlugin < Plugin
158
158
 
159
159
  # @return [Number] The size (in bytes) of the data
160
160
  def size
161
- return @data.size
161
+ return @data.bytesize
162
162
  end
163
163
 
164
164
  # Implement, if you need to do cleanup before destructing
@@ -18,7 +18,7 @@ dependencies:
18
18
  class: RSence.GUIApp
19
19
  # Each class takes a number of options for its constructor.
20
20
  options:
21
- title: Welcome App
21
+ label: Welcome App
22
22
  # The subviews use the class defined above as their parent component.
23
23
  subviews:
24
24
  # The sheet is used as the main visual container for the gui in this app.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsence-pre
3
3
  version: !ruby/object:Gem::Version
4
- hash: 77
5
- prerelease: false
4
+ hash: 71
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
+ - 8
9
10
  - 0
10
- - 21
11
- version: 2.1.0.21
11
+ version: 2.1.8.0
12
12
  platform: ruby
13
13
  authors:
14
14
  - Riassence Inc.
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-12-01 00:00:00 +02:00
19
+ date: 2011-01-18 00:00:00 +02:00
20
20
  default_executable: rsence-pre
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -27,14 +27,14 @@ dependencies:
27
27
  requirements:
28
28
  - - "="
29
29
  - !ruby/object:Gem::Version
30
- hash: 1919
30
+ hash: 1925
31
31
  segments:
32
- - 958
33
- version: "958"
32
+ - 963
33
+ version: "963"
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  description: |
37
- RSence is a RIA framework designed for responsive GUI applications on the web.
37
+ RSence is a RIA ("HTML5" or "Ajax" if you like those terms better) framework designed for responsive GUI applications on the web.
38
38
 
39
39
  RSence is a flexible and high-performance RIA framework aimed on building responsive, scalable and over-all as high-performance GUI Applications as possible with the chosen technologies.
40
40
 
@@ -77,7 +77,6 @@ files:
77
77
  - lib/session/sessionstorage.rb
78
78
  - lib/transporter/transporter.rb
79
79
  - lib/util/gzstring.rb
80
- - lib/util/ruby19_fixes.rb
81
80
  - lib/values/hvalue.rb
82
81
  - lib/values/valuemanager.rb
83
82
  - setup/welcome/gui/welcome.yaml
@@ -408,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
408
407
  requirements: []
409
408
 
410
409
  rubyforge_project: rsence-
411
- rubygems_version: 1.3.7
410
+ rubygems_version: 1.4.1
412
411
  signing_key:
413
412
  specification_version: 3
414
413
  summary: Pre-Release 2.1 version of the RSence framework.
@@ -1,18 +0,0 @@
1
-
2
- # NOTE: Ruby 1.9 isn't fully supported yet.
3
- # There are some encoding handlers and some of the dependencies are not fully working yet.
4
- # One should wait for Ruby 2.0 for production use anyway.
5
-
6
- # Ruby 1.9 encoding defaults.
7
- # This is clearly not enough but a good start for fixing the encoding madness.
8
- Encoding.default_external = Encoding::BINARY
9
- Encoding.default_internal = Encoding::BINARY
10
-
11
- # Ruby 1.9 doesn't have String#each anymore.
12
- # This is a backwards-compatible work-around.
13
- class String
14
- def each
15
- self.split($/).each { |e| yield e }
16
- end
17
- end
18
-