rsence 2.0.0.10.pre → 2.0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/.yardopts +10 -0
  2. data/INSTALL.rdoc +52 -86
  3. data/{LICENSE → LICENSE.txt} +0 -0
  4. data/README.rdoc +52 -49
  5. data/VERSION +1 -1
  6. data/bin/rsence +4 -6
  7. data/conf/default_conf.yaml +314 -305
  8. data/conf/default_strings.yaml +70 -71
  9. data/docs/ExampleGuiPlugin.rdoc +193 -0
  10. data/{js/comm/comm/autosync/js.inc → docs/JavascriptBundles.rdoc} +0 -0
  11. data/docs/PluginBundleInfo.rdoc +173 -0
  12. data/docs/PluginBundles.rdoc +96 -0
  13. data/docs/Values.rdoc +163 -0
  14. data/js/comm/{comm/autosync → autosync}/autosync.js +1 -2
  15. data/js/comm/{comm → autosync}/js.inc +0 -0
  16. data/js/comm/{comm/comm.js → comm.js} +1 -0
  17. data/js/comm/{comm/queue/js.inc → js.inc} +0 -0
  18. data/js/comm/jsloader/jsloader.js +2 -4
  19. data/js/comm/{comm/session → queue}/js.inc +0 -0
  20. data/js/comm/{comm/queue → queue}/queue.js +1 -0
  21. data/js/comm/{comm/sessionwatcher → session}/js.inc +0 -0
  22. data/js/comm/{comm/session → session}/session.js +4 -3
  23. data/js/comm/{comm/transporter → sessionwatcher}/js.inc +0 -0
  24. data/js/comm/{comm/sessionwatcher → sessionwatcher}/sessionwatcher.js +1 -0
  25. data/js/comm/{comm/urlresponder → transporter}/js.inc +0 -0
  26. data/js/comm/{comm/transporter → transporter}/transporter.js +1 -0
  27. data/js/comm/{comm/values → urlresponder}/js.inc +0 -0
  28. data/js/comm/{comm/urlresponder → urlresponder}/urlresponder.js +1 -0
  29. data/js/comm/{reloadapp → values}/js.inc +0 -0
  30. data/js/comm/{comm/values → values}/values.js +1 -0
  31. data/js/controls/button/button.js +10 -1
  32. data/js/controls/checkbox/checkbox.js +2 -0
  33. data/js/controls/dialogs/alert_sheet/alert_sheet.js +1 -0
  34. data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +1 -0
  35. data/js/controls/dialogs/sheet/sheet.js +1 -0
  36. data/js/controls/imageview/imageview.js +1 -0
  37. data/js/controls/passwordcontrol/passwordcontrol.js +1 -0
  38. data/js/controls/progress/progressbar/progressbar.js +1 -0
  39. data/js/controls/progress/progressindicator/progressindicator.js +1 -0
  40. data/js/controls/radiobutton/radiobutton.js +3 -1
  41. data/js/controls/sliders/slider/slider.js +1 -0
  42. data/js/controls/sliders/vslider/vslider.js +1 -0
  43. data/js/controls/stepper/stepper.js +1 -0
  44. data/js/controls/stringview/stringview.js +2 -2
  45. data/js/controls/tab/tab.js +7 -5
  46. data/js/controls/textarea/textarea.js +1 -0
  47. data/js/controls/textcontrol/textcontrol.js +3 -1
  48. data/js/controls/uploader/uploader.js +1 -0
  49. data/js/controls/validatorview/validatorview.js +62 -59
  50. data/js/controls/window/window.js +1 -0
  51. data/js/core/class/class.js +2 -1
  52. data/js/core/elem/elem.js +27 -27
  53. data/js/core/event/event.js +3 -874
  54. data/js/{comm/sha → core/rsence_ns}/js.inc +0 -0
  55. data/js/core/rsence_ns/rsence_ns.js +15 -0
  56. data/js/{controls/datetime → datetime}/calendar/calendar.js +1 -0
  57. data/js/{comm/values/value → datetime/calendar}/js.inc +0 -0
  58. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar.css +0 -0
  59. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar.html +0 -0
  60. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar_arrows-ie6.gif +0 -0
  61. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar_arrows.png +0 -0
  62. data/js/{controls/datetime → datetime}/datetimevalue/datetimevalue.js +1 -0
  63. data/js/{comm/values/valuematrix → datetime/datetimevalue}/js.inc +0 -0
  64. data/js/{controls/datetime/calendar → datetime/timesheet}/js.inc +0 -0
  65. data/js/{controls/datetime → datetime}/timesheet/themes/default/timesheet.css +0 -0
  66. data/js/{controls/datetime → datetime}/timesheet/themes/default/timesheet.html +0 -0
  67. data/js/{controls/datetime → datetime}/timesheet/timesheet.js +1 -0
  68. data/js/{controls/datetime/datetimevalue → datetime/timesheet_item}/js.inc +0 -0
  69. data/js/{controls/datetime → datetime}/timesheet_item/themes/default/timesheet_item.css +0 -0
  70. data/js/{controls/datetime → datetime}/timesheet_item/themes/default/timesheet_item.html +0 -0
  71. data/js/{controls/datetime → datetime}/timesheet_item/timesheet_item.js +1 -0
  72. data/js/{controls/datetime/timesheet → datetime/timesheet_item_edit}/js.inc +0 -0
  73. data/js/{controls/datetime → datetime}/timesheet_item_edit/timesheet_item_edit.js +1 -1
  74. data/js/foundation/application/application.js +1 -2
  75. data/js/foundation/control/control.js +1 -4
  76. data/js/foundation/control/controldefaults/controldefaults.js +1 -4
  77. data/js/foundation/control/dummyvalue/dummyvalue.js +1 -0
  78. data/js/foundation/control/dyncontrol/dyncontrol.js +1 -2
  79. data/js/foundation/control/eventresponder/eventresponder.js +11 -3
  80. data/js/{controls/datetime/timesheet_item → foundation/control/valuematrix}/js.inc +0 -0
  81. data/js/{comm/values → foundation/control}/valuematrix/valuematrix.js +2 -5
  82. data/js/foundation/control/valueresponder/valueresponder.js +3 -1
  83. data/js/foundation/eventmanager/eventmanager.js +884 -0
  84. data/js/{controls/datetime/timesheet_item_edit → foundation/eventmanager}/js.inc +0 -0
  85. data/js/foundation/geom/point/point.js +2 -2
  86. data/js/foundation/geom/rect/rect.js +1 -0
  87. data/js/foundation/json_renderer/json_renderer.js +2 -0
  88. data/js/foundation/system/system.js +2 -1
  89. data/js/foundation/thememanager/thememanager.js +29 -23
  90. data/js/{controls/lists/checkboxlist → foundation/value}/js.inc +0 -0
  91. data/js/{comm/values → foundation}/value/value.js +1 -0
  92. data/js/foundation/view/markupview/markupview.js +2 -1
  93. data/js/foundation/view/morphanimation/morphanimation.js +1 -0
  94. data/js/foundation/view/view.js +6 -12
  95. data/js/foundation/view/viewdefaults/viewdefaults.js +1 -0
  96. data/js/{controls/lists → lists}/checkboxlist/checkboxlist.js +1 -0
  97. data/js/{controls/lists/listitems → lists/checkboxlist}/js.inc +0 -0
  98. data/js/{controls/lists/radiobuttonlist → lists/listitems}/js.inc +0 -0
  99. data/js/{controls/lists → lists}/listitems/listitems.js +22 -3
  100. data/js/lists/radiobuttonlist/js.inc +0 -0
  101. data/js/{controls/lists → lists}/radiobuttonlist/radiobuttonlist.js +2 -12
  102. data/js/util/reloadapp/js.inc +0 -0
  103. data/js/{comm → util}/reloadapp/reloadapp.js +10 -8
  104. data/js/{comm → util}/reloadapp/themes/default/reloadapp_warning-ie6.gif +0 -0
  105. data/js/{comm → util}/reloadapp/themes/default/reloadapp_warning.png +0 -0
  106. data/js/util/sha/js.inc +0 -0
  107. data/js/{comm → util}/sha/sha.js +27 -33
  108. data/js/views/centerview/centerview.js +33 -3
  109. data/js/views/inlineview/inlineview.js +1 -0
  110. data/js/views/scrollview/scrollview.js +1 -0
  111. data/lib/conf/argv.rb +34 -22
  112. data/lib/conf/default.rb +165 -173
  113. data/lib/daemon/daemon.rb +9 -9
  114. data/lib/daemon/sigcomm.rb +4 -4
  115. data/lib/http/broker.rb +30 -27
  116. data/lib/http/rackup.rb +2 -3
  117. data/lib/http/request.rb +1 -2
  118. data/lib/http/response.rb +10 -10
  119. data/lib/plugins/dependencies.rb +2 -1
  120. data/lib/plugins/gui_plugin.rb +77 -50
  121. data/lib/plugins/guiparser.rb +26 -22
  122. data/lib/plugins/plugin.rb +207 -427
  123. data/lib/plugins/plugin_base.rb +162 -0
  124. data/lib/plugins/plugin_plugins.rb +21 -15
  125. data/lib/plugins/plugin_sqlite_db.rb +45 -20
  126. data/lib/plugins/pluginmanager.rb +10 -5
  127. data/lib/plugins/plugins.rb +65 -31
  128. data/lib/plugins/servlet.rb +74 -26
  129. data/lib/rsence.rb +32 -0
  130. data/lib/session/msg.rb +131 -96
  131. data/lib/session/sessionmanager.rb +5 -4
  132. data/lib/session/sessionstorage.rb +4 -3
  133. data/lib/transporter/transporter.rb +30 -21
  134. data/lib/util/gzstring.rb +4 -2
  135. data/lib/util/ruby19_fixes.rb +18 -0
  136. data/lib/values/hvalue.rb +139 -88
  137. data/lib/values/valuemanager.rb +60 -46
  138. data/plugins/client_pkg/client_pkg.rb +6 -5
  139. data/plugins/client_pkg/lib/client_pkg_build.rb +5 -5
  140. data/plugins/client_pkg/lib/client_pkg_serve.rb +8 -0
  141. data/plugins/index_html/index_html.rb +3 -1
  142. data/plugins/index_html/tmpl/index.html +2 -3
  143. data/plugins/main/js/main.js +84 -0
  144. data/plugins/main/main.rb +54 -27
  145. data/plugins/ticket/lib/common.rb +4 -2
  146. data/plugins/ticket/lib/favicon.rb +3 -2
  147. data/plugins/ticket/lib/file.rb +2 -2
  148. data/plugins/ticket/lib/img.rb +2 -2
  149. data/plugins/ticket/lib/objblob.rb +2 -2
  150. data/plugins/ticket/lib/rsrc.rb +2 -2
  151. data/plugins/ticket/lib/upload.rb +9 -8
  152. data/plugins/ticket/ticket.rb +141 -8
  153. data/setup/welcome/welcome.rb +1 -0
  154. metadata +76 -72
  155. data/lib/plugins/plugin_util.rb +0 -107
  156. data/plugins/index_html/tmpl/startup_index.html +0 -29
  157. data/plugins/main/js/riassence_ns.js +0 -87
  158. data/setup/legacy/info.yaml +0 -18
  159. data/setup/legacy/legacy.rb +0 -17
  160. data/setup/welcome/gui/welcome.yaml +0 -68
  161. data/setup/welcome/text/welcome.html +0 -8
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,9 +5,12 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
9
+
10
+ # @private Inner workings of Ticket
11
11
  module TicketService
