scaffolding_extensions 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2004-2008 Jeremy Evans
1
+ Copyright (c) 2005-2010 Jeremy Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README CHANGED
@@ -21,20 +21,37 @@ to better suit your needs.
21
21
  Scaffolding Extensions currently supports:
22
22
 
23
23
  * Web Frameworks
24
- * Rails 2.3.5 (with or without RailsXss plugin)
25
- * Ramaze 2010.04.04
26
- * Camping 2.0
24
+ * Rails 2.3.8 (with or without RailsXss plugin)
25
+ * Ramaze 2010.06.18
26
+ * Camping 2.1
27
27
  * Sinatra 1.0
28
28
  * Merb 1.0.4
29
29
  * Rack 1.1.0
30
30
  * Object Relational Mappers
31
- * ActiveRecord 2.3.5
32
- * Sequel 3.10.0
33
- * DataMapper 0.10.2 (see doc/datamapper.txt for details)
31
+ * ActiveRecord 2.3.8
32
+ * Sequel 3.14.0
33
+ * DataMapper 1.0 (see doc/datamapper.txt for details)
34
34
  * Javascript Libaries (used for Ajax/Autocompleting)
35
35
  * Prototype 1.6.0.3
36
36
  * JQuery 1.2.3
37
37
 
38
+ There are differing levels of support for the web frameworks, mostly related
39
+ to whether or not you can use custom views and layouts. Custom views mean
40
+ that you can keep the scaffolded controller action, and change how the
41
+ view is displayed. Custom layouts mean you can provide your own layout,
42
+ which the scaffolded views use. Here's the current level of support:
43
+
44
+ * Scaffold view, scaffold layout (all)
45
+ * Scaffold view, custom layout (Rails, Sinatra)
46
+ * Custom view, custom layout (Rails, Sinatra)
47
+ * Custom view, scaffold layout (Sinatra)
48
+
49
+ For the web frameworks that don't have support for custom layouts and views,
50
+ you can still customize the scaffolded views and layout, but you need to copy
51
+ the scaffold template directory from the plugin and set the
52
+ @scaffold_template_dir class instance variable in the controller to the path
53
+ to your scaffold template directory.
54
+
38
55
  Support for other web frameworks and ORMs can be added, see the
39
56
  controller_spec.txt and model_spec.txt files for the methods that need to be
40
57
  defined.
data/doc/ramaze.txt CHANGED
@@ -18,3 +18,6 @@ controllers have been loaded.
18
18
 
19
19
  Also, note that Scaffolding Extensions uses the :Erubis engine in Ramaze,
20
20
  so you must have Erubis installed to use it.
21
+
22
+ Finally, note that should not call map after calling a scaffolding method
23
+ in your controller.
data/doc/testing.txt CHANGED
@@ -17,6 +17,6 @@ There is an automated test suite that tests the plugin against all supported web
17
17
  frameworks and ORMs. It is now available in the same github repository as the
18
18
  plugin itself.
19
19
 
20
- It requires the ruby-sytle, hpricot, and mongrel gems (in addition to gems for
20
+ It requires the unicorn and hpricot gems (in addition to gems for
21
21
  all of the frameworks and ORMs), and does black box testing of the plugin by
22
22
  running a web crawler against a running application that uses the plugin.
@@ -92,17 +92,30 @@ module ScaffoldingExtensions
92
92
  # Adds a default scaffolded layout if none has been set. Activates the Erubis
93
93
  # engine. Includes the necessary scaffolding helper and controller methods.
94
94
  def scaffold_setup_helper
95
- map generate_mapping, :scaffolding_extensions
96
- map_views '/'
97
- map_layouts '/'
98
95
  engine :Erubis
99
96
  layout(:layout){|name, wish| !request.xhr? }
100
-
101
- o = Ramaze::App[:scaffolding_extensions].options
102
- o.roots = [scaffold_template_dir]
103
- o.views = ['/']
104
- o.layouts = ['/']
105
-
97
+
98
+ # Instantiates the controller's App (necessary to have a valid
99
+ # Ramaze::Controller.options, which is actually just a shortcut
100
+ # to controller's App options)
101
+ setup
102
+
103
+ # Retrieves current controller options, and ensure the required ones
104
+ # are properly initialized
105
+ o = options
106
+ o.roots ||= []
107
+ o.views ||= []
108
+ o.layouts ||= []
109
+
110
+ # Adds scaffold_template_dir to the controller roots
111
+ o.roots += [scaffold_template_dir] unless o.roots.include?(scaffold_template_dir)
112
+
113
+ # The scaffolding_extensions templates are located directly in the
114
+ # scaffold_template_dir, not in a view/ or layout/ subdirectory,
115
+ # so adds '/' to the views et layout default search paths
116
+ o.views << '/' unless o.views.include? '/'
117
+ o.layouts << '/' unless o.layouts.include? '/'
118
+
106
119
  include ScaffoldingExtensions::Controller
107
120
  include ScaffoldingExtensions::RamazeController
108
121
  include ScaffoldingExtensions::Helper
@@ -228,13 +228,13 @@ module ScaffoldingExtensions::MetaDataMapper
228
228
  end
229
229
 
230
230
  # The column type for the given table column, or nil if it isn't a table column
231
- def scaffold_table_column_type(column)
232
- column = self.properties[column]
231
+ def scaffold_table_column_type(c)
232
+ column = self.properties[c]
233
233
  if column then
234
- if column.type == DataMapper::Types::Text
234
+ if column.type == DataMapper::Property::Text
235
235
  :text
236
236
  else
237
- column.type.to_s.split("::").last.downcase.intern
237
+ column.class.to_s.split("::").last.downcase.intern
238
238
  end
239
239
  else
240
240
  nil
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffolding_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ hash: 1
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 4
9
+ - 3
10
+ version: 1.4.3
5
11
  platform: ruby
6
12
  authors:
7
13
  - Jeremy Evans
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-04-14 00:00:00 -07:00
18
+ date: 2010-08-26 00:00:00 -07:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -103,21 +109,29 @@ rdoc_options:
103
109
  require_paths:
104
110
  - lib
105
111
  required_ruby_version: !ruby/object:Gem::Requirement
112
+ none: false
106
113
  requirements:
107
114
  - - ">="
108
115
  - !ruby/object:Gem::Version
116
+ hash: 59
117
+ segments:
118
+ - 1
119
+ - 8
120
+ - 6
109
121
  version: 1.8.6
110
- version:
111
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
+ none: false
112
124
  requirements:
113
125
  - - ">="
114
126
  - !ruby/object:Gem::Version
127
+ hash: 3
128
+ segments:
129
+ - 0
115
130
  version: "0"
116
- version:
117
131
  requirements: []
118
132
 
119
133
  rubyforge_project: scaffolding-ext
120
- rubygems_version: 1.3.5
134
+ rubygems_version: 1.3.7
121
135
  signing_key:
122
136
  specification_version: 3
123
137
  summary: Administrative database front-end for multiple web-frameworks and ORMs