pakyow-presenter 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/pakyow-presenter/CHANGELOG.md +16 -0
  3. data/pakyow-presenter/lib/pakyow-presenter.rb +1 -11
  4. data/pakyow-presenter/lib/pakyow/presenter.rb +8 -0
  5. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/attributes.rb +21 -14
  6. data/pakyow-presenter/lib/pakyow/presenter/base.rb +38 -0
  7. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/binder.rb +19 -6
  8. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/binder_set.rb +18 -21
  9. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/binding_eval.rb +14 -0
  10. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/config/presenter.rb +12 -6
  11. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/container.rb +0 -0
  12. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/doc_helpers.rb +0 -0
  13. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/exceptions.rb +0 -0
  14. data/pakyow-presenter/lib/pakyow/presenter/ext/app.rb +33 -0
  15. data/pakyow-presenter/lib/pakyow/presenter/ext/call_context.rb +28 -0
  16. data/pakyow-presenter/lib/pakyow/presenter/helpers.rb +46 -0
  17. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/page.rb +0 -0
  18. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/partial.rb +0 -0
  19. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/presenter.rb +14 -9
  20. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/string_doc.rb +35 -9
  21. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/string_doc_parser.rb +41 -30
  22. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/string_doc_renderer.rb +0 -0
  23. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/template.rb +0 -0
  24. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view.rb +79 -36
  25. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view_collection.rb +10 -4
  26. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view_composer.rb +43 -3
  27. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view_context.rb +12 -8
  28. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view_store.rb +3 -1
  29. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view_store_loader.rb +0 -0
  30. data/pakyow-presenter/lib/{presenter → pakyow/presenter}/view_version.rb +19 -3
  31. data/pakyow-presenter/lib/pakyow/views/errors/404.erb +26 -0
  32. data/pakyow-presenter/lib/pakyow/views/errors/500.erb +23 -0
  33. metadata +39 -38
  34. data/pakyow-presenter/lib/presenter/base.rb +0 -27
  35. data/pakyow-presenter/lib/presenter/ext/app.rb +0 -63
  36. data/pakyow-presenter/lib/presenter/helpers.rb +0 -40
  37. data/pakyow-presenter/lib/views/errors/404.html +0 -5
  38. data/pakyow-presenter/lib/views/errors/500.html +0 -0
@@ -1,40 +0,0 @@
1
- require 'forwardable'
2
-
3
- module Pakyow
4
- module Helpers; end
5
-
6
- module AppHelpers
7
- extend Forwardable
8
-
9
- def_delegators :@presenter, :store, :store=, :content, :view=,
10
- :template=, :page=, :path, :path=, :compose, :composer, :precompose!
11
-
12
- def view
13
- Presenter::ViewContext.new(@presenter.view, self)
14
- end
15
-
16
- def partial(*args)
17
- Presenter::ViewContext.new(@presenter.partial(*args), self)
18
- end
19
-
20
- def template
21
- Presenter::ViewContext.new(@presenter.template, self)
22
- end
23
-
24
- def page
25
- Presenter::ViewContext.new(@presenter.page, self)
26
- end
27
-
28
- def container(*args)
29
- Presenter::ViewContext.new(@presenter.container(*args), self)
30
- end
31
-
32
- def presenter
33
- @presenter
34
- end
35
-
36
- def bindings(name)
37
- presenter.bindings(name).bindings
38
- end
39
- end
40
- end
@@ -1,5 +0,0 @@
1
- <p class="lead">
2
- But, we recommend you start by creating a view at <code>app/views/{view_path}</code>.
3
- The view will be served up automatically without writing any back-end code! This pattern
4
- is called view-first development (you could also call it <em>awesome</em>).
5
- </p>
File without changes