rails 1.1.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails might be problematic. Click here for more details.

Files changed (104) hide show
  1. data/CHANGELOG +267 -2
  2. data/MIT-LICENSE +1 -1
  3. data/README +62 -63
  4. data/Rakefile +26 -15
  5. data/bin/process/inspector +3 -0
  6. data/configs/databases/frontbase.yml +28 -0
  7. data/configs/databases/mysql.yml +3 -2
  8. data/configs/databases/oracle.yml +10 -1
  9. data/configs/databases/sqlite3.yml +3 -0
  10. data/configs/lighttpd.conf +1 -0
  11. data/configs/routes.rb +1 -0
  12. data/environments/boot.rb +4 -3
  13. data/environments/environment.rb +9 -2
  14. data/environments/production.rb +1 -1
  15. data/helpers/application.rb +5 -2
  16. data/html/404.html +27 -5
  17. data/html/500.html +27 -5
  18. data/html/javascripts/controls.js +41 -23
  19. data/html/javascripts/dragdrop.js +105 -76
  20. data/html/javascripts/effects.js +293 -163
  21. data/html/javascripts/prototype.js +897 -389
  22. data/lib/breakpoint.rb +31 -1
  23. data/lib/breakpoint_client.rb +5 -5
  24. data/lib/code_statistics.rb +1 -1
  25. data/lib/commands/performance/profiler.rb +25 -9
  26. data/lib/commands/plugin.rb +69 -23
  27. data/lib/commands/process/inspector.rb +68 -0
  28. data/lib/commands/process/reaper.rb +88 -69
  29. data/lib/commands/process/spawner.rb +148 -33
  30. data/lib/commands/runner.rb +27 -6
  31. data/lib/commands/server.rb +18 -9
  32. data/lib/commands/servers/base.rb +19 -0
  33. data/lib/commands/servers/lighttpd.rb +20 -18
  34. data/lib/commands/servers/mongrel.rb +65 -0
  35. data/lib/console_sandbox.rb +2 -2
  36. data/lib/dispatcher.rb +67 -11
  37. data/lib/fcgi_handler.rb +52 -34
  38. data/lib/initializer.rb +190 -111
  39. data/lib/rails/version.rb +2 -2
  40. data/lib/rails_generator/base.rb +82 -24
  41. data/lib/rails_generator/commands.rb +87 -25
  42. data/lib/rails_generator/generated_attribute.rb +42 -0
  43. data/lib/rails_generator/generators/applications/app/app_generator.rb +13 -10
  44. data/lib/rails_generator/generators/components/controller/controller_generator.rb +1 -2
  45. data/lib/rails_generator/generators/components/mailer/mailer_generator.rb +10 -8
  46. data/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +1 -1
  47. data/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +4 -4
  48. data/lib/rails_generator/generators/components/mailer/templates/view.rhtml +1 -1
  49. data/lib/rails_generator/generators/components/migration/templates/migration.rb +1 -1
  50. data/lib/rails_generator/generators/components/model/USAGE +19 -12
  51. data/lib/rails_generator/generators/components/model/model_generator.rb +4 -0
  52. data/lib/rails_generator/generators/components/model/templates/fixtures.yml +8 -2
  53. data/lib/rails_generator/generators/components/model/templates/migration.rb +3 -1
  54. data/lib/rails_generator/generators/components/observer/USAGE +15 -0
  55. data/lib/rails_generator/generators/components/observer/observer_generator.rb +16 -0
  56. data/lib/rails_generator/generators/components/observer/templates/observer.rb +2 -0
  57. data/lib/rails_generator/generators/components/observer/templates/unit_test.rb +10 -0
  58. data/lib/rails_generator/generators/components/plugin/plugin_generator.rb +4 -0
  59. data/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +1 -0
  60. data/lib/rails_generator/generators/components/resource/resource_generator.rb +76 -0
  61. data/lib/rails_generator/generators/components/resource/templates/USAGE +18 -0
  62. data/lib/rails_generator/generators/components/resource/templates/controller.rb +2 -0
  63. data/lib/rails_generator/generators/components/resource/templates/fixtures.yml +11 -0
  64. data/lib/rails_generator/generators/components/resource/templates/functional_test.rb +20 -0
  65. data/lib/rails_generator/generators/components/resource/templates/helper.rb +2 -0
  66. data/lib/rails_generator/generators/components/resource/templates/migration.rb +13 -0
  67. data/lib/rails_generator/generators/components/resource/templates/model.rb +2 -0
  68. data/lib/rails_generator/generators/components/resource/templates/unit_test.rb +10 -0
  69. data/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +10 -1
  70. data/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +11 -7
  71. data/lib/rails_generator/generators/components/scaffold/templates/layout.rhtml +5 -1
  72. data/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +2 -2
  73. data/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml +1 -1
  74. data/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +2 -2
  75. data/lib/rails_generator/generators/components/scaffold_resource/USAGE +29 -0
  76. data/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +92 -0
  77. data/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +79 -0
  78. data/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +11 -0
  79. data/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +57 -0
  80. data/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +2 -0
  81. data/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml +17 -0
  82. data/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +13 -0
  83. data/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +2 -0
  84. data/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +74 -0
  85. data/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +10 -0
  86. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml +19 -0
  87. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml +24 -0
  88. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml +18 -0
  89. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml +10 -0
  90. data/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +7 -1
  91. data/lib/rails_generator/generators/components/session_migration/templates/migration.rb +5 -4
  92. data/lib/rails_generator/lookup.rb +1 -2
  93. data/lib/rails_generator/options.rb +6 -3
  94. data/lib/tasks/databases.rake +46 -20
  95. data/lib/tasks/documentation.rake +1 -0
  96. data/lib/tasks/framework.rake +1 -3
  97. data/lib/tasks/pre_namespace_aliases.rake +34 -27
  98. data/lib/tasks/rails.rb +2 -2
  99. data/lib/tasks/statistics.rake +6 -5
  100. data/lib/tasks/testing.rake +28 -13
  101. data/lib/tasks/tmp.rake +8 -1
  102. data/lib/test_help.rb +3 -2
  103. data/lib/webrick_server.rb +6 -8
  104. metadata +50 -9
