scaffolding_extensions 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
data/README
CHANGED
@@ -22,13 +22,13 @@ Scaffolding Extensions currently supports:
|
|
22
22
|
|
23
23
|
* Web Frameworks
|
24
24
|
* Rails 2.0
|
25
|
-
* Ramaze 0.3.5
|
25
|
+
* Ramaze 0.3.9.5
|
26
26
|
* Camping 1.5
|
27
|
-
* Sinatra 0.
|
27
|
+
* Sinatra 0.2.0
|
28
28
|
* Object/Relational Mappers
|
29
29
|
* ActiveRecord 2.0
|
30
|
-
* DataMapper 0.
|
31
|
-
* Sequel
|
30
|
+
* DataMapper 0.3.0
|
31
|
+
* Sequel 1.4.0
|
32
32
|
* Javascript Libaries (used for Ajax/Autocompleting)
|
33
33
|
* Prototype 1.6.0.1
|
34
34
|
* JQuery 1.2.3
|
@@ -43,11 +43,12 @@ able to use an older version of the plugin, which won't be discussed further as
|
|
43
43
|
it is substantially different from the current version (see the conversion.txt
|
44
44
|
file for details).
|
45
45
|
|
46
|
-
You can get Scaffolding Extensions via
|
46
|
+
You can get Scaffolding Extensions via git or as a gem:
|
47
47
|
|
48
|
-
*
|
48
|
+
* git: git://github.com/jeremyevans/scaffolding_extensions.git
|
49
49
|
* gem: sudo gem install scaffolding_extensions
|
50
|
-
* demo: http://scaffolding-extensions.jeremyevans.net
|
50
|
+
* demo: http://scaffolding-extensions.jeremyevans.net
|
51
|
+
* github: http://github.com/jeremyevans/scaffolding_extensions/tree/master
|
51
52
|
* RDoc: http://code.jeremyevans.net/doc/scaffolding_extensions
|
52
53
|
* Bug Tracker: http://rubyforge.org/tracker/?atid=22169&group_id=5726&func=browse
|
53
54
|
* Forum: http://rubyforge.org/forum/forum.php?forum_id=22403
|
data/doc/testing.txt
CHANGED
@@ -2,11 +2,10 @@ If you are using Rails and want some basic generic tests, looking the test
|
|
2
2
|
folder for details on the Rails testing helper methods (e.g.
|
3
3
|
test_scaffold_all_models).
|
4
4
|
|
5
|
-
There is an automated test suite that tests the plugin against all supported
|
6
|
-
|
5
|
+
There is an automated test suite that tests the plugin against all supported web
|
6
|
+
frameworks and ORMs. It is now available in the same github repository as the
|
7
|
+
plugin itself.
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
testing of the plugin by running a web crawler against a running application
|
12
|
-
that uses the plugin.
|
9
|
+
It requires the ruby-sytle, hpricot, and mongrel gems (in addition to gems for
|
10
|
+
all of the frameworks and ORMs), and does black box testing of the plugin by
|
11
|
+
running a web crawler against a running application that uses the plugin.
|
@@ -69,9 +69,7 @@ module ScaffoldingExtensions
|
|
69
69
|
# Treats the id option as special (appending it so the list of options),
|
70
70
|
# which requires a lambda router.
|
71
71
|
def scaffold_url(action, options = {})
|
72
|
-
|
73
|
-
options.each{|k,v| escaped_options[u(k.to_s)] = u(v.to_s)}
|
74
|
-
escaped_options['id'] ? Rs(action, escaped_options.delete('id'), escaped_options) : Rs(action, escaped_options)
|
72
|
+
options[:id] ? Rs(action, options.delete(:id), options) : Rs(action, options)
|
75
73
|
end
|
76
74
|
end
|
77
75
|
|
@@ -101,7 +99,7 @@ module ScaffoldingExtensions
|
|
101
99
|
include ScaffoldingExtensions::RamazeController
|
102
100
|
include ScaffoldingExtensions::Helper
|
103
101
|
include ScaffoldingExtensions::PrototypeHelper
|
104
|
-
unless trait[:layout][:all]
|
102
|
+
unless trait[:layout] && trait[:layout][:all]
|
105
103
|
layout(:scaffold_layout)
|
106
104
|
define_method(:scaffold_layout){::Ramaze::Action.current.template = scaffold_path(:layout)}
|
107
105
|
end
|
@@ -62,12 +62,12 @@ module ScaffoldingExtensions
|
|
62
62
|
text = ERB.new(render_options[:inline]).result(binding)
|
63
63
|
Proc.new do
|
64
64
|
headers('Content-Type'=>'text/javascript') if use_js
|
65
|
-
render(text,
|
65
|
+
render(:text, text, :layout=>false)
|
66
66
|
end
|
67
67
|
else
|
68
68
|
@content = ERB.new(File.read(scaffold_path(File.exists?(scaffold_path(suffix_action)) ? suffix_action : action))).result(binding)
|
69
69
|
text = ERB.new(File.read(scaffold_path('layout'))).result(binding)
|
70
|
-
Proc.new{render(text,
|
70
|
+
Proc.new{render(:text, text, :layout=>false)}
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -101,7 +101,7 @@ module ScaffoldingExtensions
|
|
101
101
|
param
|
102
102
|
end
|
103
103
|
|
104
|
-
# You need to enable
|
104
|
+
# You need to enable Sinatra's session support for this to work,
|
105
105
|
# otherwise, this will always be the empty hash. The session data
|
106
106
|
# is only used for access control, so if you aren't using
|
107
107
|
# scaffold_session_value, it shouldn't matter.
|
@@ -143,13 +143,21 @@ module ScaffoldingExtensions
|
|
143
143
|
end
|
144
144
|
|
145
145
|
module TextRenderer
|
146
|
-
def render_text(template)
|
146
|
+
def render_text(template, options = {})
|
147
147
|
template
|
148
148
|
end
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
152
|
-
|
152
|
+
class Sinatra::EventContext
|
153
|
+
include ScaffoldingExtensions::TextRenderer
|
154
|
+
end
|
155
|
+
|
156
|
+
class NilClass
|
157
|
+
def from_param
|
158
|
+
nil
|
159
|
+
end
|
160
|
+
end
|
153
161
|
|
154
162
|
def scaffold(root, model, options = {})
|
155
163
|
scaffold_setup(root).send(:scaffold, model, options)
|
@@ -232,7 +232,7 @@ module ScaffoldingExtensions
|
|
232
232
|
def scaffold_model_error_messages
|
233
233
|
return '' unless (errors = @scaffold_object.scaffold_error_messages).length > 0
|
234
234
|
content = '<p>There were problems with the following fields:</p><ul>'
|
235
|
-
errors.each{|msg| content << "<li
|
235
|
+
errors.each{|msg| content << "<li>#{msg}</li>"}
|
236
236
|
content << '</ul>'
|
237
237
|
content
|
238
238
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: scaffolding_extensions
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2008-
|
6
|
+
version: 1.1.2
|
7
|
+
date: 2008-04-15 00:00:00 -07:00
|
8
8
|
summary: Administrative database front-end for multiple web-frameworks and ORMs
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -33,61 +33,61 @@ files:
|
|
33
33
|
- README
|
34
34
|
- lib/scaffolding_extensions.rb
|
35
35
|
- lib/scaffolding_extensions
|
36
|
-
- lib/scaffolding_extensions/
|
36
|
+
- lib/scaffolding_extensions/controller.rb
|
37
37
|
- lib/scaffolding_extensions/controller
|
38
38
|
- lib/scaffolding_extensions/helper.rb
|
39
|
-
- lib/scaffolding_extensions/
|
40
|
-
- lib/scaffolding_extensions/prototype_helper.rb
|
39
|
+
- lib/scaffolding_extensions/jquery_helper.rb
|
41
40
|
- lib/scaffolding_extensions/meta_controller.rb
|
42
|
-
- lib/scaffolding_extensions/overridable.rb
|
43
|
-
- lib/scaffolding_extensions/model.rb
|
44
41
|
- lib/scaffolding_extensions/meta_model.rb
|
45
|
-
- lib/scaffolding_extensions/
|
46
|
-
- lib/scaffolding_extensions/model
|
47
|
-
- lib/scaffolding_extensions/
|
48
|
-
- lib/scaffolding_extensions/
|
49
|
-
- lib/scaffolding_extensions/model/sequel.rb
|
50
|
-
- lib/scaffolding_extensions/controller/ramaze.rb
|
42
|
+
- lib/scaffolding_extensions/model.rb
|
43
|
+
- lib/scaffolding_extensions/model
|
44
|
+
- lib/scaffolding_extensions/overridable.rb
|
45
|
+
- lib/scaffolding_extensions/prototype_helper.rb
|
51
46
|
- lib/scaffolding_extensions/controller/action_controller.rb
|
52
47
|
- lib/scaffolding_extensions/controller/camping.rb
|
48
|
+
- lib/scaffolding_extensions/controller/ramaze.rb
|
53
49
|
- lib/scaffolding_extensions/controller/sinatra.rb
|
50
|
+
- lib/scaffolding_extensions/model/active_record.rb
|
51
|
+
- lib/scaffolding_extensions/model/ardm.rb
|
52
|
+
- lib/scaffolding_extensions/model/data_mapper.rb
|
53
|
+
- lib/scaffolding_extensions/model/sequel.rb
|
54
54
|
- doc/advanced.txt
|
55
|
+
- doc/camping.txt
|
56
|
+
- doc/controller_spec.txt
|
55
57
|
- doc/conversion.txt
|
56
58
|
- doc/model_spec.txt
|
57
|
-
- doc/controller_spec.txt
|
58
|
-
- doc/testing.txt
|
59
59
|
- doc/ramaze.txt
|
60
|
-
- doc/camping.txt
|
61
|
-
- doc/sinatra.txt
|
62
60
|
- doc/sequel.txt
|
61
|
+
- doc/sinatra.txt
|
62
|
+
- doc/testing.txt
|
63
63
|
- contrib/scaffold_associations_tree
|
64
|
-
- contrib/scaffold_jquery_autocomplete
|
65
64
|
- contrib/scaffold_auto_complete_style
|
66
65
|
- contrib/scaffold_form_focus
|
66
|
+
- contrib/scaffold_jquery_autocomplete
|
67
|
+
- contrib/scaffold_associations_tree/README
|
68
|
+
- contrib/scaffold_associations_tree/bullet.gif
|
67
69
|
- contrib/scaffold_associations_tree/minus.gif
|
68
|
-
- contrib/scaffold_associations_tree/scaffold_associations_tree.css
|
69
70
|
- contrib/scaffold_associations_tree/plus.gif
|
71
|
+
- contrib/scaffold_associations_tree/scaffold_associations_tree.css
|
70
72
|
- contrib/scaffold_associations_tree/scaffold_associations_tree.js
|
71
|
-
- contrib/scaffold_associations_tree/bullet.gif
|
72
|
-
- contrib/scaffold_associations_tree/README
|
73
|
-
- contrib/scaffold_jquery_autocomplete/jquery.ui.se_autocomplete.css
|
74
|
-
- contrib/scaffold_jquery_autocomplete/README
|
75
|
-
- contrib/scaffold_jquery_autocomplete/jquery.ui.se_autocomplete.js
|
76
|
-
- contrib/scaffold_auto_complete_style/auto_complete.css
|
77
73
|
- contrib/scaffold_auto_complete_style/README
|
74
|
+
- contrib/scaffold_auto_complete_style/auto_complete.css
|
78
75
|
- contrib/scaffold_form_focus/README
|
79
76
|
- contrib/scaffold_form_focus/scaffold_form_focus.js
|
77
|
+
- contrib/scaffold_jquery_autocomplete/README
|
78
|
+
- contrib/scaffold_jquery_autocomplete/jquery.ui.se_autocomplete.css
|
79
|
+
- contrib/scaffold_jquery_autocomplete/jquery.ui.se_autocomplete.js
|
80
|
+
- scaffolds/edit.rhtml
|
80
81
|
- scaffolds/habtm.rhtml
|
81
|
-
- scaffolds/
|
82
|
+
- scaffolds/index.rhtml
|
82
83
|
- scaffolds/layout.rhtml
|
83
|
-
- scaffolds/
|
84
|
-
- scaffolds/show.rhtml
|
84
|
+
- scaffolds/list.rhtml
|
85
85
|
- scaffolds/listtable.rhtml
|
86
|
-
- scaffolds/edit.rhtml
|
87
|
-
- scaffolds/search.rhtml
|
88
|
-
- scaffolds/index.rhtml
|
89
86
|
- scaffolds/manage.rhtml
|
87
|
+
- scaffolds/merge.rhtml
|
90
88
|
- scaffolds/new.rhtml
|
89
|
+
- scaffolds/search.rhtml
|
90
|
+
- scaffolds/show.rhtml
|
91
91
|
- test/scaffolding_extensions_test.rb
|
92
92
|
test_files: []
|
93
93
|
|