rails on rack

Download Rails on Rack

Post on 11-Nov-2014

163 views

Category:

Technology

2 download

Embed Size (px)

DESCRIPTION

 

TRANSCRIPT

  • 1. Monday, February 24, 14 1
  • 2. O QUE ? Monday, February 24, 14 2
  • 3. UMA ESPECIFICAO PARA COMUNICAO ENTRE APLICAES RUBY E SERVIDORES WEB Monday, February 24, 14 3
  • 4. Request Monday, February 24, 14 WebServer Rack App 4
  • 5. API RACK APP Qualquer objeto que responde ao metodo call e receba como parmetro um objeto com os dados da requisio Retorna um array com 3 elementos [status, headers, response] Monday, February 24, 14 5
  • 6. API RACK APP [status, headers, response] to_i Monday, February 24, 14 hash string each 6
  • 7. EXEMPLO Monday, February 24, 14 7
  • 8. proc {|env| [200, {"content-Type": "text/html"}, ["Ol frevoonrails"]] Monday, February 24, 14 8
  • 9. RACK MIDDLEWARES Monday, February 24, 14 9
  • 10. Request Middleware Middleware Rack App Monday, February 24, 14 10
  • 11. RAILS ON RACK Monday, February 24, 14 11
  • 12. RAKE MIDDLEWARE Monday, February 24, 14 12
  • 13. ADICIONANDO UM RACK MIDDLEWARE AO RAILS Monday, February 24, 14 13
  • 14. Crie seu arquivo rack.rb e adicione na pasta lib ou initializers Monday, February 24, 14 14
  • 15. Adicione seu rack application application.rb Monday, February 24, 14 15
  • 16. Verique com rake middleware Monday, February 24, 14 16
  • 17. USOS NA VIDA REAL Contador de acessos Bloquear acesso Devise(Warden) Monday, February 24, 14 17
  • 18. REFERNCIAS http://guides.rubyonrails.org/rails_on_rack.html http://rack.github.io/ https://www.youtube.com/watch?v=TslkdT3PfKc& https://github.com/hassox/warden Monday, February 24, 14 18
  • 19. OBRIGADO!! Monday, February 24, 14 19
  • 20. OPS MAIS UMA COISA!! Monday, February 24, 14 20
  • 21. Monday, February 24, 14 21