lotus-view 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -15
  3. data/.travis.yml +6 -0
  4. data/.yardopts +3 -0
  5. data/Gemfile +13 -2
  6. data/README.md +514 -3
  7. data/Rakefile +17 -1
  8. data/lib/lotus/layout.rb +132 -0
  9. data/lib/lotus/presenter.rb +70 -0
  10. data/lib/lotus/view/dsl.rb +247 -0
  11. data/lib/lotus/view/inheritable.rb +50 -0
  12. data/lib/lotus/view/rendering/layout_finder.rb +104 -0
  13. data/lib/lotus/view/rendering/layout_registry.rb +63 -0
  14. data/lib/lotus/view/rendering/layout_scope.rb +138 -0
  15. data/lib/lotus/view/rendering/null_layout.rb +52 -0
  16. data/lib/lotus/view/rendering/null_template.rb +79 -0
  17. data/lib/lotus/view/rendering/partial.rb +29 -0
  18. data/lib/lotus/view/rendering/partial_finder.rb +41 -0
  19. data/lib/lotus/view/rendering/registry.rb +129 -0
  20. data/lib/lotus/view/rendering/scope.rb +48 -0
  21. data/lib/lotus/view/rendering/template.rb +56 -0
  22. data/lib/lotus/view/rendering/template_finder.rb +53 -0
  23. data/lib/lotus/view/rendering/templates_finder.rb +85 -0
  24. data/lib/lotus/view/rendering/view_finder.rb +37 -0
  25. data/lib/lotus/view/rendering.rb +265 -0
  26. data/lib/lotus/view/template.rb +45 -0
  27. data/lib/lotus/view/version.rb +4 -1
  28. data/lib/lotus/view.rb +180 -2
  29. data/lib/lotus-view.rb +1 -0
  30. data/lotus-view.gemspec +15 -11
  31. data/test/fixtures/templates/app/app_view.html.erb +0 -0
  32. data/test/fixtures/templates/app/view.html.erb +0 -0
  33. data/test/fixtures/templates/application.html.erb +10 -0
  34. data/test/fixtures/templates/articles/_form.html.erb +4 -0
  35. data/test/fixtures/templates/articles/alternative_new.html.erb +1 -0
  36. data/test/fixtures/templates/articles/index.atom.erb +5 -0
  37. data/test/fixtures/templates/articles/index.html.erb +3 -0
  38. data/test/fixtures/templates/articles/index.json.erb +9 -0
  39. data/test/fixtures/templates/articles/index.rss.erb +0 -0
  40. data/test/fixtures/templates/articles/new.html.erb +7 -0
  41. data/test/fixtures/templates/articles/show.html.erb +1 -0
  42. data/test/fixtures/templates/articles/show.json.erb +5 -0
  43. data/test/fixtures/templates/contacts/show.html.haml +1 -0
  44. data/test/fixtures/templates/dashboard/index.html.erb +2 -0
  45. data/test/fixtures/templates/hello_world_view.html.erb +1 -0
  46. data/test/fixtures/templates/index_view.html.erb +1 -0
  47. data/test/fixtures/templates/json_render_view.json.erb +3 -0
  48. data/test/fixtures/templates/render_view.html.erb +1 -0
  49. data/test/fixtures/templates/shared/_sidebar.html.erb +1 -0
  50. data/test/fixtures.rb +187 -0
  51. data/test/layout_test.rb +10 -0
  52. data/test/load_test.rb +79 -0
  53. data/test/presenter_test.rb +31 -0
  54. data/test/rendering_test.rb +125 -0
  55. data/test/root_test.rb +38 -0
  56. data/test/test_helper.rb +24 -0
  57. data/test/version_test.rb +7 -0
  58. data/test/view_test.rb +27 -0
  59. metadata +137 -10
metadata CHANGED
@@ -1,15 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lotus-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-01 00:00:00.000000000 Z
11
+ date: 2014-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tilt
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.0.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.0.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: lotus-utils
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.1'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.1'
13
47
  - !ruby/object:Gem::Dependency
14
48
  name: bundler
15
49
  requirement: !ruby/object:Gem::Requirement
@@ -24,20 +58,34 @@ dependencies:
24
58
  - - "~>"
25
59
  - !ruby/object:Gem::Version
26
60
  version: '1.5'
61
+ - !ruby/object:Gem::Dependency
62
+ name: minitest
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '5'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '5'
27
75
  - !ruby/object:Gem::Dependency
28
76
  name: rake
29
77
  requirement: !ruby/object:Gem::Requirement
30
78
  requirements:
31
- - - ">="
79
+ - - "~>"
32
80
  - !ruby/object:Gem::Version
33
- version: '0'
81
+ version: '10'
34
82
  type: :development
35
83
  prerelease: false
36
84
  version_requirements: !ruby/object:Gem::Requirement
37
85
  requirements:
38
- - - ">="
86
+ - - "~>"
39
87
  - !ruby/object:Gem::Version
40
- version: '0'
88
+ version: '10'
41
89
  description: View layer for Lotus
42
90
  email:
43
91
  - me@lucaguidi.com
@@ -46,14 +94,64 @@ extensions: []
46
94
  extra_rdoc_files: []
47
95
  files:
48
96
  - ".gitignore"
