rails 0.8.5 → 8.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +2 -2
  3. data/README.md +102 -0
  4. metadata +227 -127
  5. data/CHANGELOG +0 -187
  6. data/README +0 -121
  7. data/Rakefile +0 -271
  8. data/bin/rails +0 -28
  9. data/configs/apache.conf +0 -44
  10. data/configs/database.yml +0 -13
  11. data/dispatches/dispatch.fcgi +0 -7
  12. data/dispatches/dispatch.rb +0 -10
  13. data/dispatches/dispatch.servlet +0 -45
  14. data/doc/README_FOR_APP +0 -2
  15. data/doc/apache_protection +0 -3
  16. data/doc/index.html +0 -94
  17. data/environments/production.rb +0 -6
  18. data/environments/shared.rb +0 -27
  19. data/environments/shared_for_gem.rb +0 -17
  20. data/environments/test.rb +0 -6
  21. data/fresh_rakefile +0 -101
  22. data/gem_snapshot +0 -14
  23. data/generators/new_controller.rb +0 -43
  24. data/generators/new_crud.rb +0 -34
  25. data/generators/new_mailer.rb +0 -43
  26. data/generators/new_model.rb +0 -31
  27. data/generators/templates/controller.erb +0 -24
  28. data/generators/templates/controller_test.erb +0 -17
  29. data/generators/templates/controller_view.rhtml +0 -10
  30. data/generators/templates/helper.erb +0 -2
  31. data/generators/templates/mailer.erb +0 -15
  32. data/generators/templates/mailer_action.rhtml +0 -3
  33. data/generators/templates/mailer_fixture.rhtml +0 -4
  34. data/generators/templates/mailer_test.erb +0 -37
  35. data/generators/templates/model.erb +0 -4
  36. data/generators/templates/model_test.erb +0 -11
  37. data/helpers/abstract_application.rb +0 -7
  38. data/helpers/application_helper.rb +0 -3
  39. data/helpers/test_helper.rb +0 -15
  40. data/html/404.html +0 -6
  41. data/html/500.html +0 -6
  42. data/html/index.html +0 -1
  43. data/lib/code_statistics.rb +0 -71
  44. data/lib/dispatcher.rb +0 -46
  45. data/lib/generator.rb +0 -112
  46. data/lib/webrick_server.rb +0 -158
