Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test workflow improvements #803

Merged
merged 4 commits into from
Jul 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ spec/dummy/*
.idea
/app/assets/javascripts/pageflow/dist
.localeapp
/node_package/package-lock.json
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion doc/contributing/rails_engine_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pageflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions spec/pageflow/paperclip_processors/vtt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/support/config/capybara.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'capybara/rspec'
require 'capybara/webkit'
require 'capybara/poltergeist'

Capybara.javascript_driver = :webkit
Capybara.javascript_driver = :poltergeist
28 changes: 13 additions & 15 deletions spec/support/pageflow/dummy/templates/database.yml
Original file line number Diff line number Diff line change
@@ -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 %>