tilt-handlebars 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/.editorconfig +12 -0
  3. data/.github/workflows/ci.yml +76 -0
  4. data/.github/workflows/publish.yml +58 -0
  5. data/.gitignore +14 -15
  6. data/.rspec +1 -0
  7. data/.rubocop.yml +189 -0
  8. data/Appraisals +9 -0
  9. data/CONTRIBUTING.md +75 -0
  10. data/Gemfile +3 -1
  11. data/LICENSE +22 -0
  12. data/README.md +34 -19
  13. data/RELEASE_NOTES.md +50 -8
  14. data/Rakefile +4 -8
  15. data/bin/audit +8 -0
  16. data/bin/build +8 -0
  17. data/bin/bundle +114 -0
  18. data/bin/bundler-audit +29 -0
  19. data/bin/console +15 -0
  20. data/bin/doc +7 -0
  21. data/bin/lint +8 -0
  22. data/bin/rake +29 -0
  23. data/bin/release +25 -0
  24. data/bin/rspec +29 -0
  25. data/bin/rubocop +29 -0
  26. data/bin/setup +13 -0
  27. data/bin/tag +25 -0
  28. data/bin/test +7 -0
  29. data/bin/version +24 -0
  30. data/gemfiles/tilt_1.gemfile +7 -0
  31. data/gemfiles/tilt_2.gemfile +7 -0
  32. data/lib/sinatra/handlebars.rb +10 -6
  33. data/lib/tilt/handlebars/version.rb +3 -1
  34. data/lib/tilt/handlebars.rb +57 -46
  35. data/lib/tilt-handlebars.rb +3 -0
  36. data/spec/fixtures/helpers.rb +21 -0
  37. data/spec/fixtures/views/hello.hbs +1 -0
  38. data/spec/fixtures/views/hello_missing.hbs +1 -0
  39. data/spec/fixtures/views/hello_partial.hbs +1 -0
  40. data/spec/fixtures/views/hello_partial2.hbs +1 -0
  41. data/spec/fixtures/views/partial.hbs +1 -0
  42. data/spec/fixtures/views/partial2.handlebars +1 -0
  43. data/spec/sinatra/handlebars_spec.rb +47 -0
  44. data/spec/spec_coverage.rb +19 -0
  45. data/spec/spec_helper.rb +23 -0
  46. data/spec/tilt/handlebars_template_spec.rb +543 -0
  47. data/spec/tilt_spec.rb +40 -0
  48. data/tasks/doc.rake +8 -0
  49. data/tasks/gem.rake +7 -0
  50. data/tasks/lint.rake +7 -0
  51. data/tasks/test.rake +10 -0
  52. data/tilt-handlebars.gemspec +48 -23
  53. metadata +261 -65
  54. data/.travis.yml +0 -6
  55. data/LICENSE.txt +0 -22
  56. data/test/fixtures/views/hello.hbs +0 -1
  57. data/test/fixtures/views/missing_partial.hbs +0 -1
  58. data/test/fixtures/views/partial.hbs +0 -1
  59. data/test/fixtures/views/partial2.handlebars +0 -1
  60. data/test/fixtures/views/partial_test.hbs +0 -1
  61. data/test/fixtures/views/partial_test2.handlebars +0 -1
  62. data/test/fixtures/views/two_partials.hbs +0 -1
  63. data/test/sinatra_test.rb +0 -38
  64. data/test/test_helper.rb +0 -9
  65. data/test/tilt_handlebarstemplate_test.rb +0 -276
@@ -1,31 +1,56 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1
+ # frozen_string_literal: true
4
2
 
5
- require 'tilt/handlebars/version'
3
+ require_relative "lib/tilt/handlebars/version"
6
4
 
7
5
  Gem::Specification.new do |spec|
