Replace PhantomJS #2
6 changed files with 43 additions and 45 deletions
|
@ -1 +1 @@
|
||||||
2.2.2
|
2.3.3
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
language: ruby
|
language: ruby
|
||||||
before_script:
|
before_script:
|
||||||
- "export DISPLAY=:99.0"
|
|
||||||
- "sh -e /etc/init.d/xvfb start"
|
|
||||||
- sleep 3
|
|
||||||
- RACK_ENV=test bundle exec rake db:create
|
- RACK_ENV=test bundle exec rake db:create
|
||||||
- RACK_ENV=test bundle exec rake db:migrate
|
- RACK_ENV=test bundle exec rake db:migrate
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
FROM alpine:latest
|
FROM ruby:2.4.2-alpine
|
||||||
|
|
||||||
RUN export LANG=en_US.UTF-8 && \
|
RUN export LANG=en_US.UTF-8 && \
|
||||||
export LANGUAGE=en_US.UTF-8 && \
|
export LANGUAGE=en_US.UTF-8 && \
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk add build-base ruby-dev sqlite-dev ca-certificates \
|
&& apk add build-base sqlite-dev \
|
||||||
&& apk add ruby ruby-bundler ruby-io-console \
|
|
||||||
&& rm -rf /var/cache/apk*
|
&& rm -rf /var/cache/apk*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -20,7 +20,7 @@ gem 'tzinfo-data'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'rspec'
|
gem 'rspec'
|
||||||
gem 'capybara-webkit'
|
gem 'poltergeist'
|
||||||
gem 'factory_girl'
|
gem 'factory_girl'
|
||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
gem 'launchy'
|
gem 'launchy'
|
||||||
|
|
68
Gemfile.lock
68
Gemfile.lock
|
@ -1,13 +1,13 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activemodel (5.1.3)
|
activemodel (5.1.4)
|
||||||
activesupport (= 5.1.3)
|
activesupport (= 5.1.4)
|
||||||
activerecord (5.1.3)
|
activerecord (5.1.4)
|
||||||
activemodel (= 5.1.3)
|
activemodel (= 5.1.4)
|
||||||
activesupport (= 5.1.3)
|
activesupport (= 5.1.4)
|
||||||
arel (~> 8.0)
|
arel (~> 8.0)
|
||||||
activesupport (5.1.3)
|
activesupport (5.1.4)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
|
@ -15,26 +15,24 @@ GEM
|
||||||
addressable (2.5.2)
|
addressable (2.5.2)
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
public_suffix (>= 2.0.2, < 4.0)
|
||||||
arel (8.0.0)
|
arel (8.0.0)
|
||||||
aws-sdk (2.10.39)
|
aws-sdk (2.10.53)
|
||||||
aws-sdk-resources (= 2.10.39)
|
aws-sdk-resources (= 2.10.53)
|
||||||
aws-sdk-core (2.10.39)
|
aws-sdk-core (2.10.53)
|
||||||
aws-sigv4 (~> 1.0)
|
aws-sigv4 (~> 1.0)
|
||||||
jmespath (~> 1.0)
|
jmespath (~> 1.0)
|
||||||
aws-sdk-resources (2.10.39)
|
aws-sdk-resources (2.10.53)
|
||||||
aws-sdk-core (= 2.10.39)
|
aws-sdk-core (= 2.10.53)
|
||||||
aws-sigv4 (1.0.2)
|
aws-sigv4 (1.0.2)
|
||||||
backports (3.8.0)
|
backports (3.8.0)
|
||||||
bigdecimal (1.3.2)
|
bigdecimal (1.3.2)
|
||||||
capybara (2.13.0)
|
capybara (2.15.1)
|
||||||
addressable
|
addressable
|
||||||
mime-types (>= 1.16)
|
mini_mime (>= 0.1.3)
|
||||||
nokogiri (>= 1.3.3)
|
nokogiri (>= 1.3.3)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (>= 0.5.4)
|
rack-test (>= 0.5.4)
|
||||||
xpath (~> 2.0)
|
xpath (~> 2.0)
|
||||||
capybara-webkit (1.14.0)
|
cliver (0.3.2)
|
||||||
capybara (>= 2.3.0, < 2.14.0)
|
|
||||||
json
|
|
||||||
coderay (1.1.2)
|
coderay (1.1.2)
|
||||||
concurrent-ruby (1.0.5)
|
concurrent-ruby (1.0.5)
|
||||||
database_cleaner (1.6.1)
|
database_cleaner (1.6.1)
|
||||||
|
@ -45,33 +43,34 @@ GEM
|
||||||
ffi (1.9.18)
|
ffi (1.9.18)
|
||||||
i18n (0.8.6)
|
i18n (0.8.6)
|
||||||
jmespath (1.3.1)
|
jmespath (1.3.1)
|
||||||
json (2.1.0)
|
|
||||||
launchy (2.4.3)
|
launchy (2.4.3)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
listen (3.1.1)
|
listen (3.1.5)
|
||||||
rb-fsevent (>= 0.9.3)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (>= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
method_source (0.8.2)
|
ruby_dep (~> 1.2)
|
||||||
mime-types (3.1)
|
method_source (0.9.0)
|
||||||
mime-types-data (~> 3.2015)
|
mini_mime (0.1.4)
|
||||||
mime-types-data (3.2016.0521)
|
mini_portile2 (2.3.0)
|
||||||
mini_portile2 (2.2.0)
|
|
||||||
minitest (5.10.3)
|
minitest (5.10.3)
|
||||||
multi_json (1.12.2)
|
multi_json (1.12.2)
|
||||||
mustermann (1.0.1)
|
mustermann (1.0.1)
|
||||||
nokogiri (1.8.0)
|
nokogiri (1.8.1)
|
||||||
mini_portile2 (~> 2.2.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
pry (0.10.4)
|
poltergeist (1.16.0)
|
||||||
|
capybara (~> 2.1)
|
||||||
|
cliver (~> 0.3.1)
|
||||||
|
websocket-driver (>= 0.2.0)
|
||||||
|
pry (0.11.1)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.8.1)
|
method_source (~> 0.9.0)
|
||||||
slop (~> 3.4)
|
|
||||||
public_suffix (3.0.0)
|
public_suffix (3.0.0)
|
||||||
rack (2.0.3)
|
rack (2.0.3)
|
||||||
rack-protection (2.0.0)
|
rack-protection (2.0.0)
|
||||||
rack
|
rack
|
||||||
rack-test (0.7.0)
|
rack-test (0.7.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rake (12.0.0)
|
rake (12.1.0)
|
||||||
rb-fsevent (0.10.2)
|
rb-fsevent (0.10.2)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.9.10)
|
||||||
ffi (>= 0.5.0, < 2)
|
ffi (>= 0.5.0, < 2)
|
||||||
|
@ -90,6 +89,7 @@ GEM
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.6.0)
|
rspec-support (~> 3.6.0)
|
||||||
rspec-support (3.6.0)
|
rspec-support (3.6.0)
|
||||||
|
ruby_dep (1.5.0)
|
||||||
sinatra (2.0.0)
|
sinatra (2.0.0)
|
||||||
mustermann (~> 1.0)
|
mustermann (~> 1.0)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
|
@ -110,7 +110,6 @@ GEM
|
||||||
slim (3.0.8)
|
slim (3.0.8)
|
||||||
temple (>= 0.7.6, < 0.9)
|
temple (>= 0.7.6, < 0.9)
|
||||||
tilt (>= 1.3.3, < 2.1)
|
tilt (>= 1.3.3, < 2.1)
|
||||||
slop (3.6.0)
|
|
||||||
sqlite3 (1.3.13)
|
sqlite3 (1.3.13)
|
||||||
temple (0.8.0)
|
temple (0.8.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
|
@ -122,6 +121,9 @@ GEM
|
||||||
validate_url (1.0.2)
|
validate_url (1.0.2)
|
||||||
activemodel (>= 3.0.0)
|
activemodel (>= 3.0.0)
|
||||||
addressable
|
addressable
|
||||||
|
websocket-driver (0.7.0)
|
||||||
|
websocket-extensions (>= 0.1.0)
|
||||||
|
websocket-extensions (0.1.2)
|
||||||
xpath (2.1.0)
|
xpath (2.1.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
|
||||||
|
@ -132,11 +134,11 @@ DEPENDENCIES
|
||||||
activerecord
|
activerecord
|
||||||
aws-sdk (~> 2)
|
aws-sdk (~> 2)
|
||||||
bigdecimal
|
bigdecimal
|
||||||
capybara-webkit
|
|
||||||
database_cleaner
|
database_cleaner
|
||||||
dotenv
|
dotenv
|
||||||
factory_girl
|
factory_girl
|
||||||
launchy
|
launchy
|
||||||
|
poltergeist
|
||||||
pry
|
pry
|
||||||
rake
|
rake
|
||||||
rerun
|
rerun
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'rack/test'
|
require 'rack/test'
|
||||||
require 'rspec'
|
require 'rspec'
|
||||||
require 'capybara/rspec'
|
require 'capybara/rspec'
|
||||||
require 'capybara/webkit'
|
require 'capybara/poltergeist'
|
||||||
require 'factory_girl'
|
require 'factory_girl'
|
||||||
require 'database_cleaner'
|
require 'database_cleaner'
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ module TestingMixin
|
||||||
include FactoryGirl::Syntax::Methods
|
include FactoryGirl::Syntax::Methods
|
||||||
|
|
||||||
Capybara.app = Sinatra::Application
|
Capybara.app = Sinatra::Application
|
||||||
Capybara.javascript_driver = :webkit
|
Capybara.javascript_driver = :poltergeist
|
||||||
Capybara.asset_host = 'http://localhost:3000'
|
Capybara.asset_host = 'http://localhost:3000'
|
||||||
|
|
||||||
FactoryGirl.definition_file_paths = %w{./factories ./test/factories ./spec/factories}
|
FactoryGirl.definition_file_paths = %w{./factories ./test/factories ./spec/factories}
|
||||||
|
@ -39,8 +39,8 @@ module TestingMixin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Capybara::Webkit.configure do |config|
|
Capybara.register_driver :poltergeist do |app|
|
||||||
config.allow_unknown_urls
|
Capybara::Poltergeist::Driver.new(app, js_errors: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
|
|
Loading…
Reference in a new issue