Every repository with this icon (
Every repository with this icon (
Developer Upgrade Notes
Radiant 0.8.0
1. The default_order plugin has been removed.
Old:
order_by :nameNew:
default_scope :order => "name ASC"
2. application.rb → application_controller.rb
application.rb has changed to application_controller.rb in accordance with Rails convention.
Old:
require_dependency 'application'
New:
require_dependency 'application_controller'
3. ResponseCache → Radiant::Cache
Remove all references to ResponseCache.
If you want to cache non-page items, simply apply an appropriate Cache-Control header to your response using ActionController’s expires method. Use expires_now to prevent caching.
To manually clear the cache:
Radiant::Cache.clearRadiant::Cache is built on top of Rack::Cache, which is included in vendor. As a result of this change, SiteController no longer has a show_uncached_page method. All requests to SiteController imply an uncached or expired page.
4. Testing Frameworks: RSpec 1.2.4, Cucumber 0.3.x, Webrat 0.4.4+
Now uses RSpec 1.2.4 (exact version), any 0.3 family version of Cucumber, and Webrat 0.4.4 or greater (in the same family). These are added as gem dependencies to config/environments/test.rb. spec_integration is no longer used.
5. Rails 2.3.2
Rails 2.3.2 is included. Please refer to information on upgrading from Rails 2.1.x for any significant changes there.
Radiant 0.7.x
1. Update to Controller naming convention
Before 0.7.x Radiant used to have things like Admin::PageController and Admin::SnippetController (i.e. singular controller names). .As of Radiant 0.7.0, Radiant now complies with Rails’ naming conventions and uses plural controller names like Admin::PagesController and Admin::SnippetsController.
2. Load test data with Datasets, instead of Scenarios
From 0.6.5 to 0.6.9, Radiant used the scenarios gem to load test data. With version 0.7.0, scenarios were replaced with datasets, which share a very similar API, but enable the test data to load much faster. If you were using scenarios to load test data in your extension before version 7, you need only make a few small modifications to make the switch to datasets.
Look for the following lines in the file spec/spec_helper:
require 'scenarios'
if File.directory?(File.dirname(__FILE__) + "/scenarios")
Scenario.load_paths.unshift File.dirname(__FILE__) + "/scenarios"
end
Delete those lines, and replace them with the following line:
Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
You should also replace all references to scenarios with datasets. In particular, look out for the following:
- rename the
spec/scenariosfolder tospec/datasets - rename all files within the
spec/datasetsfolder ending in_scenarioto end with_dataset - change all classes which inherit from
Scenario::Baseto inherit instead fromDataset::Base. The class name itself may also have to change, e.g.class UsersScenario < Scenario::Basewould becomeclass UsersDataset < Dataset::Base - when loading data into your specs, replace
scenariowithdataset, e.g.scenario :userswould becomedataset :users
The API for datasets is identical to that of scenarios, so you should not have to modify the actual dataset files.