8
- spec.name = "tilt-handlebars"
9
- spec.version = Tilt::Handlebars::VERSION
10
- spec.authors = ["Jim Cushing"]
11
- spec.email = ["jimothy@mac.com"]
12
- spec.description = "Use Handlebars.rb with Tilt"
13
- spec.summary = spec.description
14
- spec.homepage = "https://github.com/jimothyGator/tilt-handlebars"
15
- spec.license = "MIT"
16
-
17
- spec.files = `git ls-files`.split($/)
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
6
+ spec.name = "tilt-handlebars"
7
+ spec.version = Tilt::Handlebars::VERSION
8
+
9
+ spec.authors = ["Jim Cushing", "Zach Gianos"]
10
+ spec.email = ["jimothy@mac.com", "zach.gianos+git@gmail.com"]
11
+
12
+ spec.summary = "A Tilt interface for the official Handlebars.js"
13
+ spec.description = <<-DESCRIPTION
14
+ A Tilt interface for the official JavaScript implementation of the
15
+ Handlebars template engine.
16
+
17
+ Handlebars::Engine provides the API wrapper. MiniRacer provides the
18
+ JavaScript execution environment.
19
+ DESCRIPTION
20
+
21
+ spec.homepage = "https://github.com/gi/tilt-handlebars"
22
+ spec.license = "MIT"
23
+ spec.required_ruby_version = ">= 2.6.0"
24
+
25
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/RELEASE_NOTES.md"
26
+ spec.metadata["github_repo"] = spec.homepage
27
+ spec.metadata["homepage_uri"] = spec.homepage
28
+ spec.metadata["source_code_uri"] = spec.homepage
29
+
30
+ spec.files = `git ls-files -z`.split("\x0")
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
33
  spec.require_paths = ["lib"]
34
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
35
 
22
- spec.add_dependency "tilt", "~> 1.4"
23
- spec.add_dependency "handlebars", "~> 0.5"
36
+ spec.add_dependency "handlebars-engine"
37
+ spec.add_dependency "tilt", ">= 1.3"
24
38
 
25
- spec.add_development_dependency "bundler", "~> 1.3"
26
- spec.add_development_dependency "rake"
27
- spec.add_development_dependency "minitest", "~> 5.0"
28
- spec.add_development_dependency "sinatra"
29
- spec.add_development_dependency "rack-test"
39
+ spec.add_development_dependency "appraisal"
40
+ spec.add_development_dependency "bundler"
41
+ spec.add_development_dependency "bundler-audit"
30
42
  spec.add_development_dependency "coveralls"
43
+ spec.add_development_dependency "debug", ">= 1"
44
+ spec.add_development_dependency "rack-test", "~> 0.6"
45
+ spec.add_development_dependency "rake"
46
+ spec.add_development_dependency "rspec"
47
+ spec.add_development_dependency "rspec_junit_formatter"
48
+ spec.add_development_dependency "rubocop"
49
+ spec.add_development_dependency "rubocop-performance"
50
+ spec.add_development_dependency "rubocop-rake"
51
+ spec.add_development_dependency "rubocop-rspec"
52
+ spec.add_development_dependency "simplecov"
53
+ spec.add_development_dependency "simplecov-cobertura"
54
+ spec.add_development_dependency "sinatra", "~> 1.4"
55
+ spec.add_development_dependency "yard"
31
56
  end
metadata CHANGED
@@ -1,187 +1,383 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tilt-handlebars
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Cushing
8
+ - Zach Gianos
8
9
  autorequire:
9
- bindir: bin
10
+ bindir: exe
10
11
  cert_chain: []
11
- date: 2013-09-30 00:00:00.000000000 Z
12
+ date: 2022-02-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: tilt
15
+ name: handlebars-engine
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ~>
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: '1.4'
20
+ version: '0'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - ~>
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: '1.4'
27
+ version: '0'
27
28
  - !ruby/object:Gem::Dependency
28
- name: handlebars
29
+ name: tilt
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ~>
32
+ - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: '0.5'
34
+ version: '1.3'
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - ~>
39
+ - - ">="
39
40
  - !ruby/object:Gem::Version
40
- version: '0.5'
41
+ version: '1.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: appraisal
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
41
56
  - !ruby/object:Gem::Dependency
42
57
  name: bundler
43
58
  requirement: !ruby/object:Gem::Requirement
44
59
  requirements:
45
- - - ~>
60
+ - - ">="
46
61
  - !ruby/object:Gem::Version
47
- version: '1.3'
62
+ version: '0'
48
63
  type: :development
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
- - - ~>
67
+ - - ">="
53
68
  - !ruby/object:Gem::Version
