aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile11
-rw-r--r--Gemfile.lock32
-rw-r--r--app/assets/javascripts/videojs_loader.js7
-rw-r--r--config/deploy/refinery_setup.rb2
-rw-r--r--config/initializers/refinery/blog.rb11
-rw-r--r--config/initializers/refinery/core.rb.example2
-rw-r--r--config/initializers/refinery/inquiries.rb4
-rw-r--r--config/initializers/refinery/page_images.rb3
-rw-r--r--config/initializers/refinery/videos.rb23
-rw-r--r--db/migrate/20130611193502_create_blog_structure.refinery_blog.rb53
-rw-r--r--db/migrate/20130611193503_add_user_id_to_blog_posts.refinery_blog.rb8
-rw-r--r--db/migrate/20130611193504_acts_as_taggable_on_migration.refinery_blog.rb29
-rw-r--r--db/migrate/20130611193505_add_cached_slugs.refinery_blog.rb7
-rw-r--r--db/migrate/20130611193506_add_custom_url_field_to_blog_posts.refinery_blog.rb6
-rw-r--r--db/migrate/20130611193507_add_custom_teaser_field_to_blog_posts.refinery_blog.rb7
-rw-r--r--db/migrate/20130611193508_add_primary_key_to_categorizations.refinery_blog.rb15
-rw-r--r--db/migrate/20130611193509_add_source_url_to_blog_posts.refinery_blog.rb8
-rw-r--r--db/migrate/20130611193510_add_access_count_to_posts.refinery_blog.rb9
-rw-r--r--db/migrate/20130611193511_add_slug_to_posts_and_categories.refinery_blog.rb10
-rw-r--r--db/migrate/20130611193512_create_refinerycms_settings_schema.refinery_settings.rb17
-rw-r--r--db/migrate/20130611193519_create_inquiries.refinery_inquiries.rb25
-rw-r--r--db/migrate/20130611193536_create_search_page.refinery_search.rb17
-rw-r--r--db/migrate/20130611193607_create_page_images.refinery_page_images.rb13
-rw-r--r--db/migrate/20130611193608_add_caption_to_image_pages.refinery_page_images.rb6
-rw-r--r--db/migrate/20130611193609_translate_page_image_captions.refinery_page_images.rb23
-rw-r--r--db/migrate/20130611193610_change_page_to_polymorphic.refinery_page_images.rb6
-rw-r--r--db/migrate/20130611193620_create_videos_videos.refinery_videos.rb30
-rw-r--r--db/migrate/20130611193621_create_video_file.refinery_videos.rb26
-rw-r--r--db/schema.rb142
-rw-r--r--db/seeds.rb9
30 files changed, 553 insertions, 8 deletions
diff --git a/Gemfile b/Gemfile
index a8928bb..8cf0229 100644
--- a/Gemfile
+++ b/Gemfile
@@ -28,7 +28,7 @@ end
gem 'jquery-rails', '~> 2.0.0'
# To use ActiveModel has_secure_password
-# gem 'bcrypt-ruby', '~> 3.0.0'
+gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
@@ -48,7 +48,8 @@ gem 'refinerycms', '~> 2.0.0'
# Specify additional Refinery CMS Extensions here (all optional):
gem 'refinerycms-i18n', '~> 2.0.0'
-# gem 'refinerycms-blog', '~> 2.0.0'
-# gem 'refinerycms-inquiries', '~> 2.0.0'
-# gem 'refinerycms-search', '~> 2.0.0'
-# gem 'refinerycms-page-images', '~> 2.0.0'
+gem 'refinerycms-blog', '~> 2.0.0'
+gem 'refinerycms-inquiries', '~> 2.0.0'
+gem 'refinerycms-search', '~> 2.0.0'
+gem 'refinerycms-page-images', '~> 2.0.0'
+gem 'refinerycms-videojs'
diff --git a/Gemfile.lock b/Gemfile.lock
index f2c7b96..8f5bf04 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -28,6 +28,8 @@ GEM
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
+ acts-as-taggable-on (2.4.1)
+ rails (>= 3, < 5)
acts_as_indexed (0.7.8)
arel (3.0.2)
awesome_nested_set (2.1.6)
@@ -59,6 +61,7 @@ GEM
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
+ filters_spam (0.3)
friendly_id (4.0.9)
globalize3 (0.3.0)
activemodel (>= 3.0.0)
@@ -106,6 +109,8 @@ GEM
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
+ rails_autolink (1.1.0)
+ rails (> 3.1)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
@@ -128,6 +133,13 @@ GEM
devise (~> 2.0.5)
orm_adapter (~> 0.0.7)
refinerycms-core (= 2.0.10)
+ refinerycms-blog (2.0.4)
+ acts-as-taggable-on
+ filters_spam (~> 0.2)
+ rails_autolink
+ refinerycms-core (~> 2.0.3)
+ refinerycms-settings (~> 2.0.1)
+ seo_meta (~> 1.3.0)
refinerycms-core (2.0.10)
acts_as_indexed (~> 0.7.7)
awesome_nested_set (~> 2.1.3)
@@ -149,6 +161,12 @@ GEM
dragonfly (~> 0.9.8)
rack-cache (>= 0.5.3)
refinerycms-core (= 2.0.10)
+ refinerycms-inquiries (2.0.3)
+ filters_spam (~> 0.2)
+ refinerycms-core (~> 2.0.1)
+ refinerycms-settings (~> 2.0.1)
+ refinerycms-page-images (2.0.1)
+ refinerycms-pages (~> 2.0.0)
refinerycms-pages (2.0.10)
awesome_nested_set (~> 2.1.3)
babosa (!= 0.3.6)
@@ -158,6 +176,14 @@ GEM
dragonfly (~> 0.9.8)
rack-cache (>= 0.5.3)
refinerycms-core (= 2.0.10)
+ refinerycms-search (2.0.0)
+ refinerycms-core (~> 2.0.4)
+ refinerycms-settings (2.0.2)
+ refinerycms-core (~> 2.0.1)
+ refinerycms-videojs (0.5.5.1)
+ dragonfly
+ rack-cache
+ refinerycms-core
routing-filter (0.3.1)
actionpack
rvm-capistrano (1.3.0)
@@ -193,13 +219,19 @@ PLATFORMS
ruby
DEPENDENCIES
+ bcrypt-ruby (~> 3.0.0)
capistrano
coffee-rails (~> 3.2)
jquery-rails (~> 2.0.0)
mysql2
rails (~> 3.2)
refinerycms (~> 2.0.0)
+ refinerycms-blog (~> 2.0.0)
refinerycms-i18n (~> 2.0.0)
+ refinerycms-inquiries (~> 2.0.0)
+ refinerycms-page-images (~> 2.0.0)
+ refinerycms-search (~> 2.0.0)
+ refinerycms-videojs
rvm-capistrano
sass-rails (~> 3.2)
sqlite3
diff --git a/app/assets/javascripts/videojs_loader.js b/app/assets/javascripts/videojs_loader.js
new file mode 100644
index 0000000..48d727f
--- /dev/null
+++ b/app/assets/javascripts/videojs_loader.js
@@ -0,0 +1,7 @@
+window.onload = function ()
+{
+ if ($('video').is('*')) {
+ $('body').append('<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">')
+ $('body').append('<script src="http://vjs.zencdn.net/c/video.js"></script>')
+ }
+}; \ No newline at end of file
diff --git a/config/deploy/refinery_setup.rb b/config/deploy/refinery_setup.rb
index 6dd0a1c..cff5b98 100644
--- a/config/deploy/refinery_setup.rb
+++ b/config/deploy/refinery_setup.rb
@@ -16,7 +16,7 @@ Capistrano::Configuration.instance.load do
task :setup, :except => { :no_release => true } do
# Change this to your app name
- site_name = "Beta";
+ site_name = "Heavymetal.no";
default_template = <<-EOF
# encoding: utf-8
diff --git a/config/initializers/refinery/blog.rb b/config/initializers/refinery/blog.rb
new file mode 100644
index 0000000..792c086
--- /dev/null
+++ b/config/initializers/refinery/blog.rb
@@ -0,0 +1,11 @@
+Refinery::Blog.configure do |config|
+ # config.validate_source_url = false
+
+ # config.comments_per_page = 10
+
+ # config.posts_per_page = 10
+
+ # config.post_teaser_length = 250
+
+ # config.share_this_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+end
diff --git a/config/initializers/refinery/core.rb.example b/config/initializers/refinery/core.rb.example
index ef476ce..1bc65ee 100644
--- a/config/initializers/refinery/core.rb.example
+++ b/config/initializers/refinery/core.rb.example
@@ -15,7 +15,7 @@ Refinery::Core.configure do |config|
# config.base_cache_key = :refinery
# Site name
- config.site_name = "Company Name"
+ config.site_name = "Heavymetal.no"
# This activates Google Analytics tracking within your website. If this
# config is left blank or set to UA-xxxxxx-x then no remote calls to
diff --git a/config/initializers/refinery/inquiries.rb b/config/initializers/refinery/inquiries.rb
new file mode 100644
index 0000000..37979f5
--- /dev/null
+++ b/config/initializers/refinery/inquiries.rb
@@ -0,0 +1,4 @@
+Refinery::Inquiries.configure do |config|
+ # Configure whether to show privacy link
+ # config.show_contact_privacy_link = true
+end
diff --git a/config/initializers/refinery/page_images.rb b/config/initializers/refinery/page_images.rb
new file mode 100644
index 0000000..4e4daf5
--- /dev/null
+++ b/config/initializers/refinery/page_images.rb
@@ -0,0 +1,3 @@
+Refinery::PageImages.configure do |config|
+ # config.captions = false
+end
diff --git a/config/initializers/refinery/videos.rb b/config/initializers/refinery/videos.rb
new file mode 100644
index 0000000..b06684e
--- /dev/null
+++ b/config/initializers/refinery/videos.rb
@@ -0,0 +1,23 @@
+Refinery::Videos.configure do |config|
+ #Configures the maximum allowed upload size (in bytes) for an video file
+ #config.max_file_size = 524288000
+
+ # Configure how many videos per page should be displayed in the list of images in the admin area
+ #config.pages_per_admin_index = 20
+
+ # Configure white-listed mime types for validation
+ #config.whitelisted_mime_types = ["video/mp4", "video/x-flv", "application/ogg", "video/webm", "video/flv", "video/ogg"]
+
+ # Configure skin. Put css class name to activate skin. For YouTube like skin put tubecss and add css with images to assets path.
+ # config.skin_css_class = vjs-default-skin
+
+ # Configure Dragonfly
+ # This is where in the middleware stack to insert the Dragonfly middleware
+ # config.dragonfly_insert_before = ActionDispatch::Callbacks
+ # config.dragonfly_secret = ccce0aa2fe521c75f8702f2bae1b04b65ff8198be5ca94f5
+ # If you decide to trust file extensions replace :ext below with :format
+ # config.dragonfly_url_format = /system/videos/:job/:basename.:format
+ # config.datastore_root_path = /home/haraldei/src/heavymetal.no/web/beta/public/system/refinery/videos
+ # config.trust_file_extensions = false
+
+end
diff --git a/db/migrate/20130611193502_create_blog_structure.refinery_blog.rb b/db/migrate/20130611193502_create_blog_structure.refinery_blog.rb
new file mode 100644
index 0000000..c476909
--- /dev/null
+++ b/db/migrate/20130611193502_create_blog_structure.refinery_blog.rb
@@ -0,0 +1,53 @@
+# This migration comes from refinery_blog (originally 20110803223522)
+class CreateBlogStructure < ActiveRecord::Migration
+
+ def up
+ create_table Refinery::Blog::Post.table_name, :id => true do |t|
+ t.string :title
+ t.text :body
+ t.boolean :draft
+ t.datetime :published_at
+ t.timestamps
+ end
+
+ add_index Refinery::Blog::Post.table_name, :id
+
+ create_table Refinery::Blog::Comment.table_name, :id => true do |t|
+ t.integer :blog_post_id
+ t.boolean :spam
+ t.string :name
+ t.string :email
+ t.text :body
+ t.string :state
+ t.timestamps
+ end
+
+ add_index Refinery::Blog::Comment.table_name, :id
+
+ create_table Refinery::Blog::Category.table_name, :id => true do |t|
+ t.string :title
+ t.timestamps
+ end
+
+ add_index Refinery::Blog::Category.table_name, :id
+
+ create_table Refinery::Categorization.table_name, :id => true do |t|
+ t.integer :blog_category_id
+ t.integer :blog_post_id
+ end
+
+ add_index Refinery::Categorization.table_name, [:blog_category_id, :blog_post_id], :name => 'index_blog_categories_blog_posts_on_bc_and_bp'
+ end
+
+ def down
+ Refinery::UserPlugin.destroy_all({:name => "refinerycms_blog"})
+
+ Refinery::Page.delete_all({:link_url => "/blog"})
+
+ drop_table Refinery::Blog::Post.table_name
+ drop_table Refinery::Blog::Comment.table_name
+ drop_table Refinery::Category.table_name
+ drop_table Refinery::Categorization.table_name
+ end
+
+end
diff --git a/db/migrate/20130611193503_add_user_id_to_blog_posts.refinery_blog.rb b/db/migrate/20130611193503_add_user_id_to_blog_posts.refinery_blog.rb
new file mode 100644
index 0000000..80e1795
--- /dev/null
+++ b/db/migrate/20130611193503_add_user_id_to_blog_posts.refinery_blog.rb
@@ -0,0 +1,8 @@
+# This migration comes from refinery_blog (originally 20110803223523)
+class AddUserIdToBlogPosts < ActiveRecord::Migration
+
+ def change
+ add_column Refinery::Blog::Post.table_name, :user_id, :integer
+ end
+
+end \ No newline at end of file
diff --git a/db/migrate/20130611193504_acts_as_taggable_on_migration.refinery_blog.rb b/db/migrate/20130611193504_acts_as_taggable_on_migration.refinery_blog.rb
new file mode 100644
index 0000000..be9b88c
--- /dev/null
+++ b/db/migrate/20130611193504_acts_as_taggable_on_migration.refinery_blog.rb
@@ -0,0 +1,29 @@
+# This migration comes from refinery_blog (originally 20110803223524)
+class ActsAsTaggableOnMigration < ActiveRecord::Migration
+ def up
+ create_table :tags do |t|
+ t.string :name
+ end
+
+ create_table :taggings do |t|
+ t.references :tag
+
+ # You should make sure that the column created is
+ # long enough to store the required class names.
+ t.references :taggable, :polymorphic => true
+ t.references :tagger, :polymorphic => true
+
+ t.string :context
+
+ t.datetime :created_at
+ end
+
+ add_index :taggings, :tag_id
+ add_index :taggings, [:taggable_id, :taggable_type, :context]
+ end
+
+ def down
+ drop_table :taggings
+ drop_table :tags
+ end
+end
diff --git a/db/migrate/20130611193505_add_cached_slugs.refinery_blog.rb b/db/migrate/20130611193505_add_cached_slugs.refinery_blog.rb
new file mode 100644
index 0000000..64a4c78
--- /dev/null
+++ b/db/migrate/20130611193505_add_cached_slugs.refinery_blog.rb
@@ -0,0 +1,7 @@
+# This migration comes from refinery_blog (originally 20110803223526)
+class AddCachedSlugs < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Category.table_name, :cached_slug, :string
+ add_column Refinery::Blog::Post.table_name, :cached_slug, :string
+ end
+end
diff --git a/db/migrate/20130611193506_add_custom_url_field_to_blog_posts.refinery_blog.rb b/db/migrate/20130611193506_add_custom_url_field_to_blog_posts.refinery_blog.rb
new file mode 100644
index 0000000..2d6b369
--- /dev/null
+++ b/db/migrate/20130611193506_add_custom_url_field_to_blog_posts.refinery_blog.rb
@@ -0,0 +1,6 @@
+# This migration comes from refinery_blog (originally 20110803223527)
+class AddCustomUrlFieldToBlogPosts < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Post.table_name, :custom_url, :string
+ end
+end
diff --git a/db/migrate/20130611193507_add_custom_teaser_field_to_blog_posts.refinery_blog.rb b/db/migrate/20130611193507_add_custom_teaser_field_to_blog_posts.refinery_blog.rb
new file mode 100644
index 0000000..e818e76
--- /dev/null
+++ b/db/migrate/20130611193507_add_custom_teaser_field_to_blog_posts.refinery_blog.rb
@@ -0,0 +1,7 @@
+# This migration comes from refinery_blog (originally 20110803223528)
+class AddCustomTeaserFieldToBlogPosts < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Post.table_name, :custom_teaser, :text
+ end
+end
+
diff --git a/db/migrate/20130611193508_add_primary_key_to_categorizations.refinery_blog.rb b/db/migrate/20130611193508_add_primary_key_to_categorizations.refinery_blog.rb
new file mode 100644
index 0000000..f55b314
--- /dev/null
+++ b/db/migrate/20130611193508_add_primary_key_to_categorizations.refinery_blog.rb
@@ -0,0 +1,15 @@
+# This migration comes from refinery_blog (originally 20110803223529)
+class AddPrimaryKeyToCategorizations < ActiveRecord::Migration
+ def up
+ unless Refinery::Categorization.column_names.include?("id")
+ add_column Refinery::Categorization.table_name, :id, :primary_key
+ end
+ end
+
+ def down
+ if Refinery::Categorization.column_names.include?("id")
+ remove_column Refinery::Categorization.table_name, :id
+ end
+ end
+end
+
diff --git a/db/migrate/20130611193509_add_source_url_to_blog_posts.refinery_blog.rb b/db/migrate/20130611193509_add_source_url_to_blog_posts.refinery_blog.rb
new file mode 100644
index 0000000..0489ba4
--- /dev/null
+++ b/db/migrate/20130611193509_add_source_url_to_blog_posts.refinery_blog.rb
@@ -0,0 +1,8 @@
+# This migration comes from refinery_blog (originally 20120103055909)
+class AddSourceUrlToBlogPosts < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Post.table_name, :source_url, :string
+ add_column Refinery::Blog::Post.table_name, :source_url_title, :string
+
+ end
+end
diff --git a/db/migrate/20130611193510_add_access_count_to_posts.refinery_blog.rb b/db/migrate/20130611193510_add_access_count_to_posts.refinery_blog.rb
new file mode 100644
index 0000000..76ad624
--- /dev/null
+++ b/db/migrate/20130611193510_add_access_count_to_posts.refinery_blog.rb
@@ -0,0 +1,9 @@
+# This migration comes from refinery_blog (originally 20120223022021)
+class AddAccessCountToPosts < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Post.table_name, :access_count, :integer, :default => 0
+
+ add_index Refinery::Blog::Post.table_name, :access_count
+
+ end
+end \ No newline at end of file
diff --git a/db/migrate/20130611193511_add_slug_to_posts_and_categories.refinery_blog.rb b/db/migrate/20130611193511_add_slug_to_posts_and_categories.refinery_blog.rb
new file mode 100644
index 0000000..a1091e9
--- /dev/null
+++ b/db/migrate/20130611193511_add_slug_to_posts_and_categories.refinery_blog.rb
@@ -0,0 +1,10 @@
+# This migration comes from refinery_blog (originally 20120227022021)
+class AddSlugToPostsAndCategories < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Post.table_name, :slug, :string
+ add_index Refinery::Blog::Post.table_name, :slug
+
+ add_column Refinery::Blog::Category.table_name, :slug, :string
+ add_index Refinery::Blog::Category.table_name, :slug
+ end
+end \ No newline at end of file
diff --git a/db/migrate/20130611193512_create_refinerycms_settings_schema.refinery_settings.rb b/db/migrate/20130611193512_create_refinerycms_settings_schema.refinery_settings.rb
new file mode 100644
index 0000000..6a736b7
--- /dev/null
+++ b/db/migrate/20130611193512_create_refinerycms_settings_schema.refinery_settings.rb
@@ -0,0 +1,17 @@
+# This migration comes from refinery_settings (originally 20100913234710)
+class CreateRefinerycmsSettingsSchema < ActiveRecord::Migration
+ def change
+ create_table :refinery_settings do |t|
+ t.string :name
+ t.text :value
+ t.boolean :destroyable, :default => true
+ t.string :scoping
+ t.boolean :restricted, :default => false
+ t.string :form_value_type
+
+ t.timestamps
+ end
+
+ add_index :refinery_settings, :name
+ end
+end
diff --git a/db/migrate/20130611193519_create_inquiries.refinery_inquiries.rb b/db/migrate/20130611193519_create_inquiries.refinery_inquiries.rb
new file mode 100644
index 0000000..83d2036
--- /dev/null
+++ b/db/migrate/20130611193519_create_inquiries.refinery_inquiries.rb
@@ -0,0 +1,25 @@
+# This migration comes from refinery_inquiries (originally 20101208082840)
+class CreateInquiries < ActiveRecord::Migration
+ def up
+ unless ::Refinery::Inquiries::Inquiry.table_exists?
+ create_table :refinery_inquiries_inquiries, :force => true do |t|
+ t.string :name
+ t.string :email
+ t.string :phone
+ t.text :message
+ t.boolean :spam, :default => false
+ t.timestamps
+ end
+
+ add_index :refinery_inquiries_inquiries, :id
+ end
+ end
+
+ def down
+ drop_table ::Refinery::Inquiries::Inquiry.table_name
+
+ ::Refinery::Page.delete_all({
+ :link_url => ("/contact" || "/contact/thank_you")
+ }) if defined?(::Refinery::Page)
+ end
+end
diff --git a/db/migrate/20130611193536_create_search_page.refinery_search.rb b/db/migrate/20130611193536_create_search_page.refinery_search.rb
new file mode 100644
index 0000000..d8c9509
--- /dev/null
+++ b/db/migrate/20130611193536_create_search_page.refinery_search.rb
@@ -0,0 +1,17 @@
+# This migration comes from refinery_search (originally 1)
+class CreateSearchPage < ActiveRecord::Migration
+
+ def up
+ end
+
+ def down
+ if defined?(Refinery::UserPlugin)
+ Refinery::UserPlugin.destroy_all({:name => "refinerycms_search"})
+ end
+
+ if defined?(Refinery::Page)
+ Refinery::Page.delete_all({:link_url => "/search"})
+ end
+ end
+
+end
diff --git a/db/migrate/20130611193607_create_page_images.refinery_page_images.rb b/db/migrate/20130611193607_create_page_images.refinery_page_images.rb
new file mode 100644
index 0000000..871bee3
--- /dev/null
+++ b/db/migrate/20130611193607_create_page_images.refinery_page_images.rb
@@ -0,0 +1,13 @@
+# This migration comes from refinery_page_images (originally 20101014230041)
+class CreatePageImages < ActiveRecord::Migration
+ def change
+ create_table Refinery::ImagePage.table_name, :id => false do |t|
+ t.integer :image_id
+ t.integer :page_id
+ t.integer :position
+ end
+
+ add_index Refinery::ImagePage.table_name, :image_id
+ add_index Refinery::ImagePage.table_name, :page_id
+ end
+end
diff --git a/db/migrate/20130611193608_add_caption_to_image_pages.refinery_page_images.rb b/db/migrate/20130611193608_add_caption_to_image_pages.refinery_page_images.rb
new file mode 100644
index 0000000..4b85eca
--- /dev/null
+++ b/db/migrate/20130611193608_add_caption_to_image_pages.refinery_page_images.rb
@@ -0,0 +1,6 @@
+# This migration comes from refinery_page_images (originally 20101014230042)
+class AddCaptionToImagePages < ActiveRecord::Migration
+ def change
+ add_column Refinery::ImagePage.table_name, :caption, :text
+ end
+end
diff --git a/db/migrate/20130611193609_translate_page_image_captions.refinery_page_images.rb b/db/migrate/20130611193609_translate_page_image_captions.refinery_page_images.rb
new file mode 100644
index 0000000..c2b3ebc
--- /dev/null
+++ b/db/migrate/20130611193609_translate_page_image_captions.refinery_page_images.rb
@@ -0,0 +1,23 @@
+# This migration comes from refinery_page_images (originally 20110511215016)
+class TranslatePageImageCaptions < ActiveRecord::Migration
+ def up
+ add_column Refinery::ImagePage.table_name, :id, :primary_key
+
+ Refinery::ImagePage.reset_column_information
+ unless defined?(Refinery::ImagePage::Translation) && Refinery::ImagePage::Translation.table_exists?
+ Refinery::ImagePage.create_translation_table!({
+ :caption => :text
+ }, {
+ :migrate_data => true
+ })
+ end
+ end
+
+ def down
+ Refinery::ImagePage.reset_column_information
+
+ Refinery::ImagePage.drop_translation_table! :migrate_data => true
+
+ remove_column Refinery::ImagePage.table_name, :id
+ end
+end
diff --git a/db/migrate/20130611193610_change_page_to_polymorphic.refinery_page_images.rb b/db/migrate/20130611193610_change_page_to_polymorphic.refinery_page_images.rb
new file mode 100644
index 0000000..d613730
--- /dev/null
+++ b/db/migrate/20130611193610_change_page_to_polymorphic.refinery_page_images.rb
@@ -0,0 +1,6 @@
+# This migration comes from refinery_page_images (originally 20110527052435)
+class ChangePageToPolymorphic < ActiveRecord::Migration
+ def change
+ add_column Refinery::ImagePage.table_name, :page_type, :string, :default => "page"
+ end
+end
diff --git a/db/migrate/20130611193620_create_videos_videos.refinery_videos.rb b/db/migrate/20130611193620_create_videos_videos.refinery_videos.rb
new file mode 100644
index 0000000..d1207d8
--- /dev/null
+++ b/db/migrate/20130611193620_create_videos_videos.refinery_videos.rb
@@ -0,0 +1,30 @@
+# This migration comes from refinery_videos (originally 1)
+class CreateVideosVideos < ActiveRecord::Migration
+
+ def up
+ create_table "refinery_videos", :force => true do |t|
+ t.integer "position"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "config"
+ t.string "title"
+ t.integer "poster_id"
+ t.boolean "use_shared"
+ t.text "embed_tag"
+ end
+ end
+
+ def down
+ if defined?(::Refinery::UserPlugin)
+ ::Refinery::UserPlugin.destroy_all({:name => "refinerycms-videos"})
+ end
+
+ if defined?(::Refinery::Page)
+ ::Refinery::Page.delete_all({:link_url => "/videos/videos"})
+ end
+
+ drop_table :refinery_videos
+
+ end
+
+end
diff --git a/db/migrate/20130611193621_create_video_file.refinery_videos.rb b/db/migrate/20130611193621_create_video_file.refinery_videos.rb
new file mode 100644
index 0000000..e56ceac
--- /dev/null
+++ b/db/migrate/20130611193621_create_video_file.refinery_videos.rb
@@ -0,0 +1,26 @@
+# This migration comes from refinery_videos (originally 2)
+class CreateVideoFile < ActiveRecord::Migration
+
+ def up
+ create_table "refinery_video_files", :force => true do |t|
+ t.string "file_name"
+ t.integer "file_size"
+ t.string "file_ext"
+ t.string "file_uid"
+ t.string "file_mime_type"
+ t.integer "video_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "external_url"
+ t.boolean "use_external"
+ end
+
+ end
+
+ def down
+
+ drop_table :refinery_videos
+
+ end
+
+end
diff --git a/db/schema.rb b/db/schema.rb
index 8afc9c6..b121c20 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,81 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130125203718) do
+ActiveRecord::Schema.define(:version => 20130611193621) do
+
+ create_table "refinery_blog_categories", :force => true do |t|
+ t.string "title"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "cached_slug"
+ t.string "slug"
+ end
+
+ add_index "refinery_blog_categories", ["id"], :name => "index_refinery_blog_categories_on_id"
+ add_index "refinery_blog_categories", ["slug"], :name => "index_refinery_blog_categories_on_slug"
+
+ create_table "refinery_blog_categories_blog_posts", :force => true do |t|
+ t.integer "blog_category_id"
+ t.integer "blog_post_id"
+ end
+
+ add_index "refinery_blog_categories_blog_posts", ["blog_category_id", "blog_post_id"], :name => "index_blog_categories_blog_posts_on_bc_and_bp"
+
+ create_table "refinery_blog_comments", :force => true do |t|
+ t.integer "blog_post_id"
+ t.boolean "spam"
+ t.string "name"
+ t.string "email"
+ t.text "body"
+ t.string "state"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "refinery_blog_comments", ["id"], :name => "index_refinery_blog_comments_on_id"
+
+ create_table "refinery_blog_posts", :force => true do |t|
+ t.string "title"
+ t.text "body"
+ t.boolean "draft"
+ t.datetime "published_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "user_id"
+ t.string "cached_slug"
+ t.string "custom_url"
+ t.text "custom_teaser"
+ t.string "source_url"
+ t.string "source_url_title"
+ t.integer "access_count", :default => 0
+ t.string "slug"
+ end
+
+ add_index "refinery_blog_posts", ["access_count"], :name => "index_refinery_blog_posts_on_access_count"
+ add_index "refinery_blog_posts", ["id"], :name => "index_refinery_blog_posts_on_id"
+ add_index "refinery_blog_posts", ["slug"], :name => "index_refinery_blog_posts_on_slug"
+
+ create_table "refinery_image_page_translations", :force => true do |t|
+ t.integer "refinery_image_page_id"
+ t.string "locale"
+ t.text "caption"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "refinery_image_page_translations", ["locale"], :name => "index_refinery_image_page_translations_on_locale"
+ add_index "refinery_image_page_translations", ["refinery_image_page_id"], :name => "index_186c9a170a0ab319c675aa80880ce155d8f47244"
+
+ create_table "refinery_image_pages", :force => true do |t|
+ t.integer "image_id"
+ t.integer "page_id"
+ t.integer "position"
+ t.text "caption"
+ t.string "page_type", :default => "page"
+ end
+
+ add_index "refinery_image_pages", ["image_id"], :name => "index_refinery_image_pages_on_image_id"
+ add_index "refinery_image_pages", ["page_id"], :name => "index_refinery_image_pages_on_page_id"
create_table "refinery_images", :force => true do |t|
t.string "image_mime_type"
@@ -25,6 +99,18 @@ ActiveRecord::Schema.define(:version => 20130125203718) do
t.datetime "updated_at", :null => false
end
+ create_table "refinery_inquiries_inquiries", :force => true do |t|
+ t.string "name"
+ t.string "email"
+ t.string "phone"
+ t.text "message"
+ t.boolean "spam", :default => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "refinery_inquiries_inquiries", ["id"], :name => "index_refinery_inquiries_inquiries_on_id"
+
create_table "refinery_page_part_translations", :force => true do |t|
t.integer "refinery_page_part_id"
t.string "locale"
@@ -109,6 +195,19 @@ ActiveRecord::Schema.define(:version => 20130125203718) do
add_index "refinery_roles_users", ["role_id", "user_id"], :name => "index_refinery_roles_users_on_role_id_and_user_id"
add_index "refinery_roles_users", ["user_id", "role_id"], :name => "index_refinery_roles_users_on_user_id_and_role_id"
+ create_table "refinery_settings", :force => true do |t|
+ t.string "name"
+ t.text "value"
+ t.boolean "destroyable", :default => true
+ t.string "scoping"
+ t.boolean "restricted", :default => false
+ t.string "form_value_type"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "refinery_settings", ["name"], :name => "index_refinery_settings_on_name"
+
create_table "refinery_user_plugins", :force => true do |t|
t.integer "user_id"
t.string "name"
@@ -136,6 +235,30 @@ ActiveRecord::Schema.define(:version => 20130125203718) do
add_index "refinery_users", ["id"], :name => "index_refinery_users_on_id"
+ create_table "refinery_video_files", :force => true do |t|
+ t.string "file_name"
+ t.integer "file_size"
+ t.string "file_ext"
+ t.string "file_uid"
+ t.string "file_mime_type"
+ t.integer "video_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "external_url"
+ t.boolean "use_external"
+ end
+
+ create_table "refinery_videos", :force => true do |t|
+ t.integer "position"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.string "config"
+ t.string "title"
+ t.integer "poster_id"
+ t.boolean "use_shared"
+ t.text "embed_tag"
+ end
+
create_table "seo_meta", :force => true do |t|
t.integer "seo_meta_id"
t.string "seo_meta_type"
@@ -159,4 +282,21 @@ ActiveRecord::Schema.define(:version => 20130125203718) do
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
+ create_table "taggings", :force => true do |t|
+ t.integer "tag_id"
+ t.integer "taggable_id"
+ t.string "taggable_type"
+ t.integer "tagger_id"
+ t.string "tagger_type"
+ t.string "context"
+ t.datetime "created_at"
+ end
+
+ add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
+ add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
+
+ create_table "tags", :force => true do |t|
+ t.string "name"
+ end
+
end
diff --git a/db/seeds.rb b/db/seeds.rb
index 5e6468a..8364d2f 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -8,3 +8,12 @@
# Added by Refinery CMS Pages extension
Refinery::Pages::Engine.load_seed
+
+# Added by Refinery CMS Blog engine
+Refinery::Blog::Engine.load_seed
+
+# Added by Refinery CMS Inquiries engine
+Refinery::Inquiries::Engine.load_seed
+
+# Added by Refinery CMS Search engine
+Refinery::Search::Engine.load_seed