Commit 03e55700 authored by Martin Markech's avatar Martin Markech
Browse files

Add support for Rails 5.1 and refinerycms 4.0.3

parent da7c5f42
source "https://rubygems.org"
gem "refinerycms-authentication-devise", '~> 1.0.4'
# this is due to renaming FactoryGirl -> FactoryBot. You do not need to use this version exactly
gem "refinerycms-authentication-devise", '~> 2.0.1', git: 'https://github.com/refinery/refinerycms-authentication-devise', ref: "4fbe5428ea2fd2bfe033617d50c47dc2ce14351d"
gemspec
gem 'refinerycms', '~> 3.0.0'
gem 'refinerycms', '~> 4.0.3'
group :development, :test do
gem 'refinerycms-testing', '~> 3.0.0'
gem 'refinerycms-testing', '~> 4.0.3'
end
# Add the default visual editor, for now.
......
module Refinery
module News
class ItemsController < ::ApplicationController
before_filter :find_page
before_filter :find_published_news_items, :only => [:index]
before_filter :find_news_item, :find_latest_news_items, :only => [:show]
before_action :find_page
before_action :find_published_news_items, :only => [:index]
before_action :find_news_item, :find_latest_news_items, :only => [:show]
def index
# render 'index'
......
class CreateNewsItems < ActiveRecord::Migration
class CreateNewsItems < ActiveRecord::Migration[4.2]
def up
create_table ::Refinery::News::Item.table_name do |t|
......
class AddExternalUrlToNewsItems < ActiveRecord::Migration
class AddExternalUrlToNewsItems < ActiveRecord::Migration[4.2]
def up
unless ::Refinery::News::Item.column_names.map(&:to_sym).include?(:external_url)
......
class TranslateNewsItems < ActiveRecord::Migration
class TranslateNewsItems < ActiveRecord::Migration[4.2]
def up
::Refinery::News::Item.reset_column_information
......
class AddImageIdToNewsItems < ActiveRecord::Migration
class AddImageIdToNewsItems < ActiveRecord::Migration[4.2]
def up
unless ::Refinery::News::Item.column_names.map(&:to_sym).include?(:image_id)
......
class AddExpirationDateToNewsItems < ActiveRecord::Migration
class AddExpirationDateToNewsItems < ActiveRecord::Migration[4.2]
def up
unless ::Refinery::News::Item.column_names.map(&:to_sym).include?(:expiration_date)
......
class RemoveImageIdAndExternalUrlFromNews < ActiveRecord::Migration
class RemoveImageIdAndExternalUrlFromNews < ActiveRecord::Migration[4.2]
def up
if ::Refinery::News::Item.column_names.map(&:to_sym).include?(:external_url)
remove_column ::Refinery::News::Item.table_name, :external_url
......
# This migration comes from refinery_news (originally 7)
class AddSourceToNewsItems < ActiveRecord::Migration
class AddSourceToNewsItems < ActiveRecord::Migration[4.2]
def up
unless Refinery::News::Item.column_names.map(&:to_sym).include?(:source)
......
# This migration comes from refinery_news (originally 8)
class TranslateSource < ActiveRecord::Migration
class TranslateSource < ActiveRecord::Migration[4.2]
def up
unless Refinery::News::Item::Translation.column_names.map(&:to_sym).include?(:source)
......
class AddSlugToNewsItems < ActiveRecord::Migration
class AddSlugToNewsItems < ActiveRecord::Migration[4.2]
def change
add_column Refinery::News::Item.table_name, :slug, :string
end
......
class AddPositionToNewsItems < ActiveRecord::Migration
class AddPositionToNewsItems < ActiveRecord::Migration[4.2]
def change
add_column Refinery::News::Item.table_name, :position, :integer
end
......
class AddTeaserToItems < ActiveRecord::Migration
class AddTeaserToItems < ActiveRecord::Migration[4.2]
def change
add_column Refinery::News::Item.table_name, :teaser, :text
end
......
class AddTeaserToItemTranslations < ActiveRecord::Migration
class AddTeaserToItemTranslations < ActiveRecord::Migration[4.2]
def change
add_column Refinery::News::Item::Translation.table_name, :teaser, :text
end
......
......@@ -5,7 +5,7 @@ module Refinery
def self.included(base)
base.class_eval do
around_filter :wrap_home_action, :only => :home
around_action :wrap_home_action, :only => :home
def wrap_home_action
......
# Encoding: UTF-8
require 'date'
Gem::Specification.new do |s|
s.name = %q{refinerycms-news}
s.version = %q{3.0.0}
s.version = %q{4.0.0}
s.description = %q{A really straightforward open source Ruby on Rails news engine designed for integration with Refinery CMS.}
s.date = "#{Date.today.strftime("%Y-%m-%d")}"
s.date = Date.today.strftime("%Y-%m-%d")
s.summary = %q{Ruby on Rails news engine for Refinery CMS.}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
......@@ -14,7 +15,10 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- spec/*`.split("\n")
s.add_dependency 'refinerycms-core', '~> 3.0.0'
s.add_dependency 'refinerycms-settings', '~> 3.0.0'
s.add_dependency 'friendly_id', '~> 5.1.0'
s.add_dependency 'refinerycms-core', '~> 4.0.3'
s.add_dependency 'refinerycms-settings', '~> 4.0.1'
s.add_dependency 'friendly_id', '~> 5.2.1'
# Development dependencies
s.add_development_dependency 'refinerycms-testing', '~> 4.0.3'
end
namespace :refinery do
namespace :testing do
# Put any code in here that you want run when you test this extension against a dummy app.
# For example, the call to require your gem and start your generator.
task :setup_extension do
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment