This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :deploy do | |
# Ask whether to reindex before restarting Passenger | |
task :restart, :roles => :app, :except => {:no_release => true} do | |
solr.reindex if 'y' == Capistrano::CLI.ui.ask("\n\n Should I reindex all models? (anything but y will cancel)") | |
run "touch #{File.join(current_path, 'tmp', 'restart.txt')}" | |
end | |
desc 'create shared data and pid dirs for Solr' | |
task :setup_solr_shared_dirs do | |
# conf dir is not shared as different versions need different configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# This validator checks common validation rules for all models having associated text models | |
class MultiTextValidator < ActiveModel::Validator | |
cattr_reader :error_messages | |
@@error_messages = { | |
italian_missing: 'activemodel.errors.event.texts.italian_missing', | |
non_unique_languages: 'activemodel.errors.event.texts.non_unique_languages', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -100f log-file.json | jq --unbuffered |