hanami-view 1.3.3 → 2.0.0.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -9
  3. data/LICENSE +20 -0
  4. data/README.md +17 -835
  5. data/hanami-view.gemspec +27 -16
  6. data/lib/hanami/view/application_configuration.rb +77 -0
  7. data/lib/hanami/view/application_context.rb +57 -0
  8. data/lib/hanami/view/application_view.rb +89 -0
  9. data/lib/hanami/view/context.rb +98 -0
  10. data/lib/hanami/view/context_helpers/content_helpers.rb +26 -0
  11. data/lib/hanami/view/decorated_attributes.rb +82 -0
  12. data/lib/hanami/view/errors.rb +31 -53
  13. data/lib/hanami/view/exposure.rb +126 -0
  14. data/lib/hanami/view/exposures.rb +74 -0
  15. data/lib/hanami/view/part.rb +217 -0
  16. data/lib/hanami/view/part_builder.rb +140 -0
  17. data/lib/hanami/view/path.rb +68 -0
  18. data/lib/hanami/view/render_environment.rb +62 -0
  19. data/lib/hanami/view/render_environment_missing.rb +44 -0
  20. data/lib/hanami/view/rendered.rb +55 -0
  21. data/lib/hanami/view/renderer.rb +79 -0
  22. data/lib/hanami/view/scope.rb +189 -0
  23. data/lib/hanami/view/scope_builder.rb +98 -0
  24. data/lib/hanami/view/standalone_view.rb +400 -0
  25. data/lib/hanami/view/tilt/erb.rb +26 -0
  26. data/lib/hanami/view/tilt/erbse.rb +21 -0
  27. data/lib/hanami/view/tilt/haml.rb +26 -0
  28. data/lib/hanami/view/tilt.rb +78 -0
  29. data/lib/hanami/view/version.rb +5 -5
  30. data/lib/hanami/view.rb +208 -223
  31. data/lib/hanami-view.rb +3 -1
  32. metadata +121 -70
  33. data/LICENSE.md +0 -22
  34. data/lib/hanami/layout.rb +0 -190
  35. data/lib/hanami/presenter.rb +0 -98
  36. data/lib/hanami/view/configuration.rb +0 -504
  37. data/lib/hanami/view/dsl.rb +0 -347
  38. data/lib/hanami/view/escape.rb +0 -225
  39. data/lib/hanami/view/inheritable.rb +0 -54
  40. data/lib/hanami/view/rendering/layout_finder.rb +0 -128
  41. data/lib/hanami/view/rendering/layout_registry.rb +0 -69
  42. data/lib/hanami/view/rendering/layout_scope.rb +0 -281
  43. data/lib/hanami/view/rendering/null_layout.rb +0 -52
  44. data/lib/hanami/view/rendering/null_local.rb +0 -82
  45. data/lib/hanami/view/rendering/null_template.rb +0 -83
  46. data/lib/hanami/view/rendering/null_view.rb +0 -26
  47. data/lib/hanami/view/rendering/options.rb +0 -24
  48. data/lib/hanami/view/rendering/partial.rb +0 -31
  49. data/lib/hanami/view/rendering/partial_file.rb +0 -29
  50. data/lib/hanami/view/rendering/partial_finder.rb +0 -75
  51. data/lib/hanami/view/rendering/partial_templates_finder.rb +0 -73
  52. data/lib/hanami/view/rendering/registry.rb +0 -134
  53. data/lib/hanami/view/rendering/scope.rb +0 -108
  54. data/lib/hanami/view/rendering/subscope.rb +0 -56
  55. data/lib/hanami/view/rendering/template.rb +0 -69
  56. data/lib/hanami/view/rendering/template_finder.rb +0 -55
  57. data/lib/hanami/view/rendering/template_name.rb +0 -50
  58. data/lib/hanami/view/rendering/templates_finder.rb +0 -144
  59. data/lib/hanami/view/rendering/view_finder.rb +0 -37
  60. data/lib/hanami/view/rendering.rb +0 -294
  61. data/lib/hanami/view/template.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72a528dac2dcd264c024a20cfdb74eeed51ffe1a94afa29ea407e273f16add51
