« Home

Using headless Chrome for Ember testing

As of Chrome v59, you can run it in a headless environment, which means you don’t need PhantomJS for running tests anymore. Using it is the easiest thing in the world: // testem.js /jshint node:true/ module.exports = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ "Chrome" ], "browser_args": { 'Chrome': [ '–headless', '–disable-gpu', '–remote-debugging-port=9222' ], }, "launch_in_dev": [ "Chrome" ] }; If you have a testem.json file, delete it.…

Read more »

Full-text search with JSONAPI Resources

PostgreSQL has a decent full-text search facility built into it that is more than adequate for many use cases. This article shows how to use it along with JSONAPI Resources in a Rails app. I urge you to read the PostgreSQL documentation, especially chapters 12.1, 12.2, and 12.3, before continuing with this article so you have good understanding of the fundamentals of full-text search. Let’s say we want to search the users table on first_name, last_name, or both.…

Read more »