data/README DELETED
@@ -1,121 +0,0 @@
1
- == Welcome to Rails
2
-
3
- Rails is a web-application and persistance framework that includes everything
4
- needed to create database-backed web-applications according to the
5
- Model-View-Control pattern of separation. This pattern splits the view (also
6
- called the presentation) into "dumb" templates that are primarily responsible
7
- for inserting pre-build data in between HTML tags. The model contains the
8
- "smart" domain objects (such as Account, Product, Person, Post) that holds all
9
- the business logic and knows how to persist themselves to a database. The
10
- controller handles the incoming requests (such as Save New Account, Update
11
- Product, Show Post) by manipulating the model and directing data to the view.
12
-
13
- In Rails, the model is handled by what's called a object-relational mapping
14
- layer entitled Active Record. This layer allows you to present the data from
15
- database rows as objects and embellish these data objects with business logic
16
- methods. You can read more about Active Record in
17
- link:files/vendor/activerecord/README.html.
18
-
19
- The controller and view is handled by the Action Pack, which handles both
20
- layers by its two parts: Action View and Action Controller. These two layers
21
- are bundled in a single package due to their heavy interdependence. This is
22
- unlike the relationship between the Active Record and Action Pack that is much
23
- more separate. Each of these packages can be used independently outside of
24
- Rails. You can read more about Action Pack in
25
- link:files/vendor/actionpack/README.html.
26
-
27
-
28
- == Requirements
29
-
30
- * Database and driver (MySQL, PostgreSQL, or SQLite)
31
- * Rake[http://rake.rubyforge.org] for running tests and the generating documentation
32
-
33
- == Optionals
34
-
35
- * Apache 1.3.x or 2.x (or any FastCGI-capable webserver with a
36
- mod_rewrite-like module)
37
- * FastCGI (or mod_ruby) for production performance (CGI is used for
38
- development)
39
-
40
- == Getting started
41
-
42
- 1a. Setup Apache for the Rails application (see "Example for Apache conf")
43
- 1b. Run the WEBrick servlet: <tt>ruby public/dispatch.servlet --help</tt>
44
- 2. Go to http://rails/ (or whatever is your ServerName) and check
45
- that you get the "Congratulations, you're on Rails!" screen
46
- 3. Follow the guidelines on the "Congratulations, you're on Rails!" screen
47
-
48
-
49
- == Example for Apache conf
50
-
51
- <VirtualHost *:80>
52
- ServerName rails
53
- DocumentRoot /path/tapplication/public/
54
- ErrorLog /path/application/log/apache.log
55
-
56
- <Directory /path/application/public/>
57
- Options ExecCGI FollowSymLinks
58
- AllowOverride all
59
- Allow from all
60
- Order allow,deny
61
- </Directory>
62
- </VirtualHost>
63
-
64
- NOTE: Be sure that CGIs can be executed in that directory as well. So ExecCGI
65
- should be on and ".cgi" should respond. All requests from 127.0.0.1 goes
66
- through CGI, so no Apache restart is necessary for changes. All other requests
67
- goes through FCGI (or mod_ruby) that requires restart to show changes.
68
-
69
-
70
- == Debugging Rails
71
-
72
- Have "tail -f" commands running on both the apache.log, production.log, and
73
- test.log files. Rails will automatically display debugging and runtime
74
- information to these files. Debugging info will also be shown in the browser
75
- on requests from 127.0.0.1.
76
-
77
-
78
- == Description of contents
79
-
80
- app
81
- Holds all the code that's specific to this particular application.
82
-
83
- app/controllers
84
- Holds controllers that should be named like weblog_controller.rb for
85
- automated URL mapping. All controllers should descend from
86
- ActionController::Base.
87
-
88
- app/models
89
- Holds models that should be named like post.rb.
90
- Most models will descent from ActiveRecord::Base.
91
-
92
- app/views
93
- Holds the template files for the view that should be named like
94
- weblog/index.rhtml for the WeblogController#index action. All views uses eRuby
95
- syntax. This directory can also be used to keep stylesheets, images, and so on
96
- that can be symlinked to public.
97
-
98
- app/helpers
99
- Holds view helpers that should be named like weblog_helper.rb.
100
-
101
- config
102
- Configuration files for Apache, database, and other dependencies.
103
-
104
- lib
105
- Application specific libraries. Basically, any kind of custom code that doesn't
106
- belong controllers, models, or helpers. This directory is in the load path.
107
-
108
- public
109
- The directory available for Apache, which includes symbolic links to other
110
- parts of the structure that are to be made available. Refrain from placing
111
- actual files in here if you're using CVS and don't want to check in this
112
- directory.
113
-
114
- script
115
- Helper scripts for automation and generation.
116
-
117
- test
118
- Unit and functional tests along with fixtures.
119
-
120
- vendor
121
- External libraries that the application depend on. This directory is in the load path.
data/Rakefile DELETED
@@ -1,271 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/rdoctask'
4
- require 'rake/gempackagetask'
5
- require 'rake/contrib/rubyforgepublisher'
6
-
7
- require 'date'
8
-
9
-
10
- PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11
- PKG_NAME = 'rails'
12
- PKG_VERSION = '0.8.5' + PKG_BUILD
13
- PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
- PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
15
-
16
- desc "Default Task"
17
- task :default => [ :fresh_rails ]
18
-
19
- desc "Generates a fresh Rails package with documentation"
20
- task :fresh_rails => [ :make_dir_structure, :initialize_file_stubs, :copy_vendor_libraries, :copy_ties_content, :generate_documentation ]
21
-
22
- desc "Generates a fresh Rails package using GEMs with documentation"
23
- task :fresh_gem_rails => [ :make_dir_structure, :initialize_file_stubs, :copy_ties_content, :copy_gem_environment ]
24
-
25
- desc "Generates a fresh Rails package without documentation (faster)"
26
- task :fresh_rails_without_docs => [ :make_dir_structure, :initialize_file_stubs, :copy_vendor_libraries, :copy_ties_content ]
27
-
28
- desc "Packages the fresh Rails package with documentation"
29
- task :package => [ :clean, :fresh_rails ] do
30
- system %{cd ..; tar -czvf #{PKG_NAME}-#{PKG_VERSION}.tgz #{PKG_NAME}}
31
- system %{cd ..; zip -r #{PKG_NAME}-#{PKG_VERSION}.zip #{PKG_NAME}}
32
- end
33
-
34
- task :clean do
35
- File.rm_rf "#{PKG_DESTINATION}"
36
- end
37
-
38
-
39
- # Make directory structure ----------------------------------------------------------------
40
-
41
- desc "Make the directory structure for the new Rails application"
42
- task :make_dir_structure => [ :make_base_dirs, :make_app_dirs, :make_public_dirs, :make_test_dirs ] do
43
- end
44
-
45
- task :make_base_dirs do
46
- File.rm_rf PKG_DESTINATION
47
- File.mkdir "#{PKG_DESTINATION}"
48
- File.mkdir "#{PKG_DESTINATION}/app"
49
- File.mkdir "#{PKG_DESTINATION}/config"
50
- File.mkdir "#{PKG_DESTINATION}/config/environments"
51
- File.mkdir "#{PKG_DESTINATION}/db"
52
- File.mkdir "#{PKG_DESTINATION}/doc"
53
- File.mkdir "#{PKG_DESTINATION}/log"
54
- File.mkdir "#{PKG_DESTINATION}/lib"
55
- File.mkdir "#{PKG_DESTINATION}/public"
56
- File.mkdir "#{PKG_DESTINATION}/script"
57
- File.mkdir "#{PKG_DESTINATION}/test"
58
- File.mkdir "#{PKG_DESTINATION}/vendor"
59
- end
60
-
61
- task :make_app_dirs do
62
- File.mkdir "#{PKG_DESTINATION}/app/models"
63
- File.mkdir "#{PKG_DESTINATION}/app/controllers"
64
- File.mkdir "#{PKG_DESTINATION}/app/helpers"
65
- File.mkdir "#{PKG_DESTINATION}/app/views"
66
- File.mkdir "#{PKG_DESTINATION}/app/views/layouts"
67
- end
68
-
69
- task :make_public_dirs do
70
- File.mkdir "#{PKG_DESTINATION}/public/images"
71
- File.mkdir "#{PKG_DESTINATION}/public/javascripts"
72
- File.mkdir "#{PKG_DESTINATION}/public/stylesheets"
73
- File.mkdir "#{PKG_DESTINATION}/public/_doc"
74
- end
75
-
76
- task :make_test_dirs do
77
- File.mkdir "#{PKG_DESTINATION}/test/fixtures"
78
- File.mkdir "#{PKG_DESTINATION}/test/unit"
79
- File.mkdir "#{PKG_DESTINATION}/test/functional"
80
- end
81
-
82
-
83
- # Initialize file stubs -------------------------------------------------------------------
84
-
85
- desc "Initialize empty file stubs (such as for logging)"
86
- task :initialize_file_stubs => [ :initialize_log_files ] do
87
- end
88
-
89
- task :initialize_log_files do
90
- chmod 0777, "#{PKG_DESTINATION}/log"
91
-
92
- File.touch "#{PKG_DESTINATION}/log/apache.log"
93
- File.touch "#{PKG_DESTINATION}/log/production.log"
94
-
95
- chmod 0777, "#{PKG_DESTINATION}/log/apache.log"
96
- chmod 0777, "#{PKG_DESTINATION}/log/production.log"
97
- end
98
-
99
-
100
- # Copy Vendors ----------------------------------------------------------------------------
101
-
102
- desc "Copy in all the Rails packages to vendor"
103
- task :copy_vendor_libraries => [ :copy_action_pack, :copy_active_record, :copy_ties, :copy_action_mailer ]
104
-
105
- task :copy_action_pack do
106
- File.cp_r "../actionpack", "#{PKG_DESTINATION}/vendor/actionpack"
107
- end
108
-
109
- task :copy_active_record do
110
- File.cp_r "../activerecord", "#{PKG_DESTINATION}/vendor/activerecord"
111
- end
112
-
113
- task :copy_action_mailer do
114
- File.cp_r "../actionmailer", "#{PKG_DESTINATION}/vendor/actionmailer"
115
- end
116
-
117
- task :copy_ties do
118
- File.cp_r "../railties", "#{PKG_DESTINATION}/vendor/railties"
119
- end
120
-
121
-
122
- # Copy Ties Content -----------------------------------------------------------------------
123
-
124
- # :link_apache_config
125
- desc "Make copies of all the default content of ties"
126
- task :copy_ties_content => [
127
- :copy_rootfiles, :copy_dispatches, :copy_html_files, :copy_abstract_application,
128
- :copy_configs, :copy_generators, :copy_test_helpers, :copy_docs_in_public,
129
- :copy_app_doc_readme ] do
130
- end
131
-
132
- task :copy_dispatches do
133
- File.cp "dispatches/dispatch.rb", "#{PKG_DESTINATION}/public/dispatch.rb"
134
- chmod 0755, "#{PKG_DESTINATION}/public/dispatch.rb"
135
-
136
- File.cp "dispatches/dispatch.rb", "#{PKG_DESTINATION}/public/dispatch.cgi"
137
- chmod 0755, "#{PKG_DESTINATION}/public/dispatch.cgi"
138
-
139
- File.cp "dispatches/dispatch.fcgi", "#{PKG_DESTINATION}/public/dispatch.fcgi"
140
- chmod 0755, "#{PKG_DESTINATION}/public/dispatch.fcgi"
141
-
142
- File.cp "dispatches/dispatch.servlet", "#{PKG_DESTINATION}/public/dispatch.servlet"
143
- end
144
-
145
- task :copy_html_files do
146
- File.cp "html/404.html", "#{PKG_DESTINATION}/public/404.html"
147
- File.cp "html/500.html", "#{PKG_DESTINATION}/public/500.html"
148
- File.cp "html/index.html", "#{PKG_DESTINATION}/public/index.html"
149
- end
150
-
151
- task :copy_abstract_application do
152
- File.cp "helpers/abstract_application.rb", "#{PKG_DESTINATION}/app/controllers/abstract_application.rb"
153
- File.cp "helpers/application_helper.rb", "#{PKG_DESTINATION}/app/helpers/application_helper.rb"
154
- end
155
-
156
- task :copy_configs do
157
- File.cp "configs/database.yml", "#{PKG_DESTINATION}/config/database.yml"
158
-
159
- File.cp "configs/apache.conf", "#{PKG_DESTINATION}/public/.htaccess"
160
-
161
- File.cp "environments/shared.rb", "#{PKG_DESTINATION}/config/environments/shared.rb"
162
- File.cp "environments/production.rb", "#{PKG_DESTINATION}/config/environments/production.rb"
163
- File.cp "environments/test.rb", "#{PKG_DESTINATION}/config/environments/test.rb"
164
- end
165
-
166
- task :copy_generators do
167
- File.cp "generators/new_controller.rb", "#{PKG_DESTINATION}/script/new_controller"
168
- File.cp "generators/new_model.rb", "#{PKG_DESTINATION}/script/new_model"
169
- File.cp "generators/new_mailer.rb", "#{PKG_DESTINATION}/script/new_mailer"
170
- File.cp "generators/new_crud.rb", "#{PKG_DESTINATION}/script/new_crud"
171
- chmod 0755, "#{PKG_DESTINATION}/script/new_controller"
172
- chmod 0755, "#{PKG_DESTINATION}/script/new_model"
173
- chmod 0755, "#{PKG_DESTINATION}/script/new_mailer"
174
- chmod 0755, "#{PKG_DESTINATION}/script/new_crud"
175
- end
176
-
177
- task :copy_rootfiles do
178
- File.cp "fresh_rakefile", "#{PKG_DESTINATION}/Rakefile"
179
- File.cp "README", "#{PKG_DESTINATION}/README"
180
- end
181
-
182
- task :copy_test_helpers do
183
- File.cp "helpers/test_helper.rb", "#{PKG_DESTINATION}/test/test_helper.rb"
184
- end
185
-
186
- task :copy_docs_in_public do
187
- File.cp "doc/index.html", "#{PKG_DESTINATION}/public/_doc/index.html"
188
- end
189
-
190
- task :copy_app_doc_readme do
191
- File.cp "doc/README_FOR_APP", "#{PKG_DESTINATION}/doc/README_FOR_APP"
192
- end
193
-
194
- task :link_apache_config do
195
- cd "#{PKG_DESTINATION}/config/"
196
- ln_s "../public/.htaccess", "apache.conf"
197
- cd "../../railties"
198
- end
199
-
200
-
201
- # Generate documentation ------------------------------------------------------------------
202
-
203
- desc "Generate documentation for the framework and for the empty application"
204
- task :generate_documentation => [ :generate_app_doc, :generate_rails_framework_doc ] do
205
- end
206
-
207
- task :generate_rails_framework_doc do
208
- system %{cd #{PKG_DESTINATION}; rake apidoc}
209
- end
210
-
211
- task :generate_app_doc do
212
- File.cp "doc/README_FOR_APP", "#{PKG_DESTINATION}/doc/README_FOR_APP"
213
- system %{cd #{PKG_DESTINATION}; rake appdoc}
214
- end
215
-
216
-
217
- # Generate GEM ----------------------------------------------------------------------------
218
-
219
- task :copy_gem_environment do
220
- File.cp "environments/shared_for_gem.rb", "#{PKG_DESTINATION}/config/environments/shared.rb"
221
- end
222
-
223
-
224
- PKG_FILES = FileList[
225
- '[a-zA-Z]*',
226
- 'bin/**/*',
227
- 'configs/**/*',
228
- 'doc/**/*',
229
- 'dispatches/**/*',
230
- 'environments/**/*',
231
- 'generators/**/*',
232
- 'helpers/**/*',
233
- 'html/**/*',
234
- 'lib/**/*'
235
- ]
236
-
237
- spec = Gem::Specification.new do |s|
238
- s.name = 'rails'
239
- s.version = PKG_VERSION
240
- s.summary = "Web-application framework with template engine, control-flow layer, and ORM."
241
- s.description = <<-EOF
242
- Rails is a framework for building web-application using CGI, FCGI, mod_ruby, or WEBrick
243
- on top of either MySQL, PostgreSQL, or SQLite with eRuby-based templates.
244
- EOF
245
-
246
- s.add_dependency('rake', '>= 0.4.11')
247
- s.add_dependency('activerecord', '>= 1.1.0')
248
- s.add_dependency('actionpack', '>= 0.9.5')
249
- s.add_dependency('actionmailer', '>= 0.4.0')
250
-
251
- s.files = PKG_FILES.to_a
252
- s.require_path = 'lib'
253
-
254
- s.bindir = "bin" # Use these for applications.
255
- s.executables = ["rails"]
256
- s.default_executable = "rails"
257
-
258
- s.author = "David Heinemeier Hansson"
259
- s.email = "david@loudthinking.com"
260
- s.homepage = "http://www.rubyonrails.org"
261
- s.rubyforge_project = "rails"
262
- end
263
-
264
- Rake::GemPackageTask.new(spec) do |pkg|
265
- end
266
-
267
- # Publish beta gem
268
- desc "Publish the API documentation"
269
- task :pgem => [:gem] do
270
- Rake::SshFilePublisher.new("davidhh@one.textdrive.com", "domains/rubyonrails.org/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
271
- end
data/bin/rails DELETED
@@ -1,28 +0,0 @@
1
- if ARGV[0]
2
- ENV["RAILS_PKG_DESTINATION"] = File.expand_path(ARGV[0])
3
- if RUBY_PLATFORM =~ /mswin32/
4
- Dir.chdir File.dirname(__FILE__)
5
- system %{rake.cmd fresh_gem_rails}
6
- else
7
- system %{ cd #{File.dirname(__FILE__)}; rake fresh_gem_rails }
8
- end
9
- else
10
- puts <<-HELP
11
-
12
- NAME
13
- rails - creates a new Rails installation
14
-
15
- SYNOPSIS
16
- rails [full path]
17
-
18
- DESCRIPTION
19
- This generator will create a suggested directory structure, lots of minor helper
20
- files, and a default configuration for creating a new Rails application. Once the
21
- generator is done, you're adviced to look at the README in the root of the folder.
22
-
23
- EXAMPLE
24
- rails ~/Code/Ruby/weblog
25
-
26
- This will generate a new Rails installation in the ~/Code/Ruby/weblog folder.
27
- HELP
28
- end
data/configs/apache.conf DELETED
@@ -1,44 +0,0 @@
1
- # General Apache options
2
- AddHandler fastcgi-script .fcgi
3
- AddHandler cgi-script .cgi
4
- Options +FollowSymLinks +ExecCGI
5
-
6
-
7
- # Remember to set RubySafeLevel 0 in httpd.conf
8
- <IfModule mod_ruby.c>
9
- RubyRequire apache/ruby-run
10
- <Files dispatch.rb>
11
- SetHandler ruby-object
12
- RubyHandler Apache::RubyRun.instance
13
- </Files>
14
- </IfModule>
15
-
16
-
17
- # Make sure that mod_ruby.c has been added and loaded as a module with Apache
18
- RewriteEngine On
19
-
20
- RewriteRule ^dispatch.servlet$ / [R]
21
-
22
- # Enable this rewrite rule to point to the controller/action that should serve root.
23
- # RewriteRule ^$ /controller/action [R]
24
-
25
- # Force fcgi
26
- RewriteRule ^fcgi/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ /dispatch.fcgi?controller=$1&action=$2&id=$3 [QSA] [L]
27
- RewriteRule ^fcgi/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ /dispatch.fcgi?controller=$1&action=$2 [QSA] [L]
28
- RewriteRule ^fcgi/([-_a-zA-Z0-9]+)/?$ /dispatch.fcgi?controller=$1&action=index [QSA] [L]
29
-
30
- # Force mod_ruby
31
- RewriteRule ^mruby/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ /dispatch.rb?controller=$1&action=$2&id=$3 [QSA] [L]
32
- RewriteRule ^mruby/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ /dispatch.rb?controller=$1&action=$2 [QSA] [L]
33
- RewriteRule ^mruby/([-_a-zA-Z0-9]+)/?$ /dispatch.rb?controller=$1&action=index [QSA] [L]
34
-
35
- # Default rewriting rules. Change extension from .cgi to .fcgi to switch to FCGI and to .rb to switch to mod_ruby
36
- RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ /dispatch.cgi?controller=$1&action=$2&id=$3 [QSA] [L]
37
- RewriteRule ^([-_a-zA-Z0-9]+)/([-_a-zA-Z0-9]+)$ /dispatch.cgi?controller=$1&action=$2 [QSA] [L]
38
- RewriteRule ^([-_a-zA-Z0-9]+)/$ /dispatch.cgi?controller=$1&action=index [QSA] [L]
39
- RewriteRule ^([-_a-zA-Z0-9]+)$ /$1/ [R]
40
-
41
-
42
- # You can also point these error messages to a controller/action
43
- ErrorDocument 500 /500.html
44
- ErrorDocument 404 /404.html
data/configs/database.yml DELETED
@@ -1,13 +0,0 @@
1
- production:
2
- adapter: mysql
3
- database: rails_production
4
- host: localhost
5
- username: root
6
- password:
7
-
8
- test:
9
- adapter: mysql
10
- database: rails_test
11
- host: localhost
12
- username: root
13
- password:
@@ -1,7 +0,0 @@
1
- #!/usr/local/bin/ruby
2
-
3
- require File.dirname(__FILE__) + "/../config/environments/production"
4
- require 'dispatcher'
5
- require 'fcgi'
6
-
7
- FCGI.each_cgi { |cgi| Dispatcher.dispatch(cgi, Dispatcher::DEFAULT_SESSION_OPTIONS, File.dirname(__FILE__) + "/500.html") }
@@ -1,10 +0,0 @@
1
- #!/usr/local/bin/ruby
2
-
3
- require File.dirname(__FILE__) + "/../config/environments/production"
4
-
5
- # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
6
- # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
7
- require "dispatcher"
8
-
9
- ADDITIONAL_LOAD_PATHS.each { |dir| $:.unshift "#{File.dirname(__FILE__)}/../#{dir}" }
10
- Dispatcher.dispatch
@@ -1,45 +0,0 @@
1
- #!/usr/local/bin/ruby
2
-
3
- require File.dirname(__FILE__) + "/../config/environments/production"
4
- require 'webrick_server'
5
- require 'optparse'
6
-
7
- OPTIONS = {
8
- :port => 3000,
9
- :ip => "127.0.0.1",
10
- :cache_classes => false,
11
- :server_root => File.expand_path(File.dirname(__FILE__)),
12
- :server_type => SimpleServer
13
- }
14
-
15
- ARGV.options do |opts|
16
- script_name = File.basename($0)
17
- opts.banner = "Usage: ruby #{script_name} [options]"
18
-
19
- opts.separator ""
20
-
21
- opts.on("-p", "--port=port", Integer,
22
- "Runs Rails on the specified port.",
23
- "Default: 3000") { |OPTIONS[:port]| }
24
- opts.on("-b", "--binding=ip", String,
25
- "Binds Rails to the specified ip.",
26
- "Default: 127.0.0.1") { |OPTIONS[:ip]| }
27
- opts.on("-i", "--index=controller", String,
28
- "Specifies an index controller that requests for root will go to (instead of congratulations screen)."
29
- ) { |OPTIONS[:index_controller]| }
30
- opts.on("-d", "--daemon",
31
- "Make Rails run as a Daemon (only works if fork is available -- meaning on *nix)."
32
- ) { OPTIONS[:server_type] = Daemon }
33
- opts.on("-c", "--cache-classes",
34
- "Caches class compilation which will speed up the serving of requests, but require a server restart on source changes."
35
- ) { |OPTIONS[:cache_classes]| }
36
-
37
- opts.separator ""
38
-
39
- opts.on("-h", "--help",
40
- "Show this help message.") { puts opts; exit }
41
-
42
- opts.parse!
43
- end
44
-
45
- DispatchServlet.dispatch(OPTIONS)
data/doc/README_FOR_APP DELETED
@@ -1,2 +0,0 @@
1
- Use this README file to introduce your application and point to useful places in the API for learning more.
2
- Run "rake appdoc" to generate API documentation for your models and controllers.
@@ -1,3 +0,0 @@
1
- Order Deny,Allow
2
- Deny from all
3
- Allow from 127.0.0.1
data/doc/index.html DELETED
@@ -1,94 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Rails: Welcome on board</title>
4
- <style>
5
- body { background-color: #fff; color: #333; }
6
-
7
- body, p, ol, ul, td {
8
- font-family: verdana, arial, helvetica, sans-serif;
9
- font-size: 12px;
10
- line-height: 18px;
11
- }
12
-
13
- li {
14
- margin-bottom: 7px;
15
- }
16
-
17
- pre {
18
- background-color: #eee;
19
- padding: 10px;
20
- font-size: 11px;
21
- }
22
-
23
- a { color: #000; }
24
- a:visited { color: #666; }
25
- a:hover { color: #fff; background-color:#000; }
26
- </style>
27
- </head>
28
- <body>
29
-
30
- <h1>Congratulations, you're on Rails!</h1>
31
-
32
- <p>
33
- <i>You've succesfully configured your web server to point at this Rails application.</i>
34
- </p>
35
-
36
- <p>Before you move on, verify that the following conditions have been met:</p>
37
-
38
- <ol>
39
- <li>The log directory and the empty log files must be writable to the web server (<code>chmod -R 777 log</code>).
40
- <li>
41
- The shebang line in the public/dispatch* files must reference your Ruby installation. <br/>
42
- You might need to change it to <code>#!/usr/bin/env ruby</code> or point directly at the installation.
43
- </li>
44
- <li>
45
- Rails on Apache needs to have the cgi handler and mod_rewrite enabled. <br/>
46
- Somewhere in your httpd.conf, you should have:<br/>
47
- <code>AddHandler cgi-script .cgi</code><br/>
48
- <code>LoadModule rewrite_module libexec/httpd/mod_rewrite.so</code><br/>
49
- <code>AddModule mod_rewrite.c</code>
50
- </li>
51
- </ol>
52
-
53
- <p>Take the following steps to get started:</p>
54
-
55
- <ol>
56
- <li>Create empty production and test databases for your application.<br/>
57
- <small>Warning: Don't point your test database at your production database, it'll destroy the latter on test runs!</small>
58
- <li>Edit config/database.yml with your database settings.
59
- <li>Create a new controller using the <code>script/new_controller</code> generator <br/>
60
- <small>Help: Run with no arguments for documentation</small>
61
- <li>Create a new model using the <code>script/new_model</code> generator <br/>
62
- <small>Help: Run with no arguments for documentation</small>
63
- <li>See all the tests run and fail by running <code>rake</code>.
64
- <li>Develop your Rails application!
65
- <li>Setup FastCGI or mod_ruby to get production-level performance
66
- </ol>
67
-
68
- <p>
69
- Having problems getting up and running? First try debugging it yourself by looking at the log files. <br/> Then try the friendly Rails
70
- community on IRC (<a href="http://www.rubyonrails.org/show/IRC">howto IRC</a>). It's on FreeNET in channel #rubyonrails.
71
- </p>
72
-
73
- <div style="float: left; margin-right: 20px">
74
- <h2>Rails Online</h2>
75
-
76
- <ul>
77
- <li><a href="http://www.rubyonrails.org">Ruby on Rails</a></li>
78
- <li><a href="http://activerecord.rubyonrails.org">Active Record</a></li>
79
- <li><a href="http://actionpack.rubyonrails.org">Action Pack</a></li>
80
- </ul>
81
- </div>
82
-
83
- <div style="float: left">
84
- <h2>Beyond CGI</h2>
85
-
86
- <ul>
87
- <li><a href="http://www.fastcgi.com">FastCGI</a></li>
88
- <li><a href="http://raa.ruby-lang.org/list.rhtml?name=fcgi">FastCGI bindings for Ruby</a></li>
89
- <li><a href="http://modruby.net/en/">mod_ruby</a></li>
90
- </ul>
91
- </div>
92
-
93
- </body>
94
- </html>
@@ -1,6 +0,0 @@
1
- require File.dirname(__FILE__) + "/shared"
2
-
3
- ActiveRecord::Base.logger = ActionController::Base.logger = ActionMailer::Base.logger =
4
- Logger.new(File.dirname(__FILE__) + "/../../log/production.log")
5
-
6
- ActiveRecord::Base.establish_connection(database_configurations["production"])