54
- version: '1.3'
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: bundler-audit
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: coveralls
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: debug
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '1'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '1'
112
+ - !ruby/object:Gem::Dependency
113
+ name: rack-test
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '0.6'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '0.6'
55
126
  - !ruby/object:Gem::Dependency
56
127
  name: rake
57
128
  requirement: !ruby/object:Gem::Requirement
58
129
  requirements:
59
- - - '>='
130
+ - - ">="
60
131
  - !ruby/object:Gem::Version
61
132
  version: '0'
62
133
  type: :development
63
134
  prerelease: false
64
135
  version_requirements: !ruby/object:Gem::Requirement
65
136
  requirements:
66
- - - '>='
137
+ - - ">="
67
138
  - !ruby/object:Gem::Version
68
139
  version: '0'
69
140
  - !ruby/object:Gem::Dependency
70
- name: minitest
141
+ name: rspec
71
142
  requirement: !ruby/object:Gem::Requirement
72
143
  requirements:
73
- - - ~>
144
+ - - ">="
74
145
  - !ruby/object:Gem::Version
75
- version: '5.0'
146
+ version: '0'
76
147
  type: :development
77
148
  prerelease: false
78
149
  version_requirements: !ruby/object:Gem::Requirement
79
150
  requirements:
80
- - - ~>
151
+ - - ">="
81
152
  - !ruby/object:Gem::Version
82
- version: '5.0'
153
+ version: '0'
83
154
  - !ruby/object:Gem::Dependency
84
- name: sinatra
155
+ name: rspec_junit_formatter
85
156
  requirement: !ruby/object:Gem::Requirement
86
157
  requirements:
87
- - - '>='
158
+ - - ">="
88
159
  - !ruby/object:Gem::Version
89
160
  version: '0'
90
161
  type: :development
91
162
  prerelease: false
92
163
  version_requirements: !ruby/object:Gem::Requirement
93
164
  requirements:
94
- - - '>='
165
+ - - ">="
95
166
  - !ruby/object:Gem::Version
96
167
  version: '0'
97
168
  - !ruby/object:Gem::Dependency
98
- name: rack-test
169
+ name: rubocop
99
170
  requirement: !ruby/object:Gem::Requirement
100
171
  requirements:
101
- - - '>='
172
+ - - ">="
102
173
  - !ruby/object:Gem::Version
103
174
  version: '0'
104
175
  type: :development
105
176
  prerelease: false
106
177
  version_requirements: !ruby/object:Gem::Requirement
107
178
  requirements:
108
- - - '>='
179
+ - - ">="
109
180
  - !ruby/object:Gem::Version
110
181
  version: '0'
111
182
  - !ruby/object:Gem::Dependency
112
- name: coveralls
183
+ name: rubocop-performance
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: rubocop-rake
113
198
  requirement: !ruby/object:Gem::Requirement
114
199
  requirements:
115
- - - '>='
200
+ - - ">="
116
201
  - !ruby/object:Gem::Version
117
202
  version: '0'
118
203
  type: :development
119
204
  prerelease: false
120
205
  version_requirements: !ruby/object:Gem::Requirement
121
206
  requirements:
122
- - - '>='
207
+ - - ">="
123
208
  - !ruby/object:Gem::Version
124
209
  version: '0'
125
- description: Use Handlebars.rb with Tilt
210
+ - !ruby/object:Gem::Dependency
211
+ name: rubocop-rspec
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ name: simplecov
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :development
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: simplecov-cobertura
240
+ requirement: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ type: :development
246
+ prerelease: false
247
+ version_requirements: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ - !ruby/object:Gem::Dependency
253
+ name: sinatra
254
+ requirement: !ruby/object:Gem::Requirement
255
+ requirements:
256
+ - - "~>"
257
+ - !ruby/object:Gem::Version
258
+ version: '1.4'
259
+ type: :development
260
+ prerelease: false
261
+ version_requirements: !ruby/object:Gem::Requirement
262
+ requirements:
263
+ - - "~>"
264
+ - !ruby/object:Gem::Version
265
+ version: '1.4'
266
+ - !ruby/object:Gem::Dependency
267
+ name: yard
268
+ requirement: !ruby/object:Gem::Requirement
269
+ requirements:
270
+ - - ">="
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
273
+ type: :development
274
+ prerelease: false
275
+ version_requirements: !ruby/object:Gem::Requirement
276
+ requirements:
277
+ - - ">="
278
+ - !ruby/object:Gem::Version
279
+ version: '0'
280
+ description: |2
281
+ A Tilt interface for the official JavaScript implementation of the
282
+ Handlebars template engine.
283
+
284
+ Handlebars::Engine provides the API wrapper. MiniRacer provides the
285
+ JavaScript execution environment.
126
286
  email:
