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.
- checksums.yaml +5 -5
- data/.editorconfig +12 -0
- data/.github/workflows/ci.yml +76 -0
- data/.github/workflows/publish.yml +58 -0
- data/.gitignore +14 -15
- data/.rspec +1 -0
- data/.rubocop.yml +189 -0
- data/Appraisals +9 -0
- data/CONTRIBUTING.md +75 -0
- data/Gemfile +3 -1
- data/LICENSE +22 -0
- data/README.md +34 -19
- data/RELEASE_NOTES.md +50 -8
- data/Rakefile +4 -8
- data/bin/audit +8 -0
- data/bin/build +8 -0
- data/bin/bundle +114 -0
- data/bin/bundler-audit +29 -0
- data/bin/console +15 -0
- data/bin/doc +7 -0
- data/bin/lint +8 -0
- data/bin/rake +29 -0
- data/bin/release +25 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/bin/setup +13 -0
- data/bin/tag +25 -0
- data/bin/test +7 -0
- data/bin/version +24 -0
- data/gemfiles/tilt_1.gemfile +7 -0
- data/gemfiles/tilt_2.gemfile +7 -0
- data/lib/sinatra/handlebars.rb +10 -6
- data/lib/tilt/handlebars/version.rb +3 -1
- data/lib/tilt/handlebars.rb +57 -46
- data/lib/tilt-handlebars.rb +3 -0
- data/spec/fixtures/helpers.rb +21 -0
- data/spec/fixtures/views/hello.hbs +1 -0
- data/spec/fixtures/views/hello_missing.hbs +1 -0
- data/spec/fixtures/views/hello_partial.hbs +1 -0
- data/spec/fixtures/views/hello_partial2.hbs +1 -0
- data/spec/fixtures/views/partial.hbs +1 -0
- data/spec/fixtures/views/partial2.handlebars +1 -0
- data/spec/sinatra/handlebars_spec.rb +47 -0
- data/spec/spec_coverage.rb +19 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/tilt/handlebars_template_spec.rb +543 -0
- data/spec/tilt_spec.rb +40 -0
- data/tasks/doc.rake +8 -0
- data/tasks/gem.rake +7 -0
- data/tasks/lint.rake +7 -0
- data/tasks/test.rake +10 -0
- data/tilt-handlebars.gemspec +48 -23
- metadata +261 -65
- data/.travis.yml +0 -6
- data/LICENSE.txt +0 -22
- data/test/fixtures/views/hello.hbs +0 -1
- data/test/fixtures/views/missing_partial.hbs +0 -1
- data/test/fixtures/views/partial.hbs +0 -1
- data/test/fixtures/views/partial2.handlebars +0 -1
- data/test/fixtures/views/partial_test.hbs +0 -1
- data/test/fixtures/views/partial_test2.handlebars +0 -1
- data/test/fixtures/views/two_partials.hbs +0 -1
- data/test/sinatra_test.rb +0 -38
- data/test/test_helper.rb +0 -9
- data/test/tilt_handlebarstemplate_test.rb +0 -276
data/tilt-handlebars.gemspec
CHANGED
@@ -1,31 +1,56 @@
|
|
1
|
-
#
|
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
|
-
|
3
|
+
require_relative "lib/tilt/handlebars/version"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
|
11
|
-
spec.
|
12
|
-
spec.
|
13
|
-
|
14
|
-
spec.
|
15
|
-
spec.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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 "
|
23
|
-
spec.add_dependency "
|
36
|
+
spec.add_dependency "handlebars-engine"
|
37
|
+
spec.add_dependency "tilt", ">= 1.3"
|
24
38
|
|
25
|
-
spec.add_development_dependency "
|
26
|
-
spec.add_development_dependency "
|
27
|
-
spec.add_development_dependency "
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Cushing
|
8
|
+
- Zach Gianos
|
8
9
|
autorequire:
|
9
|
-
bindir:
|
10
|
+
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
+
name: handlebars-engine
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- -
|
18
|
+
- - ">="
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
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: '
|
27
|
+
version: '0'
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
29
|
+
name: tilt
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
|
-
- -
|
32
|
+
- - ">="
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
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: '
|
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: '
|
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: '
|
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:
|
141
|
+
name: rspec
|
71
142
|
requirement: !ruby/object:Gem::Requirement
|
72
143
|
requirements:
|
73
|
-
- -
|
144
|
+
- - ">="
|
74
145
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
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: '
|
153
|
+
version: '0'
|
83
154
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
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:
|
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:
|
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
|
-
|
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
|
-
- .
|
133
|
-
- .
|
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
|
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
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
147
|
-
-
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
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/
|
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:
|
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
|
-
|
173
|
-
rubygems_version: 2.1.5
|
367
|
+
rubygems_version: 3.3.3
|
174
368
|
signing_key:
|
175
369
|
specification_version: 4
|
176
|
-
summary:
|
370
|
+
summary: A Tilt interface for the official Handlebars.js
|
177
371
|
test_files:
|
178
|
-
-
|
179
|
-
-
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
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
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
|