ActionPack 1.12.0 ActiveRecord 1.14.0 ActiveSupport 1.3.0 | RailTies 1.1.0 Prototype 1.5.0 Scriptaculous 1.6.0 |
Neues in RailTies 1.1.0Datenbank-SchemaDas neue Standardformat für Schemata in Rails 1.1 ist
rails-KommandoEs gibt ein paar kleine Änderungen am —database/-dDiese neue Option konfiguriert die Applikation für die gewählte Datenbank vor.
Das betrifft die Datei Wählbar sind -rDie Erzeugte DateienRails 1.1 legt beim Erzeugen eines neuen Projektes jetzt auch die folgenden Dateien und Ordner an:
rakeRake-Tasks benutzt jetzt die Namensräume von Rake.
Zum Beispiel kann Eine Karte der Umleitungen: # clear
task :clear_logs => "log:clear"
# test
task :recent => "test:recent"
task :test_units => "test:units"
task :test_functional => "test:functionals"
task :test_plugins => "test:plugins"
# doc
task :appdoc => "doc:app"
task :apidoc => "doc:rails"
task :plugindoc => "doc:plugins"
task :clobber_plugindoc => "doc:clobber_plugins"
FileList['vendor/plugins/**'].collect { |plugin| File.basename(plugin) }.each do |plugin|
task :"#{plugin}_plugindoc" => "doc:plugins:#{plugin}"
end
# rails
task :freeze_gems => "rails:freeze:gems"
task :freeze_edge => "rails:freeze:edge"
task :unfreeze_rails => "rails:unfreeze"
task :add_new_scripts => "rails:update:scripts"
task :update_javascripts => "rails:update:javascripts"
# db
task :migrate => "db:migrate"
task :load_fixtures => "db:fixtures:load"
task :db_schema_dump => "db:schema:dump"
task :db_schema_import => "db:schema:load"
task :db_structure_dump => "db:structure:dump"
task :purge_test_database => "db:test:purge"
task :clone_schema_to_test => "db:test:clone"
task :clone_structure_to_test => "db:test:clone_structure"
task :prepare_test_database => "db:test:prepare"
task :create_sessions_table => "db:sessions:create"
task :drop_sessions_table => "db:sessions:drop"
task :purge_sessions_table => "db:sessions:recreate" Wie man sieht, ist das Rake-Code, aus der Datei pre_namespace_aliases.rake. Rails 1.1 unterstützt also alle alten Rake-Kommandos wie gehabt. Mit rake db:fixtures:load # Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y
rake db:migrate # Migrate the database through scripts in db/migrate. Target specific version with VERSION=x
rake db:schema:dump # Create a db/schema.rb file that can be portably used against any DB supported by AR
rake db:schema:load # Load a schema.rb file into the database
rake db:sessions:clear # Clear the sessions table
rake db:sessions:create # Creates a sessions table for use with CGI::Session::ActiveRecordStore
rake db:structure:dump # Dump the database structure to a SQL file
rake db:test:clone # Recreate the test database from the current environment's database schema
rake db:test:clone_structure # Recreate the test databases from the development structure
rake db:test:prepare # Prepare the test database and load the schema
rake db:test:purge # Empty the test database
rake doc:app # Build the app HTML Files
rake doc:clobber_app # Remove rdoc products
rake doc:clobber_plugins # Remove plugin documentation
rake doc:clobber_rails # Remove rdoc products
rake doc:plugins # Generate documation for all installed plugins
rake doc:rails # Build the rails HTML Files
rake doc:reapp # Force a rebuild of the RDOC files
rake doc:rerails # Force a rebuild of the RDOC files
rake log:clear # Truncates all *.log files in log/ to zero bytes
rake rails:freeze:edge # Lock this application to latest Edge Rails. Lock a specific revision with REVISION=X
rake rails:freeze:gems # Lock this application to the current gems (by unpacking them into vendor/rails)
rake rails:unfreeze # Unlock this application from freeze of gems or edge and return to a fluid use of system gems
rake rails:update # Update both scripts and public/javascripts from Rails
rake rails:update:javascripts # Update your javascripts from your current rails install
rake rails:update:scripts # Add new scripts to the application script/ directory
rake stats # Report code statistics (KLOCs, etc) from the application
rake test # Test all units and functionals
rake test:functionals # Run tests for functionalsdb:test:prepare
rake test:integration # Run tests for integrationdb:test:prepare
rake test:plugins # Run tests for pluginsenvironment
rake test:recent # Run tests for recentdb:test:prepare
rake test:uncommitted # Run tests for uncommitteddb:test:prepare
rake test:units # Run tests for unitsdb:test:prepare
rake tmp:cache:clear # Clears all files and directories in tmp/cache
rake tmp:clear # Clear session, cache, and socket files from tmp/
rake tmp:create # Creates tmp directories for sessions, cache, and sockets
rake tmp:sessions:clear # Clears all files in tmp/sessions
rake tmp:sockets:clear # Clears all ruby_sess.* files in tmp/sessions Einzelne Fixtures ladenMittelsrake db:fixtures:load FIXTURES=users,instruments Scriptescript/serverMit script/consoleDie Konsole hat ein paar neue Features:
TestsDie Umgebung für Tests ist jetzt zwingend ‘test’, so dass Der Befehl index.htmlDie Startseite von Rails 1.1 sieht jetzt so aus. Die gelbe Box holt sich ihre Infos über die Rails-Konfiguration aus einem neuen, überall verfügbaren Rails::InfoController. Dieser Controller verfügt über die Methode properties, und man kann ihn über /rails/info/properties erreichen, aber nur, wenn man lokal darauf zugreift. |