Module: EY::GateKeeper::Util

Defined in:
lib/ey_gatekeeper/util.rb

Instance Method Summary collapse

Instance Method Details

#debug(message) ⇒ Object



6
7
8
# File 'lib/ey_gatekeeper/util.rb', line 6

def debug(message)
  puts message
end

#random_shaObject



13
14
15
# File 'lib/ey_gatekeeper/util.rb', line 13

def random_sha
  Digest::SHA256.hexdigest((1..1000).map { |i| rand.to_s }.join)
end

#root_or_meta?(env) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ey_gatekeeper/util.rb', line 17

def root_or_meta?(env)
  env['PATH_INFO'] == '/' || env['PATH_INFO'] == '/cloudkit-meta'
end