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