97
+ - ".travis.yml"
98
+ - ".yardopts"
49
99
  - Gemfile
50
100
  - LICENSE.txt
51
101
  - README.md
52
102
  - Rakefile
103
+ - lib/lotus-view.rb
104
+ - lib/lotus/layout.rb
105
+ - lib/lotus/presenter.rb
53
106
  - lib/lotus/view.rb
107
+ - lib/lotus/view/dsl.rb
108
+ - lib/lotus/view/inheritable.rb
109
+ - lib/lotus/view/rendering.rb
110
+ - lib/lotus/view/rendering/layout_finder.rb
111
+ - lib/lotus/view/rendering/layout_registry.rb
112
+ - lib/lotus/view/rendering/layout_scope.rb
113
+ - lib/lotus/view/rendering/null_layout.rb
114
+ - lib/lotus/view/rendering/null_template.rb
115
+ - lib/lotus/view/rendering/partial.rb
116
+ - lib/lotus/view/rendering/partial_finder.rb
117
+ - lib/lotus/view/rendering/registry.rb
118
+ - lib/lotus/view/rendering/scope.rb
119
+ - lib/lotus/view/rendering/template.rb
120
+ - lib/lotus/view/rendering/template_finder.rb
121
+ - lib/lotus/view/rendering/templates_finder.rb
122
+ - lib/lotus/view/rendering/view_finder.rb
123
+ - lib/lotus/view/template.rb
54
124
  - lib/lotus/view/version.rb
55
125
  - lotus-view.gemspec
56
- homepage: ''
126
+ - test/fixtures.rb
127
+ - test/fixtures/templates/app/app_view.html.erb
128
+ - test/fixtures/templates/app/view.html.erb
129
+ - test/fixtures/templates/application.html.erb
130
+ - test/fixtures/templates/articles/_form.html.erb
131
+ - test/fixtures/templates/articles/alternative_new.html.erb
132
+ - test/fixtures/templates/articles/index.atom.erb
133
+ - test/fixtures/templates/articles/index.html.erb
134
+ - test/fixtures/templates/articles/index.json.erb
135
+ - test/fixtures/templates/articles/index.rss.erb
136
+ - test/fixtures/templates/articles/new.html.erb
137
+ - test/fixtures/templates/articles/show.html.erb
138
+ - test/fixtures/templates/articles/show.json.erb
139
+ - test/fixtures/templates/contacts/show.html.haml
140
+ - test/fixtures/templates/dashboard/index.html.erb
141
+ - test/fixtures/templates/hello_world_view.html.erb
142
+ - test/fixtures/templates/index_view.html.erb
143
+ - test/fixtures/templates/json_render_view.json.erb
144
+ - test/fixtures/templates/render_view.html.erb
145
+ - test/fixtures/templates/shared/_sidebar.html.erb
146
+ - test/layout_test.rb
147
+ - test/load_test.rb
148
+ - test/presenter_test.rb
149
+ - test/rendering_test.rb
150
+ - test/root_test.rb
151
+ - test/test_helper.rb
152
+ - test/version_test.rb
153
+ - test/view_test.rb
154
+ homepage: http://lotusrb.org
57
155
  licenses:
58
156
  - MIT
59
157
  metadata: {}
@@ -73,8 +171,37 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
171
  version: '0'
74
172
  requirements: []
75
173
  rubyforge_project:
76
- rubygems_version: 2.2.0
174
+ rubygems_version: 2.2.2
77
175
  signing_key:
78
176
  specification_version: 4
79
- summary: View layer for Lotus
80
- test_files: []
177
+ summary: View layer for Lotus, with a separation between views and templates
178
+ test_files:
179
+ - test/fixtures.rb
180
+ - test/fixtures/templates/app/app_view.html.erb
181
+ - test/fixtures/templates/app/view.html.erb
182
+ - test/fixtures/templates/application.html.erb
183
+ - test/fixtures/templates/articles/_form.html.erb
184
+ - test/fixtures/templates/articles/alternative_new.html.erb
185
+ - test/fixtures/templates/articles/index.atom.erb
186
+ - test/fixtures/templates/articles/index.html.erb
187
+ - test/fixtures/templates/articles/index.json.erb
188
+ - test/fixtures/templates/articles/index.rss.erb
189
+ - test/fixtures/templates/articles/new.html.erb
190
+ - test/fixtures/templates/articles/show.html.erb
191
+ - test/fixtures/templates/articles/show.json.erb
192
+ - test/fixtures/templates/contacts/show.html.haml
193
+ - test/fixtures/templates/dashboard/index.html.erb
194
+ - test/fixtures/templates/hello_world_view.html.erb
195
+ - test/fixtures/templates/index_view.html.erb
196
+ - test/fixtures/templates/json_render_view.json.erb
197
+ - test/fixtures/templates/render_view.html.erb
198
+ - test/fixtures/templates/shared/_sidebar.html.erb
199
+ - test/layout_test.rb
200
+ - test/load_test.rb
201
+ - test/presenter_test.rb
202
+ - test/rendering_test.rb
203
+ - test/root_test.rb
204
+ - test/test_helper.rb
205
+ - test/version_test.rb
206
+ - test/view_test.rb
207
+ has_rdoc: