1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Switch out Poltergeist for Capybara Webkit

This commit is contained in:
Daniel Barber 2017-08-09 19:30:50 +01:00
parent 5baaccfe47
commit 966b936d3e
3 changed files with 120 additions and 113 deletions

89
Gemfile
View File

@ -1,68 +1,69 @@
source 'http://rubygems.org'
ruby '2.4.1'
source "http://rubygems.org"
ruby "2.4.1"
gem 'dotenv-rails', :groups => [:development, :test]
gem "dotenv-rails", :groups => [:development, :test]
gem 'rails', '~> 5.1'
gem "rails", "~> 5.1"
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# gem "rails", :git => "git://github.com/rails/rails.git"
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
gem "sass-rails"
gem "coffee-rails"
gem "uglifier"
gem 'bourbon'
gem "bourbon"
gem 'jquery-rails'
gem "jquery-rails"
gem 'aws-sdk'
gem "aws-sdk"
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :development do
gem 'ruby_parser'
gem 'powder'
gem 'better_errors'
gem 'binding_of_caller'
gem 'letter_opener'
gem "ruby_parser"
gem "powder"
gem "better_errors"
gem "binding_of_caller"
gem "letter_opener"
end
group :test, :development do
gem 'rspec-rails'
gem 'rails-controller-testing'
gem 'rubocop'
gem 'pry'
gem "rspec-rails"
gem "rails-controller-testing"
gem "rubocop"
gem "pry"
end
group :test do
gem 'factory_girl_rails'
gem 'shoulda'
gem 'shoulda-context'
gem 'shoulda-matchers'
gem 'poltergeist'
gem 'database_cleaner'
gem 'fivemat'
gem 'capybara-screenshot'
gem 'simplecov'
gem "capybara-screenshot"
gem "capybara-webkit"
gem "database_cleaner"
gem "factory_girl_rails"
gem "fivemat"
gem "headless"
gem "shoulda"
gem "shoulda-context"
gem "shoulda-matchers"
gem "simplecov"
end
group :production do
gem 'puma'
gem 'rails_12factor'
gem "puma"
gem "rails_12factor"
end
gem 'administrate'
gem 'administrate-field-image'
gem 'dragonfly'
gem 'dragonfly-s3_data_store'
gem 'kaminari'
gem 'monban'
gem 'monban-generators'
gem 'nokogiri'
gem 'pg'
gem 'kramdown'
gem 'simple_form'
gem 'slugtastic'
gem 'unf'
gem "administrate"
gem "administrate-field-image"
gem "dragonfly"
gem "dragonfly-s3_data_store"
gem "kaminari"
gem "monban"
gem "monban-generators"
gem "nokogiri"
gem "pg"
gem "kramdown"
gem "simple_form"
gem "slugtastic"
gem "unf"

View File

