lotus-view 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +105 -0
  3. data/{LICENSE.txt → LICENSE.md} +0 -0
  4. data/README.md +117 -28
  5. data/lib/lotus/layout.rb +11 -4
  6. data/lib/lotus/view/configuration.rb +298 -0
  7. data/lib/lotus/view/dsl.rb +89 -10
  8. data/lib/lotus/view/inheritable.rb +4 -0
  9. data/lib/lotus/view/rendering/layout_finder.rb +31 -7
  10. data/lib/lotus/view/rendering/layout_scope.rb +2 -2
  11. data/lib/lotus/view/rendering/registry.rb +0 -1
  12. data/lib/lotus/view/rendering/scope.rb +2 -2
  13. data/lib/lotus/view/rendering/template_name.rb +37 -0
  14. data/lib/lotus/view/rendering/templates_finder.rb +36 -5
  15. data/lib/lotus/view/version.rb +1 -1
  16. data/lib/lotus/view.rb +196 -88
  17. data/lotus-view.gemspec +2 -2
  18. metadata +9 -67
  19. data/.gitignore +0 -8
  20. data/.travis.yml +0 -6
  21. data/.yardopts +0 -3
  22. data/Gemfile +0 -15
  23. data/Rakefile +0 -17
  24. data/test/fixtures/templates/app/app_view.html.erb +0 -0
  25. data/test/fixtures/templates/app/view.html.erb +0 -0
  26. data/test/fixtures/templates/application.html.erb +0 -10
  27. data/test/fixtures/templates/articles/_form.html.erb +0 -4
  28. data/test/fixtures/templates/articles/alternative_new.html.erb +0 -1
  29. data/test/fixtures/templates/articles/index.atom.erb +0 -5
  30. data/test/fixtures/templates/articles/index.html.erb +0 -3
  31. data/test/fixtures/templates/articles/index.json.erb +0 -9
  32. data/test/fixtures/templates/articles/index.rss.erb +0 -0
  33. data/test/fixtures/templates/articles/new.html.erb +0 -7
  34. data/test/fixtures/templates/articles/show.html.erb +0 -1
  35. data/test/fixtures/templates/articles/show.json.erb +0 -5
  36. data/test/fixtures/templates/contacts/show.html.haml +0 -1
  37. data/test/fixtures/templates/dashboard/index.html.erb +0 -2
  38. data/test/fixtures/templates/hello_world_view.html.erb +0 -1
  39. data/test/fixtures/templates/index_view.html.erb +0 -1
  40. data/test/fixtures/templates/json_render_view.json.erb +0 -3
  41. data/test/fixtures/templates/render_view.html.erb +0 -1
  42. data/test/fixtures/templates/shared/_sidebar.html.erb +0 -1
  43. data/test/fixtures.rb +0 -187
  44. data/test/layout_test.rb +0 -10
  45. data/test/load_test.rb +0 -79
  46. data/test/presenter_test.rb +0 -31
  47. data/test/rendering_test.rb +0 -125
  48. data/test/root_test.rb +0 -38
  49. data/test/test_helper.rb +0 -24
  50. data/test/version_test.rb +0 -7
  51. data/test/view_test.rb +0 -27
data/lib/lotus/view.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'set'
2
2
  require 'pathname'
3
+ require 'lotus/utils/class_attribute'
3
4
  require 'lotus/view/version'
5
+ require 'lotus/view/configuration'
4
6
  require 'lotus/view/inheritable'
5
7
  require 'lotus/view/rendering'
6
8
  require 'lotus/view/dsl'
@@ -41,145 +43,251 @@ module Lotus
41
43
  class MissingFormatError < ::StandardError
42
44
  end
43
45
 
44
- # Register a view
46
+ include Utils::ClassAttribute
47
+
48
+ # Framework configuration
45
49
  #
50
+ # @since 0.2.0
46
51
  # @api private
47
- # @since 0.1.0
52
+ class_attribute :configuration
53
+ self.configuration = Configuration.new
54
+
55
+ # Configure the framework.
56
+ # It yields the given block in the context of the configuration
57
+ #
58
+ # @param blk [Proc] the configuration block
59
+ #
60
+ # @since 0.2.0
61
+ #
62
+ # @see Lotus::View::Configuration
48
63
  #
