spiderfw 0.5.7 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +17 -6
- data/apps/cas_server/controllers/mixins/cas_login_mixin.rb +18 -5
- data/apps/cas_server/lib/cas.rb +1 -1
- data/apps/cms/models/content.rb +16 -0
- data/apps/cms/models/news_item.rb +7 -0
- data/apps/cms/models/translation.rb +14 -0
- data/apps/cms/views/admin/admin.shtml +16 -0
- data/apps/cms/views/admin/content.shtml +4 -0
- data/apps/core/acl/_init.rb +10 -0
- data/apps/core/acl/controllers/acl_controller.rb +14 -0
- data/apps/core/acl/models/permission.rb +11 -0
- data/apps/core/acl/views/acl.layout.shtml +8 -0
- data/apps/core/acl/views/index.shtml +3 -0
- data/apps/core/auth/controllers/mixins/auth_helper.rb +3 -3
- data/apps/core/auth/lib/authenticable.rb +4 -0
- data/apps/core/auth/models/super_user.rb +1 -0
- data/apps/core/auth/po/it/spider_auth.po +18 -10
- data/apps/core/auth/po/spider_auth.pot +13 -1
- data/apps/core/components/_init.rb +2 -1
- data/apps/core/components/po/it/spider_components.po +3 -3
- data/apps/core/components/po/spider_components.pot +3 -3
- data/apps/core/components/public/css/month_calendar.css +24 -0
- data/apps/core/components/public/js/jquery/jquery-1.4.2-min.js +154 -0
- data/apps/core/components/public/js/jquery/jquery-1.4.2.js +6240 -0
- data/apps/core/components/public/js/jquery/plugins/jquery.form.js +1 -1
- data/apps/core/components/public/js/spider.js +26 -20
- data/apps/core/components/widgets/admin/admin.rb +1 -1
- data/apps/core/components/widgets/crud/crud.rb +1 -1
- data/apps/core/components/widgets/list/list.rb +2 -2
- data/apps/core/components/widgets/month_calendar/month_calendar.rb +67 -0
- data/apps/core/components/widgets/month_calendar/month_calendar.shtml +21 -0
- data/apps/core/components/widgets/table/table.rb +4 -2
- data/apps/core/components/widgets/table/table.shtml +37 -31
- data/apps/core/forms/_init.rb +2 -1
- data/apps/core/forms/po/it/spider_forms.po +14 -2
- data/apps/core/forms/po/spider_forms.pot +13 -1
- data/apps/core/forms/public/css/file_input.css +15 -0
- data/apps/core/forms/public/{form.css → css/form.css} +8 -0
- data/apps/core/forms/public/file_input.js +37 -0
- data/apps/core/forms/tags/element_label.erb +4 -1
- data/apps/core/forms/tags/element_row.erb +7 -2
- data/apps/core/forms/tags/row.erb +10 -1
- data/apps/core/forms/widgets/form/form.rb +43 -10
- data/apps/core/forms/widgets/form/form.shtml +12 -5
- data/apps/core/forms/widgets/inputs/date_time/date_time.shtml +1 -0
- data/apps/core/forms/widgets/inputs/file_input/file_input.rb +43 -0
- data/apps/core/forms/widgets/inputs/file_input/file_input.shtml +12 -0
- data/apps/core/forms/widgets/inputs/input/input.rb +23 -1
- data/apps/core/forms/widgets/inputs/password/password.rb +1 -0
- data/apps/core/forms/widgets/inputs/text/text.shtml +1 -1
- data/apps/core/forms/widgets/inputs/text_area/text_area.shtml +2 -2
- data/apps/git_model_versioning/models/mixins/git_versioned.rb +91 -0
- data/apps/hippo/models/mixins/hippo_struct.rb +42 -26
- data/apps/master/controllers/git.rb +32 -0
- data/apps/messenger/_init.rb +1 -1
- data/apps/messenger/config/options.rb +2 -0
- data/apps/messenger/config/worker/queue.rb +3 -0
- data/apps/messenger/controllers/mixins/{messenger_controller_mixin.rb → messenger_helper.rb} +8 -6
- data/apps/messenger/messenger.rb +10 -3
- data/apps/messenger/models/message.rb +2 -2
- data/apps/messenger/po/it/spider_messenger.po +1 -1
- data/apps/messenger/po/spider_messenger.pot +1 -1
- data/apps/saml/_init.rb +13 -0
- data/apps/saml/controllers/saml2idp.rb +18 -0
- data/apps/saml/lib/bindings/http_redirect_binding.rb +14 -0
- data/apps/saml/lib/messages/authn_request.rb +52 -0
- data/apps/saml/lib/saml.rb +10 -0
- data/apps/soap/controllers/soap_controller.rb +12 -2
- data/apps/soap/lib/soap.rb +16 -1
- data/apps/soap/soap.gemspec +10 -0
- data/apps/webdav/lib/locking.rb +2 -2
- data/apps/worker/_init.rb +2 -0
- data/apps/worker/config/options.rb +1 -0
- data/apps/worker/worker.rb +17 -4
- data/blueprints/app/__APP__.appspec +4 -0
- data/blueprints/app/_init.rb +5 -8
- data/blueprints/app/controllers/__APP___controller.rb +2 -1
- data/blueprints/app/views/__APP__.layout.shtml +4 -1
- data/blueprints/install/config/config.yml +2 -4
- data/blueprints/model.rb +15 -0
- data/data/locale/it/LC_MESSAGES/spider.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_auth.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_components.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_forms.mo +0 -0
- data/data/locale/it/LC_MESSAGES/spider_messenger.mo +0 -0
- data/lib/spiderfw/app.rb +93 -31
- data/lib/spiderfw/autoload.rb +1 -0
- data/lib/spiderfw/cmd/cmd.rb +8 -1
- data/lib/spiderfw/cmd/commands/config.rb +54 -0
- data/lib/spiderfw/config/configuration.rb +30 -0
- data/lib/spiderfw/config/options/spider.rb +18 -6
- data/lib/spiderfw/controller/controller.rb +12 -11
- data/lib/spiderfw/controller/dispatcher.rb +5 -4
- data/lib/spiderfw/controller/http_controller.rb +16 -2
- data/lib/spiderfw/controller/mixins/http_mixin.rb +3 -2
- data/lib/spiderfw/controller/mixins/static_content.rb +8 -2
- data/lib/spiderfw/controller/mixins/visual.rb +72 -52
- data/lib/spiderfw/controller/request.rb +7 -3
- data/lib/spiderfw/controller/scene.rb +6 -0
- data/lib/spiderfw/controller/session.rb +12 -8
- data/lib/spiderfw/env.rb +1 -1
- data/lib/spiderfw/http/adapters/mongrel.rb +1 -1
- data/lib/spiderfw/http/http.rb +48 -19
- data/lib/spiderfw/i18n/cldr.rb +53 -3
- data/lib/spiderfw/i18n/i18n.rb +52 -2
- data/lib/spiderfw/i18n/provider.rb +24 -0
- data/lib/spiderfw/i18n/rails.rb +24 -0
- data/lib/spiderfw/model/active_record.rb +3 -3
- data/lib/spiderfw/model/base_model.rb +45 -14
- data/lib/spiderfw/model/condition.rb +11 -2
- data/lib/spiderfw/model/data_type.rb +15 -7
- data/lib/spiderfw/model/datatypes/decimal.rb +15 -3
- data/lib/spiderfw/model/datatypes/file_path.rb +50 -0
- data/lib/spiderfw/model/datatypes/serialized_object.rb +0 -4
- data/lib/spiderfw/model/datatypes/uuid.rb +3 -3
- data/lib/spiderfw/model/datatypes.rb +1 -0
- data/lib/spiderfw/model/extended_models/managed.rb +11 -2
- data/lib/spiderfw/model/mappers/db_mapper.rb +116 -52
- data/lib/spiderfw/model/mappers/mapper.rb +36 -14
- data/lib/spiderfw/model/mixins/state_machine.rb +45 -9
- data/lib/spiderfw/model/mixins/versioned.rb +1 -1
- data/lib/spiderfw/model/model.rb +2 -1
- data/lib/spiderfw/model/query_set.rb +21 -3
- data/lib/spiderfw/model/request.rb +7 -0
- data/lib/spiderfw/model/storage/db/adapters/mssql.rb +2 -1
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +4 -1
- data/lib/spiderfw/model/storage/db/adapters/oci8.rb +35 -18
- data/lib/spiderfw/model/storage/db/adapters/sqlite.rb +68 -34
- data/lib/spiderfw/model/storage/db/connectors/odbc.rb +1 -1
- data/lib/spiderfw/model/storage/db/db_schema.rb +33 -4
- data/lib/spiderfw/model/storage/db/db_storage.rb +27 -8
- data/lib/spiderfw/requires.rb +2 -0
- data/lib/spiderfw/tag/tag.rb +1 -1
- data/lib/spiderfw/templates/blocks/attr_if.rb +7 -1
- data/lib/spiderfw/templates/blocks/each.rb +8 -3
- data/lib/spiderfw/templates/blocks/html.rb +12 -22
- data/lib/spiderfw/templates/blocks/render.rb +3 -3
- data/lib/spiderfw/templates/blocks/run.rb +47 -11
- data/lib/spiderfw/templates/blocks/tag_if.rb +2 -2
- data/lib/spiderfw/templates/blocks/text.rb +2 -1
- data/lib/spiderfw/templates/blocks/widget.rb +5 -3
- data/lib/spiderfw/templates/blocks/yield.rb +1 -1
- data/lib/spiderfw/templates/template.rb +27 -24
- data/lib/spiderfw/templates/template_blocks.rb +37 -14
- data/lib/spiderfw/utils/monkey/exception.rb +1 -1
- data/lib/spiderfw/utils/monkey/nil_class.rb +7 -0
- data/lib/spiderfw/utils/monkey/numeric.rb +15 -0
- data/lib/spiderfw/version.rb +1 -1
- data/lib/spiderfw/widget/widget.rb +36 -33
- data/lib/spiderfw/widget/widget_attributes.rb +1 -1
- data/lib/spiderfw.rb +18 -5
- data/spider.gemspec +5 -5
- metadata +44 -18
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js +0 -187
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js +0 -1
- data/apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js +0 -193
- data/apps/core/forms/widgets/inputs/subform/subform.rb +0 -10
- data/apps/core/forms/widgets/inputs/subform/subform.shtml +0 -5
- data/apps/messenger/config/worker.rb +0 -3
- data/lib/spiderfw/controller/app_controller.rb +0 -14
- data/lib/spiderfw/utils/test_case.rb +0 -24
@@ -10,33 +10,33 @@ module Spider
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.get_block_type(el, skip_attributes=false)
|
13
|
-
if
|
13
|
+
if el.class == ::Hpricot::Text
|
14
14
|
block = :Text
|
15
|
-
elsif
|
15
|
+
elsif el.class == ::Hpricot::Comment
|
16
16
|
block = :Comment
|
17
|
-
elsif
|
17
|
+
elsif !skip_attributes && (el.has_attribute?('sp:if') || el.has_attribute?('sp:run-if'))
|
18
18
|
block = :If
|
19
|
-
elsif
|
19
|
+
elsif !skip_attributes && el.has_attribute?('sp:tag-if')
|
20
20
|
block = :TagIf
|
21
|
-
elsif
|
21
|
+
elsif !skip_attributes && el.has_attribute?('sp:attr-if')
|
22
22
|
block = :AttrIf
|
23
|
-
elsif
|
23
|
+
elsif !skip_attributes && (el.has_attribute?('sp:each') || el.has_attribute?('sp:each_index'))
|
24
24
|
block = :Each
|
25
|
-
elsif
|
25
|
+
elsif el.name == 'sp:render'
|
26
26
|
block = :Render
|
27
|
-
elsif
|
27
|
+
elsif el.name == 'sp:run'
|
28
28
|
block = :Run
|
29
|
-
elsif
|
29
|
+
elsif el.name == 'sp:yield'
|
30
30
|
block = :Yield
|
31
|
-
elsif
|
31
|
+
elsif el.name == 'sp:pass' || el.name == 'sp:template'
|
32
32
|
block = :Pass
|
33
|
-
elsif
|
33
|
+
elsif el.name == 'sp:debugger'
|
34
34
|
block = :Debugger
|
35
|
-
elsif
|
35
|
+
elsif Spider::Template.registered?(el.name)
|
36
36
|
klass = Spider::Template.get_registered_class(el.name)
|
37
|
-
if
|
37
|
+
if klass < ::Spider::Widget
|
38
38
|
block = :Widget
|
39
|
-
elsif
|
39
|
+
elsif klass < Spider::Tag
|
40
40
|
block = :Tag
|
41
41
|
else
|
42
42
|
Spider.logger.error("Could not parse #{el.name} tag")
|
@@ -127,6 +127,29 @@ module Spider
|
|
127
127
|
return scanner.rest
|
128
128
|
end
|
129
129
|
|
130
|
+
def compile_text(str)
|
131
|
+
res = ""
|
132
|
+
scanner = ::StringScanner.new(str)
|
133
|
+
pos = 0
|
134
|
+
var_regexp = /\{ ([^}]+) \}/
|
135
|
+
while scanner.scan_until(Regexp.union(var_regexp, GettextRegexp))
|
136
|
+
text = scanner.pre_match[pos..-1]
|
137
|
+
pos = scanner.pos
|
138
|
+
case scanner.matched
|
139
|
+
when var_regexp
|
140
|
+
res += text+"'+("+vars_to_scene(scanner.matched[2..-3])+").to_s+'"
|
141
|
+
when GettextRegexp
|
142
|
+
res += "'\n$out << _('#{escape_text($1)}')"
|
143
|
+
if $2
|
144
|
+
res += " #{vars_to_scene($2)}"
|
145
|
+
end
|
146
|
+
res += "\n$out << '"
|
147
|
+
end
|
148
|
+
end
|
149
|
+
res += scanner.rest
|
150
|
+
return res
|
151
|
+
end
|
152
|
+
|
130
153
|
|
131
154
|
def inspect
|
132
155
|
@el
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Numeric
|
2
|
+
|
3
|
+
def lformat(precision = nil, locale=nil, options={})
|
4
|
+
locale ||= Spider.locale
|
5
|
+
Spider::I18n.localize_number(locale, self, precision, options)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.lparse(string)
|
9
|
+
locale ||= Spider.locale
|
10
|
+
options = {}
|
11
|
+
options[:return] = self
|
12
|
+
Spider::I18n.parse_number(locale, string)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/lib/spiderfw/version.rb
CHANGED
@@ -11,7 +11,7 @@ module Spider
|
|
11
11
|
include HTTPMixin
|
12
12
|
|
13
13
|
attr_accessor :parent
|
14
|
-
attr_accessor :request, :scene, :widgets, :template, :id, :id_path, :containing_template, :
|
14
|
+
attr_accessor :request, :scene, :widgets, :template, :id, :id_path, :containing_template, :target_mode
|
15
15
|
attr_reader :attributes, :widget_attributes, :css_classes, :widgets_runtime_content
|
16
16
|
attr_accessor :active
|
17
17
|
|
@@ -46,12 +46,14 @@ module Spider
|
|
46
46
|
params[:instance_attr] = true
|
47
47
|
params[:set_var] = true
|
48
48
|
attribute(name, params)
|
49
|
+
attr_reader(name)
|
49
50
|
end
|
50
51
|
|
51
52
|
def is_attribute(name, params={})
|
52
53
|
params[:instance_attr] = true
|
53
54
|
i_attribute(name, params)
|
54
55
|
attr_to_scene(name)
|
56
|
+
attr_reader(name)
|
55
57
|
end
|
56
58
|
|
57
59
|
def i_attr_accessor(name, params={})
|
@@ -159,6 +161,7 @@ module Spider
|
|
159
161
|
overrides.each do |ovr|
|
160
162
|
parse_override(ovr)
|
161
163
|
end
|
164
|
+
|
162
165
|
Hpricot::Elements[*overrides].remove
|
163
166
|
plugins.each do |plugin|
|
164
167
|
name = plugin['name']
|
@@ -198,13 +201,14 @@ module Spider
|
|
198
201
|
|
199
202
|
def initialize(request, response, scene=nil)
|
200
203
|
super
|
204
|
+
@is_target = false
|
201
205
|
@widgets = {}
|
202
206
|
@attributes = WidgetAttributes.new(self)
|
203
207
|
@id_path = []
|
204
208
|
@widget_attributes = {}
|
205
209
|
locale = @request.locale.language
|
206
210
|
include_js = [
|
207
|
-
'/js/jquery/jquery-1.
|
211
|
+
'/js/jquery/jquery-1.4.2.js', '/js/inheritance.js', '/js/spider.js', '/js/jquery/plugins/jquery.query-2.1.6.js',
|
208
212
|
'/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.js', #'/js/jquery/jquery-ui/development-bundle/ui/jquery-ui-1.7.2.custom.min.js'
|
209
213
|
"/js/jquery/jquery-ui/development-bundle/ui/i18n/ui.datepicker-#{locale}.js", '/js/jquery/plugins/jquery.form.js'
|
210
214
|
]
|
@@ -288,6 +292,7 @@ module Spider
|
|
288
292
|
unless @template
|
289
293
|
@template = load_template(@use_template)
|
290
294
|
end
|
295
|
+
prepare_template(@template)
|
291
296
|
@id ||= @attributes[:id]
|
292
297
|
@template.id_path = @id_path
|
293
298
|
@template.mode = :widget
|
@@ -357,12 +362,7 @@ module Spider
|
|
357
362
|
if (sub_w)
|
358
363
|
@widgets[w_id].widget_attributes[sub_w] = a
|
359
364
|
else
|
360
|
-
|
361
|
-
if (a[:name] && a[:value])
|
362
|
-
@widgets[w_id].attributes[a[:name].to_sym] = a[:value]
|
363
|
-
else
|
364
|
-
a.each{ |key, value| @widgets[w_id].attributes[key] = value}
|
365
|
-
end
|
365
|
+
a.each{ |key, value| @widgets[w_id].attributes[key] = value}
|
366
366
|
end
|
367
367
|
end
|
368
368
|
end
|
@@ -505,6 +505,7 @@ module Spider
|
|
505
505
|
end
|
506
506
|
end
|
507
507
|
end
|
508
|
+
widget
|
508
509
|
end
|
509
510
|
|
510
511
|
def check_subwidget_conditions
|
@@ -530,29 +531,8 @@ module Spider
|
|
530
531
|
# debugger
|
531
532
|
# a = 3
|
532
533
|
# end
|
533
|
-
attributes = doc.search('sp:attribute')
|
534
|
-
attributes.each do |a|
|
535
|
-
name = a.attributes['name'].to_sym
|
536
|
-
kvs = a.children_of_type('sp:value')
|
537
|
-
if (kvs.length > 0)
|
538
|
-
value = {}
|
539
|
-
kvs.each do |kv|
|
540
|
-
key = kv.attributes['key']
|
541
|
-
val = kv.innerText
|
542
|
-
value[key] = val
|
543
|
-
end
|
544
|
-
else
|
545
|
-
value = a.attributes['value']
|
546
|
-
end
|
547
|
-
if (w = a.attributes['widget'])
|
548
|
-
@widget_attributes[w] = {:name => name, :value => value}
|
549
|
-
else
|
550
|
-
@attributes[name] = value
|
551
|
-
end
|
552
|
-
end
|
553
|
-
attributes.remove
|
554
534
|
doc.search('sp:runtime-content').each do |cont|
|
555
|
-
w = cont.
|
535
|
+
w = cont.get_attribute('widget')
|
556
536
|
first, rest = w.split('/', 2)
|
557
537
|
params = nil
|
558
538
|
if (first =~ /(.+)\[(.+)\]/)
|
@@ -573,13 +553,36 @@ module Spider
|
|
573
553
|
end
|
574
554
|
end
|
575
555
|
doc.search('sp:runtime-content').remove
|
556
|
+
|
557
|
+
attributes = doc.search('sp:attribute')
|
558
|
+
attributes.each do |a|
|
559
|
+
name = a.get_attribute('name').to_sym
|
560
|
+
kvs = a.children ? a.children_of_type('sp:value') : []
|
561
|
+
if (kvs.length > 0)
|
562
|
+
value = {}
|
563
|
+
kvs.each do |kv|
|
564
|
+
key = kv.get_attribute('key')
|
565
|
+
val = kv.innerText
|
566
|
+
value[key] = val
|
567
|
+
end
|
568
|
+
else
|
569
|
+
value = a.get_attribute('value')
|
570
|
+
end
|
571
|
+
if w = a.get_attribute('widget')
|
572
|
+
@widget_attributes[w] ||= {}
|
573
|
+
@widget_attributes[w][name] = value
|
574
|
+
else
|
575
|
+
@attributes[name] = value
|
576
|
+
end
|
577
|
+
end
|
578
|
+
attributes.remove
|
576
579
|
doc.search('sp:use-template').each do |templ|
|
577
|
-
if
|
578
|
-
owner = Spider.apps_by_path[templ.
|
580
|
+
if templ.has_attribute?('app')
|
581
|
+
owner = Spider.apps_by_path[templ.get_attribute('app')]
|
579
582
|
else
|
580
583
|
owner = self
|
581
584
|
end
|
582
|
-
@template = load_template(templ.
|
585
|
+
@template = load_template(templ.get_attribute('src'), nil, owner)
|
583
586
|
end
|
584
587
|
return doc
|
585
588
|
end
|
data/lib/spiderfw.rb
CHANGED
@@ -59,13 +59,14 @@ module Spider
|
|
59
59
|
all_apps.each do |path|
|
60
60
|
require path+'/config/options.rb' if File.exist?(path+'/config/options.rb')
|
61
61
|
end
|
62
|
+
@runmode = nil
|
63
|
+
self.runmode = $SPIDER_RUNMODE if $SPIDER_RUNMODE
|
62
64
|
load_configuration($SPIDER_PATH+'/config')
|
63
65
|
load_configuration(@root+'/config')
|
64
66
|
start_loggers
|
65
67
|
# @controller = Controller
|
66
68
|
@paths[:spider] = $SPIDER_PATH
|
67
|
-
|
68
|
-
self.runmode = $SPIDER_RUNMODE if $SPIDER_RUNMODE
|
69
|
+
|
69
70
|
if ($SPIDER_CONFIG_SETS)
|
70
71
|
$SPIDER_CONFIG_SETS.each{ |set| @configuration.include_set(set) }
|
71
72
|
end
|
@@ -100,6 +101,9 @@ module Spider
|
|
100
101
|
|
101
102
|
# Invoked before a server is started. Apps may implement the app_startup method, that will be called.
|
102
103
|
def startup
|
104
|
+
unless File.exists?(Spider.paths[:root]+'/init.rb')
|
105
|
+
raise "The server must be started from the root directory"
|
106
|
+
end
|
103
107
|
if (Spider.conf.get('template.cache.reload_on_restart'))
|
104
108
|
FileUtils.touch("#{Spider.paths[:tmp]}/templates_reload.txt")
|
105
109
|
end
|
@@ -273,6 +277,10 @@ module Spider
|
|
273
277
|
@apps_by_short_name[mod.short_name] = mod
|
274
278
|
end
|
275
279
|
|
280
|
+
def app?(path)
|
281
|
+
@apps_by_path[path] ? true : false
|
282
|
+
end
|
283
|
+
|
276
284
|
def load_configuration(path)
|
277
285
|
return unless File.directory?(path)
|
278
286
|
path += '/' unless path[-1] == ?o
|
@@ -287,7 +295,7 @@ module Spider
|
|
287
295
|
@configuration.load_yaml(path+f)
|
288
296
|
rescue ConfigurationException => exc
|
289
297
|
if (exc.type == :yaml)
|
290
|
-
@logger.error("Configuration file #{path+f} is not
|
298
|
+
@logger.error("Configuration file #{path+f} is not valid YAML")
|
291
299
|
else
|
292
300
|
raise
|
293
301
|
end
|
@@ -368,9 +376,11 @@ module Spider
|
|
368
376
|
return Resource.new(first_found(extensions, File.dirname(cur_path)+path[2..-1]), owner_class)
|
369
377
|
end
|
370
378
|
end
|
379
|
+
app = nil
|
371
380
|
if (path[0].chr == '/')
|
381
|
+
first_part = path[1..-1].split('/')[0]
|
372
382
|
Spider.apps_by_path.each do |p, a|
|
373
|
-
if
|
383
|
+
if first_part == p
|
374
384
|
app = a
|
375
385
|
path = path[p.length+2..-1]
|
376
386
|
break
|
@@ -480,6 +490,10 @@ module Spider
|
|
480
490
|
Locale.current[0]
|
481
491
|
end
|
482
492
|
|
493
|
+
def i18n(l = self.locale)
|
494
|
+
Spider::I18n.provider(l)
|
495
|
+
end
|
496
|
+
|
483
497
|
def test_setup
|
484
498
|
end
|
485
499
|
|
@@ -502,7 +516,6 @@ module Spider
|
|
502
516
|
|
503
517
|
end
|
504
518
|
|
505
|
-
|
506
519
|
# load instead of require for reload_sources to work correctly
|
507
520
|
load 'spiderfw/config/options/spider.rb'
|
508
521
|
Spider::init()
|
data/spider.gemspec
CHANGED
@@ -2,8 +2,8 @@ require 'rake'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "spiderfw"
|
5
|
-
s.version =
|
6
|
-
s.date = "2010-
|
5
|
+
s.version = File.read(File.dirname(__FILE__)+'/VERSION')
|
6
|
+
s.date = "2010-03-12"
|
7
7
|
s.summary = "A (web) framework"
|
8
8
|
s.email = "abmajor7@gmail.com"
|
9
9
|
s.homepage = "http://github.com/me/spider"
|
@@ -28,16 +28,16 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.default_executable = 'spider'
|
29
29
|
s.add_dependency("cmdparse", ["> 2.0.0"])
|
30
30
|
s.add_dependency("gettext", ["> 2.0.0"])
|
31
|
-
s.add_dependency("hpricot", ["
|
31
|
+
s.add_dependency("hpricot", ["> 0.8"])
|
32
32
|
s.add_dependency("json", ["> 1.1"])
|
33
|
-
s.add_dependency("
|
33
|
+
s.add_dependency("uuidtools", ["> 2.1"])
|
34
34
|
s.add_dependency("rufus-scheduler", ["> 1.0"])
|
35
35
|
s.add_dependency("mime-types", ["> 1.0"])
|
36
36
|
s.add_dependency("locale", ["> 2.0"])
|
37
37
|
s.add_dependency("builder", ["> 2.1"])
|
38
38
|
s.add_development_dependency("rake", ["> 0.7.3"])
|
39
39
|
s.add_development_dependency("ruby-debug", ["> 0.9.3"])
|
40
|
-
s.requirements << "Optional dependencies: openssl, sqlite3, webrick, mongrel, ruby-oci8
|
40
|
+
s.requirements << "Optional dependencies: openssl, sqlite3, webrick, mongrel, ruby-oci8 >2.0, mysql"
|
41
41
|
# optional dependencies
|
42
42
|
#
|
43
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spiderfw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Pirlik
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-03-12 00:00:00 +01:00
|
13
13
|
default_executable: spider
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -38,9 +38,9 @@ dependencies:
|
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - "
|
41
|
+
- - ">"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: "0.
|
43
|
+
version: "0.8"
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: json
|
@@ -53,14 +53,14 @@ dependencies:
|
|
53
53
|
version: "1.1"
|
54
54
|
version:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: uuidtools
|
57
57
|
type: :runtime
|
58
58
|
version_requirement:
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: "2.
|
63
|
+
version: "2.1"
|
64
64
|
version:
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: rufus-scheduler
|
@@ -147,6 +147,16 @@ files:
|
|
147
147
|
- apps/cas_server/models/ticket.rb
|
148
148
|
- apps/cas_server/models/ticket_granting_ticket.rb
|
149
149
|
- apps/cas_server/views/logout.shtml
|
150
|
+
- apps/cms/models/content.rb
|
151
|
+
- apps/cms/models/news_item.rb
|
152
|
+
- apps/cms/models/translation.rb
|
153
|
+
- apps/cms/views/admin/admin.shtml
|
154
|
+
- apps/cms/views/admin/content.shtml
|
155
|
+
- apps/core/acl/_init.rb
|
156
|
+
- apps/core/acl/controllers/acl_controller.rb
|
157
|
+
- apps/core/acl/models/permission.rb
|
158
|
+
- apps/core/acl/views/acl.layout.shtml
|
159
|
+
- apps/core/acl/views/index.shtml
|
150
160
|
- apps/core/admin/_init.rb
|
151
161
|
- apps/core/admin/admin.rb
|
152
162
|
- apps/core/admin/controllers/admin_controller.rb
|
@@ -193,11 +203,14 @@ files:
|
|
193
203
|
- apps/core/components/public/css/img/section-bottom.jpg
|
194
204
|
- apps/core/components/public/css/list.css
|
195
205
|
- apps/core/components/public/css/menu.css
|
206
|
+
- apps/core/components/public/css/month_calendar.css
|
196
207
|
- apps/core/components/public/css/spider.css
|
197
208
|
- apps/core/components/public/css/switcher.css
|
198
209
|
- apps/core/components/public/css/table.css
|
199
210
|
- apps/core/components/public/js/inheritance.js
|
200
211
|
- apps/core/components/public/js/jquery/jquery-1.3.2.js
|
212
|
+
- apps/core/components/public/js/jquery/jquery-1.4.2-min.js
|
213
|
+
- apps/core/components/public/js/jquery/jquery-1.4.2.js
|
201
214
|
- apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
202
215
|
- apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
203
216
|
- apps/core/components/public/js/jquery/jquery-ui/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
@@ -384,9 +397,6 @@ files:
|
|
384
397
|
- apps/core/components/public/js/jquery/plugins/jquery.form.js
|
385
398
|
- apps/core/components/public/js/jquery/plugins/jquery.query-2.1.6.js
|
386
399
|
- apps/core/components/public/js/jquery/plugins/jquery.url.js
|
387
|
-
- apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.js
|
388
|
-
- apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.1.0.min.js
|
389
|
-
- apps/core/components/public/js/jquery/plugins/jtree/jquery.jtree.spider.1.0.js
|
390
400
|
- apps/core/components/public/js/jquery/plugins/treeview/changelog.txt
|
391
401
|
- apps/core/components/public/js/jquery/plugins/treeview/images/ajax-loader.gif
|
392
402
|
- apps/core/components/public/js/jquery/plugins/treeview/images/file.gif
|
@@ -497,6 +507,8 @@ files:
|
|
497
507
|
- apps/core/components/widgets/list/plugins/exportable/exportable_list.shtml
|
498
508
|
- apps/core/components/widgets/menu/menu.rb
|
499
509
|
- apps/core/components/widgets/menu/menu.shtml
|
510
|
+
- apps/core/components/widgets/month_calendar/month_calendar.rb
|
511
|
+
- apps/core/components/widgets/month_calendar/month_calendar.shtml
|
500
512
|
- apps/core/components/widgets/search_table/search_table.rb
|
501
513
|
- apps/core/components/widgets/search_table/search_table.shtml
|
502
514
|
- apps/core/components/widgets/switcher/switcher.rb
|
@@ -508,8 +520,10 @@ files:
|
|
508
520
|
- apps/core/forms/_init.rb
|
509
521
|
- apps/core/forms/po/it/spider_forms.po
|
510
522
|
- apps/core/forms/po/spider_forms.pot
|
523
|
+
- apps/core/forms/public/css/file_input.css
|
524
|
+
- apps/core/forms/public/css/form.css
|
511
525
|
- apps/core/forms/public/date_time.js
|
512
|
-
- apps/core/forms/public/
|
526
|
+
- apps/core/forms/public/file_input.js
|
513
527
|
- apps/core/forms/public/form.js
|
514
528
|
- apps/core/forms/public/input.js
|
515
529
|
- apps/core/forms/public/search_select.js
|
@@ -524,6 +538,8 @@ files:
|
|
524
538
|
- apps/core/forms/widgets/inputs/checkbox/checkbox.shtml
|
525
539
|
- apps/core/forms/widgets/inputs/date_time/date_time.rb
|
526
540
|
- apps/core/forms/widgets/inputs/date_time/date_time.shtml
|
541
|
+
- apps/core/forms/widgets/inputs/file_input/file_input.rb
|
542
|
+
- apps/core/forms/widgets/inputs/file_input/file_input.shtml
|
527
543
|
- apps/core/forms/widgets/inputs/hidden/hidden.rb
|
528
544
|
- apps/core/forms/widgets/inputs/hidden/hidden.shtml
|
529
545
|
- apps/core/forms/widgets/inputs/input/input.rb
|
@@ -535,8 +551,6 @@ files:
|
|
535
551
|
- apps/core/forms/widgets/inputs/search_select/search_select.shtml
|
536
552
|
- apps/core/forms/widgets/inputs/select/select.rb
|
537
553
|
- apps/core/forms/widgets/inputs/select/select.shtml
|
538
|
-
- apps/core/forms/widgets/inputs/subform/subform.rb
|
539
|
-
- apps/core/forms/widgets/inputs/subform/subform.shtml
|
540
554
|
- apps/core/forms/widgets/inputs/text/text.rb
|
541
555
|
- apps/core/forms/widgets/inputs/text/text.shtml
|
542
556
|
- apps/core/forms/widgets/inputs/text_area/text_area.rb
|
@@ -544,15 +558,17 @@ files:
|
|
544
558
|
- apps/drb_server/_init.rb
|
545
559
|
- apps/drb_server/lib/model_server.rb
|
546
560
|
- apps/drb_server/script/start_server.rb
|
561
|
+
- apps/git_model_versioning/models/mixins/git_versioned.rb
|
547
562
|
- apps/hippo/_init.rb
|
548
563
|
- apps/hippo/models/mixins/hippo_struct.rb
|
549
564
|
- apps/hippo/models/security_group.rb
|
550
565
|
- apps/hippo/models/security_user.rb
|
566
|
+
- apps/master/controllers/git.rb
|
551
567
|
- apps/messenger/_init.rb
|
552
568
|
- apps/messenger/config/options.rb
|
553
|
-
- apps/messenger/config/worker.rb
|
569
|
+
- apps/messenger/config/worker/queue.rb
|
554
570
|
- apps/messenger/controllers/messenger_controller.rb
|
555
|
-
- apps/messenger/controllers/mixins/
|
571
|
+
- apps/messenger/controllers/mixins/messenger_helper.rb
|
556
572
|
- apps/messenger/lib/backends/email/smtp.rb
|
557
573
|
- apps/messenger/messenger.rb
|
558
574
|
- apps/messenger/models/email.rb
|
@@ -564,10 +580,16 @@ files:
|
|
564
580
|
- apps/messenger/views/messenger.layout.shtml
|
565
581
|
- apps/messenger/views/queue.shtml
|
566
582
|
- apps/messenger/views/tags/sent_messages.shtml
|
583
|
+
- apps/saml/_init.rb
|
584
|
+
- apps/saml/controllers/saml2idp.rb
|
585
|
+
- apps/saml/lib/bindings/http_redirect_binding.rb
|
586
|
+
- apps/saml/lib/messages/authn_request.rb
|
587
|
+
- apps/saml/lib/saml.rb
|
567
588
|
- apps/soap/_init.rb
|
568
589
|
- apps/soap/controllers/soap_controller.rb
|
569
590
|
- apps/soap/doc/examples/example.rb
|
570
591
|
- apps/soap/lib/soap.rb
|
592
|
+
- apps/soap/soap.gemspec
|
571
593
|
- apps/sso/_init.rb
|
572
594
|
- apps/sso/config/options.rb
|
573
595
|
- apps/sso/controllers/mixins/saml2_mixin.rb
|
@@ -590,12 +612,14 @@ files:
|
|
590
612
|
- apps/worker/models/job.rb
|
591
613
|
- apps/worker/worker.rb
|
592
614
|
- bin/spider
|
615
|
+
- blueprints/app/__APP__.appspec
|
593
616
|
- blueprints/app/_init.rb
|
594
617
|
- blueprints/app/controllers/__APP___controller.rb
|
595
618
|
- blueprints/app/views/__APP__.layout.shtml
|
596
619
|
- blueprints/app/views/index.shtml
|
597
620
|
- blueprints/install/config/config.yml
|
598
621
|
- blueprints/install/init.rb
|
622
|
+
- blueprints/model.rb
|
599
623
|
- data/locale/it/LC_MESSAGES/spider.mo
|
600
624
|
- data/locale/it/LC_MESSAGES/spider_auth.mo
|
601
625
|
- data/locale/it/LC_MESSAGES/spider_components.mo
|
@@ -606,6 +630,7 @@ files:
|
|
606
630
|
- lib/spiderfw/cache/template_cache.rb
|
607
631
|
- lib/spiderfw/cmd/cmd.rb
|
608
632
|
- lib/spiderfw/cmd/commands/cert.rb
|
633
|
+
- lib/spiderfw/cmd/commands/config.rb
|
609
634
|
- lib/spiderfw/cmd/commands/console.rb
|
610
635
|
- lib/spiderfw/cmd/commands/init.rb
|
611
636
|
- lib/spiderfw/cmd/commands/model.rb
|
@@ -615,7 +640,6 @@ files:
|
|
615
640
|
- lib/spiderfw/config/configurable.rb
|
616
641
|
- lib/spiderfw/config/configuration.rb
|
617
642
|
- lib/spiderfw/config/options/spider.rb
|
618
|
-
- lib/spiderfw/controller/app_controller.rb
|
619
643
|
- lib/spiderfw/controller/controller.rb
|
620
644
|
- lib/spiderfw/controller/controller_exceptions.rb
|
621
645
|
- lib/spiderfw/controller/controller_io.rb
|
@@ -669,6 +693,7 @@ files:
|
|
669
693
|
- lib/spiderfw/model/datatypes/bool.rb
|
670
694
|
- lib/spiderfw/model/datatypes/decimal.rb
|
671
695
|
- lib/spiderfw/model/datatypes/email.rb
|
696
|
+
- lib/spiderfw/model/datatypes/file_path.rb
|
672
697
|
- lib/spiderfw/model/datatypes/password.rb
|
673
698
|
- lib/spiderfw/model/datatypes/serialized_object.rb
|
674
699
|
- lib/spiderfw/model/datatypes/text.rb
|
@@ -750,6 +775,8 @@ files:
|
|
750
775
|
- lib/spiderfw/utils/monkey/exception.rb
|
751
776
|
- lib/spiderfw/utils/monkey/kernel.rb
|
752
777
|
- lib/spiderfw/utils/monkey/module.rb
|
778
|
+
- lib/spiderfw/utils/monkey/nil_class.rb
|
779
|
+
- lib/spiderfw/utils/monkey/numeric.rb
|
753
780
|
- lib/spiderfw/utils/monkey/symbol.rb
|
754
781
|
- lib/spiderfw/utils/monkey/time.rb
|
755
782
|
- lib/spiderfw/utils/multi_level_hash.rb
|
@@ -761,7 +788,6 @@ files:
|
|
761
788
|
- lib/spiderfw/utils/shared_store/file_shared_store.rb
|
762
789
|
- lib/spiderfw/utils/shared_store/memory_shared_store.rb
|
763
790
|
- lib/spiderfw/utils/shared_store.rb
|
764
|
-
- lib/spiderfw/utils/test_case.rb
|
765
791
|
- lib/spiderfw/utils/thread_out.rb
|
766
792
|
- lib/spiderfw/version.rb
|
767
793
|
- lib/spiderfw/widget/rest_model.rb
|
@@ -794,9 +820,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
794
820
|
version: "0"
|
795
821
|
version:
|
796
822
|
requirements:
|
797
|
-
- "Optional dependencies: openssl, sqlite3, webrick, mongrel, ruby-oci8
|
823
|
+
- "Optional dependencies: openssl, sqlite3, webrick, mongrel, ruby-oci8 >2.0, mysql"
|
798
824
|
rubyforge_project:
|
799
|
-
rubygems_version: 1.3.
|
825
|
+
rubygems_version: 1.3.4
|
800
826
|
signing_key:
|
801
827
|
specification_version: 3
|
802
828
|
summary: A (web) framework
|