@ -1,39 +1,39 @@
GEM
remote: http://rubygems.org/
specs:
actioncable (5.1.2)
actionpack (= 5.1.2)
actioncable (5.1.3)
actionpack (= 5.1.3)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
actionmailer (5.1.3)
actionpack (= 5.1.3)
actionview (= 5.1.3)
activejob (= 5.1.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.2)
actionview (= 5.1.2)
activesupport (= 5.1.2)
actionpack (5.1.3)
actionview (= 5.1.3)
activesupport (= 5.1.3)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.2)
activesupport (= 5.1.2)
actionview (5.1.3)
activesupport (= 5.1.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.2)
activesupport (= 5.1.2)
activejob (5.1.3)
activesupport (= 5.1.3)
globalid (>= 0.3.6)
activemodel (5.1.2)
activesupport (= 5.1.2)
activerecord (5.1.2)
activemodel (= 5.1.2)
activesupport (= 5.1.2)
activemodel (5.1.3)
activesupport (= 5.1.3)
activerecord (5.1.3)
activemodel (= 5.1.3)
activesupport (= 5.1.3)
arel (~> 8.0)
activesupport (5.1.2)
activesupport (5.1.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
@ -55,20 +55,20 @@ GEM
administrate (>= 0.2.0.rc1)
arel (8.0.0)
ast (2.3.0)
autoprefixer-rails (7.1.2.3)
autoprefixer-rails (7.1.2.4)
execjs
aws-sdk (2.10.13)
aws-sdk-resources (= 2.10.13)
aws-sdk-core (2.10.13)
aws-sdk (2.10.22)
aws-sdk-resources (= 2.10.22)
aws-sdk-core (2.10.22)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.10.13)
aws-sdk-core (= 2.10.13)
aws-sdk-resources (2.10.22)
aws-sdk-core (= 2.10.22)
aws-sigv4 (1.0.1)
bcrypt (3.1.11)
better_errors (2.1.1)
better_errors (2.3.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
erubi (>= 1.0.0)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
@ -76,7 +76,7 @@ GEM
sass (~> 3.4)
thor (~> 0.19)
builder (3.2.3)
capybara (2.14.4)
capybara (2.13.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@ -86,7 +86,9 @@ GEM
capybara-screenshot (1.0.17)
capybara (>= 1.0, < 3)
launchy
cliver (0.3.2)
capybara-webkit (1.14.0)
capybara (>= 2.3.0, < 2.14.0)
json
coderay (1.1.1)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
@ -114,8 +116,7 @@ GEM
dragonfly (~> 1.0)
fog-aws
erubi (1.6.1)
erubis (2.7.0)
excon (0.57.1)
excon (0.58.0)
execjs (2.7.0)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
@ -129,9 +130,9 @@ GEM
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.44.3)
fog-core (1.45.0)
builder
excon (~> 0.49)
excon (~> 0.58)
formatador (~> 0.2)
fog-json (1.0.2)
fog-core (~> 1.0)
@ -142,6 +143,7 @@ GEM
formatador (0.2.5)
globalid (0.4.0)
activesupport (>= 4.2.0)
headless (2.3.1)
i18n (0.8.6)
ipaddress (0.8.3)
jmespath (1.3.1)
@ -176,7 +178,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.2.0)
minitest (5.10.2)
minitest (5.10.3)
momentjs-rails (2.17.1)
railties (>= 3.1)
monban (1.1.0)
@ -189,14 +191,10 @@ GEM
nio4r (2.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
parallel (1.11.2)
parallel (1.12.0)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.21.0)
poltergeist (1.15.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
powder (0.3.2)
thor (>= 0.11.5)
powerpack (0.1.1)
@ -209,17 +207,17 @@ GEM
rack (2.0.3)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.1.2)
actioncable (= 5.1.2)
actionmailer (= 5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
activemodel (= 5.1.2)
activerecord (= 5.1.2)
activesupport (= 5.1.2)
bundler (>= 1.3.0, < 2.0)
railties (= 5.1.2)
rails (5.1.3)
actioncable (= 5.1.3)
actionmailer (= 5.1.3)
actionpack (= 5.1.3)
actionview (= 5.1.3)
activejob (= 5.1.3)
activemodel (= 5.1.3)
activerecord (= 5.1.3)
activesupport (= 5.1.3)
bundler (>= 1.3.0)
railties (= 5.1.3)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
@ -235,9 +233,9 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.1.2)
actionpack (= 5.1.2)
activesupport (= 5.1.2)
railties (5.1.3)
actionpack (= 5.1.3)
activesupport (= 5.1.3)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
@ -272,7 +270,7 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.8.1)
ruby_parser (3.10.0)
ruby_parser (3.10.1)
sexp_processor (~> 4.9)
sass (3.5.1)
sass-listen (~> 4.0.0)
@ -312,7 +310,7 @@ GEM
sprockets (>= 3.0.0)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
tilt (2.0.8)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uglifier (3.2.0)
@ -340,6 +338,7 @@ DEPENDENCIES
binding_of_caller
bourbon
capybara-screenshot
capybara-webkit
coffee-rails
database_cleaner
dotenv-rails
@ -347,6 +346,7 @@ DEPENDENCIES
dragonfly-s3_data_store
factory_girl_rails
fivemat
headless
jquery-rails
kaminari
kramdown
@ -355,7 +355,6 @@ DEPENDENCIES
monban-generators
nokogiri
pg
poltergeist
powder
pry
puma
@ -379,4 +378,4 @@ RUBY VERSION
ruby 2.4.1p111
BUNDLED WITH
1.14.6
1.15.3

View File

@ -1,20 +1,22 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
require 'capybara/poltergeist'
# This file is copied to spec/ when you run "rails generate rspec:install"
ENV["RAILS_ENV"] ||= "test"
require File.expand_path("../../config/environment", __FILE__)
require "rspec/rails"
require "headless"
require "capybara/rspec"
# For code coverage
require 'simplecov'
require "simplecov"
SimpleCov.start
headless = Headless.new
# Use Poltergeist
Capybara.javascript_driver = :poltergeist
Capybara.javascript_driver = :webkit
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
RSpec.configure do |config|
# ## Mock Framework
@ -29,10 +31,10 @@ RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.include Ajax, type: :feature
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
# Remove this line if you"re not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# If you"re not using ActiveRecord, or you"d prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
config.use_transactional_fixtures = false
@ -46,10 +48,15 @@ RSpec.configure do |config|
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = 'random'
config.order = "random"
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
headless.start
end
config.after(:suite) do
headless.destroy
end
config.before(:each) do