49
64
  # @example
50
65
  # require 'lotus/view'
51
66
  #
52
- # class IndexView
53
- # include Lotus::View
67
+ # Lotus::View.configure do
68
+ # root '/path/to/root'
54
69
  # end
55
- def self.included(base)
56
- base.class_eval do
57
- extend Inheritable.dup
58
- extend Dsl.dup
59
- extend Rendering.dup
60
- end
61
-
62
- views.add(base)
70
+ def self.configure(&blk)
71
+ configuration.instance_eval(&blk)
63
72
  end
64
73
 
65
- # Set the directory root where templates are located
74
+ # Duplicate Lotus::View in order to create a new separated instance
75
+ # of the framework.
66
76
  #
67
- # @param root [String] the root path
77
+ # The new instance of the framework will be completely decoupled from the
78
+ # original. It will inherit the configuration, but all the changes that
79
+ # happen after the duplication, won't be reflected on the other copies.
68
80
  #
69
- # @see Lotus::View.root
81
+ # @return [Module] a copy of Lotus::View
70
82
  #
71
- # @since 0.1.0
83
+ # @since 0.2.0
84
+ # @api private
72
85
  #
73
- # @example
86
+ # @example Basic usage
74
87
  # require 'lotus/view'
75
88
  #
76
- # Lotus::View.root = '/path/to/templates'
77
- def self.root=(root)
78
- @root = Pathname.new(root) rescue nil
79
- end
80
-
81
- # Returns the directory root where templates are located.
82
- # If not already set, it returns the current directory.
83
- #
84
- # @return [Pathname] the root path for templates
89
+ # module MyApp
90
+ # View = Lotus::View.dupe
91
+ # end
85
92
  #
86
- # @see Lotus::View.root=
93
+ # MyApp::View == Lotus::View # => false
87
94
  #
88
- # @since 0.1.0
95
+ # MyApp::View.configuration ==
96
+ # Lotus::View.configuration # => false
89
97
  #
90
- # @example with already set value
98
+ # @example Inheriting configuration
91
99
  # require 'lotus/view'
92
100
  #
93
- # Lotus::View.root = '/path/to/templates'
94
- # Lotus::View.root # => #<Pathname:/path/to/templates>
101
+ # Lotus::View.configure do
102
+ # root '/path/to/root'
103
+ # end
95
104
  #
96
- # @example with missing set value
97
- # require 'lotus/view'
105
+ # module MyApp
106
+ # View = Lotus::View.dupe
107
+ # end
108
+ #
109
+ # module MyApi
110
+ # View = Lotus::View.dupe
111
+ # View.configure do
112
+ # root '/another/root'
113
+ # end
114
+ # end
98
115
  #
99
- # Lotus::View.root # => #<Pathname:.>
100
- def self.root
101
- @root ||= begin
102
- self.root = '.'
103
- @root
116
+ # Lotus::View.configuration.root # => #<Pathname:/path/to/root>
117
+ # MyApp::View.configuration.root # => #<Pathname:/path/to/root>
118
+ # MyApi::View.configuration.root # => #<Pathname:/another/root>
119
+ def self.dupe
120
+ dup.tap do |duplicated|
121
+ duplicated.configuration = configuration.duplicate
104
122
  end
105
123
  end
106
124
 
107
- # Sets the default layout for all the registered views.
125
+ # Duplicate the framework and generate modules for the target application
108
126
  #
109
- # @param layout [Symbol] the layout name
127
+ # @param mod [Module] the Ruby namespace of the application
128
+ # @param views [String] the optional namespace where the application's
129
+ # views will live
130
+ # @param blk [Proc] an optional block to configure the framework
110
131
  #
111
- # @since 0.1.0
132
+ # @return [Module] a copy of Lotus::View
112
133
  #
113
- # @see Lotus::View::Dsl#layout
114
- # @see Lotus::View.load!
134
+ # @since 0.2.0
115
135
  #
116
- # @example
136
+ # @see Lotus::View#dupe
137
+ # @see Lotus::View::Configuration
138
+ # @see Lotus::View::Configuration#namespace
139
+ #
140
+ # @example Basic usage
117
141
  # require 'lotus/view'
