rails 1.2.6 → 2.0.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.
- data/CHANGELOG +491 -12
- data/MIT-LICENSE +1 -1
- data/README +17 -25
- data/Rakefile +41 -18
- data/bin/about +1 -1
- data/bin/console +1 -1
- data/bin/destroy +1 -1
- data/bin/generate +1 -1
- data/bin/performance/request +3 -0
- data/bin/plugin +1 -1
- data/bin/runner +1 -1
- data/bin/server +1 -1
- data/builtin/rails_info/rails/info.rb +2 -2
- data/configs/apache.conf +1 -1
- data/configs/databases/mysql.yml +9 -3
- data/configs/databases/postgresql.yml +16 -12
- data/configs/initializers/inflections.rb +10 -0
- data/configs/initializers/mime_types.rb +5 -0
- data/configs/routes.rb +23 -11
- data/doc/README_FOR_APP +1 -1
- data/environments/boot.rb +95 -26
- data/environments/development.rb +2 -5
- data/environments/environment.rb +24 -25
- data/environments/test.rb +4 -1
- data/helpers/application.rb +5 -2
- data/helpers/test_helper.rb +10 -0
- data/html/422.html +30 -0
- data/html/500.html +1 -1
- data/html/index.html +2 -2
- data/html/javascripts/controls.js +484 -354
- data/html/javascripts/dragdrop.js +88 -58
- data/html/javascripts/effects.js +396 -364
- data/html/javascripts/prototype.js +2817 -1107
- data/html/robots.txt +5 -1
- data/lib/commands/console.rb +12 -5
- data/lib/commands/performance/request.rb +6 -0
- data/lib/commands/plugin.rb +15 -10
- data/lib/commands/process/spawner.rb +14 -4
- data/lib/commands/servers/base.rb +12 -0
- data/lib/commands/servers/mongrel.rb +5 -1
- data/lib/commands/servers/webrick.rb +14 -7
- data/lib/console_app.rb +5 -2
- data/lib/console_with_helpers.rb +5 -2
- data/lib/dispatcher.rb +3 -151
- data/lib/fcgi_handler.rb +79 -81
- data/lib/initializer.rb +125 -169
- data/lib/rails/plugin.rb +84 -0
- data/lib/rails/plugin/loader.rb +150 -0
- data/lib/rails/plugin/locator.rb +78 -0
- data/lib/rails/version.rb +3 -3
- data/lib/rails_generator/base.rb +11 -9
- data/lib/rails_generator/commands.rb +20 -10
- data/lib/rails_generator/generators/applications/app/USAGE +0 -7
- data/lib/rails_generator/generators/applications/app/app_generator.rb +25 -6
- data/lib/rails_generator/generators/components/controller/USAGE +11 -12
- data/lib/rails_generator/generators/components/controller/controller_generator.rb +2 -2
- data/lib/rails_generator/generators/components/controller/templates/functional_test.rb +1 -11
- data/lib/rails_generator/generators/components/controller/templates/{view.rhtml → view.html.erb} +0 -0
- data/lib/rails_generator/generators/components/integration_test/USAGE +5 -11
- data/lib/rails_generator/generators/components/mailer/USAGE +8 -10
- data/lib/rails_generator/generators/components/mailer/mailer_generator.rb +3 -3
- data/lib/rails_generator/generators/components/mailer/templates/fixture.erb +3 -0
- data/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -3
- data/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +8 -24
- data/lib/rails_generator/generators/components/mailer/templates/view.erb +3 -0
- data/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -3
- data/lib/rails_generator/generators/components/migration/USAGE +23 -8
- data/lib/rails_generator/generators/components/migration/migration_generator.rb +15 -2
- data/lib/rails_generator/generators/components/migration/templates/migration.rb +6 -2
- data/lib/rails_generator/generators/components/model/USAGE +15 -14
- data/lib/rails_generator/generators/components/model/model_generator.rb +10 -3
- data/lib/rails_generator/generators/components/model/templates/fixtures.yml +11 -3
- data/lib/rails_generator/generators/components/model/templates/migration.rb +4 -1
- data/lib/rails_generator/generators/components/model/templates/unit_test.rb +1 -3
- data/lib/rails_generator/generators/components/observer/USAGE +5 -7
- data/lib/rails_generator/generators/components/observer/templates/unit_test.rb +0 -2
- data/lib/rails_generator/generators/components/plugin/USAGE +8 -18
- data/lib/rails_generator/generators/components/plugin/plugin_generator.rb +1 -0
- data/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +20 -0
- data/lib/rails_generator/generators/components/plugin/templates/README +10 -1
- data/lib/rails_generator/generators/components/plugin/templates/USAGE +1 -1
- data/lib/rails_generator/generators/components/plugin/templates/init.rb +1 -1
- data/lib/rails_generator/generators/components/plugin/templates/plugin.rb +1 -1
- data/lib/rails_generator/generators/components/plugin/templates/tasks.rake +1 -1
- data/lib/rails_generator/generators/components/resource/USAGE +23 -0
- data/lib/rails_generator/generators/components/resource/resource_generator.rb +13 -15
- data/lib/rails_generator/generators/components/resource/templates/controller.rb +1 -1
- data/lib/rails_generator/generators/components/resource/templates/functional_test.rb +2 -14
- data/lib/rails_generator/generators/components/scaffold/USAGE +24 -31
- data/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +45 -146
- data/lib/rails_generator/generators/components/scaffold/templates/controller.rb +64 -37
- data/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +23 -80
- data/lib/rails_generator/generators/components/scaffold/templates/{layout.rhtml → layout.html.erb} +0 -0
- data/lib/rails_generator/generators/components/scaffold/templates/style.css +1 -1
- data/lib/rails_generator/generators/components/{scaffold_resource/templates/view_edit.rhtml → scaffold/templates/view_edit.html.erb} +4 -4
- data/lib/rails_generator/generators/components/{scaffold_resource/templates/view_index.rhtml → scaffold/templates/view_index.html.erb} +4 -4
- data/lib/rails_generator/generators/components/{scaffold_resource/templates/view_new.rhtml → scaffold/templates/view_new.html.erb} +3 -3
- data/lib/rails_generator/generators/components/{scaffold_resource/templates/view_show.rhtml → scaffold/templates/view_show.html.erb} +1 -1
- data/lib/rails_generator/generators/components/session_migration/USAGE +6 -11
- data/lib/rails_generator/generators/components/session_migration/templates/migration.rb +3 -3
- data/lib/rails_generator/lookup.rb +45 -10
- data/lib/rails_generator/scripts.rb +6 -3
- data/lib/rails_generator/scripts/destroy.rb +23 -0
- data/lib/rails_generator/secret_key_generator.rb +160 -0
- data/lib/rails_generator/spec.rb +1 -1
- data/lib/source_annotation_extractor.rb +62 -0
- data/lib/tasks/annotations.rake +23 -0
- data/lib/tasks/databases.rake +249 -83
- data/lib/tasks/documentation.rake +11 -13
- data/lib/tasks/framework.rake +1 -1
- data/lib/tasks/rails.rb +1 -1
- data/lib/tasks/testing.rake +5 -7
- data/lib/test_help.rb +4 -3
- data/lib/webrick_server.rb +3 -4
- metadata +31 -49
- data/bin/breakpointer +0 -3
- data/lib/binding_of_caller.rb +0 -85
- data/lib/breakpoint.rb +0 -553
- data/lib/breakpoint_client.rb +0 -196
- data/lib/commands/breakpointer.rb +0 -1
- data/lib/rails_generator/generators/components/resource/templates/USAGE +0 -18
- data/lib/rails_generator/generators/components/resource/templates/fixtures.yml +0 -11
- data/lib/rails_generator/generators/components/resource/templates/migration.rb +0 -13
- data/lib/rails_generator/generators/components/resource/templates/model.rb +0 -2
- data/lib/rails_generator/generators/components/resource/templates/unit_test.rb +0 -10
- data/lib/rails_generator/generators/components/scaffold/templates/form.rhtml +0 -3
- data/lib/rails_generator/generators/components/scaffold/templates/form_scaffolding.rhtml +0 -1
- data/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +0 -9
- data/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml +0 -27
- data/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +0 -8
- data/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml +0 -8
- data/lib/rails_generator/generators/components/scaffold_resource/USAGE +0 -29
- data/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +0 -93
- data/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +0 -79
- data/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +0 -11
- data/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +0 -57
- data/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +0 -2
- data/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml +0 -17
- data/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +0 -13
- data/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +0 -2
- data/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +0 -74
- data/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +0 -10
- data/lib/rails_generator/generators/components/web_service/USAGE +0 -28
- data/lib/rails_generator/generators/components/web_service/templates/api_definition.rb +0 -5
- data/lib/rails_generator/generators/components/web_service/templates/controller.rb +0 -8
- data/lib/rails_generator/generators/components/web_service/templates/functional_test.rb +0 -19
- data/lib/rails_generator/generators/components/web_service/web_service_generator.rb +0 -29
- data/lib/tasks/pre_namespace_aliases.rake +0 -53
data/MIT-LICENSE
CHANGED
data/README
CHANGED
@@ -25,11 +25,11 @@ Rails. You can read more about Action Pack in
|
|
25
25
|
link:files/vendor/rails/actionpack/README.html.
|
26
26
|
|
27
27
|
|
28
|
-
== Getting
|
28
|
+
== Getting Started
|
29
29
|
|
30
|
-
1. At the command prompt, start a new
|
30
|
+
1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
|
31
31
|
and your application name. Ex: rails myapp
|
32
|
-
(If you've downloaded
|
32
|
+
(If you've downloaded Rails in a complete tgz or zip, this step is already done)
|
33
33
|
2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
|
34
34
|
3. Go to http://localhost:3000/ and get "Welcome aboard: You’re riding the Rails!"
|
35
35
|
4. Follow the guidelines to start developing your application
|
@@ -38,11 +38,11 @@ link:files/vendor/rails/actionpack/README.html.
|
|
38
38
|
== Web Servers
|
39
39
|
|
40
40
|
By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise
|
41
|
-
Rails will use
|
41
|
+
Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server,
|
42
42
|
Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures
|
43
43
|
that you can always get up and running quickly.
|
44
44
|
|
45
|
-
Mongrel is a Ruby-based webserver with a C
|
45
|
+
Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
|
46
46
|
suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
|
47
47
|
getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
|
48
48
|
More info at: http://mongrel.rubyforge.org
|
@@ -98,29 +98,27 @@ These two online (and free) books will bring you up to speed on the Ruby languag
|
|
98
98
|
and also on programming in general.
|
99
99
|
|
100
100
|
|
101
|
-
==
|
101
|
+
== Debugger
|
102
102
|
|
103
|
-
|
104
|
-
means that you can break out of execution at any point
|
105
|
-
and change the model, AND then resume execution! Example:
|
103
|
+
Debugger support is available through the debugger command when you start your Mongrel or
|
104
|
+
Webrick server with --debugger. This means that you can break out of execution at any point
|
105
|
+
in the code, investigate and change the model, AND then resume execution! Example:
|
106
106
|
|
107
107
|
class WeblogController < ActionController::Base
|
108
108
|
def index
|
109
109
|
@posts = Post.find(:all)
|
110
|
-
|
110
|
+
debugger
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
114
114
|
So the controller will accept the action, run the first line, then present you
|
115
|
-
with a IRB prompt in the
|
116
|
-
|
117
|
-
Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint'
|
115
|
+
with a IRB prompt in the server window. Here you can do things like:
|
118
116
|
|
119
117
|
>> @posts.inspect
|
120
118
|
=> "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
|
121
119
|
#<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
|
122
|
-
>> @posts.first.title = "hello from a
|
123
|
-
=> "hello from a
|
120
|
+
>> @posts.first.title = "hello from a debugger"
|
121
|
+
=> "hello from a debugger"
|
124
122
|
|
125
123
|
...and even better is that you can examine how your runtime objects actually work:
|
126
124
|
|
@@ -129,7 +127,7 @@ Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in
|
|
129
127
|
>> f.
|
130
128
|
Display all 152 possibilities? (y or n)
|
131
129
|
|
132
|
-
Finally, when you're ready to resume execution, you
|
130
|
+
Finally, when you're ready to resume execution, you enter "cont"
|
133
131
|
|
134
132
|
|
135
133
|
== Console
|
@@ -142,11 +140,8 @@ Passing an argument will specify a different environment, like <tt>script/consol
|
|
142
140
|
|
143
141
|
To reload your controllers and models after launching the console run <tt>reload!</tt>
|
144
142
|
|
145
|
-
To reload your controllers and models after launching the console run <tt>reload!</tt>
|
146
|
-
|
147
143
|
|
148
|
-
|
149
|
-
== Description of contents
|
144
|
+
== Description of Contents
|
150
145
|
|
151
146
|
app
|
152
147
|
Holds all the code that's specific to this particular application.
|
@@ -162,13 +157,13 @@ app/models
|
|
162
157
|
|
163
158
|
app/views
|
164
159
|
Holds the template files for the view that should be named like
|
165
|
-
weblogs/index.
|
160
|
+
weblogs/index.erb for the WeblogsController#index action. All views use eRuby
|
166
161
|
syntax.
|
167
162
|
|
168
163
|
app/views/layouts
|
169
164
|
Holds the template files for layouts to be used with views. This models the common
|
170
165
|
header/footer method of wrapping views. In your views, define a layout using the
|
171
|
-
<tt>layout :default</tt> and create a file named default.
|
166
|
+
<tt>layout :default</tt> and create a file named default.erb. Inside default.erb,
|
172
167
|
call <% yield %> to render the view using this layout.
|
173
168
|
|
174
169
|
app/helpers
|
@@ -179,9 +174,6 @@ app/helpers
|
|
179
174
|
config
|
180
175
|
Configuration files for the Rails environment, the routing map, the database, and other dependencies.
|
181
176
|
|
182
|
-
components
|
183
|
-
Self-contained mini-applications that can bundle together controllers, models, and views.
|
184
|
-
|
185
177
|
db
|
186
178
|
Contains the database schema in schema.rb. db/migrate contains all
|
187
179
|
the sequence of Migrations for your schema.
|
data/Rakefile
CHANGED
@@ -21,6 +21,8 @@ RUBY_FORGE_PROJECT = "rails"
|
|
21
21
|
RUBY_FORGE_USER = "webster132"
|
22
22
|
|
23
23
|
|
24
|
+
task :default => :test
|
25
|
+
|
24
26
|
## This is required until the regular test task
|
25
27
|
## below passes. It's not ideal, but at least
|
26
28
|
## we can see the failures
|
@@ -38,9 +40,27 @@ Rake::TestTask.new("regular_test") do |t|
|
|
38
40
|
end
|
39
41
|
|
40
42
|
|
41
|
-
BASE_DIRS
|
42
|
-
app
|
43
|
-
|
43
|
+
BASE_DIRS = %w(
|
44
|
+
app
|
45
|
+
config/environments
|
46
|
+
config/initializers
|
47
|
+
components
|
48
|
+
db
|
49
|
+
doc
|
50
|
+
log
|
51
|
+
lib
|
52
|
+
lib/tasks
|
53
|
+
public
|
54
|
+
script
|
55
|
+
script/performance
|
56
|
+
script/process
|
57
|
+
test
|
58
|
+
vendor
|
59
|
+
vendor/plugins
|
60
|
+
tmp/sessions
|
61
|
+
tmp/cache
|
62
|
+
tmp/sockets
|
63
|
+
tmp/pids
|
44
64
|
)
|
45
65
|
|
46
66
|
APP_DIRS = %w( models controllers helpers views views/layouts )
|
@@ -48,12 +68,12 @@ PUBLIC_DIRS = %w( images javascripts stylesheets )
|
|
48
68
|
TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
|
49
69
|
|
50
70
|
LOG_FILES = %w( server.log development.log test.log production.log )
|
51
|
-
HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico images/rails.png
|
71
|
+
HTML_FILES = %w( 422.html 404.html 500.html index.html robots.txt favicon.ico images/rails.png
|
52
72
|
javascripts/prototype.js javascripts/application.js
|
53
73
|
javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
|
54
|
-
BIN_FILES = %w( about
|
74
|
+
BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/inspector runner server plugin )
|
55
75
|
|
56
|
-
VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport
|
76
|
+
VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport activeresource railties )
|
57
77
|
|
58
78
|
|
59
79
|
desc "Generates a fresh Rails package with documentation"
|
@@ -179,11 +199,14 @@ task :copy_configs do
|
|
179
199
|
|
180
200
|
cp "configs/apache.conf", "#{PKG_DESTINATION}/public/.htaccess"
|
181
201
|
|
182
|
-
cp "
|
202
|
+
cp "configs/initializers/inflections.rb", "#{PKG_DESTINATION}/config/initializers/inflections.rb"
|
203
|
+
cp "configs/initializers/mime_types.rb", "#{PKG_DESTINATION}/config/initializers/mime_types.rb"
|
204
|
+
|
205
|
+
cp "environments/boot.rb", "#{PKG_DESTINATION}/config/boot.rb"
|
183
206
|
cp "environments/environment.rb", "#{PKG_DESTINATION}/config/environment.rb"
|
184
|
-
cp "environments/production.rb",
|
207
|
+
cp "environments/production.rb", "#{PKG_DESTINATION}/config/environments/production.rb"
|
185
208
|
cp "environments/development.rb", "#{PKG_DESTINATION}/config/environments/development.rb"
|
186
|
-
cp "environments/test.rb",
|
209
|
+
cp "environments/test.rb", "#{PKG_DESTINATION}/config/environments/test.rb"
|
187
210
|
end
|
188
211
|
|
189
212
|
task :copy_binfiles do
|
@@ -237,18 +260,19 @@ desc "Generate documentation for the framework and for the empty application"
|
|
237
260
|
task :generate_documentation => [ :generate_app_doc, :generate_rails_framework_doc ]
|
238
261
|
|
239
262
|
task :generate_rails_framework_doc do
|
240
|
-
system %{cd #{PKG_DESTINATION}; rake
|
263
|
+
system %{cd #{PKG_DESTINATION}; rake doc:rails}
|
241
264
|
end
|
242
265
|
|
243
266
|
task :generate_app_doc do
|
244
267
|
File.cp "doc/README_FOR_APP", "#{PKG_DESTINATION}/doc/README_FOR_APP"
|
245
|
-
system %{cd #{PKG_DESTINATION}; rake
|
268
|
+
system %{cd #{PKG_DESTINATION}; rake doc:app}
|
246
269
|
end
|
247
270
|
|
248
271
|
Rake::RDocTask.new { |rdoc|
|
249
272
|
rdoc.rdoc_dir = 'doc'
|
250
273
|
rdoc.title = "Railties -- Gluing the Engine to the Rails"
|
251
274
|
rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=object'
|
275
|
+
rdoc.options << '--charset' << 'utf-8'
|
252
276
|
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
253
277
|
rdoc.rdoc_files.include('README', 'CHANGELOG')
|
254
278
|
rdoc.rdoc_files.include('lib/*.rb')
|
@@ -288,18 +312,17 @@ spec = Gem::Specification.new do |s|
|
|
288
312
|
EOF
|
289
313
|
|
290
314
|
s.add_dependency('rake', '>= 0.7.2')
|
291
|
-
s.add_dependency('activesupport', '=
|
292
|
-
s.add_dependency('activerecord', '=
|
293
|
-
s.add_dependency('actionpack', '=
|
294
|
-
s.add_dependency('actionmailer', '=
|
295
|
-
s.add_dependency('
|
315
|
+
s.add_dependency('activesupport', '= 2.0.0' + PKG_BUILD)
|
316
|
+
s.add_dependency('activerecord', '= 2.0.0' + PKG_BUILD)
|
317
|
+
s.add_dependency('actionpack', '= 2.0.0' + PKG_BUILD)
|
318
|
+
s.add_dependency('actionmailer', '= 2.0.0' + PKG_BUILD)
|
319
|
+
s.add_dependency('activeresource', '= 2.0.0' + PKG_BUILD)
|
296
320
|
|
297
321
|
s.rdoc_options << '--exclude' << '.'
|
298
322
|
s.has_rdoc = false
|
299
323
|
|
300
324
|
s.files = PKG_FILES.to_a.delete_if {|f| f.include?('.svn')}
|
301
325
|
s.require_path = 'lib'
|
302
|
-
|
303
326
|
s.bindir = "bin" # Use these for applications.
|
304
327
|
s.executables = ["rails"]
|
305
328
|
s.default_executable = "rails"
|
@@ -331,4 +354,4 @@ task :release => [ :package ] do
|
|
331
354
|
rubyforge = RubyForge.new
|
332
355
|
rubyforge.login
|
333
356
|
rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
|
334
|
-
end
|
357
|
+
end
|
data/bin/about
CHANGED
data/bin/console
CHANGED
data/bin/destroy
CHANGED
data/bin/generate
CHANGED
data/bin/plugin
CHANGED
data/bin/runner
CHANGED
data/bin/server
CHANGED
@@ -19,7 +19,7 @@ module Rails
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def components
|
22
|
-
%w( active_record action_pack
|
22
|
+
%w( active_record action_pack active_resource action_mailer active_support )
|
23
23
|
end
|
24
24
|
|
25
25
|
def component_version(component)
|
@@ -89,7 +89,7 @@ module Rails
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# Versions of each Rails component (Active Record, Action Pack,
|
92
|
-
#
|
92
|
+
# Active Resource, Action Mailer, and Active Support).
|
93
93
|
components.each do |component|
|
94
94
|
property "#{component.titlecase} version" do
|
95
95
|
component_version(component)
|
data/configs/apache.conf
CHANGED
@@ -37,4 +37,4 @@ RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
|
|
37
37
|
# Example:
|
38
38
|
# ErrorDocument 500 /500.html
|
39
39
|
|
40
|
-
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
|
40
|
+
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
|
data/configs/databases/mysql.yml
CHANGED
@@ -2,8 +2,11 @@
|
|
2
2
|
#
|
3
3
|
# Install the MySQL driver:
|
4
4
|
# gem install mysql
|
5
|
-
# On
|
6
|
-
# gem install mysql -- --
|
5
|
+
# On Mac OS X:
|
6
|
+
# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
|
7
|
+
# On Mac OS X Leopard:
|
8
|
+
# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
|
9
|
+
# This sets the ARCHFLAGS environment variable to your native architecture
|
7
10
|
# On Windows:
|
8
11
|
# gem install mysql
|
9
12
|
# Choose the win32 build.
|
@@ -13,6 +16,7 @@
|
|
13
16
|
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
14
17
|
development:
|
15
18
|
adapter: mysql
|
19
|
+
encoding: utf8
|
16
20
|
database: <%= app_name %>_development
|
17
21
|
username: root
|
18
22
|
password:
|
@@ -27,6 +31,7 @@ development:
|
|
27
31
|
# Do not set this db to the same as development or production.
|
28
32
|
test:
|
29
33
|
adapter: mysql
|
34
|
+
encoding: utf8
|
30
35
|
database: <%= app_name %>_test
|
31
36
|
username: root
|
32
37
|
password:
|
@@ -38,6 +43,7 @@ test:
|
|
38
43
|
|
39
44
|
production:
|
40
45
|
adapter: mysql
|
46
|
+
encoding: utf8
|
41
47
|
database: <%= app_name %>_production
|
42
48
|
username: root
|
43
49
|
password:
|
@@ -45,4 +51,4 @@ production:
|
|
45
51
|
socket: <%= socket %>
|
46
52
|
<% else -%>
|
47
53
|
host: localhost
|
48
|
-
<% end -%>
|
54
|
+
<% end -%>
|
@@ -1,30 +1,32 @@
|
|
1
|
-
# PostgreSQL
|
1
|
+
# PostgreSQL. Versions 7.4 and 8.x are supported.
|
2
2
|
#
|
3
|
-
#
|
4
|
-
# gem install postgres
|
5
|
-
#
|
6
|
-
# gem install postgres
|
3
|
+
# Install the ruby-postgres driver:
|
4
|
+
# gem install ruby-postgres
|
5
|
+
# On Mac OS X:
|
6
|
+
# gem install ruby-postgres -- --include=/usr/local/pgsql
|
7
|
+
# On Windows:
|
8
|
+
# gem install ruby-postgres
|
9
|
+
# Choose the win32 build.
|
10
|
+
# Install PostgreSQL and put its /bin directory on your path.
|
7
11
|
development:
|
8
12
|
adapter: postgresql
|
13
|
+
encoding: unicode
|
9
14
|
database: <%= app_name %>_development
|
10
15
|
username: <%= app_name %>
|
11
16
|
password:
|
12
17
|
|
13
|
-
# Connect on a TCP socket.
|
14
|
-
# domain socket that doesn't need configuration.
|
18
|
+
# Connect on a TCP socket. Omitted by default since the client uses a
|
19
|
+
# domain socket that doesn't need configuration. Windows does not have
|
15
20
|
# domain sockets, so uncomment these lines.
|
16
21
|
#host: localhost
|
17
22
|
#port: 5432
|
18
23
|
|
19
|
-
# Schema search path.
|
24
|
+
# Schema search path. The server defaults to $user,public
|
20
25
|
#schema_search_path: myapp,sharedapp,public
|
21
26
|
|
22
|
-
# Character set encoding. The server defaults to sql_ascii.
|
23
|
-
#encoding: UTF8
|
24
|
-
|
25
27
|
# Minimum log levels, in increasing order:
|
26
28
|
# debug5, debug4, debug3, debug2, debug1,
|
27
|
-
#
|
29
|
+
# log, notice, warning, error, fatal, and panic
|
28
30
|
# The server defaults to notice.
|
29
31
|
#min_messages: warning
|
30
32
|
|
@@ -33,12 +35,14 @@ development:
|
|
33
35
|
# Do not set this db to the same as development or production.
|
34
36
|
test:
|
35
37
|
adapter: postgresql
|
38
|
+
encoding: unicode
|
36
39
|
database: <%= app_name %>_test
|
37
40
|
username: <%= app_name %>
|
38
41
|
password:
|
39
42
|
|
40
43
|
production:
|
41
44
|
adapter: postgresql
|
45
|
+
encoding: unicode
|
42
46
|
database: <%= app_name %>_production
|
43
47
|
username: <%= app_name %>
|
44
48
|
password:
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
data/configs/routes.rb
CHANGED
@@ -1,23 +1,35 @@
|
|
1
1
|
ActionController::Routing::Routes.draw do |map|
|
2
2
|
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
-
|
3
|
+
|
4
4
|
# Sample of regular route:
|
5
|
-
#
|
5
|
+
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
6
|
# Keep in mind you can assign values other than :controller and :action
|
7
7
|
|
8
8
|
# Sample of named route:
|
9
|
-
#
|
9
|
+
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
10
|
# This route can be invoked with purchase_url(:id => product.id)
|
11
11
|
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# map.connect '', :controller => "welcome"
|
12
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
+
# map.resources :products
|
15
14
|
|
16
|
-
#
|
17
|
-
#
|
18
|
-
map.connect ':controller/service.wsdl', :action => 'wsdl'
|
15
|
+
# Sample resource route with options:
|
16
|
+
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
19
17
|
|
20
|
-
#
|
21
|
-
map.
|
18
|
+
# Sample resource route with sub-resources:
|
19
|
+
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
+
|
21
|
+
# Sample resource route within a namespace:
|
22
|
+
# map.namespace :admin do |admin|
|
23
|
+
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
24
|
+
# admin.resources :products
|
25
|
+
# end
|
26
|
+
|
27
|
+
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
28
|
+
# map.root :controller => "welcome"
|
29
|
+
|
30
|
+
# See how all your routes lay out with "rake routes"
|
31
|
+
|
32
|
+
# Install the default routes as the lowest priority.
|
22
33
|
map.connect ':controller/:action/:id'
|
34
|
+
map.connect ':controller/:action/:id.:format'
|
23
35
|
end
|