4
- data.tar.gz: 699740c375290f05449c8daed600cd8e64ececfeb9b5bf4e107ff83092f17cfe
3
+ metadata.gz: 728dfbae92fb7d572546e53f1825fcdaf62e65516cc37239adedc6ee4cb53180
4
+ data.tar.gz: 7141aecb976e943a354edf1e737dc89fa1f9909789963e04a80fe6bcfd6b90a0
5
5
  SHA512:
6
- metadata.gz: e29c5e88308af381939a32cc1516a4fad5b4522117f82a0dd1c7c6dcf1ef81e37a08b15d6d82f1b7dff564c22dff17eafa89f9aceade70365545929396a6b7b8
7
- data.tar.gz: ccb17de1053dcf123762cf2b10ee680e0c0a0998a05469b0dc4e9f8dea23ea26df1d34432fca3975c571690d51138160d74cad0bedf2ccc27e4032c1f9f474ca
6
+ metadata.gz: be9ca9902d8e234749fab079f9a6c67593d8e0c657534729530e1b189a0096cb4592c3a7834ca5a817a23a91b2a0c1b1ea9a4d0fb0fe02f203bf762f4b94d704
7
+ data.tar.gz: 191de385de5777d639263270d8dfb6c5539766d28e1b545b62008d50c0ff7e6ac671b6287346b5c91288ffbbcaae79e717f5543c2eabcc95be03cd665a1780ff
data/CHANGELOG.md CHANGED
@@ -1,18 +1,27 @@
1
1
  # Hanami::View
2
2
  View layer for Hanami
3
3
 
4
- ## v1.3.3 - 2019-01-07
4
+ ## v2.0.0.alpha6 - 2022-02-10
5
5
  ### Added
6
- - [Luca Guidi] Official support for Ruby: MRI 2.7
7
- - [unleashy] Allow `LayoutScope#render` to accept a block (e.g. `<%= render(partial: "shared/sidebar") { %(<div id="sidebar"></div>) } %>` or `<%= render(partial: "shared/sidebar", &Sidebar.new) %>`)
6
+ - [Luca Guidi] Official support for Ruby: MRI 3.0 and 3.1
8
7
 
9
- ### Fixed
10
- - [MITSUBOSHI] `Hanami::View::Rendering::TemplateName`: Fix frozen string literal error
8
+ ### Changed
9
+ - [Luca Guidi] Drop support for Ruby: MRI 2.3, 2.4, 2.5, 2.6, and 2.7.
11
10
 
12
- ## v1.3.2 - 2019-09-27
13
- ### Fixed
14
- - [Luca Guidi] Ensure rendering scope to work with latest `tilt` changes (`2.0.10`)
15
- - [Luca Guidi] Ensure `Hanami::View::Rendering::LayoutScope#is_a?` to return consistent results
11
+ ## v2.0.0.alpha5 - 2022-01-12
12
+ ### Added
13
+ - [Marc Busqué] Automatically provide access to Hanami application routes helper as `routes` in default application view context (`Hanami::View::ApplicationContext`)
14
+
15
+ ## v2.0.0.alpha3 - 2021-11-09
16
+ ### Added
17
+ - [Pablo Vicente] Raise `LayoutNotFoundError` exception with friendlier, more specific error message when layouts cannot be found
18
+
19
+ ### Changed
20
+ - [Tim Riley] (Internal) Updated settings to use updated dry-configurable `setting` 0.13.0 API
21
+
22
+ ## v2.0.0.alpha2 - 2021-05-04
23
+ ### Changed
24
+ - [Tim Riley] Replaced entire gem with dry-view (now renamed to hanami-view). See [dry-view's documentation](https://dry-rb.org/gems/dry-view/) for its capabilities and [the dry-view changelog](CHANGELOG.dry-view.md) for its history.
16
25
 
17
26
  ## v1.3.1 - 2019-01-18
18
27
  ### Added
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2020 dry-rb team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.