12
+
13
+ # @private Inner workings of Ticket
12
14
  module Common
13
15
 
14
16
  def initialize
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,10 +5,12 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
11
9
 
10
+
11
+ # @private Inner workings of Ticket
12
12
  module TicketService
13
+ # @private Inner workings of Ticket
13
14
  module Favicon
14
15
 
15
16
  def favicon( req, res ) # :nodoc:
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,10 +5,11 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
11
9
 
10
+ # @private Inner workings of Ticket
12
11
  module TicketService
12
+ # @private Inner workings of Ticket
13
13
  module TicketFile
14
14
 
15
15
  # Removes other disposable data and references. File removed by file_id
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,10 +5,11 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
11
9
 
10
+ # @private Inner workings of Ticket
12
11
  module TicketService
12
+ # @private Inner workings of Ticket
13
13
  module Img
14
14
 
15
15
  # Removes image data and references. Image is removed with
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,10 +5,11 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
11
9
 
10
+ # @private Inner workings of Ticket
12
11
  module TicketService
12
+ # @private Inner workings of Ticket
13
13
  module ObjBlob
14
14
 
15
15
  # Serves a blob object. Will expire by default. Returns ID as URI.
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,10 +5,11 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
11
9
 
10
+ # @private Inner workings of Ticket
12
11
  module TicketService
