rails_product 0.5 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,619 +1,9 @@
1
- *SVN*
1
+ - 2005-09-24: Version 0.6 Released
2
2
 
3
- * Allow ERb in the database.yml file (just like with fixtures), so you can pull out the database configuration in environment variables #1822 [Duane Johnson]
3
+ - 2005-09-24: Added a sample section of vhost-based lighttpd config file (Michael Baudino)
4
4
 
5
- * Added convenience controls for FCGI processes (especially when managed remotely): spinner, spawner, and reaper. They reside in script/process. More details can be had by calling them with -h/--help.
5
+ - 2005-09-24: Changed the behavior of site-specific migrations--they now use a site_version column in the schema_info table instead of a floating point revision mechanism (Brad Ellis)
6
6
 
7
- * Added load_fixtures task to the Rakefile, which will load all the fixtures into the database for the current environment #1791 [Marcel Molina]
7
+ - 2005-09-24: Added models to the things that are auto-required and re-opened (Brad Ellis)
8
8
 
9
- * Added an empty robots.txt to public/, so that web servers asking for it won't trigger a dynamic call, like favicon.ico #1738 [michael@schubert]
10
-
11
- * Dropped the 'immediate close-down' of FCGI processes since it didn't work consistently and produced bad responses when it didn't. So now a TERM ensures exit after the next request (just as if the process is handling a request when it receives the signal). This means that you'll have to 'nudge' all FCGI processes with a request in order to ensure that they have all reloaded. This can be done by something like ./script/process/repear --nudge 'http://www.myapp.com' --instances 10, which will load the myapp site 10 times (and thus hit all of the 10 FCGI processes once, enough to shut down).
12
-
13
-
14
- *0.13.1* (11 July, 2005)
15
-
16
- * Look for app-specific generators in RAILS_ROOT/generators rather than the clunky old RAILS_ROOT/script/generators. Nobody really uses this feature except for the unit tests, so it's a negligible-impact change. If you want to work with third-party generators, drop them in ~/.rails/generators or simply install gems.
17
-
18
- * Fixed that each request with the WEBrick adapter would open a new database connection #1685 [Sam Stephenson]
19
-
20
- * Added support for SQL Server in the database rake tasks #1652 [ken.barker@gmail.com] Note: osql and scptxfr may need to be installed on your development environment. This involves getting the .exes and a .rll (scptxfr) from a production SQL Server (not developer level SQL Server). Add their location to your Environment PATH and you are all set.
21
-
22
- * Added a VERSION parameter to the migrate task that allows you to do "rake migrate VERSION=34" to migrate to the 34th version traveling up or down depending on the current version
23
-
24
- * Extend Ruby version check to include RUBY_RELEASE_DATE >= '2005-12-25', the final Ruby 1.8.2 release #1674 [court3nay@gmail.com]
25
-
26
- * Improved documentation for environment config files #1625 [court3nay@gmail.com]
27
-
28
-
29
- *0.13.0* (6 July, 2005)
30
-
31
- * Changed the default logging level in config/environment.rb to INFO for production (so SQL statements won't be logged)
32
-
33
- * Added migration generator: ./script/generate migration add_system_settings
34
-
35
- * Added "migrate" as rake task to execute all the pending migrations from db/migrate
36
-
37
- * Fixed that model generator would make fixtures plural, even if ActiveRecord::Base.pluralize_table_names was false #1185 [Marcel Molina]
38
-
39
- * Added a DOCTYPE of HTML transitional to the HTML files generated by Rails #1124 [Michael Koziarski]
40
-
41
- * SIGTERM also gracefully exits dispatch.fcgi. Ignore SIGUSR1 on Windows.
42
-
43
- * Add the option to manually manage garbage collection in the FastCGI dispatcher. Set the number of requests between GC runs in your public/dispatch.fcgi [skaes@web.de]
44
-
45
- * Allow dynamic application reloading for dispatch.fcgi processes by sending a SIGHUP. If the process is currently handling a request, the request will be allowed to complete first. This allows production fcgi's to be reloaded without having to restart them.
46
-
47
- * RailsFCGIHandler (dispatch.fcgi) no longer tries to explicitly flush $stdout (CgiProcess#out always calls flush)
48
-
49
- * Fixed rakefile actions against PostgreSQL when the password is all numeric #1462 [michael@schubert.cx]
50
-
51
- * ActionMailer::Base subclasses are reloaded with the other rails components #1262
52
-
53
- * Made the WEBrick adapter not use a mutex around action performance if ActionController::Base.allow_concurrency is true (default is false)
54
-
55
- * Fixed that mailer generator generated fixtures/plural while units expected fixtures/singular #1457 [Scott Barron]
56
-
57
- * Added a 'whiny nil' that's aim to ensure that when users pass nil to methods where that isn't appropriate, instead of NoMethodError? and the name of some method used by the framework users will see a message explaining what type of object was expected. Only active in test and development environments by default #1209 [Michael Koziarski]
58
-
59
- * Fixed the test_helper.rb to be safe for requiring controllers from multiple spots, like app/controllers/article_controller.rb and app/controllers/admin/article_controller.rb, without reloading the environment twice #1390 [Nicholas Seckar]
60
-
61
- * Fixed Webrick to escape + characters in URL's the same way that lighttpd and apache do #1397 [Nicholas Seckar]
62
-
63
- * Added -e/--environment option to script/runner #1408 [fbeausoleil@ftml.net]
64
-
65
- * Modernize the scaffold generator to use the simplified render and test methods and to change style from @params["id"] to params[:id]. #1367
66
-
67
- * Added graceful exit from pressing CTRL-C during the run of the rails command #1150 [Caleb Tennis]
68
-
69
- * Allow graceful exits for dispatch.fcgi processes by sending a SIGUSR1. If the process is currently handling a request, the request will be allowed to complete and then will terminate itself. If a request is not being handled, the process is terminated immediately (via #exit). This basically works like restart graceful on Apache. [Jamis Buck]
70
-
71
- * Made dispatch.fcgi more robust by catching fluke errors and retrying unless its a permanent condition. [Jamis Buck]
72
-
73
- * Added console --profile for profiling an IRB session #1154 [Jeremy Kemper]
74
-
75
- * Changed console_sandbox into console --sandbox #1154 [Jeremy Kemper]
76
-
77
-
78
- *0.12.1* (20th April, 2005)
79
-
80
- * Upgraded to Active Record 1.10.1, Action Pack 1.8.1, Action Mailer 0.9.1, Action Web Service 0.7.1
81
-
82
-
83
- *0.12.0* (19th April, 2005)
84
-
85
- * Fixed that purge_test_database would use database settings from the development environment when recreating the test database #1122 [rails@cogentdude.com]
86
-
87
- * Added script/benchmarker to easily benchmark one or more statement a number of times from within the environment. Examples:
88
-
89
- # runs the one statement 10 times
90
- script/benchmarker 10 'Person.expensive_method(10)'
91
-
92
- # pits the two statements against each other with 50 runs each
93
- script/benchmarker 50 'Person.expensive_method(10)' 'Person.cheap_method(10)'
94
-
95
- * Added script/profiler to easily profile a single statement from within the environment. Examples:
96
-
97
- script/profiler 'Person.expensive_method(10)'
98
- script/profiler 'Person.expensive_method(10)' 10 # runs the statement 10 times
99
-
100
- * Added Rake target clear_logs that'll truncate all the *.log files in log/ to zero #1079 [Lucas Carlson]
101
-
102
- * Added lazy typing for generate, such that ./script/generate cn == ./script/generate controller and the likes #1051 [k@v2studio.com]
103
-
104
- * Fixed that ownership is brought over in pg_dump during tests for PostgreSQL #1060 [pburleson@gmail.com]
105
-
106
- * Upgraded to Active Record 1.10.0, Action Pack 1.8.0, Action Mailer 0.9.0, Action Web Service 0.7.0, Active Support 1.0.4
107
-
108
-
109
- *0.11.1* (27th March, 2005)
110
-
111
- * Fixed the dispatch.fcgi use of a logger
112
-
113
- * Upgraded to Active Record 1.9.1, Action Pack 1.7.0, Action Mailer 0.8.1, Action Web Service 0.6.2, Active Support 1.0.3
114
-
115
-
116
- *0.11.0* (22th March, 2005)
117
-
118
- * Removed SCRIPT_NAME from the WEBrick environment to prevent conflicts with PATH_INFO #896 [Nicholas Seckar]
119
-
120
- * Removed ?$1 from the dispatch.f/cgi redirect line to get rid of 'complete/path/from/request.html' => nil being in the @params now that the ENV["REQUEST_URI"] is used to determine the path #895 [dblack/Nicholas Seckar]
121
-
122
- * Added additional error handling to the FastCGI dispatcher to catch even errors taking down the entire process
123
-
124
- * Improved the generated scaffold code a lot to take advantage of recent Rails developments #882 [Tobias Luetke]
125
-
126
- * Combined the script/environment.rb used for gems and regular files version. If vendor/rails/* has all the frameworks, then files version is used, otherwise gems #878 [Nicholas Seckar]
127
-
128
- * Changed .htaccess to allow dispatch.* to be called from a sub-directory as part of the push with Action Pack to make Rails work on non-vhost setups #826 [Nicholas Seckar/Tobias Luetke]
129
-
130
- * Added script/runner which can be used to run code inside the environment by eval'ing the first parameter. Examples:
131
-
132
- ./script/runner 'ReminderService.deliver'
133
- ./script/runner 'Mailer.receive(STDIN.read)'
134
-
135
- This makes it easier to do CRON and postfix scripts without actually making a script just to trigger 1 line of code.
136
-
137
- * Fixed webrick_server cookie handling to allow multiple cookes to be set at once #800, #813 [dave@cherryville.org]
138
-
139
- * Fixed the Rakefile's interaction with postgresql to:
140
-
141
- 1. Use PGPASSWORD and PGHOST in the environment to fix prompting for
142
- passwords when connecting to a remote db and local socket connections.
143
- 2. Add a '-x' flag to pg_dump which stops it dumping privileges #807 [rasputnik]
144
- 3. Quote the user name and use template0 when dumping so the functions doesn't get dumped too #855 [pburleson]
145
- 4. Use the port if available #875 [madrobby]
146
-
147
- * Upgraded to Active Record 1.9.0, Action Pack 1.6.0, Action Mailer 0.8.0, Action Web Service 0.6.1, Active Support 1.0.2
148
-
149
-
150
- *0.10.1* (7th March, 2005)
151
-
152
- * Fixed rake stats to ignore editor backup files like model.rb~ #791 [skanthak]
153
-
154
- * Added exception shallowing if the DRb server can't be started (not worth making a fuss about to distract new users) #779 [Tobias Luetke]
155
-
156
- * Added an empty favicon.ico file to the public directory of new applications (so the logs are not spammed by its absence)
157
-
158
- * Fixed that scaffold generator new template should use local variable instead of instance variable #778 [Dan Peterson]
159
-
160
- * Allow unit tests to run on a remote server for PostgreSQL #781 [adamm@galacticasoftware.com]
161
-
162
- * Added web_service generator (run ./script/generate web_service for help) #776 [Leon Bredt]
163
-
164
- * Added app/apis and components to code statistics report #729 [Scott Barron]
165
-
166
- * Fixed WEBrick server to use ABSOLUTE_RAILS_ROOT instead of working_directory #687 [Nicholas Seckar]
167
-
168
- * Fixed rails_generator to be usable without RubyGems #686 [Cristi BALAN]
169
-
170
- * Fixed -h/--help for generate and destroy generators #331
171
-
172
- * Added begin/rescue around the FCGI dispatcher so no uncaught exceptions can bubble up to kill the process (logs to log/fastcgi.crash.log)
173
-
174
- * Fixed that association#count would produce invalid sql when called sequentialy #659 [kanis@comcard.de]
175
-
176
- * Fixed test/mocks/testing to the correct test/mocks/test #740
177
-
178
- * Added early failure if the Ruby version isn't 1.8.2 or above #735
179
-
180
- * Removed the obsolete -i/--index option from the WEBrick servlet #743
181
-
182
- * Upgraded to Active Record 1.8.0, Action Pack 1.5.1, Action Mailer 0.7.1, Action Web Service 0.6.0, Active Support 1.0.1
183
-
184
-
185
- *0.10.0* (24th February, 2005)
186
-
187
- * Changed default IP binding for WEBrick from 127.0.0.1 to 0.0.0.0 so that the server is accessible both locally and remotely #696 [Marcel]
188
-
189
- * Fixed that script/server -d was broken so daemon mode couldn't be used #687 [Nicholas Seckar]
190
-
191
- * Upgraded to breakpoint 92 which fixes:
192
-
193
- * overload IRB.parse_opts(), fixes #443
194
- => breakpoints in tests work even when running them via rake
195
- * untaint handlers, might fix an issue discussed on the Rails ML
196
- * added verbose mode to breakpoint_client
197
- * less noise caused by breakpoint_client by default
198
- * ignored TerminateLineInput exception in signal handler
199
- => quiet exit on Ctrl-C
200
-
201
- * Added support for independent components residing in /components. Example:
202
-
203
- Controller: components/list/items_controller.rb
204
- (holds a List::ItemsController class with uses_component_template_root called)
205
-
206
- Model : components/list/item.rb
207
- (namespace is still shared, so an Item model in app/models will take precedence)
208
-
209
- Views : components/list/items/show.rhtml
210
-
211
-
212
- * Added --sandbox option to script/console that'll roll back all changes made to the database when you quit #672 [Jeremy Kemper]
213
-
214
- * Added 'recent' as a rake target that'll run tests for files that changed in the last 10 minutes #612 [Jeremy Kemper]
215
-
216
- * Changed script/console to default to development environment and drop --no-inspect #650 [Jeremy Kemper]
217
-
218
- * Added that the 'fixture :posts' syntax can be used for has_and_belongs_to_many fixtures where a model doesn't exist #572 [Jeremy Kemper]
219
-
220
- * Added that running test_units and test_functional now performs the clone_structure_to_test as well #566 [rasputnik]
221
-
222
- * Added new generator framework that informs about its doings on generation and enables updating and destruction of generated artifacts. See the new script/destroy and script/update for more details #487 [Jeremy Kemper]
223
-
224
- * Added Action Web Service as a new add-on framework for Action Pack [Leon Bredt]
225
-
226
- * Added Active Support as an independent utility and standard library extension bundle
227
-
228
- * Upgraded to Active Record 1.7.0, Action Pack 1.5.0, Action Mailer 0.7.0
229
-
230
-
231
- *0.9.5* (January 25th, 2005)
232
-
233
- * Fixed dependency reloading by switching to a remove_const approach where all Active Records, Active Record Observers, and Action Controllers are reloading by undefining their classes. This enables you to remove methods in all three types and see the change reflected immediately and it fixes #539. This also means that only those three types of classes will benefit from the const_missing and reloading approach. If you want other classes (like some in lib/) to reload, you must use require_dependency to do it.
234
-
235
- * Added Florian Gross' latest version of Breakpointer and friends that fixes a variaty of bugs #441 [Florian Gross]
236
-
237
- * Fixed skeleton Rakefile to work with sqlite3 out of the box #521 [rasputnik]
238
-
239
- * Fixed that script/breakpointer didn't get the Ruby path rewritten as the other scripts #523 [brandt@kurowski.net]
240
-
241
- * Fixed handling of syntax errors in models that had already been succesfully required once in the current interpreter
242
-
243
- * Fixed that models that weren't referenced in associations weren't being reloaded in the development mode by reinstating the reload
244
-
245
- * Fixed that generate scaffold would produce bad functional tests
246
-
247
- * Fixed that FCGI can also display SyntaxErrors
248
-
249
- * Upgraded to Active Record 1.6.0, Action Pack 1.4.0
250
-
251
-
252
- *0.9.4.1* (January 18th, 2005)
253
-
254
- * Added 5-second timeout to WordNet alternatives on creating reserved-word models #501 [Marcel Molina]
255
-
256
- * Fixed binding of caller #496 [Alexey]
257
-
258
- * Upgraded to Active Record 1.5.1, Action Pack 1.3.1, Action Mailer 0.6.1
259
-
260
-
261
- *0.9.4* (January 17th, 2005)
262
-
263
- * Added that ApplicationController will catch a ControllerNotFound exception if someone attempts to access a url pointing to an unexisting controller [Tobias Luetke]
264
-
265
- * Flipped code-to-test ratio around to be more readable #468 [Scott Baron]
266
-
267
- * Fixed log file permissions to be 666 instead of 777 (so they're not executable) #471 [Lucas Carlson]
268
-
269
- * Fixed that auto reloading would some times not work or would reload the models twice #475 [Tobias Luetke]
270
-
271
- * Added rewrite rules to deal with caching to public/.htaccess
272
-
273
- * Added the option to specify a controller name to "generate scaffold" and made the default controller name the plural form of the model.
274
-
275
- * Added that rake clone_structure_to_test, db_structure_dump, and purge_test_database tasks now pick up the source database to use from
276
- RAILS_ENV instead of just forcing development #424 [Tobias Luetke]
277
-
278
- * Fixed script/console to work with Windows (that requires the use of irb.bat) #418 [octopod]
279
-
280
- * Fixed WEBrick servlet slowdown over time by restricting the load path reloading to mod_ruby
281
-
282
- * Removed Fancy Indexing as a default option on the WEBrick servlet as it made it harder to use various caching schemes
283
-
284
- * Upgraded to Active Record 1.5, Action Pack 1.3, Action Mailer 0.6
285
-
286
-
287
- *0.9.3* (January 4th, 2005)
288
-
289
- * Added support for SQLite in the auto-dumping/importing of schemas for development -> test #416
290
-
291
- * Added automated rewriting of the shebang lines on installs through the gem rails command #379 [Manfred Stienstra]
292
-
293
- * Added ActionMailer::Base.deliver_method = :test to the test environment so that mail objects are available in ActionMailer::Base.deliveries
294
- for functional testing.
295
-
296
- * Added protection for creating a model through the generators with a name of an existing class, like Thread or Date.
297
- It'll even offer you a synonym using wordnet.princeton.edu as a look-up. No, I'm not kidding :) [Florian Gross]
298
-
299
- * Fixed dependency management to happen in a unified fashion for Active Record and Action Pack using the new Dependencies module. This means that
300
- the environment options needs to change from:
301
-
302
- Before in development.rb:
303
- ActionController::Base.reload_dependencies = true  
304
- ActiveRecord::Base.reload_associations     = true
305
-
306
- Now in development.rb:
307
- Dependencies.mechanism = :load
308
-
309
- Before in production.rb and test.rb:
310
- ActionController::Base.reload_dependencies = false
311
- ActiveRecord::Base.reload_associations     = false
312
-
313
- Now in production.rb and test.rb:
314
- Dependencies.mechanism = :require
315
-
316
- * Fixed problems with dependency caching and controller hierarchies on Ruby 1.8.2 in development mode #351
317
-
318
- * Fixed that generated action_mailers doesnt need to require the action_mailer since thats already done in the environment #382 [Lucas Carlson]
319
-
320
- * Upgraded to Action Pack 1.2.0 and Active Record 1.4.0
321
-
322
-
323
- *0.9.2*
324
-
325
- * Fixed CTRL-C exists from the Breakpointer to be a clean affair without error dumping [Kent Sibilev]
326
-
327
- * Fixed "rake stats" to work with sub-directories in models and controllers and to report the code to test ration [Scott Baron]
328
-
329
- * Added that Active Record associations are now reloaded instead of cleared to work with the new const_missing hook in Active Record.
330
-
331
- * Added graceful handling of an inaccessible log file by redirecting output to STDERR with a warning #330 [rainmkr]
332
-
333
- * Added support for a -h/--help parameter in the generator #331 [Ulysses]
334
-
335
- * Fixed that File.expand_path in config/environment.rb would fail when dealing with symlinked public directories [mjobin]
336
-
337
- * Upgraded to Action Pack 1.1.0 and Active Record 1.3.0
338
-
339
-
340
- *0.9.1*
341
-
342
- * Upgraded to Action Pack 1.0.1 for important bug fix
343
-
344
- * Updated gem dependencies
345
-
346
-
347
- *0.9.0*
348
-
349
- * Renamed public/dispatch.servlet to script/server -- it wasn't really dispatching anyway as its delegating calls to public/dispatch.rb
350
-
351
- * Renamed AbstractApplicationController and abstract_application.rb to ApplicationController and application.rb, so that it will be possible
352
- for the framework to automatically pick up on app/views/layouts/application.rhtml and app/helpers/application.rb
353
-
354
- * Added script/console that makes it even easier to start an IRB session for interacting with the domain model. Run with no-args to
355
- see help.
356
-
357
- * Added breakpoint support through the script/breakpointer client. This means that you can break out of execution at any point in
358
- the code, investigate and change the model, AND then resume execution! Example:
359
-
360
- class WeblogController < ActionController::Base
361
- def index
362
- @posts = Post.find_all
363
- breakpoint "Breaking out from the list"
364
- end
365
- end
366
-
367
- So the controller will accept the action, run the first line, then present you with a IRB prompt in the breakpointer window.
368
- Here you can do things like:
369
-
370
- Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint'
371
-
372
- >> @posts.inspect
373
- => "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
374
- #<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
375
- >> @posts.first.title = "hello from a breakpoint"
376
- => "hello from a breakpoint"
377
-
378
- ...and even better is that you can examine how your runtime objects actually work:
379
-
380
- >> f = @posts.first
381
- => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
382
- >> f.
383
- Display all 152 possibilities? (y or n)
384
-
385
- Finally, when you're ready to resume execution, you press CTRL-D
386
-
387
- * Changed environments to be configurable through an environment variable. By default, the environment is "development", but you
388
- can change that and set your own by configuring the Apache vhost with a string like (mod_env must be available on the server):
389
-
390
- SetEnv RAILS_ENV production
391
-
392
- ...if you're using WEBrick, you can pick the environment to use with the command-line parameters -e/--environment, like this:
393
-
394
- ruby public/dispatcher.servlet -e production
395
-
396
- * Added a new default environment called "development", which leaves the production environment to be tuned exclusively for that.
397
-
398
- * Added a start_server in the root of the Rails application to make it even easier to get started
399
-
400
- * Fixed public/.htaccess to use RewriteBase and share the same rewrite rules for all the dispatch methods
401
-
402
- * Fixed webrick_server to handle requests in a serialized manner (the Rails reloading infrastructure is not thread-safe)
403
-
404
- * Added support for controllers in directories. So you can have:
405
-
406
- app/controllers/account_controller.rb # URL: /account/
407
- app/controllers/admin/account_controller.rb # URL: /admin/account/
408
-
409
- NOTE: You need to update your public/.htaccess with the new rules to pick it up
410
-
411
- * Added reloading for associations and dependencies under cached environments like FastCGI and mod_ruby. This makes it possible to use
412
- those environments for development. This is turned on by default, but can be turned off with
413
- ActiveRecord::Base.reload_associations = false and ActionController::Base.reload_dependencies = false in production environments.
414
-
415
- * Added support for sub-directories in app/models. So now you can have something like Basecamp with:
416
-
417
- app/models/accounting
418
- app/models/project
419
- app/models/participants
420
- app/models/settings
421
-
422
- It's poor man's namespacing, but only for file-system organization. You still require files just like before.
423
- Nothing changes inside the files themselves.
424
-
425
-
426
- * Fixed a few references in the tests generated by new_mailer [Jeremy Kemper]
427
-
428
- * Added support for mocks in testing with test/mocks
429
-
430
- * Cleaned up the environments a bit and added global constant RAILS_ROOT
431
-
432
-
433
- *0.8.5* (9)
434
-
435
- * Made dev-util available to all tests, so you can insert breakpoints in any test case to get an IRB prompt at that point [Jeremy Kemper]:
436
-
437
- def test_complex_stuff
438
- @david.projects << @new_project
439
- breakpoint "Let's have a closer look at @david"
440
- end
441
-
442
- You need to install dev-utils yourself for this to work ("gem install dev-util").
443
-
444
- * Added shared generator behavior so future upgrades should be possible without manually copying over files [Jeremy Kemper]
445
-
446
- * Added the new helper style to both controller and helper templates [Jeremy Kemper]
447
-
448
- * Added new_crud generator for creating a model and controller at the same time with explicit scaffolding [Jeremy Kemper]
449
-
450
- * Added configuration of Test::Unit::TestCase.fixture_path to test_helper to concide with the new AR fixtures style
451
-
452
- * Fixed that new_model was generating singular table/fixture names
453
-
454
- * Upgraded to Action Mailer 0.4.0
455
-
456
- * Upgraded to Action Pack 0.9.5
457
-
458
- * Upgraded to Active Record 1.1.0
459
-
460
-
461
- *0.8.0 (15)*
462
-
463
- * Removed custom_table_name option for new_model now that the Inflector is as powerful as it is
464
-
465
- * Changed the default rake action to just do testing and separate API generation and coding statistics into a "doc" task.
466
-
467
- * Fixed WEBrick dispatcher to handle missing slashes in the URLs gracefully [alexey]
468
-
469
- * Added user option for all postgresql tool calls in the rakefile [elvstone]
470
-
471
- * Fixed problem with running "ruby public/dispatch.servlet" instead of "cd public; ruby dispatch.servlet" [alexey]
472
-
473
- * Fixed WEBrick server so that it no longer hardcodes the ruby interpreter used to "ruby" but will get the one used based
474
- on the Ruby runtime configuration. [Marcel Molina Jr.]
475
-
476
- * Fixed Dispatcher so it'll route requests to magic_beans to MagicBeansController/magic_beans_controller.rb [Caio Chassot]
477
-
478
- * "new_controller MagicBeans" and "new_model SubscriptionPayments" will now both behave properly as they use the new Inflector.
479
-
480
- * Fixed problem with MySQL foreign key constraint checks in Rake :clone_production_structure_to_test target [Andreas Schwarz]
481
-
482
- * Changed WEBrick server to by default be auto-reloading, which is slower but makes source changes instant.
483
- Class compilation cache can be turned on with "-c" or "--cache-classes".
484
-
485
- * Added "-b/--binding" option to WEBrick dispatcher to bind the server to a specific IP address (default: 127.0.0.1) [Kevin Temp]
486
-
487
- * dispatch.fcgi now DOESN'T set FCGI_PURE_RUBY as it was slowing things down for now reason [Andreas Schwarz]
488
-
489
- * Added new_mailer generator to work with Action Mailer
490
-
491
- * Included new framework: Action Mailer 0.3
492
-
493
- * Upgraded to Action Pack 0.9.0
494
-
495
- * Upgraded to Active Record 1.0.0
496
-
497
-
498
- *0.7.0*
499
-
500
- * Added an optional second argument to the new_model script that allows the programmer to specify the table name,
501
- which will used to generate a custom table_name method in the model and will also be used in the creation of fixtures.
502
- [Kevin Radloff]
503
-
504
- * script/new_model now turns AccountHolder into account_holder instead of accountholder [Kevin Radloff]
505
-
506
- * Fixed the faulty handleing of static files with WEBrick [Andreas Schwarz]
507
-
508
- * Unified function_test_helper and unit_test_helper into test_helper
509
-
510
- * Fixed bug with the automated production => test database dropping on PostgreSQL [dhawkins]
511
-
512
- * create_fixtures in both the functional and unit test helper now turns off the log during fixture generation
513
- and can generate more than one fixture at a time. Which makes it possible for assignments like:
514
-
515
- @people, @projects, @project_access, @companies, @accounts =
516
- create_fixtures "people", "projects", "project_access", "companies", "accounts"
517
-
518
- * Upgraded to Action Pack 0.8.5 (locally-scoped variables, partials, advanced send_file)
519
-
520
- * Upgraded to Active Record 0.9.5 (better table_name guessing, cloning, find_all_in_collection)
521
-
522
-
523
- *0.6.5*
524
-
525
- * No longer specifies a template for rdoc, so it'll use whatever is default (you can change it in the rakefile)
526
-
527
- * The new_model generator will now use the same rules for plural wordings as Active Record
528
- (so Category will give categories, not categorys) [Kevin Radloff]
529
-
530
- * dispatch.fcgi now sets FCGI_PURE_RUBY to true to ensure that it's the Ruby version that's loaded [danp]
531
-
532
- * Made the GEM work with Windows
533
-
534
- * Fixed bug where mod_ruby would "forget" the load paths added when switching between controllers
535
-
536
- * PostgreSQL are now supported for the automated production => test database dropping [Kevin Radloff]
537
-
538
- * Errors thrown by the dispatcher are now properly handled in FCGI.
539
-
540
- * Upgraded to Action Pack 0.8.0 (lots and lots and lots of fixes)
541
-
542
- * Upgraded to Active Record 0.9.4 (a bunch of fixes)
543
-
544
-
545
- *0.6.0*
546
-
547
- * Added AbstractionApplicationController as a superclass for all controllers generated. This class can be used
548
- to carry filters and methods that are to be shared by all. It has an accompanying ApplicationHelper that all
549
- controllers will also automatically have available.
550
-
551
- * Added environments that can be included from any script to get the full Active Record and Action Controller
552
- context running. This can be used by maintenance scripts or to interact with the model through IRB. Example:
553
-
554
- require 'config/environments/production'
555
-
556
- for account in Account.find_all
557
- account.recalculate_interests
558
- end
559
-
560
- A short migration script for an account model that had it's interest calculation strategy changed.
561
-
562
- * Accessing the index of a controller with "/weblog" will now redirect to "/weblog/" (only on Apache, not WEBrick)
563
-
564
- * Simplified the default Apache config so even remote requests are served off CGI as a default.
565
- You'll now have to do something specific to activate mod_ruby and FCGI (like using the force urls).
566
- This should make it easier for new comers that start on an external server.
567
-
568
- * Added more of the necessary Apache options to .htaccess to make it easier to setup
569
-
570
- * Upgraded to Action Pack 0.7.9 (lots of fixes)
571
-
572
- * Upgraded to Active Record 0.9.3 (lots of fixes)
573
-
574
-
575
- *0.5.7*
576
-
577
- * Fixed bug in the WEBrick dispatcher that prevented it from getting parameters from the URL
578
- (through GET requests or otherwise)
579
-
580
- * Added lib in root as a place to store app specific libraries
581
-
582
- * Added lib and vendor to load_path, so anything store within can be loaded directly.
583
- Hence lib/redcloth.rb can be loaded with require "redcloth"
584
-
585
- * Upgraded to Action Pack 0.7.8 (lots of fixes)
586
-
587
- * Upgraded to Active Record 0.9.2 (minor upgrade)
588
-
589
-
590
- *0.5.6*
591
-
592
- * Upgraded to Action Pack 0.7.7 (multipart form fix)
593
-
594
- * Updated the generated template stubs to valid XHTML files
595
-
596
- * Ensure that controllers generated are capitalized, so "new_controller TodoLists"
597
- gives the same as "new_controller Todolists" and "new_controller todolists".
598
-
599
-
600
- *0.5.5*
601
-
602
- * Works on Windows out of the box! (Dropped symlinks)
603
-
604
- * Added webrick dispatcher: Try "ruby public/dispatch.servlet --help" [Florian Gross]
605
-
606
- * Report errors about initialization to browser (instead of attempting to use uninitialized logger)
607
-
608
- * Upgraded to Action Pack 0.7.6
609
-
610
- * Upgraded to Active Record 0.9.1
611
-
612
- * Added distinct 500.html instead of reusing 404.html
613
-
614
- * Added MIT license
615
-
616
-
617
- *0.5.0*
618
-
619
- * First public release
9
+ - 2005-07-25: Version 0.5 Released
data/README CHANGED
@@ -12,7 +12,7 @@ working on an adoption site (Jul 2005). Adoption sites, in general, have
12
12
  some generic needs (e.g. a "Birth Mother" login and a "Waiting Family"
13
13
  login), but our client has some particular needs as well.
14
14
 
15
- Using the following code, you can create a single generic application which
15
+ Using the rails_product generator, you can create a single generic application which
16
16
  uses a separate database for each client. In addition, you will have a
17
17
  hierarchical application structure wherein add-ons and tweaks for specific
18
18
  customers are possible without affecting the core "generic" site code base
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ require 'rbconfig'
9
9
 
10
10
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11
11
  PKG_NAME = 'rails_product'
12
- PKG_VERSION = '0.5' + PKG_BUILD
12
+ PKG_VERSION = '0.6' + PKG_BUILD
13
13
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
14
  PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
15
15
 
data/TICKETS ADDED
@@ -0,0 +1,2 @@
1
+ - 2005-08-09: (Benjamin Curtis) If the base application layouts/application.rhtml file doesn't exist, then the view rendering code will not check for a second-tier layouts/application.rhtml.
2
+
@@ -0,0 +1,28 @@
1
+ $HTTP["host"] == "school.mydomain.com" {
2
+ server.document-root = "/code/online/public"
3
+ setenv.add-environment = ( "APP_USER" => "mike")
4
+ fastcgi.server = (".fcgi" =>
5
+ ( "rails" => (
6
+ "socket" => "/tmp/ruby-fastcgi-school.socket",
7
+ "bin-path" => "/code/online/sites/school/public/dispatch.fcgi",
8
+ "bin-environment" => ("site" => "school")
9
+ )
10
+ )
11
+ )
12
+ alias.url = ("/generic" => "/code/online/public")
13
+ }
14
+
15
+
16
+ $HTTP["host"] == "golf.mydomain.com" {
17
+ server.document-root = "/code/online/public"
18
+ setenv.add-environment = ( "APP_USER" => "mike")
19
+ fastcgi.server = (".fcgi" =>
20
+ ( "rails" => (
21
+ "socket" => "/tmp/ruby-fastcgi-golf.socket",
22
+ "bin-path" => "/code/online/sites/golf/public/dispatch.fcgi",
23
+ "bin-environment" => ("site" => "golf")
24
+ )
25
+ )
26
+ )
27
+ alias.url = ("/generic" => "/code/online/public")
28
+ }
@@ -1,16 +1,27 @@
1
1
  SITE_ROOT = File.join(RAILS_ROOT, 'sites', SITE)
2
2
 
3
- # Load site-specific controllers and let them re-open their corresponding class
3
+ # Load site-specific controllers and models and let them re-open their corresponding class
4
4
  module Dependencies
5
5
  def require_or_load(file_name)
6
6
  file_name = "#{file_name}.rb" unless ! load? || file_name[-3..-1] == '.rb'
7
- load? ? load(file_name) : require(file_name)
7
+ begin
8
+ load? ? load(file_name) : require(file_name)
9
+ rescue LoadError => e
10
+ # raise an error if this isn't a site-specific model
11
+ raise unless File.exist?(File.join(SITE_ROOT, 'app', 'models', File.basename(file_name)))
12
+ end
13
+ # try loading site-specific controller
8
14
  if file_name.include? 'controller'
9
15
  file_name = File.join(SITE_ROOT, 'app', 'controllers', File.basename(file_name))
10
16
  if File.exist? file_name
11
17
  load? ? load(file_name) : require(file_name)
12
18
  end
13
19
  end
20
+ # try loading site-specific model
21
+ file_name = File.join(SITE_ROOT, 'app', 'models', File.basename(file_name))
22
+ if File.exist? file_name
23
+ load? ? load(file_name) : require(file_name)
24
+ end
14
25
  end
15
26
  end
16
27
 
@@ -32,33 +43,29 @@ module ActionView
32
43
  end
33
44
  end
34
45
 
35
- # Scoop up both the base's migration files (those that should apply to ALL sites), plus
36
- # the site-specific migration files. Sort them. Apply them in turn.
37
- module ActiveRecord
38
- class Migrator
39
- private
40
- def migration_files
41
- generic_files = Dir["#{@migrations_path}/[0-9]*_*.rb"].sort
42
- puts generic_files.inspect
43
- # Include the site-specific files in our complete list of migration files
44
- if defined? SITE_ROOT and File.exist?("#{SITE_ROOT}/db/migrate")
45
- # Note that a tilde (~) is used intentionally because its ascii value
46
- # is greater than both the lower-case and upper-case alphabets (thereby
47
- # causing the sort! below to behave as expected).
48
- site_specific_files = Dir["#{SITE_ROOT}/db/migrate/[0-9]*\.[0-9]*_*.rb"]
49
- files = generic_files + site_specific_files
50
- # Sort by filename, ignoring the path to get there. Also convert '.'
51
- # to '~' so that sorting occurs in the correct order.
52
- files.sort! { |a,b| a.gsub(".", "~").match(/.+[\/\\](.+)/)[1] <=> b.gsub(".", "~").match(/.+[\/\\](.+)/)[1] }
53
- else
54
- files = generic_files
55
- end
56
- down? ? files.reverse : files
57
- end
46
+ # Allow for site-specific migrations by adding a "site_version" field to the schema_info table
47
+ class ActiveRecord::SiteMigrator < ActiveRecord::Migrator
48
+ def self.current_version
49
+ ActiveRecord::Base.connection.select_one("SELECT site_version FROM schema_info")["site_version"].to_i
50
+ end
58
51
 
52
+ def set_schema_version(version)
53
+ ActiveRecord::Base.connection.update("UPDATE schema_info SET site_version = #{down? ? version.to_i - 1 : version.to_i}")
59
54
  end
60
55
  end
61
56
 
57
+ class ActiveRecord::ConnectionAdapters::AbstractAdapter
58
+ def initialize_schema_information
59
+ begin
60
+ execute "CREATE TABLE schema_info (version #{type_to_sql(:integer)}, site_version #{type_to_sql(:integer)})"
61
+ execute "INSERT INTO schema_info (version, site_version) VALUES(0, 0)"
62
+ rescue ActiveRecord::StatementInvalid
63
+ # Schema has been intialized
64
+ end
65
+ end
66
+ end
67
+
68
+
62
69
  # Make routes site-specific for sites whose config/routes.rb exists
63
70
  module ActionController
64
71
  module Routing #:nodoc:
@@ -109,8 +116,3 @@ end
109
116
 
110
117
  # Put cached pages in the site-specific public folder
111
118
  ActionController::Base.page_cache_directory = "#{SITE_ROOT}/public"
112
-
113
- # Load any site-specific models
114
- # TODO: Make site-specific models re-open classes rather than
115
- # this temporary either/or hack
116
- ADDITIONAL_LOAD_PATHS.concat(Dir["#{SITE_ROOT}/app/models/[_a-z]*"])
@@ -40,6 +40,7 @@ class ProductizedAppGenerator < Rails::Generator::Base
40
40
  m.file "sites/fresh_rakefile", "sites/Rakefile"
41
41
  m.file "lib/productize.rb", "lib/productize.rb"
42
42
  m.file "configs/apache/vhost.example.conf", "config/apache/vhost.example.conf"
43
+ m.file "configs/lighttpd/sample.txt", "config/lighttpd/sample.txt"
43
44
 
44
45
  # Environments
45
46
  m.file "environments/environment.rb", "config/environment.rb"
@@ -113,6 +114,7 @@ class ProductizedAppGenerator < Rails::Generator::Base
113
114
  app/views/layouts
114
115
  config/environments
115
116
  config/apache
117
+ config/lighttpd
116
118
  components
117
119
  db
118
120
  doc
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: rails_product
5
5
  version: !ruby/object:Gem::Version
6
- version: "0.5"
7
- date: 2005-07-25
6
+ version: "0.6"
7
+ date: 2005-09-24
8
8
  summary: "Creates a ready-to-go productized Ruby on Rails application from a single
9
9
  command ('rails_product')."
10
10
  require_paths:
@@ -44,10 +44,12 @@ files:
44
44
  - html
45
45
  - lib
46
46
  - MIT-LICENSE
47
+ - pkg
47
48
  - Rakefile
48
49
  - README
49
50
  - sites
50
51
  - test
52
+ - TICKETS
51
53
  - bin/benchmarker
52
54
  - bin/breakpointer
53
55
  - bin/breakpointer_for_gem
@@ -71,8 +73,10 @@ files:
71
73
  - configs/apache.conf
72
74
  - configs/database.yml
73
75
  - configs/empty.log
76
+ - configs/lighttpd
74
77
  - configs/routes.rb
75
78
  - configs/apache/vhost.example.conf
79
+ - configs/lighttpd/sample.txt
76
80
  - doc/README_FOR_APP
77
81
  - dispatches/dispatch.fcgi
78
82
  - dispatches/dispatch.rb