127
287
  - jimothy@mac.com
288
+ - zach.gianos+git@gmail.com
128
289
  executables: []
129
290
  extensions: []
130
291
  extra_rdoc_files: []
131
292
  files:
132
- - .gitignore
133
- - .travis.yml
293
+ - ".editorconfig"
294
+ - ".github/workflows/ci.yml"
295
+ - ".github/workflows/publish.yml"
296
+ - ".gitignore"
297
+ - ".rspec"
298
+ - ".rubocop.yml"
299
+ - Appraisals
300
+ - CONTRIBUTING.md
134
301
  - Gemfile
135
- - LICENSE.txt
302
+ - LICENSE
136
303
  - README.md
137
304
  - RELEASE_NOTES.md
138
305
  - Rakefile
306
+ - bin/audit
307
+ - bin/build
308
+ - bin/bundle
309
+ - bin/bundler-audit
310
+ - bin/console
311
+ - bin/doc
312
+ - bin/lint
313
+ - bin/rake
314
+ - bin/release
315
+ - bin/rspec
316
+ - bin/rubocop
317
+ - bin/setup
318
+ - bin/tag
319
+ - bin/test
320
+ - bin/version
321
+ - gemfiles/tilt_1.gemfile
322
+ - gemfiles/tilt_2.gemfile
139
323
  - lib/sinatra/handlebars.rb
324
+ - lib/tilt-handlebars.rb
140
325
  - lib/tilt/handlebars.rb
141
326
  - lib/tilt/handlebars/version.rb
142
- - test/fixtures/views/hello.hbs
143
- - test/fixtures/views/missing_partial.hbs
144
- - test/fixtures/views/partial.hbs
145
- - test/fixtures/views/partial2.handlebars
146
- - test/fixtures/views/partial_test.hbs
147
- - test/fixtures/views/partial_test2.handlebars
148
- - test/fixtures/views/two_partials.hbs
149
- - test/sinatra_test.rb
150
- - test/test_helper.rb
151
- - test/tilt_handlebarstemplate_test.rb
327
+ - spec/fixtures/helpers.rb
328
+ - spec/fixtures/views/hello.hbs
329
+ - spec/fixtures/views/hello_missing.hbs
330
+ - spec/fixtures/views/hello_partial.hbs
331
+ - spec/fixtures/views/hello_partial2.hbs
332
+ - spec/fixtures/views/partial.hbs
333
+ - spec/fixtures/views/partial2.handlebars
334
+ - spec/sinatra/handlebars_spec.rb
335
+ - spec/spec_coverage.rb
336
+ - spec/spec_helper.rb
337
+ - spec/tilt/handlebars_template_spec.rb
338
+ - spec/tilt_spec.rb
339
+ - tasks/doc.rake
340
+ - tasks/gem.rake
341
+ - tasks/lint.rake
342
+ - tasks/test.rake
152
343
  - tilt-handlebars.gemspec
153
- homepage: https://github.com/jimothyGator/tilt-handlebars
344
+ homepage: https://github.com/gi/tilt-handlebars
154
345
  licenses:
155
346
  - MIT
156
- metadata: {}
347
+ metadata:
348
+ changelog_uri: https://github.com/gi/tilt-handlebars/RELEASE_NOTES.md
349
+ github_repo: https://github.com/gi/tilt-handlebars
350
+ homepage_uri: https://github.com/gi/tilt-handlebars
351
+ source_code_uri: https://github.com/gi/tilt-handlebars
157
352
  post_install_message:
158
353
  rdoc_options: []
159
354
  require_paths:
160
355
  - lib
161
356
  required_ruby_version: !ruby/object:Gem::Requirement
162
357
  requirements:
