I hereby claim:
- I am mreinsch on github.
- I am mreinsch (https://keybase.io/mreinsch) on keybase.
- I have a public key ASBVOsqAmcvVZvk1rJpx4KPv4M0AwbFBKtG-3t1zSkNRrgo
To claim this, I am signing this object:
| # some helpers to make integration testing with elasticsearch easier | |
| # expects Capybara | |
| # modify this! | |
| MODELS_WITH_ELASICSEARCH_MODEL = [Group, Event] | |
| begin | |
| MODELS_WITH_ELASICSEARCH_MODEL.each do |c| | |
| c.__elasticsearch__.create_index! force: true | |
| c.__elasticsearch__.refresh_index! |
| class Event < ActiveRecord::Base | |
| include Elasticsearch::Model | |
| belongs_to :group | |
| after_save { IndexerJob.perform_later('update', self.class.name, self.id) } | |
| after_destroy { IndexerJob.perform_later('delete', self.class.name, self.id) } | |
| def in_search_index? | |
| published? && group.in_search_index? |
| $ git branch -r --merged master | | |
| awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' | | |
| xargs git push origin --delete |
| module RSpecLoggerListener | |
| extend self | |
| def start(notification) | |
| Rails.logger.info("\n\n====== Starting new test run") | |
| end | |
| def stop(notification) | |
| Rails.logger.info("\n\n====== Test run finished") | |
| end | |
| def example_started(notification) |
| module CapybaraHelperMethods | |
| def wait_for_ajax | |
| counter = 0 | |
| while !finished_all_ajax_requests? | |
| counter += 1 | |
| sleep 0.2 | |
| raise "AJAX request took too long." if counter >= (Capybara.default_wait_time * 5) | |
| end | |
| end |
I hereby claim:
To claim this, I am signing this object: