Skip to content
Browse files

Renamed indices to indexes. Seems wrong, but that is the terminology …

…used by MySQL.
  • Loading branch information...
1 parent a432013 commit 254182744e284ef55d729038e0cd9dca90bfe611 @nelstrom committed Feb 9, 2009
View
10 README.markdown
@@ -1,19 +1,19 @@
-= Indices
+= indexes
-This extension adds indices to the database, which should speed up common queries and provide a more snappy response for page rendering.
+This extension adds indexes to the database, which should speed up common queries and provide a more snappy response for page rendering.
-The extension is targeted at sites running on Radiant up to version 0.6.9. These indices were added to the database in version 0.7 of Radiant, so this extension will be of no use if your site is running on version 0.7.0 or later.
+The extension is targeted at sites running on Radiant up to version 0.6.9. These indexes were added to the database in version 0.7 of Radiant, so this extension will be of no use if your site is running on version 0.7.0 or later.
== To install
Place this extension in the vendor/extensions directory of your Radiant project. Then run the Rake task:
- rake [production] radiant:extensions:indices:install
+ rake [production] radiant:extensions:indexes:install
== To uninstall
If you are planning on upgrading your site to run on Radiant 0.7.0 or later, it is advised that you first uninstall this extension. To do so, first run the rake task:
- rake [production] radiant:extensions:indices:uninstall
+ rake [production] radiant:extensions:indexes:uninstall
Then delete this extension from your vendor extensions directory.
View
6 Rakefile
@@ -99,17 +99,17 @@ namespace :spec do
end
end
-desc 'Generate documentation for the indices extension.'
+desc 'Generate documentation for the indexes extension.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'IndicesExtension'
+ rdoc.title = 'IndexesExtension'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
# For extensions that are in transition
-desc 'Test the indices extension.'
+desc 'Test the indexes extension.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
View
2 db/migrate/001_add_indices.rb → db/migrate/001_add_indexes.rb
@@ -1,4 +1,4 @@
-class AddIndices < ActiveRecord::Migration
+class AddIndexes < ActiveRecord::Migration
def self.up
add_index :pages, :class_name, :name => :pages_class_name
add_index :pages, :parent_id, :name => :pages_parent_id
View
5 indexes_extension.rb
@@ -0,0 +1,5 @@
+class IndexesExtension < Radiant::Extension
+ version "1.0"
+ description "Add indexes to the database, for a speed boost on SQL queries."
+ url "http://github.com/nelstrom/radiant-indexes-extension"
+end
View
5 indices_extension.rb
@@ -1,5 +0,0 @@
-class IndicesExtension < Radiant::Extension
- version "1.0"
- description "Add indices to the database, for a speed boost on SQL queries."
- url "http://github.com/nelstrom/radiant-indices-extension"
-end
View
20 lib/tasks/indices_extension_tasks.rake → lib/tasks/indexes_extension_tasks.rake
@@ -1,31 +1,31 @@
namespace :radiant do
namespace :extensions do
- namespace :indices do
+ namespace :indexes do
- desc "Runs migrations, to add indices to database."
+ desc "Runs migrations, to add indexes to database."
task :install => :migrate
- desc "Runs migrations, to remove indices to database."
+ desc "Runs migrations, to remove indexes to database."
task :uninstall => :environment do
require 'radiant/extension_migrator'
- IndicesExtension.migrator.migrate(0)
+ indexesExtension.migrator.migrate(0)
end
- desc "Runs the migration of the Indices extension"
+ desc "Runs the migration of the indexes extension"
task :migrate => :environment do
require 'radiant/extension_migrator'
if ENV["VERSION"]
- IndicesExtension.migrator.migrate(ENV["VERSION"].to_i)
+ indexesExtension.migrator.migrate(ENV["VERSION"].to_i)
else
- IndicesExtension.migrator.migrate
+ indexesExtension.migrator.migrate
end
end
- desc "Copies public assets of the Indices to the instance public/ directory."
+ desc "Copies public assets of the indexes to the instance public/ directory."
task :update => :environment do
is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
- Dir[IndicesExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
- path = file.sub(IndicesExtension.root, '')
+ Dir[indexesExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
+ path = file.sub(indexesExtension.root, '')
directory = File.dirname(path)
puts "Copying #{path}..."
mkdir_p RAILS_ROOT + directory

0 comments on commit 2541827

Please sign in to comment.
Something went wrong with that request. Please try again.