Commit c3da247b authored by Brice Sanchez's avatar Brice Sanchez

Add support for Refinery 4.0

parent 5f50b6d3
......@@ -22,5 +22,6 @@ env:
- DB=postgresql
- DB=mysql
rvm:
- 2.3.1
- 2.2.5
- 2.4.2
- 2.3.5
- 2.2.8
\ No newline at end of file
......@@ -2,7 +2,7 @@ source "http://rubygems.org"
gemspec
git 'https://github.com/refinery/refinerycms', branch: '3-0-stable' do
git "https://github.com/refinery/refinerycms", branch: "master" do
gem 'refinerycms'
group :development, :test do
......@@ -10,7 +10,11 @@ git 'https://github.com/refinery/refinerycms', branch: '3-0-stable' do
end
end
gem 'refinerycms-wymeditor', '~> 1.0.0'
gem 'refinerycms-wymeditor', ['~> 2.0', '>= 2.0.0']
group :development do
gem 'listen'
end
group :test do
gem 'poltergeist'
......@@ -34,8 +38,10 @@ if !ENV['TRAVIS'] || ENV['DB'] == 'postgresql'
end
# Refinery/rails should pull in the proper versions of these
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
group :assets do
gem "sass-rails"
gem "coffee-rails"
end
# Load local gems according to Refinery developer preference.
if File.exist? local_gemfile = File.expand_path('../.gemfile', __FILE__)
......
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails gems
# installed from the root of your application.
begin
load File.join(File.expand_path('../../', __FILE__), 'spec/dummy/bin/rails')
rescue LoadError => load_error
warn "No dummy Rails application found! \n" \
"To create one in spec/dummy, please run: \n\n" \
" rake refinery:testing:dummy_app"
end
\ No newline at end of file
class CreatePageImages < ActiveRecord::Migration
class CreatePageImages < ActiveRecord::Migration[4.2]
def change
create_table Refinery::ImagePage.table_name, :id => false do |t|
t.integer :image_id
......
class AddCaptionToImagePages < ActiveRecord::Migration
class AddCaptionToImagePages < ActiveRecord::Migration[4.2]
def change
add_column Refinery::ImagePage.table_name, :caption, :text
end
......
class TranslatePageImageCaptions < ActiveRecord::Migration
class TranslatePageImageCaptions < ActiveRecord::Migration[4.2]
def up
add_column Refinery::ImagePage.table_name, :id, :primary_key
......
class ChangePageToPolymorphic < ActiveRecord::Migration
class ChangePageToPolymorphic < ActiveRecord::Migration[4.2]
def change
add_column Refinery::ImagePage.table_name, :page_type, :string, :default => "page"
end
......
......@@ -8,7 +8,7 @@ Page Images allows you to relate one or more images to any page in Refinery whic
## Requirements
* refinerycms >= 3.0.0
* refinerycms-pages ~> 4.0
## Features
......@@ -23,7 +23,7 @@ Page Images allows you to relate one or more images to any page in Refinery whic
Add this line to your application's `Gemfile`
```ruby
gem 'refinerycms-page-images', '~> 3.0.0', github: "refinery/refinerycms-page-images", branch: "master"
gem 'refinerycms-page-images', '~> 4.0.0', git: "https://github.com/refinery/refinerycms-page-images", branch: "master"
```
Next run
......@@ -74,7 +74,7 @@ Refinery::PageImages.wysiwyg = false
Note that WYMeditor support requires that you have the extension in your Gemfile:
```ruby
gem 'refinerycms-wymeditor', '~> 1.0.0'
gem 'refinerycms-wymeditor', ['~> 2.0', '>= 2.0.0']
```
## Usage
......
Gem::Specification.new do |s|
s.name = %q{refinerycms-page-images}
s.version = %q{3.0.0}
s.version = %q{4.0.0}
s.description = %q{Attach images to pages ins Refinery CMS}
s.summary = %q{Page Images extension for Refinery CMS}
s.email = %q{info@refinerycms.com}
......@@ -12,7 +12,7 @@ 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-pages', '~> 3.0.0'
s.add_dependency 'decorators', '~> 2.0.0'
s.add_dependency 'globalize', '~> 5.0'
s.add_dependency 'refinerycms-pages', ['~> 4.0', '>= 4.0.0']
s.add_dependency 'decorators', '~> 2.0'
s.add_dependency 'globalize', ['>= 5.1.0.beta1', '< 5.2']
end
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
ENGINE_PATH = File.expand_path('../..', __FILE__)
load File.expand_path('../../spec/dummy/bin/rails', __FILE__)
......@@ -27,7 +27,7 @@ describe Refinery::PageImages::Engine do
expect(Refinery::PageImages::EnableForMock::Model).to receive(:has_many_page_images).once
expect(Refinery::Page).not_to receive(:has_many_page_images)
ActionDispatch::Reloader.prepare!
Rails.application.reloader.prepare!
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