118
142
  #
119
- # Lotus::View.layout = :application
143
+ # module MyApp
144
+ # View = Lotus::View.duplicate(self)
145
+ # end
120
146
  #
121
- # class IndexView
122
- # include Lotus::View
147
+ # # It will:
148
+ # #
149
+ # # 1. Generate MyApp::View
150
+ # # 2. Generate MyApp::Layout
151
+ # # 3. Generate MyApp::Views
152
+ # # 4. Configure MyApp::Views as the default namespace for views
153
+ #
154
+ # module MyApp::Views::Dashboard
155
+ # class Index
156
+ # include MyApp::View
157
+ # end
158
+ # end
159
+ #
160
+ # @example Compare code
161
+ # require 'lotus/view'
162
+ #
163
+ # module MyApp
164
+ # View = Lotus::View.duplicate(self) do
165
+ # # ...
166
+ # end
123
167
  # end
124
168
  #
125
- # Lotus::View.load!
126
- # IndexView.layout # => ApplicationLayout
127
- def self.layout=(layout)
128
- @layout = Rendering::LayoutFinder.find(layout)
129
- end
130
-
131
- # Returns the default layout to assign to the registered views.
132
- # If not already set, it returns a <tt>Rendering::NullLayout</tt>.
169
+ # # it's equivalent to:
133
170
  #
134
- # @return [Class,Rendering::NullLayout] depends if already set or not.
171
+ # module MyApp
172
+ # View = Lotus::View.dupe
173
+ # Layout = Lotus::Layout.dup
135
174
  #
136
- # @since 0.1.0
175
+ # module Views
176
+ # end
137
177
  #
138
- # @see Lotus::View.layout=
139
- def self.layout
140
- @layout ||= Rendering::NullLayout
141
- end
142
-
143
- # A set of registered views.
178
+ # View.configure do
179
+ # namespace 'MyApp::Views'
180
+ # end
144
181
  #
145
- # @return [Set] all the registered views.
182
+ # View.configure do
183
+ # # ...
184
+ # end
185
+ # end
146
186
  #
