In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
| require 'rspec/expectations' | |
| # expect(response).to be_json_success | |
| RSpec::Matchers.define :be_json_success do |_expected| | |
| match do |actual| | |
| actual.status == 200 && actual.content_type.match("application/json") | |
| end | |
| failure_message do |actual| | |
| "expected status: 200, content_type: 'application/json', got status: #{actual.status}, content_type: '#{actual.content_type}'" |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| hand_shutdown "key 290 mod1" | |
| hand_capmouse "key 291 mod1" | |
| hand_fullscr "key 13 mod2" | |
| hand_pause "key 19 mod2" | |
| hand_mapper "key 282 mod1" | |
| hand_speedlock "key 293 mod2" | |
| hand_recwave "key 287 mod1" | |
| hand_caprawmidi "key 289 mod1 mod2" | |
| hand_scrshot "key 286 mod1" | |
| hand_video "key 286 mod1 mod2" |
| # This task can be used reindex Solr without dropping your index first. | |
| # This is ideal for production environments where a live, working index is critical. | |
| # | |
| # Put this in lib/tasks/sunspot_tasks.rake | |
| namespace :sunspot do | |
| task reindex_gracefully: :environment do | |
| Dir.glob(Rails.root.join('app/models/**/*.rb')).each { |path| require path } | |
| sunspot_models = Sunspot.searchable |