I hereby claim:
- I am descentintomael on github.
- I am sean_todd (https://keybase.io/sean_todd) on keybase.
- I have a public key whose fingerprint is B512 CAA8 B053 DFFB B789 C81F A8D9 F6D6 BA96 61D1
To claim this, I am signing this object:
module LogTestHelpers | |
def exclude_from_logs(*hits, &block) | |
exclude_from_other_logs(test_log_path, *hits, &block) | |
end | |
alias :expect_logs_to_not_include :exclude_from_logs | |
def exclude_from_other_logs(log_path=test_log_path, *hits, &block) | |
lines_to_scan = scan_logs log_path, &block | |
regex = Regexp.union *hits |
def new_error(message = 'oops', klass = RuntimeError) | |
raise klass, message | |
rescue | |
return $! | |
end |
I hereby claim:
To claim this, I am signing this object:
class A | |
def a | |
1 | |
end | |
def b | |
def a | |
3 | |
end |
module DateScopes | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def include_date_scopes | |
include_date_scopes_for :created_at | |
end | |
def include_date_scopes_for(column, prepend_name = false) | |
return unless self.table_exists? |
class SecurityHelper | |
def self.action_names(controller, opts = {}) | |
actions = controller.class.public_instance_methods(false).reject{|a| a.to_s.starts_with? '_'} | |
actions - Array(opts[:except]) | |
end | |
def self.create_insecure_user(opts = {}) | |
roles = User.available_roles - Array(opts[:allowed_roles]).map(&:to_s) | |
FactoryGirl.create :user, roles: roles | |
end |
days = ENV['TIMECOP_DAYS'].nil? ? 0 : ENV['TIMECOP_DAYS'].to_i | |
minutes = ENV['TIMECOP_MINUTES'].nil? ? 0 : ENV['TIMECOP_MINUTES'].to_i | |
Timecop.travel Time.now + days.days | |
Timecop.travel Time.now + minutes.minutes |