163
- - - '>='
358
+ - - ">="
164
359
  - !ruby/object:Gem::Version
165
- version: '0'
360
+ version: 2.6.0
166
361
  required_rubygems_version: !ruby/object:Gem::Requirement
167
362
  requirements:
168
- - - '>='
363
+ - - ">="
169
364
  - !ruby/object:Gem::Version
170
365
  version: '0'
171
366
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.1.5
367
+ rubygems_version: 3.3.3
174
368
  signing_key:
175
369
  specification_version: 4
176
- summary: Use Handlebars.rb with Tilt
370
+ summary: A Tilt interface for the official Handlebars.js
177
371
  test_files:
178
- - test/fixtures/views/hello.hbs
179
- - test/fixtures/views/missing_partial.hbs
180
- - test/fixtures/views/partial.hbs
181
- - test/fixtures/views/partial2.handlebars
182
- - test/fixtures/views/partial_test.hbs
183
- - test/fixtures/views/partial_test2.handlebars
184
- - test/fixtures/views/two_partials.hbs
185
- - test/sinatra_test.rb
186
- - test/test_helper.rb
187
- - test/tilt_handlebarstemplate_test.rb
372
+ - spec/fixtures/helpers.rb
373
+ - spec/fixtures/views/hello.hbs
374
+ - spec/fixtures/views/hello_missing.hbs
375
+ - spec/fixtures/views/hello_partial.hbs
376
+ - spec/fixtures/views/hello_partial2.hbs
377
+ - spec/fixtures/views/partial.hbs
378
+ - spec/fixtures/views/partial2.handlebars
379
+ - spec/sinatra/handlebars_spec.rb
380
+ - spec/spec_coverage.rb
381
+ - spec/spec_helper.rb
382
+ - spec/tilt/handlebars_template_spec.rb
383
+ - spec/tilt_spec.rb
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- # - "1.9.2"
4
- - "1.9.3"
5
- - "2.0.0"
6
- - rbx-19mode
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Jim Cushing
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- Hello, {{ name }}. I'm {{ emotion }} to meet you.
@@ -1 +0,0 @@
1
- Has anyone seen my partial? {{> no_partial }}
@@ -1 +0,0 @@
1
- It Came From the Partial Side by {{ author }}
@@ -1 +0,0 @@
1
- It Came From the Partial Side by {{ author }}
@@ -1 +0,0 @@
1
- My all time favorite book is {{> partial}}.
@@ -1 +0,0 @@
1
- My all time favorite book is {{> partial2}}.
@@ -1 +0,0 @@
1
- {{> partial}} may be a good book, but I'm waiting for the movie directed by {{> director}}.
data/test/sinatra_test.rb DELETED
@@ -1,38 +0,0 @@
1
- require 'test_helper'
2
-
3
- require 'rack/test'
4
- require 'sinatra/base'
5
- require 'sinatra/handlebars'
6
-
7
- class HandlebarsApp < Sinatra::Base
8
- set :root, File.dirname(__FILE__) + '/fixtures'
9
- helpers Sinatra::Handlebars
10
-
11
- get "/hello" do
12
- handlebars :hello, locals: {name: 'Joe', emotion: 'happy'}
13
- end
14
-
15
- get "/partials" do
16
- handlebars :partial_test, locals: {author: "Stephanie Queen"}
17
- end
18
- end
19
-
20
-
21
- describe "Using handlebars in Sinatra" do
22
- include Rack::Test::Methods
23
-
24
- def app
25
- HandlebarsApp
26
- end
27
-
28
- it "renders simple template" do
29
- response = get "/hello"
30
- response.body.strip.must_equal "Hello, Joe. I'm happy to meet you."
31
- end
32
-
33
- it "renders template with partials" do
34
- response = get "/partials"
35
- response.body.strip.must_equal "My all time favorite book is It Came From the Partial Side by Stephanie Queen."
36
- end
37
-
38
- end
data/test/test_helper.rb DELETED
@@ -1,9 +0,0 @@
1
- require 'bundler'
2
- Bundler.setup
3
-
4
- require 'coveralls'
5
- Coveralls.wear!
6
-
7
- require 'minitest/autorun'
8
- require 'minitest/spec'
9
-