From 1ae97bb9b1f4199d2b840bed982a9bb71d7c8c91 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Thu, 5 May 2011 23:43:43 +1200 Subject: Depend on seo_meta and create a migration for it unless it already exists. --- db/migrate/4_create_seo_meta_for_blog.rb | 25 +++++++++++++++++++++++++ lib/gemspec.rb | 1 + refinerycms-blog.gemspec | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 db/migrate/4_create_seo_meta_for_blog.rb diff --git a/db/migrate/4_create_seo_meta_for_blog.rb b/db/migrate/4_create_seo_meta_for_blog.rb new file mode 100644 index 0000000..baf81a4 --- /dev/null +++ b/db/migrate/4_create_seo_meta_for_blog.rb @@ -0,0 +1,25 @@ +class CreateSeoMetaForBlog < ActiveRecord::Migration + + def self.up + unless ::SeoMetum.table_exists? + create_table ::SeoMetum.table_name do |t| + t.integer :seo_meta_id + t.string :seo_meta_type + + t.string :browser_title + t.string :meta_keywords + t.text :meta_description + + t.timestamps + end + + add_index ::SeoMetum.table_name, :id + add_index ::SeoMetum.table_name, [:seo_meta_id, :seo_meta_type] + end + end + + def self.down + # can't drop the table because someone else might be using it. + end + +end diff --git a/lib/gemspec.rb b/lib/gemspec.rb index dfd4213..5a02ae6 100644 --- a/lib/gemspec.rb +++ b/lib/gemspec.rb @@ -22,6 +22,7 @@ Gem::Specification.new do |s| s.add_dependency 'refinerycms-core', '>= 0.9.9.1' s.add_dependency 'filters_spam', '~> 0.2' s.add_dependency 'acts-as-taggable-on' + s.add_dependency 'seo_meta', '~> 1.0.5' # Development dependencies s.add_development_dependency 'factory_girl' diff --git a/refinerycms-blog.gemspec b/refinerycms-blog.gemspec index 6030428..f91bc7b 100644 --- a/refinerycms-blog.gemspec +++ b/refinerycms-blog.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{refinerycms-blog} s.version = %q{1.4.0} s.description = %q{A really straightforward open source Ruby on Rails blog engine designed for integration with RefineryCMS.} - s.date = %q{2011-04-25} + s.date = %q{2011-05-05} s.summary = %q{Ruby on Rails blogging engine for RefineryCMS.} s.email = %q{info@refinerycms.com} s.homepage = %q{http://refinerycms.com/blog} @@ -13,6 +13,7 @@ Gem::Specification.new do |s| s.add_dependency 'refinerycms-core', '>= 0.9.9.1' s.add_dependency 'filters_spam', '~> 0.2' s.add_dependency 'acts-as-taggable-on' + s.add_dependency 'seo_meta', '~> 1.0.5' # Development dependencies s.add_development_dependency 'factory_girl' -- cgit v1.2.3