@@ -1,5 +1,9 @@
1
- <html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2
5
  <head>
6
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
3
7
  <title><%= controller_class_name %>: <%%= controller.action_name %></title>
4
8
  <%%= stylesheet_link_tag 'scaffold' %>
5
9
  </head>
@@ -1,9 +1,9 @@
1
1
  <h1>Editing <%= singular_name %></h1>
2
2
 
3
- <%%= start_form_tag :action => 'update<%= @suffix %>', :id => @<%= singular_name %> %>
3
+ <%% form_tag :action => 'update<%= @suffix %>', :id => @<%= singular_name %> do %>
4
4
  <%%= render :partial => 'form' %>
5
5
  <%%= submit_tag 'Edit' %>
6
- <%%= end_form_tag %>
6
+ <%% end %>
7
7
 
8
8
  <%%= link_to 'Show', :action => 'show<%= suffix %>', :id => @<%= singular_name %> %> |
9
9
  <%%= link_to 'Back', :action => 'list<%= suffix %>' %>
@@ -14,7 +14,7 @@
14
14
  <%% end %>
15
15
  <td><%%= link_to 'Show', :action => 'show<%= suffix %>', :id => <%= singular_name %> %></td>
16
16
  <td><%%= link_to 'Edit', :action => 'edit<%= suffix %>', :id => <%= singular_name %> %></td>
17
- <td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?', :post => true %></td>
17
+ <td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?', :method => :post %></td>
18
18
  </tr>
19
19
  <%% end %>
20
20
  </table>
@@ -1,8 +1,8 @@
1
1
  <h1>New <%= singular_name %></h1>
2
2
 
3
- <%%= start_form_tag :action => 'create<%= @suffix %>' %>
3
+ <%% form_tag :action => 'create<%= @suffix %>' do %>
4
4
  <%%= render :partial => 'form' %>
5
5
  <%%= submit_tag "Create" %>
6
- <%%= end_form_tag %>
6
+ <%% end %>
7
7
 
8
8
  <%%= link_to 'Back', :action => 'list<%= suffix %>' %>
