diff --git a/.gitignore b/.gitignore index 969f23d4d2..b2133ef420 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ spec/dummy/* .idea /app/assets/javascripts/pageflow/dist .localeapp +/node_package/package-lock.json diff --git a/.travis.yml b/.travis.yml index 043d0e9b58..730a64f9e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,6 @@ services: before_install: - nvm install stable - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start before_script: - bin/npm install diff --git a/README.md b/README.md index c0023e615c..8c8566e0b5 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Pageflow assumes the following choice of libraries: Pageflow runs in environments with: -* Ruby >= 2.1 +* Ruby >= 2.1 (see `.travis.yml` for supported versions) * Node >= 6.9.5 * Rails 4.2 * Redis server (for Resque) diff --git a/doc/contributing/rails_engine_development.md b/doc/contributing/rails_engine_development.md index 3e95d182db..ba1cb04807 100644 --- a/doc/contributing/rails_engine_development.md +++ b/doc/contributing/rails_engine_development.md @@ -5,9 +5,10 @@ Ensure the development machine meets the requirements listed in the readme. From the repository root run: + $ gem install bundler $ bundle install $ bin/npm install - + Build node package to `assets` directory: $ bin/npm run build diff --git a/pageflow.gemspec b/pageflow.gemspec index a61ed2dc70..0dcb9d2739 100644 --- a/pageflow.gemspec +++ b/pageflow.gemspec @@ -128,7 +128,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'capybara', '~> 2.4' # Headless browser testing - s.add_development_dependency 'capybara-webkit', '~> 1.3' + s.add_development_dependency 'poltergeist', '~> 1.15.0' # View abstraction fro integration testing s.add_development_dependency 'domino', '~> 0.7.0' diff --git a/spec/pageflow/paperclip_processors/vtt_spec.rb b/spec/pageflow/paperclip_processors/vtt_spec.rb index 89ad099500..f3356f92bb 100644 --- a/spec/pageflow/paperclip_processors/vtt_spec.rb +++ b/spec/pageflow/paperclip_processors/vtt_spec.rb @@ -13,7 +13,7 @@ module PaperclipProcessors file = processor.make - expect(file.path).to match(/tmp.*\.vtt$/) + expect(file.path).to match(/\.vtt\z/) expect(file.read).to match(/^WEBVTT/) end end @@ -28,7 +28,7 @@ module PaperclipProcessors file = processor.make - expect(file.path).to match(/tmp.*\.vtt$/) + expect(file.path).to match(/\.vtt\z/) expect(file.read).to match(/^WEBVTT/) end end diff --git a/spec/support/config/capybara.rb b/spec/support/config/capybara.rb index 106fdabcdd..167bcc2a28 100644 --- a/spec/support/config/capybara.rb +++ b/spec/support/config/capybara.rb @@ -1,4 +1,4 @@ require 'capybara/rspec' -require 'capybara/webkit' +require 'capybara/poltergeist' -Capybara.javascript_driver = :webkit +Capybara.javascript_driver = :poltergeist diff --git a/spec/support/pageflow/dummy/templates/database.yml b/spec/support/pageflow/dummy/templates/database.yml index 1c27d52915..5b1fa7d2d4 100644 --- a/spec/support/pageflow/dummy/templates/database.yml +++ b/spec/support/pageflow/dummy/templates/database.yml @@ -1,27 +1,25 @@ -development: +common: &common adapter: mysql2 encoding: utf8 - database: development - pool: 5 username: <%= ENV.fetch('PAGEFLOW_DB_USER', 'root') %> password: <%= ENV.fetch('PAGEFLOW_DB_PASSWORD', '') %> + pool: 5 <% if ENV['PAGEFLOW_DB_HOST'].present? %> host: <%= ENV['PAGEFLOW_DB_HOST'] %> port: <%= ENV.fetch('PAGEFLOW_DB_PORT', '3306') %> -<% else %> +<% elsif File.socket?('/var/run/mysqld/mysqld.sock') %> socket: /var/run/mysqld/mysqld.sock +<% elsif File.socket?('/tmp/mysql.sock') %> + socket: /tmp/mysql.sock +<% else %> + host: localhost + port: 3306 <% end %> +development: + <<: *common + database: development + test: - adapter: mysql2 - encoding: utf8 + <<: *common database: test - pool: 5 - username: <%= ENV.fetch('PAGEFLOW_DB_USER', 'root') %> - password: <%= ENV.fetch('PAGEFLOW_DB_PASSWORD', '') %> -<% if ENV['PAGEFLOW_DB_HOST'].present? %> - host: <%= ENV['PAGEFLOW_DB_HOST'] %> - port: <%= ENV.fetch('PAGEFLOW_DB_PORT', '3306') %> -<% else %> - socket: /var/run/mysqld/mysqld.sock -<% end %>