12
+ # @private Inner workings of Ticket
13
13
  module Rsrc
14
14
 
15
15
  # Removes static data by ID.
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,9 +5,17 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
10
8
 
11
9
 
10
+
11
+ require 'sequel'
12
+
13
+ # @private Inner workings of Ticket
14
+ module TicketService
15
+
16
+ # @private Inner workings of Ticket
17
+ module Upload
18
+
12
19
  =begin
13
20
 
14
21
  Handles uploads by using tickets and other filters.
@@ -41,12 +48,6 @@ create table rsence_uploads (
41
48
  file_data mediumblob
42
49
  )
43
50
  =end
44
-
45
- require 'sequel'
46
-
47
- module TicketService
48
- module Upload
49
-
50
51
  def upload(request,response)
51
52
 
52
53
  ticket_id = req.unparsed_uri.match(/^#{::RSence.config[:broker_urls][:u]}(.*)$/)[1]
@@ -1,4 +1,3 @@
1
- #--
2
1
  ## RSence
3
2
  # Copyright 2008 Riassence Inc.
4
3
  # http://riassence.com/
@@ -6,7 +5,7 @@
6
5
  # You should have received a copy of the GNU General Public License along
7
6
  # with this software package. If not, contact licensing@riassence.com
8
7
  ##
9
- #++
8
+
10
9
 
11
10
 
12
11
  require 'rubygems'
@@ -42,12 +41,13 @@ require File.join(lib_path,'favicon')
42
41
  # smart object wrapper
43
42
  require File.join(lib_path,'objblob')
44
43
 
45
- ## TicketServe serves static and disposable data and images.
46
- ## It accepts Magick::Image objects too to render them only when really needed.
47
- ## Each serve-call returns an unique uri to pass to the client.
48
- ## It performs clean-ups based on session and request time-outs.
49
- class Ticket < Plugin
44
+ # TicketPlugin serves static and disposable data and images. It accepts Magick::Image objects too to render them only when really needed. Each serve-call returns an unique uri to pass to the client.
45
+ # It performs clean-ups based on session and request time-outs.
46
+ #
47
+ # It's available to other plugins as +@plugins.ticket+
48
+ class TicketPlugin < Plugin
50
49
 
50
+ # @private No user-addressable code inside
51
51
  class TicketServe
52
52
  include TicketService::Common
53
53
  include TicketService::Rsrc
@@ -58,10 +58,12 @@ class Ticket < Plugin
58
58
  include TicketService::ObjBlob
59
59
  end
60
60
 
61
+ # @private Returns the broker's url's. Used in {#match}
61
62
  def broker_urls
62
63
  ::RSence.config[:broker_urls]
63
64
  end
64
65
 
66
+ # @private Implements this part of the {RSence::Plugins::Servlet__ Servlet} API on a plugin to match the {#broker_urls}
65
67
  def match( uri, request_type )
66
68
  if request_type == :post
67
69
  return true if uri[0..2] == broker_urls[:u]
@@ -83,8 +85,10 @@ class Ticket < Plugin
83
85
  return false
84
86
  end
85
87
 
88
+ # @private Override with a lower score, if you want to match some parts in alternative ways.
86
89
  def score; 200; end
87
90
 
91
+ # @private Implements this part of the {RSence::Plugins::Servlet__ Servlet} API on a plugin to respond to get requests matched by the {#match}
88
92
  def get( req, res, ses )
89
93
  uri = req.fullpath
90
94
  if uri.match( /^#{broker_urls[:i]}/ )
@@ -111,6 +115,7 @@ class Ticket < Plugin
111
115
  end
112
116
  end
113
117
 
118
+ # @private Handles the upload request
114
119
  def post( req, res, ses )
115
120
  uri = req.fullpath
116
121
  if uri[0..2] == broker_urls[:u]
@@ -119,79 +124,207 @@ class Ticket < Plugin
119
124
  end
120
125
  end
121
126
 
122
- # Initializes storage.
127
+ # @private Initializes storage.
123
128
  def init # :nodoc:
124
129
  super
125
130
  @ticketserve = TicketServe.new
126
131
  end
127
132
 
133
+ # @private Shuts down TicketServe
128
134
  def shutdown
129
135
  @ticketserve.shutdown
130
136
  end
131
137
 
138
+ # API for BlobObj's
132
139
  class BlobObj
140
+
141
+ # @param [String] data The data to serve
142
+ # @param [String] mime The content-type of the data to serve
133
143
  def initialize(data,mime)
134
144
  @data = data
135
145
  @mime = mime
136
146
  end
147
+
148
+ # @return [String] The content-type served
137
149
  def mime
138
150
  return @mime
139
151
  end
152
+
153
+ # @return [String] The data served
140
154
  def data
141
155
  return @data
142
156
  end
157
+
158
+ # @return [Number] The size (in bytes) of the data
143
159
  def size
144
160
  return @data.size
145
161
  end
162
+
163
+ # Implement, if you need to do cleanup before destructing
146
164
  def close
147
165
  end
166
+
148
167
  end
149
168
 
169
+ # Serves an RMagick::Image object accessible by a disposable ticket URL.
170
+ #
171
+ # @param [Message] msg The message instance.
172
+ # @param [#to_blob] content Image data to serve
173
+ # @param [String] format To pass on as a +{ self.format = format }+ block of +content#to_blob+
174
+ # @param [Symbol] type The type of the object.
175
+ #
176
+ # @return [String] Disposable URL. Destroyed after being requested.
150
177
  def serve( msg, content, format='PNG', type=:img )
151
178
  @ticketserve.serve( msg, content, format, type )
152
179
  end
180
+
181
+ # @private Removes data used by the session
153
182
  def expire_ses( msg )
154
183
  @ticketserve.expire_ses( msg.ses_id )
155
184
  end
185
+
186
+ # Sets a custom favicon for RSence
187
+ #
188
+ # @param [String] ico_data Favicon-compatible image data in binary.
189
+ # @param [String] content_type The content-type of the favicon image data.
190
+ #
191
+ # @return [nil]
156
192
  def set_favicon( ico_data, content_type=false )
157
193
  @ticketserve.set_favicon( ico_data, content_type )
158
194
  end
195
+
196
+ # Removes a downloadable file resource served from memory.
197
+ #
198
+ # Does not delete any files from the file system.
199
+ #
200
+ # @param [Message] msg The message instance.
201
+ # @param [String] file_id The file url returned by {#serve_file}
202
+ #
203
+ # @return [nil]
159
204
  def del_file( msg, file_id )
160
205
  @ticketserve.del_file( file_id, msg.ses_id )
161
206
  end
207
+
208
+ # Serves a downloadable file resource to be served from memory using a generated url.
209
+ #
210
+ # @param [Message] msg The message instance.
211
+ # @param [String] content The file attachment file data in binary.
212
+ # @param [String] content_type The content-type of the file attachment.
213
+ # @param [String] filename The filename of the download (not the url)
214
+ #
215
+ # @return [String] Disposable URL. Destroyed after being requested.
162
216
  def serve_file( msg, content='', content_type='text/plain', filename='' )
163
217
  @ticketserve.serve_file( msg, content, content_type, filename )
164
218
  end
219
+
220
+ # Removes a downloadable file resource served from memory.
221
+ #
222
+ # Does not delete any files from the file system.
223
+ #
224
+ # @param [Message] msg The message instance.
225
+ # @param [String] img_id The image url returned by {#serve_img}
226
+ #
227
+ # @return [nil]
165
228
  def del_img( msg, img_id )
166
229
  @ticketserve.del_img( img_id, msg.ses_id )
167
230
  end
231
+
232
+ # Serves a downloadable file resource to be served from memory using a generated url.
233
+ #
234
+ # @param [Message] msg The message instance.
235
+ # @param [#to_blob] content Image data to serve
236
+ # @param [String] format To pass on as a +{ self.format = format }+ block of +content#to_blob+
237
+ # @param [Symbol] type The type of the object.
238
+ #
239
+ # @return [String] Disposable URL. Destroyed after being requested.
168
240
  def serve_img( msg, content, format='PNG', type=:img )
169
241
  @ticketserve.serve_img( msg, content, format, type )
170
242
  end
243
+
244
+ # @return [BlobObj] to be used for custom objects served by {#serve_obj}
171
245
  def proto_obj
172
246
  return BlobObj
173
247
  end
248
+
249
+ # Serves custom object using the {BlobObj} API (Binary Large Object)
250
+ #
251
+ # @param [Message] msg The message instance.
252
+ # @param [BlobObj] blob_obj The custom object to serve.
253
+ # @param [Boolean] no_expire When true, keeps in memory until {#del_obj} is called manually.
254
+ #
255
+ # @return [String] URL. Destroyed after being requested, unless +no_expire+ is +true+.
174
256
  def serve_obj( msg, blob_obj, no_expire=false )
175
257
  @ticketserve.serve_blobobj( msg, blob_obj, no_expire )
176
258
  end
259
+
260
+ # Deletes a custom object served by {#serve_obj}
261
+ #
262
+ # @param [Message] msg The message instance.
263
+ # @param [String] ticket_id The object url returned by {#serve_img}
264
+ #
265
+ # @return [nil]
177
266
  def del_obj( msg, ticket_id )
178
267
  @ticketserve.del_blobobj( ticket_id, msg.ses_id )
179
268
  end
269
+
270
+ # Removes static resource served by {#serve_rsrc}
271
+ #
272
+ # @param [String] rsrc_id The object url returned by {#serve_rsrc}
273
+ #
274
+ # @return [nil]
180
275
  def del_rsrc( rsrc_id )
181
276
  @ticketserve.del_rsrc( rsrc_id )
182
277
  end
278
+
279
+ # Serves static resource as from raw binary data.
280
+ #
281
+ # @param [String] content Any binary data to serve
282
+ # @param [String] content_type The content-type to serve the +content+ as.
283
+ #
284
+ # @return [String] A static url. Use {#del_rsrc} manually to free the memory occupied by the content.
183
285
  def serve_rsrc( content, content_type )
184
286
  @ticketserve.serve_rsrc( content, content_type )
185
287
  end
288
+
289
+ # Returns a list of uploads matching the ticket id.
290
+ #
291
+ # @param [String] ticket_id The key for the upload, returned by {#upload_key}
292
+ # @param [Boolean] with_data Return data also
293
+ #
294
+ # @return [Array] List of uploaded data matching the ticket_id
186
295
  def get_uploads( ticket_id, with_data=false )
187
296
  @ticketserve.get_uploads( ticket_id, with_data )
188
297
  end
298
+
299
+ # Removes the uploaded data matching both ticket id as well as row id.
300
+ #
301
+ # @param [String] ticket_id The key for the upload, returned by {#upload_key}
302
+ # @param [Number] row_id The row id returned by {#get_uploads}
303
+ #
304
+ # @return [nil]
189
305
  def del_upload( ticket_id, row_id )
190
306
  @ticketserve.del_upload( ticket_id, row_id )
191
307
  end
308
+
309
+ # Removes all uploaded data matching the ticket id
310
+ #
311
+ # @param [Message] msg The message instance.
312
+ # @param [String] ticket_id The key for the upload, returned by {#upload_key}
313
+ #
314
+ # @return [nil]
192
315
  def del_uploads( msg, ticket_id )
193
316
  @ticketserve.del_uploads( ticket_id, msg.ses_id )
194
317
  end
318
+
319
+ # Allocates an upload slot and returns the ticket id to use for {#get_uploads}, {#del_upload} and {#del_uploads}
320
+ #
321
+ # @param [Message] msg The message instance.
322
+ # @param [String] value_key The key for the value associated with the upload. See {RSence::HValue#value_id}
323
+ # @param [Number] max_size The maximum size allowed to upload.
324
+ # @param [RegExp] mime_allow A regular expression to match what types of data are allowed to be uploaded
325
+ # @param [Boolean] allow_multi When false, allows uploading only once per key.
326
+ #
327
+ # @return [String] The ticket id. Use for the {RSence::HValue HValue} used with the client HUploader component. Also use with {#get_uploads}, {#del_upload} and {#del_uploads}
195
328
  def upload_key( msg, value_key, max_size=1000000, mime_allow=/(.*?)\/(.*?)/, allow_multi=true )
196
329
  @ticketserve.upload_key( msg, value_key, max_size, mime_allow, allow_multi )
197
330
  end
@@ -6,6 +6,7 @@
6
6
  # with this software package. If not, contact licensing@riassence.com
7
7
  ##
8
8
 
9
+
9
10
  # RSence 'Welcome' plugin
10
11
  class WelcomePlugin < GUIPlugin
11
12
  def disable_self
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsence
3
3
  version: !ruby/object:Gem::Version
4
- hash: 961916124
5
- prerelease: true
4
+ hash: 121
5
+ prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 0
10
- - 10
11
- - pre
12
- version: 2.0.0.10.pre
10
+ - 11
11
+ version: 2.0.0.11
13
12
  platform: ruby
14
13
  authors:
15
14
  - Riassence Inc.
@@ -17,7 +16,7 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2010-05-29 00:00:00 +03:00
19
+ date: 2010-07-06 00:00:00 +03:00
21
20
  default_executable: rsence
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
@@ -66,24 +65,22 @@ files:
66
65
  - lib/plugins/gui_plugin.rb
67
66
  - lib/plugins/guiparser.rb
68
67
  - lib/plugins/plugin.rb
68
+ - lib/plugins/plugin_base.rb
69
69
  - lib/plugins/plugin_plugins.rb
70
70
  - lib/plugins/plugin_sqlite_db.rb
71
- - lib/plugins/plugin_util.rb
72
71
  - lib/plugins/pluginmanager.rb
73
72
  - lib/plugins/plugins.rb
74
73
  - lib/plugins/servlet.rb
74
+ - lib/rsence.rb
75
75
  - lib/session/msg.rb
76
76
  - lib/session/sessionmanager.rb
77
77
  - lib/session/sessionstorage.rb
78
78
  - lib/transporter/transporter.rb
79
79
  - lib/util/gzstring.rb
80
+ - lib/util/ruby19_fixes.rb
80
81
  - lib/values/hvalue.rb
81
82
  - lib/values/valuemanager.rb
82
- - setup/legacy/info.yaml
83
- - setup/legacy/legacy.rb
84
- - setup/welcome/gui/welcome.yaml
85
83
  - setup/welcome/info.yaml
86
- - setup/welcome/text/welcome.html
87
84
  - setup/welcome/values.yaml
88
85
  - setup/welcome/welcome.rb
89
86
  - conf/default_conf.yaml
@@ -99,9 +96,8 @@ files:
99
96
  - plugins/index_html/index_html.rb
100
97
  - plugins/index_html/info.yaml
101
98
  - plugins/index_html/tmpl/index.html
102
- - plugins/index_html/tmpl/startup_index.html
103
99
  - plugins/main/info.yaml
104
- - plugins/main/js/riassence_ns.js
100
+ - plugins/main/js/main.js
105
101
  - plugins/main/main.rb
106
102
  - plugins/main/values.yaml
107
103
  - plugins/ticket/info.yaml
@@ -113,34 +109,24 @@ files:
113
109
  - plugins/ticket/lib/rsrc.rb
114
110
  - plugins/ticket/lib/upload.rb
115
111
  - plugins/ticket/ticket.rb
116
- - js/comm/comm/autosync/autosync.js
117
- - js/comm/comm/autosync/js.inc
118
- - js/comm/comm/comm.js
119
- - js/comm/comm/js.inc
120
- - js/comm/comm/queue/js.inc
121
- - js/comm/comm/queue/queue.js
122
- - js/comm/comm/session/js.inc
123
- - js/comm/comm/session/session.js
124
- - js/comm/comm/sessionwatcher/js.inc
125
- - js/comm/comm/sessionwatcher/sessionwatcher.js
126
- - js/comm/comm/transporter/js.inc
127
- - js/comm/comm/transporter/transporter.js
128
- - js/comm/comm/urlresponder/js.inc
129
- - js/comm/comm/urlresponder/urlresponder.js
130
- - js/comm/comm/values/js.inc
131
- - js/comm/comm/values/values.js
112
+ - js/comm/autosync/autosync.js
113
+ - js/comm/autosync/js.inc
114
+ - js/comm/comm.js
115
+ - js/comm/js.inc
132
116
  - js/comm/jsloader/js.inc
133
117
  - js/comm/jsloader/jsloader.js
134
- - js/comm/reloadapp/js.inc
135
- - js/comm/reloadapp/reloadapp.js
136
- - js/comm/reloadapp/themes/default/reloadapp_warning-ie6.gif
137
- - js/comm/reloadapp/themes/default/reloadapp_warning.png
138
- - js/comm/sha/js.inc
139
- - js/comm/sha/sha.js
140
- - js/comm/values/value/js.inc
141
- - js/comm/values/value/value.js
142
- - js/comm/values/valuematrix/js.inc
143
- - js/comm/values/valuematrix/valuematrix.js
118
+ - js/comm/queue/js.inc
119
+ - js/comm/queue/queue.js
120
+ - js/comm/session/js.inc
121
+ - js/comm/session/session.js
122
+ - js/comm/sessionwatcher/js.inc
123
+ - js/comm/sessionwatcher/sessionwatcher.js
124
+ - js/comm/transporter/js.inc
125
+ - js/comm/transporter/transporter.js
126
+ - js/comm/urlresponder/js.inc
127
+ - js/comm/urlresponder/urlresponder.js
128
+ - js/comm/values/js.inc
129
+ - js/comm/values/values.js
144
130
  - js/controls/button/button.js
145
131
  - js/controls/button/js.inc
146
132
  - js/controls/button/themes/bright/button.css
@@ -157,24 +143,6 @@ files:
157
143
  - js/controls/checkbox/themes/default/checkbox.html
158
144
  - js/controls/checkbox/themes/default/checkbox_parts1-ie6.gif
159
145
  - js/controls/checkbox/themes/default/checkbox_parts1.png
160
- - js/controls/datetime/calendar/calendar.js
161
- - js/controls/datetime/calendar/js.inc
162
- - js/controls/datetime/calendar/themes/default/calendar.css
163
- - js/controls/datetime/calendar/themes/default/calendar.html
164
- - js/controls/datetime/calendar/themes/default/calendar_arrows-ie6.gif
165
- - js/controls/datetime/calendar/themes/default/calendar_arrows.png
166
- - js/controls/datetime/datetimevalue/datetimevalue.js
167
- - js/controls/datetime/datetimevalue/js.inc
168
- - js/controls/datetime/timesheet/js.inc
169
- - js/controls/datetime/timesheet/themes/default/timesheet.css
170
- - js/controls/datetime/timesheet/themes/default/timesheet.html
171
- - js/controls/datetime/timesheet/timesheet.js
172
- - js/controls/datetime/timesheet_item/js.inc
173
- - js/controls/datetime/timesheet_item/themes/default/timesheet_item.css
174
- - js/controls/datetime/timesheet_item/themes/default/timesheet_item.html
175
- - js/controls/datetime/timesheet_item/timesheet_item.js
176
- - js/controls/datetime/timesheet_item_edit/js.inc
177
- - js/controls/datetime/timesheet_item_edit/timesheet_item_edit.js
178
146
  - js/controls/dialogs/alert_sheet/alert_sheet.js
179
147
  - js/controls/dialogs/alert_sheet/js.inc
180
148
  - js/controls/dialogs/confirm_sheet/confirm_sheet.js
@@ -196,12 +164,6 @@ files:
196
164
  - js/controls/imageview/imageview.js
197
165
  - js/controls/imageview/js.inc
198
166
  - js/controls/imageview/themes/default/blank.gif
199
- - js/controls/lists/checkboxlist/checkboxlist.js
200
- - js/controls/lists/checkboxlist/js.inc
201
- - js/controls/lists/listitems/js.inc
202
- - js/controls/lists/listitems/listitems.js
203
- - js/controls/lists/radiobuttonlist/js.inc
204
- - js/controls/lists/radiobuttonlist/radiobuttonlist.js
205
167
  - js/controls/passwordcontrol/js.inc
206
168
  - js/controls/passwordcontrol/passwordcontrol.js
207
169
  - js/controls/passwordcontrol/themes/default/passwordcontrol.css
@@ -309,6 +271,26 @@ files:
309
271
  - js/core/iefix/ie_css_style.htc
310
272
  - js/core/iefix/iefix.js
311
273
  - js/core/iefix/js.inc
274
+ - js/core/rsence_ns/js.inc
275
+ - js/core/rsence_ns/rsence_ns.js
276
+ - js/datetime/calendar/calendar.js
277
+ - js/datetime/calendar/js.inc
278
+ - js/datetime/calendar/themes/default/calendar.css
279
+ - js/datetime/calendar/themes/default/calendar.html
280
+ - js/datetime/calendar/themes/default/calendar_arrows-ie6.gif
281
+ - js/datetime/calendar/themes/default/calendar_arrows.png
282
+ - js/datetime/datetimevalue/datetimevalue.js
283
+ - js/datetime/datetimevalue/js.inc
284
+ - js/datetime/timesheet/js.inc
285
+ - js/datetime/timesheet/themes/default/timesheet.css
286
+ - js/datetime/timesheet/themes/default/timesheet.html
287
+ - js/datetime/timesheet/timesheet.js
288
+ - js/datetime/timesheet_item/js.inc
289
+ - js/datetime/timesheet_item/themes/default/timesheet_item.css
290
+ - js/datetime/timesheet_item/themes/default/timesheet_item.html
291
+ - js/datetime/timesheet_item/timesheet_item.js
292
+ - js/datetime/timesheet_item_edit/js.inc
293
+ - js/datetime/timesheet_item_edit/timesheet_item_edit.js
312
294
  - js/foundation/application/application.js
313
295
  - js/foundation/application/js.inc
314
296
  - js/foundation/control/control.js
@@ -323,8 +305,12 @@ files:
323
305
  - js/foundation/control/eventresponder/eventresponder.js
324
306
  - js/foundation/control/eventresponder/js.inc
325
307
  - js/foundation/control/js.inc
308
+ - js/foundation/control/valuematrix/js.inc
309
+ - js/foundation/control/valuematrix/valuematrix.js
326
310
  - js/foundation/control/valueresponder/js.inc
327
311
  - js/foundation/control/valueresponder/valueresponder.js
312
+ - js/foundation/eventmanager/eventmanager.js
313
+ - js/foundation/eventmanager/js.inc
328
314
  - js/foundation/geom/point/js.inc
329
315
  - js/foundation/geom/point/point.js
330
316
  - js/foundation/geom/rect/js.inc
@@ -335,6 +321,8 @@ files:
335
321
  - js/foundation/system/system.js
336
322
  - js/foundation/thememanager/js.inc
337
323
  - js/foundation/thememanager/thememanager.js
324
+ - js/foundation/value/js.inc
325
+ - js/foundation/value/value.js
338
326
  - js/foundation/view/js.inc
339
327
  - js/foundation/view/markupview/js.inc
340
328
  - js/foundation/view/markupview/markupview.js
@@ -343,6 +331,18 @@ files:
343
331
  - js/foundation/view/view.js
344
332
  - js/foundation/view/viewdefaults/js.inc
345
333
  - js/foundation/view/viewdefaults/viewdefaults.js
334
+ - js/lists/checkboxlist/checkboxlist.js
335
+ - js/lists/checkboxlist/js.inc
336
+ - js/lists/listitems/js.inc
337
+ - js/lists/listitems/listitems.js
338
+ - js/lists/radiobuttonlist/js.inc
339
+ - js/lists/radiobuttonlist/radiobuttonlist.js
340
+ - js/util/reloadapp/js.inc
341
+ - js/util/reloadapp/reloadapp.js
342
+ - js/util/reloadapp/themes/default/reloadapp_warning-ie6.gif
343
+ - js/util/reloadapp/themes/default/reloadapp_warning.png
344
+ - js/util/sha/js.inc
345
+ - js/util/sha/sha.js
346
346
  - js/views/centerview/centerview.js
347
347
  - js/views/centerview/js.inc
348
348
  - js/views/inlineview/inlineview.js
@@ -351,9 +351,15 @@ files:
351
351
  - js/views/scrollview/scrollview.js
352
352
  - README.rdoc
353
353
  - INSTALL.rdoc
354
- - LICENSE
354
+ - LICENSE.txt
355
+ - docs/ExampleGuiPlugin.rdoc
356
+ - docs/JavascriptBundles.rdoc
357
+ - docs/PluginBundleInfo.rdoc
358
+ - docs/PluginBundles.rdoc
359
+ - docs/Values.rdoc
355
360
  - VERSION
356
- has_rdoc: true
361
+ - .yardopts
362
+ has_rdoc: yard
357
363
  homepage: http://www.rsence.org/
358
364
  licenses: []
359
365
 
@@ -376,20 +382,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
376
382
  required_rubygems_version: !ruby/object:Gem::Requirement
377
383
  none: false
378
384
  requirements:
379
- - - ">"
385
+ - - ">="
380
386
  - !ruby/object:Gem::Version
381
- hash: 25
387
+ hash: 3
382
388
  segments:
383
- - 1
384
- - 3
385
- - 1
386
- version: 1.3.1
389
+ - 0
390
+ version: "0"
387
391
  requirements: []
388
392
 
389
393
  rubyforge_project:
390
394
  rubygems_version: 1.3.7
391
395
  signing_key:
392
396
  specification_version: 3
393
- summary: Pre-Release 2.0 version of the RSence framework.
397
+ summary: Release 2.0 version of the RSence framework.
394
398
  test_files: []
395
399