@@ -0,0 +1,29 @@
1
+ Description:
2
+ The scaffold resource generator creates a model, a controller, and a set of templates that's ready to use as the
3
+ starting point for your REST-like, resource-oriented application. This basically means that it follows a set of
4
+ conventions to exploit the full set of HTTP verbs (GET/POST/PUT/DELETE) and is prepared for multi-client access
5
+ (like one view for HTML, one for an XML API, one for ATOM, etc). Everything comes with sample unit and functional
6
+ tests as well.
7
+
8
+ The generator takes the name of the model as its first argument. This model name is then pluralized to get the
9
+ controller name. So "scaffold_resource post" will generate a Post model and a PostsController and will be intended
10
+ for URLs like /posts and /posts/45.
11
+
12
+ As additional parameters, the generator will take attribute pairs described by name and type. These attributes will
13
+ be used to prepopulate the migration to create the table for the model and to give you a set of templates for the
14
+ view. For example, "scaffold_resource post title:string created_on:date body:text published:boolean" will give
15
+ you a model with those four attributes, forms to create and edit those models from, and an index that'll list them
16
+ all.
17
+
18
+ You don't have to think up all attributes up front, but it's a good idea of adding just the baseline of what's
19
+ needed to start really working with the resource.
20
+
21
+ Once the generator has run, you'll need to add a declaration to your config/routes.rb file to hook up the rules
22
+ that'll point URLs to this new resource. If you create a resource like "scaffold_resource post", you'll need to
23
+ add "map.resources :posts" (notice the plural form) in the routes file. Then your new resource is accessible from
24
+ /posts.
25
+
26
+ Examples:
27
+ ./script/generate scaffold_resource post # no attributes, view will be anemic
28
+ ./script/generate scaffold_resource post title:string created_on:date body:text published:boolean
29
+ ./script/generate scaffold_resource purchase order_id:integer created_at:datetime amount:decimal
@@ -0,0 +1,92 @@
1
+ class ScaffoldResourceGenerator < Rails::Generator::NamedBase
2
+ attr_reader :controller_name,
3
+ :controller_class_path,
4
+ :controller_file_path,
5
+ :controller_class_nesting,
6
+ :controller_class_nesting_depth,
7
+ :controller_class_name,
8
+ :controller_singular_name,
9
+ :controller_plural_name
10
+ alias_method :controller_file_name, :controller_singular_name
11
+ alias_method :controller_table_name, :controller_plural_name
12
+
13
+ def initialize(runtime_args, runtime_options = {})
14
+ super
15
+
16
+ @controller_name = @name.pluralize
17
+
18
+ base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name)
19
+ @controller_class_name_without_nesting, @controller_singular_name, @controller_plural_name = inflect_names(base_name)
20
+
21
+ if @controller_class_nesting.empty?
22
+ @controller_class_name = @controller_class_name_without_nesting
23
+ else
24
+ @controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}"
25
+ end
26
+ end
27
+
28
+ def manifest
29
+ record do |m|
30
+ # Check for class naming collisions.
31
+ m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
32
+ m.class_collisions(class_path, "#{class_name}")
33
+
34
+ # Controller, helper, views, and test directories.
35
+ m.directory(File.join('app/models', class_path))
36
+ m.directory(File.join('app/controllers', controller_class_path))
37
+ m.directory(File.join('app/helpers', controller_class_path))
38
+ m.directory(File.join('app/views', controller_class_path, controller_file_name))
39
+ m.directory(File.join('test/functional', controller_class_path))
40
+ m.directory(File.join('test/unit', class_path))
41
+
42
+ for action in scaffold_views
43
+ m.template(
44
+ "view_#{action}.rhtml",
45
+ File.join('app/views', controller_class_path, controller_file_name, "#{action}.rhtml")
46
+ )
47
+ end
48
+
49
+ # Layout and stylesheet.
50
+ m.template('layout.rhtml', File.join('app/views/layouts', controller_class_path, "#{controller_file_name}.rhtml"))
51
+ m.template('style.css', 'public/stylesheets/scaffold.css')
52
+
53
+ m.template('model.rb', File.join('app/models', class_path, "#{file_name}.rb"))
54
+
55
+ m.template(
56
+ 'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
57
+ )
58
+
59
+ m.template('functional_test.rb', File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb"))
60
+ m.template('helper.rb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))
61
+ m.template('unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb"))
62
+ m.template('fixtures.yml', File.join('test/fixtures', "#{table_name}.yml"))
63
+
64
+ unless options[:skip_migration]
65
+ m.migration_template(
66
+ 'migration.rb', 'db/migrate',
67
+ :assigns => {
68
+ :migration_name => "Create#{class_name.pluralize.gsub(/::/, '')}",
69
+ :attributes => attributes
70
+ },
71
+ :migration_file_name => "create_#{file_path.gsub(/\//, '_').pluralize}"
72
+ )
73
+ end
74
+
75
+ m.route_resources controller_file_name
76
+ end
77
+ end
78
+
79
+ protected
80
+ # Override with your own usage banner.
81
+ def banner
82
+ "Usage: #{$0} scaffold_resource ModelName [field:type, field:type]"
83
+ end
84
+
85
+ def scaffold_views
86
+ %w[ index show new edit ]
87
+ end
88
+
89
+ def model_name
90
+ class_name.demodulize
91
+ end
92
+ end
@@ -0,0 +1,79 @@
1
+ class <%= controller_class_name %>Controller < ApplicationController
2
+ # GET /<%= table_name %>
3
+ # GET /<%= table_name %>.xml
4
+ def index
5
+ @<%= table_name %> = <%= class_name %>.find(:all)
6
+
7
+ respond_to do |format|
8
+ format.html # index.rhtml
9
+ format.xml { render :xml => @<%= table_name %>.to_xml }
10
+ end
11
+ end
12
+
13
+ # GET /<%= table_name %>/1
14
+ # GET /<%= table_name %>/1.xml
15
+ def show
16
+ @<%= file_name %> = <%= class_name %>.find(params[:id])
17
+
18
+ respond_to do |format|
19
+ format.html # show.rhtml
20
+ format.xml { render :xml => @<%= file_name %>.to_xml }
21
+ end
22
+ end
23
+
24
+ # GET /<%= table_name %>/new
25
+ def new
26
+ @<%= file_name %> = <%= class_name %>.new
27
+ end
28
+
29
+ # GET /<%= table_name %>/1;edit
30
+ def edit
31
+ @<%= file_name %> = <%= class_name %>.find(params[:id])
32
+ end
33
+
34
+ # POST /<%= table_name %>
35
+ # POST /<%= table_name %>.xml
36
+ def create
37
+ @<%= file_name %> = <%= class_name %>.new(params[:<%= file_name %>])
38
+
39
+ respond_to do |format|
40
+ if @<%= file_name %>.save
41
+ flash[:notice] = '<%= class_name %> was successfully created.'
42
+ format.html { redirect_to <%= file_name %>_url(@<%= file_name %>) }
43
+ format.xml { head :created, :location => <%= file_name %>_url(@<%= file_name %>) }
44
+ else
45
+ format.html { render :action => "new" }
46
+ format.xml { render :xml => @<%= file_name %>.errors.to_xml }
47
+ end
48
+ end
49
+ end
50
+
51
+ # PUT /<%= table_name %>/1
52
+ # PUT /<%= table_name %>/1.xml
53
+ def update
54
+ @<%= file_name %> = <%= class_name %>.find(params[:id])
55
+
56
+ respond_to do |format|
57
+ if @<%= file_name %>.update_attributes(params[:<%= file_name %>])
58
+ flash[:notice] = '<%= class_name %> was successfully updated.'
59
+ format.html { redirect_to <%= file_name %>_url(@<%= file_name %>) }
60
+ format.xml { head :ok }
61
+ else
62
+ format.html { render :action => "edit" }
63
+ format.xml { render :xml => @<%= file_name %>.errors.to_xml }
64
+ end
65
+ end
66
+ end
67
+
68
+ # DELETE /<%= table_name %>/1
69
+ # DELETE /<%= table_name %>/1.xml
70
+ def destroy
71
+ @<%= file_name %> = <%= class_name %>.find(params[:id])
72
+ @<%= file_name %>.destroy
73
+
74
+ respond_to do |format|
75
+ format.html { redirect_to <%= table_name %>_url }
76
+ format.xml { head :ok }
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+ one:
3
+ id: 1
4
+ <% for attribute in attributes -%>
5
+ <%= attribute.name %>: <%= attribute.default %>
6
+ <% end -%>
7
+ two:
8
+ id: 2
9
+ <% for attribute in attributes -%>
10
+ <%= attribute.name %>: <%= attribute.default %>
11
+ <% end -%>
@@ -0,0 +1,57 @@
1
+ require File.dirname(__FILE__) + '<%= '/..' * controller_class_nesting_depth %>/../test_helper'
2
+ require '<%= controller_file_path %>_controller'
3
+
4
+ # Re-raise errors caught by the controller.
5
+ class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end
6
+
7
+ class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase
8
+ fixtures :<%= table_name %>
9
+
10
+ def setup
11
+ @controller = <%= controller_class_name %>Controller.new
12
+ @request = ActionController::TestRequest.new
13
+ @response = ActionController::TestResponse.new
14
+ end
15
+
16
+ def test_should_get_index
17
+ get :index
18
+ assert_response :success
19
+ assert assigns(:<%= table_name %>)
20
+ end
21
+
22
+ def test_should_get_new
23
+ get :new
24
+ assert_response :success
25
+ end
26
+
27
+ def test_should_create_<%= file_name %>
28
+ old_count = <%= class_name %>.count
29
+ post :create, :<%= file_name %> => { }
30
+ assert_equal old_count+1, <%= class_name %>.count
31
+
32
+ assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>))
33
+ end
34
+
35
+ def test_should_show_<%= file_name %>
36
+ get :show, :id => 1
37
+ assert_response :success
38
+ end
39
+
40
+ def test_should_get_edit
41
+ get :edit, :id => 1
42
+ assert_response :success
43
+ end
44
+
45
+ def test_should_update_<%= file_name %>
46
+ put :update, :id => 1, :<%= file_name %> => { }
47
+ assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>))
48
+ end
49
+
50
+ def test_should_destroy_<%= file_name %>
51
+ old_count = <%= class_name %>.count
52
+ delete :destroy, :id => 1
53
+ assert_equal old_count-1, <%= class_name %>.count
54
+
55
+ assert_redirected_to <%= table_name %>_path
56
+ end
57
+ end
@@ -0,0 +1,2 @@
1
+ module <%= controller_class_name %>Helper
2
+ end
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7
+ <title><%= controller_class_name %>: <%%= controller.action_name %></title>
8
+ <%%= stylesheet_link_tag 'scaffold' %>
9
+ </head>
10
+ <body>
11
+
12
+ <p style="color: green"><%%= flash[:notice] %></p>
13
+
14
+ <%%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,13 @@
1
+ class <%= migration_name %> < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :<%= table_name %> do |t|
4
+ <% for attribute in attributes -%>
5
+ t.column :<%= attribute.name %>, :<%= attribute.type %>
6
+ <% end -%>
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :<%= table_name %>
12
+ end
13
+ end
@@ -0,0 +1,2 @@
1
+ class <%= class_name %> < ActiveRecord::Base
2
+ end
@@ -0,0 +1,74 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ }
14
+
15
+ a { color: #000; }
16
+ a:visited { color: #666; }
17
+ a:hover { color: #fff; background-color:#000; }
18
+
19
+ .fieldWithErrors {
20
+ padding: 2px;
21
+ background-color: red;
22
+ display: table;
23
+ }
24
+
25
+ #errorExplanation {
26
+ width: 400px;
27
+ border: 2px solid red;
28
+ padding: 7px;
29
+ padding-bottom: 12px;
30
+ margin-bottom: 20px;
31
+ background-color: #f0f0f0;
32
+ }
33
+
34
+ #errorExplanation h2 {
35
+ text-align: left;
36
+ font-weight: bold;
37
+ padding: 5px 5px 5px 15px;
38
+ font-size: 12px;
39
+ margin: -7px;
40
+ background-color: #c00;
41
+ color: #fff;
42
+ }
43
+
44
+ #errorExplanation p {
45
+ color: #333;
46
+ margin-bottom: 0;
47
+ padding: 5px;
48
+ }
49
+
50
+ #errorExplanation ul li {
51
+ font-size: 12px;
52
+ list-style: square;
53
+ }
54
+
55
+ div.uploadStatus {
56
+ margin: 5px;
57
+ }
58
+
59
+ div.progressBar {
60
+ margin: 5px;
61
+ }
62
+
63
+ div.progressBar div.border {
64
+ background-color: #fff;
65
+ border: 1px solid grey;
66
+ width: 100%;
67
+ }
68
+
69
+ div.progressBar div.background {
70
+ background-color: #333;
71
+ height: 18px;
72
+ width: 0%;
73
+ }
74
+
@@ -0,0 +1,10 @@
1
+ require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
2
+
3
+ class <%= class_name %>Test < Test::Unit::TestCase
4
+ fixtures :<%= table_name %>
5
+
6
+ # Replace this with your real tests.
7
+ def test_truth
8
+ assert true
9
+ end
10
+ end