breezy 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/breezy.rb +11 -6
  3. data/lib/breezy/render.rb +8 -1
  4. data/lib/breezy/version.rb +1 -1
  5. data/lib/breezy/xhr_headers.rb +9 -22
  6. data/lib/generators/breezy/view/templates/{view.jsx → view.jsx.mobile} +0 -0
  7. data/lib/generators/breezy/view/templates/{view.js → view.jsx.web} +0 -0
  8. data/lib/generators/breezy/view/view_generator.rb +3 -3
  9. data/lib/generators/rails/breezy_generator.rb +103 -0
  10. data/lib/generators/rails/scaffold_controller_generator.rb +13 -0
  11. data/lib/generators/rails/templates/controller.rb.tt +85 -0
  12. data/lib/generators/rails/templates/edit.js.props +18 -0
  13. data/lib/generators/rails/templates/index.js.props +20 -0
  14. data/lib/generators/rails/templates/mobile/edit.jsx +76 -0
  15. data/lib/generators/rails/templates/mobile/elements.js +88 -0
  16. data/lib/generators/rails/templates/mobile/form.jsx +34 -0
  17. data/lib/generators/rails/templates/mobile/index.jsx +103 -0
  18. data/lib/generators/rails/templates/mobile/new.jsx +75 -0
  19. data/lib/generators/rails/templates/mobile/show.jsx +32 -0
  20. data/lib/generators/rails/templates/new.js.props +7 -0
  21. data/lib/generators/rails/templates/show.js.props +12 -0
  22. data/lib/generators/rails/templates/web/base.jsx +68 -0
  23. data/lib/generators/rails/templates/web/edit.jsx +34 -0
  24. data/lib/generators/rails/templates/web/form.jsx +37 -0
  25. data/lib/generators/rails/templates/web/index.jsx +56 -0
  26. data/lib/generators/rails/templates/web/new.jsx +31 -0
  27. data/lib/generators/rails/templates/web/show.jsx +28 -0
  28. data/lib/install/templates/mobile/app.js +31 -38
  29. data/lib/install/templates/mobile/package.json +5 -2
  30. data/lib/install/templates/web/application.js +7 -3
  31. data/lib/install/web.rb +2 -4
  32. metadata +23 -6
  33. data/lib/assets/javascript/breezy.js +0 -6067
  34. data/lib/breezy/xhr_redirect.rb +0 -13
@@ -1,13 +0,0 @@
1
- module Breezy
2
- module XHRRedirect
3
- def call(env)
4
- status, headers, body = super(env)
5
-
6
- if env['rack.session'] && env['HTTP_X_XHR_REFERER']
7
- env['rack.session'][:_breezy_redirect_to] = headers['Location']
8
- end
9
-
10
- [status, headers, body]
11
- end
12
- end
13
- end