Advertisement
Guest User

Untitled

a guest
May 5th, 2015
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1.  
  2. 224 (config['allowed_ips'] ||= []).include?(request.ip) or
  3. 225 return err("Not allowed: #{request.ip}\n" \
  4. 226 "You need to put this IP in the 'allowed_ips' array "\
  5. 227 "in:\n #@@dir/config.yml")
  6.  
  7. AND
  8.  
  9.  
  10. 259 def config
  11. 260 @config ||= begin
  12. 261 YAML.load(File.read("#@@dir/config.yml"))
  13. 262 rescue Errno::ENOENT
  14. 263 {}
  15. 264 end
  16. 265 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement