Unverified Commit bbcf57a5 authored by Philip Arndt's avatar Philip Arndt Committed by GitHub
Browse files

Feature/refinery 4 support (#14)

parents 6ee60cca e77b5190
language: ruby
sudo: false
addons:
apt:
packages:
- chromium-chromedriver
cache: bundler
bundler_args: --without development
before_script:
- "sh -e /etc/init.d/xvfb start"
- "bundle exec rake refinery:testing:dummy_app"
- export RETRY_COUNT=3
- export PATH=$PATH:/usr/lib/chromium-browser/
- bin/rake refinery:testing:dummy_app
script:
- "DISPLAY=:99.0 bundle exec rspec spec"
env:
......@@ -11,14 +17,8 @@ env:
- DB=mysql
notifications:
email: true
irc:
use_notice: true
skip_join: true
channels:
- "irc.freenode.org#refinerycms"
webhooks:
- https://webhooks.gitter.im/e/b5d48907cdc89864b874
rvm:
- 2.5
- 2.4
sudo: false
- 2.4
\ No newline at end of file
......@@ -2,7 +2,7 @@ source 'https://rubygems.org'
gemspec
git 'https://github.com/refinery/refinerycms', :branch => 'master' do
git 'https://github.com/refinery/refinerycms', branch: 'master' do
gem 'refinerycms'
group :development, :test do
......@@ -20,28 +20,26 @@ end
if !ENV['TRAVIS'] || ENV['DB'] == 'mysql'
group :mysql do
gem 'activerecord-jdbcmysql-adapter', '>= 1.3.0.rc1', :platform => :jruby
gem 'mysql2', :platform => :ruby
gem 'activerecord-jdbcmysql-adapter', '>= 1.3.0.rc1', platform: :jruby
gem 'mysql2', platform: :ruby
end
end
if !ENV['TRAVIS'] || ENV['DB'] == 'postgresql'
group :postgres, :postgresql do
gem 'activerecord-jdbcpostgresql-adapter', '>= 1.3.0.rc1', :platform => :jruby
gem 'pg', :platform => :ruby
gem 'activerecord-jdbcpostgresql-adapter', '>= 1.3.0.rc1', platform: :jruby
gem 'pg', platform: :ruby
end
end
group :test do
gem 'launchy'
gem 'pry'
gem 'poltergeist'
gem 'selenium-webdriver', require: false
end
# Refinery/rails should pull in the proper versions of these
group :assets do
gem 'sass-rails'
gem 'uglifier'
end
gem 'jquery-rails'
end
\ No newline at end of file
......@@ -6,15 +6,14 @@ Refinery CMS Acts As Indexed is the [Acts As Indexed](https://github.com/dougal/
## Requirements
* Refinery CMS version 3.0.0 or above.
* To use Refinery `>= 2.1.x` use the refinerycms-acts-as-indexed [1-0-stable](https://github.com/refinery/refinerycms-acts-as-indexed/tree/1-0-stable) branch.
* Refinery CMS version 4.0.0 or above.
## Install
Open up your ``Gemfile`` and add at the bottom this line:
```ruby
gem 'refinerycms-acts-as-indexed', '~> 3.0.0'
gem 'refinerycms-acts-as-indexed', '~> 4.0.0'
```
Now run `bundle install`.
......
#!/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.
# This command will automatically be run when you run "rails" with Rails gems
# installed from the root of your application.
ENGINE_PATH = File.expand_path('../..', __FILE__)
load File.expand_path('../../spec/dummy/bin/rails', __FILE__)
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
......@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = %q{refinerycms-acts-as-indexed}
s.version = %q{3.0.0}
s.version = %q{4.0.0}
s.description = %q{An extension to handle the integration of Refinery CMS and ActsAsIndexed}
s.summary = %q{Refinery CMS ActsAsIndexed integration plugin}
s.email = %q{gems@p.arndt.io}
......@@ -13,10 +13,10 @@ Gem::Specification.new do |s|
s.files = `git ls-files -- app/* lib/*`.split("\n")
s.add_dependency 'refinerycms-core', ['>= 3.0.0', '< 5.0']
s.add_dependency 'acts_as_indexed', '~> 0.8.0'
s.add_dependency 'refinerycms-core', ['>= 4.0.0', '< 5.0']
s.add_dependency 'acts_as_indexed', '~> 0.8'
s.add_dependency 'decorators', '~> 2.0'
s.add_dependency 'stringex', '~> 2.5.2'
s.add_dependency 'stringex', '~> 2.5'
s.cert_chain = ['certs/parndt.pem']
if $0 =~ /gem\z/ && ARGV.include?("build") && ARGV.include?(__FILE__)
......
......@@ -16,9 +16,18 @@ RSpec.configure do |config|
config.run_all_when_everything_filtered = true
end
# set javascript driver for capybara
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
require "selenium/webdriver"
Capybara.register_driver :selenium_chrome_headless do |app|
browser_options = ::Selenium::WebDriver::Chrome::Options.new
browser_options.args << '--headless'
browser_options.args << '--no-sandbox'
browser_options.args << '--disable-gpu'
browser_options.args << '--window-size=1440,1080'
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end
Capybara.javascript_driver = (ENV['CAPYBARA_DRIVER'] || :selenium_chrome_headless).to_sym
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories including factories.
......
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