147
- # @api private
148
- # @since 0.1.0
149
- def self.views
150
- @views ||= Set.new
187
+ # @example Custom views module
188
+ # require 'lotus/view
189
+ #
190
+ # module MyApp
191
+ # View = Lotus::View.duplicate(self, 'Vs')
192
+ # end
193
+ #
194
+ # defined?(MyApp::Views) # => nil
195
+ # defined?(MyApp::Vs) # => "constant"
196
+ #
197
+ # # Developers can namespace views under Vs
198
+ # module MyApp::Vs::Dashboard
199
+ # # ...
200
+ # end
201
+ #
202
+ # @example Nil views module
203
+ # require 'lotus/view'
204
+ #
205
+ # module MyApp
206
+ # View = Lotus::View.duplicate(self, nil)
207
+ # end
208
+ #
209
+ # defined?(MyApp::Views) # => nil
210
+ #
211
+ # # Developers can namespace views under MyApp
212
+ # module MyApp
213
+ # # ...
214
+ # end
215
+ #
216
+ # @example Block usage
217
+ # require 'lotus/view'
218
+ #
219
+ # module MyApp
220
+ # View = Lotus::View.duplicate(self) do
221
+ # root '/path/to/root'
222
+ # end
223
+ # end
224
+ #
225
+ # Lotus::View.configuration.root # => #<Pathname:.>
226
+ # MyApp::View.configuration.root # => #<Pathname:/path/to/root>
227
+ def self.duplicate(mod, views = 'Views', &blk)
228
+ dupe.tap do |duplicated|
229
+ mod.module_eval %{ module #{ views }; end } if views
230
+ mod.module_eval %{ Layout = Lotus::Layout.dup }
231
+
232
+ duplicated.configure do
233
+ namespace [mod, views].compact.join '::'
234
+ end
235
+
236
+ duplicated.configure(&blk) if block_given?
237
+ end
151
238
  end
152
239
 
153
- # A set of registered layouts.
240
+ # Override Ruby's hook for modules.
241
+ # It includes basic Lotus::View modules to the given Class.
242
+ # It sets a copy of the framework configuration
154
243
  #
155
- # @return [Set] all the registered layout.
244
+ # @param base [Class] the target view
156
245
  #
157
- # @api private
158
246
  # @since 0.1.0
159
- def self.layouts
160
- @layouts ||= Set.new
161
- end
247
+ # @api private
248
+ #
249
+ # @see http://www.ruby-doc.org/core-2.1.2/Module.html#method-i-included
250
+ #
251
+ # @see Lotus::View::Dsl
252
+ # @see Lotus::View::Inheritable
253
+ # @see Lotus::View::Rendering
254
+ #
255
+ # @example
256
+ # require 'lotus/view'
257
+ #
258
+ # class IndexView
259
+ # include Lotus::View
260
+ # end
261
+ def self.included(base)
262
+ conf = self.configuration
263
+ conf.add_view(base)
162
264
 
163
- #FIXME extract a Loader class
164
- def self.load!
165
- root.freeze
166
- layout.freeze
167
- views.freeze
265
+ base.class_eval do
266
+ extend Inheritable.dup
267
+ extend Dsl.dup
268
+ extend Rendering.dup
168
269
 
169
- views.each do |view|
170
- view.send(:load!)
171
- end
270
+ include Utils::ClassAttribute
271
+ class_attribute :configuration
172
272
 
173
- layouts.each do |layout|
174
- layout.send(:load!)
273
+ self.configuration = conf.duplicate
175
274
  end
176
275
  end
177
276
 
277
+ # Load the framework
278
+ #
279
+ # @since 0.1.0
280
+ # @api private
281
+ def self.load!
282
+ configuration.load!
283
+ end
284
+
285
+ # Unload the framework
286
+ #
287
+ # @since 0.1.0
288
+ # @api private
178
289
  def self.unload!
179
- instance_variable_set(:@root, nil)
180
- instance_variable_set(:@layout, nil)
181
- instance_variable_set(:@views, Set.new)
182
- instance_variable_set(:@layouts, Set.new)
290
+ configuration.unload!
183
291
  end
184
292
  end
185
293
  end
data/lotus-view.gemspec CHANGED
@@ -13,13 +13,13 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'http://lotusrb.org'
14
14
  spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files`.split($/)
16
+ spec.files = `git ls-files -- lib/* CHANGELOG.md LICENSE.md README.md lotus-view.gemspec`.split($/)
17
17
  spec.executables = []
18
18
  spec.test_files = spec.files.grep(%r{^(test)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency 'tilt', '~> 2.0', '>= 2.0.1'
22
- spec.add_runtime_dependency 'lotus-utils', '~> 0.1'
22
+ spec.add_runtime_dependency 'lotus-utils', '~> 0.2'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.5'
25
25
  spec.add_development_dependency 'minitest', '~> 5'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lotus-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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-03-23 00:00:00.000000000 Z
11
+ date: 2014-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.1'
39
+ version: '0.2'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.1'
46
+ version: '0.2'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -93,17 +93,14 @@ executables: []
93
93
  extensions: []
94
94
  extra_rdoc_files: []
95
95
  files:
96
- - ".gitignore"
97
- - ".travis.yml"
98
- - ".yardopts"
99
- - Gemfile
100
- - LICENSE.txt
96
+ - CHANGELOG.md
97
+ - LICENSE.md
101
98
  - README.md
102
- - Rakefile
103
99
  - lib/lotus-view.rb
104
100
  - lib/lotus/layout.rb
105
101
  - lib/lotus/presenter.rb
106
102
  - lib/lotus/view.rb
103
+ - lib/lotus/view/configuration.rb
107
104
  - lib/lotus/view/dsl.rb
108
105
  - lib/lotus/view/inheritable.rb
109
106
  - lib/lotus/view/rendering.rb
@@ -118,39 +115,12 @@ files:
118
115
  - lib/lotus/view/rendering/scope.rb
119
116
  - lib/lotus/view/rendering/template.rb
120
117
  - lib/lotus/view/rendering/template_finder.rb
118
+ - lib/lotus/view/rendering/template_name.rb
121
119
  - lib/lotus/view/rendering/templates_finder.rb
122
120
  - lib/lotus/view/rendering/view_finder.rb
123
121
  - lib/lotus/view/template.rb
124
122
  - lib/lotus/view/version.rb
125
123
  - lotus-view.gemspec
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
124
  homepage: http://lotusrb.org
155
125
  licenses:
156
126
  - MIT
@@ -175,33 +145,5 @@ rubygems_version: 2.2.2
175
145
  signing_key:
176
146
  specification_version: 4
177
147
  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
148
+ test_files: []
207
149
  has_rdoc:
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- .devnotes
2
- .greenbar
3
- Gemfile.lock
4
- coverage/
5
- .yardoc/
6
- doc/
7
- *.gem
8
- .bundle
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- script: 'bundle exec rake test:coverage'
3
- rvm:
4
- - 2.0.0
5
- - 2.1.0
6
- - 2.1.1
data/.yardopts DELETED
@@ -1,3 +0,0 @@
1
- -
2
- LICENSE.txt
3
- lib/**/*.rb
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- if !ENV['TRAVIS']
4
- gem 'byebug', require: false, platforms: :ruby if RUBY_VERSION == '2.1.1'
5
- gem 'yard', require: false
6
- gem 'lotus-utils', require: false, path: '../lotus-utils'
7
- else
8
- gem 'lotus-utils'
9
- end
10
-
11
- gem 'rake'
12
- gem 'tilt', '~> 2.0.1', '>= 2.0.1'
13
- gem 'haml', require: false
14
- gem 'simplecov', require: false
15
- gem 'coveralls', require: false
data/Rakefile DELETED
@@ -1,17 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'bundler/gem_tasks'
4
-
5
- Rake::TestTask.new do |t|
6
- t.pattern = 'test/**/*_test.rb'
7
- t.libs.push 'test'
8
- end
9
-
10
- namespace :test do
11
- task :coverage do
12
- ENV['COVERAGE'] = 'true'
13
- Rake::Task['test'].invoke
14
- end
15
- end
16
-
17
- task default: :test
File without changes
File without changes
@@ -1,10 +0,0 @@
1
- <html>
2
- <head>
3
- <title><%= title %></title>
4
- </head>
5
-
6
- <body>
7
- <%= render partial: 'shared/sidebar' %>
8
- <%= yield %>
9
- </body>
10
- </html>
@@ -1,4 +0,0 @@
1
- <form>
2
- <input type="hidden" name="secret" value="<%= secret %>" />
3
- <input type="text" name="article[title]" value="<%= article.title %>" />
4
- </form>
@@ -1 +0,0 @@
1
- <%= render template: 'articles/new', locals: { errors: {} } %>
@@ -1,5 +0,0 @@
1
- <entry>
2
- <% articles.each do |article| %>
3
- <title><%= article.title %></title>
4
- <% end %>
5
- <entry>
@@ -1,3 +0,0 @@
1
- <% articles.each do |article| %>
2
- <h1><%= article.title %></h1>
3
- <% end %>
@@ -1,9 +0,0 @@
1
- {
2
- "articles": [
3
- <% articles.each do |article| %>
4
- "article":{
5
- "title":"<%= article.title %>"
6
- }
7
- <% end %>
8
- ]
9
- }
File without changes
@@ -1,7 +0,0 @@
1
- <h1>New Article</h1>
2
-
3
- <% if errors.any? %>
4
- <h2>Errors</h2>
5
- <% end %>
6
-
7
- <%= render partial: 'articles/form', locals: { secret: 23 } %>
@@ -1 +0,0 @@
1
- <h1><%= title %></h1>
@@ -1,5 +0,0 @@
1
- {
2
- article: {
3
- "title":"<%= title %>"
4
- }
5
- }
@@ -1 +0,0 @@
1
- %h1= person.name
@@ -1,2 +0,0 @@
1
- <h1>Map</h1>
2
- <h2><%= map.count %> locations</h2>
@@ -1 +0,0 @@
1
- <h1>Hello, World!</h1>
@@ -1 +0,0 @@
1
- <h1>Welcome</h1>
@@ -1,3 +0,0 @@
1
- {
2
- "greet":"Hello, <%= planet %>!"
3
- }
@@ -1 +0,0 @@
1
- <h1>Hello, <%= planet %>!</h1>
@@ -1 +0,0 @@
1
- <div id="sidebar"></div>