trusty-festivity-extension 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/skins/traf/fn-instagram-bg.svg +1 -0
- data/app/assets/images/skins/traf/fn-twitter-bg.svg +1 -0
- data/app/assets/images/skins/traf/traf-background.png +0 -0
- data/app/assets/images/skins/traf/traf-bottom-wave.png +0 -0
- data/app/assets/images/skins/traf/traf-bridge.png +0 -0
- data/app/assets/images/skins/traf/traf-bubbles.png +0 -0
- data/app/assets/images/skins/traf/traf-logo.svg +1 -0
- data/app/assets/javascripts/modal.js +2 -2
- data/app/assets/stylesheets/grunticon/info.svg +1 -0
- data/app/assets/stylesheets/grunticon/production/icons.data.png.css +4 -0
- data/app/assets/stylesheets/grunticon/production/icons.data.svg.css +5 -0
- data/app/assets/stylesheets/grunticon/production/icons.fallback.css +5 -0
- data/app/assets/stylesheets/grunticon/production/png/info.png +0 -0
- data/app/assets/stylesheets/library/_icons.scss +8 -1
- data/app/assets/stylesheets/skins/traf/contexts/_featured_events.scss +72 -0
- data/app/assets/stylesheets/skins/traf/contexts/_homepage.scss +95 -0
- data/app/assets/stylesheets/skins/traf/contexts/_social_feed.scss +82 -0
- data/app/assets/stylesheets/skins/traf/library/_general-mixins.scss +1 -0
- data/app/assets/stylesheets/skins/traf/skin.scss +2 -2
- data/app/assets/stylesheets/traf.scss +3 -0
- data/app/models/festivity_event_list.rb +4 -1
- data/app/presenters/social/twitter_post_presenter.rb +32 -0
- data/app/services/twitter_feed_service.rb +16 -0
- data/app/views/festivity_events/show.html.haml +2 -4
- data/app/views/festivity_markets/_market.html.haml +1 -3
- data/app/views/social/_instagram_posts.html.haml +0 -4
- data/app/views/social/_twitter_posts.html.haml +16 -0
- data/lib/tags/header_tags.rb +3 -2
- data/lib/tags/social_feed_tags.rb +13 -0
- data/lib/trusty-festivity-extension.rb +1 -1
- metadata +17 -73
- data/node_modules/bower/node_modules/handlebars/coverage/coverage.json +0 -1
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars.js.html +0 -436
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars.runtime.js.html +0 -424
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/base.js.html +0 -1012
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/ast.js.html +0 -961
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/base.js.html +0 -382
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/compiler.js.html +0 -1675
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/helpers.js.html +0 -880
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/index.html +0 -441
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/javascript-compiler.js.html +0 -3211
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/parser.js.html +0 -1819
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/printer.js.html +0 -742
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/compiler/visitor.js.html +0 -355
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/exception.js.html +0 -403
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/index.html +0 -402
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/runtime.js.html +0 -898
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/safe-string.js.html +0 -352
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/handlebars/utils.js.html +0 -583
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/dist/cjs/index.html +0 -363
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/index.html +0 -389
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/lib/index.html +0 -363
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/lib/index.js.html +0 -400
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/lib/precompiler.js.html +0 -754
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/prettify.css +0 -1
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/prettify.js +0 -1
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/ast.js.html +0 -1594
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/basic.js.html +0 -973
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/blocks.js.html +0 -676
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/builtins.js.html +0 -1018
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/data.js.html +0 -1093
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/env/browser.js.html +0 -406
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/env/common.js.html +0 -481
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/env/index.html +0 -402
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/env/node.js.html +0 -391
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/env/runner.js.html +0 -457
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/env/runtime.js.html +0 -466
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/helpers.js.html +0 -2182
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/index.html +0 -597
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/javascript-compiler.js.html +0 -535
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/parser.js.html +0 -892
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/partials.js.html +0 -841
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/precompiler.js.html +0 -442
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/regressions.js.html +0 -790
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/require.js.html +0 -391
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/runtime.js.html +0 -337
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/spec.js.html +0 -469
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/string-params.js.html +0 -850
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/subexpressions.js.html +0 -970
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/tokenizer.js.html +0 -1528
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/track-ids.js.html +0 -811
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/utils.js.html +0 -499
- data/node_modules/bower/node_modules/handlebars/coverage/lcov-report/spec/whitespace-control.js.html +0 -508
- data/node_modules/bower/node_modules/handlebars/coverage/lcov.info +0 -3181
- data/node_modules/bower/node_modules/semver/semver.browser.js.gz +0 -0
- data/node_modules/bower/node_modules/semver/semver.min.js.gz +0 -0
- data/node_modules/bower/node_modules/tmp/README.md +0 -162
- data/node_modules/bower/node_modules/tmp/domain-test.js +0 -13
- data/node_modules/bower/node_modules/tmp/lib/tmp.js +0 -307
- data/node_modules/bower/node_modules/tmp/package.json +0 -50
- data/node_modules/bower/node_modules/tmp/test-all.sh +0 -9
- data/node_modules/bower/node_modules/tmp/test.js +0 -6
- data/node_modules/bower/node_modules/tmp/test/base.js +0 -74
- data/node_modules/bower/node_modules/tmp/test/dir-test.js +0 -196
- data/node_modules/bower/node_modules/tmp/test/file-test.js +0 -177
- data/node_modules/bower/node_modules/tmp/test/graceful.js +0 -15
- data/node_modules/bower/node_modules/tmp/test/keep.js +0 -11
- data/node_modules/bower/node_modules/tmp/test/name-test.js +0 -82
- data/node_modules/bower/node_modules/tmp/test/spawn.js +0 -32
- data/node_modules/bower/node_modules/tmp/test/symlinkme/file.js +0 -0
- data/node_modules/bower/node_modules/tmp/test/unsafe.js +0 -30
- data/node_modules/bower/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/got/node_modules/nested-error-stacks/README.md~ +0 -0
@@ -1,1093 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<title>Code coverage report for spec/data.js</title>
|
5
|
-
<meta charset="utf-8">
|
6
|
-
|
7
|
-
<link rel="stylesheet" href="../prettify.css">
|
8
|
-
|
9
|
-
<style>
|
10
|
-
body, html {
|
11
|
-
margin:0; padding: 0;
|
12
|
-
}
|
13
|
-
body {
|
14
|
-
font-family: Helvetica Neue, Helvetica,Arial;
|
15
|
-
font-size: 10pt;
|
16
|
-
}
|
17
|
-
div.header, div.footer {
|
18
|
-
background: #eee;
|
19
|
-
padding: 1em;
|
20
|
-
}
|
21
|
-
div.header {
|
22
|
-
z-index: 100;
|
23
|
-
position: fixed;
|
24
|
-
top: 0;
|
25
|
-
border-bottom: 1px solid #666;
|
26
|
-
width: 100%;
|
27
|
-
}
|
28
|
-
div.footer {
|
29
|
-
border-top: 1px solid #666;
|
30
|
-
}
|
31
|
-
div.body {
|
32
|
-
margin-top: 10em;
|
33
|
-
}
|
34
|
-
div.meta {
|
35
|
-
font-size: 90%;
|
36
|
-
text-align: center;
|
37
|
-
}
|
38
|
-
h1, h2, h3 {
|
39
|
-
font-weight: normal;
|
40
|
-
}
|
41
|
-
h1 {
|
42
|
-
font-size: 12pt;
|
43
|
-
}
|
44
|
-
h2 {
|
45
|
-
font-size: 10pt;
|
46
|
-
}
|
47
|
-
pre {
|
48
|
-
font-family: Consolas, Menlo, Monaco, monospace;
|
49
|
-
margin: 0;
|
50
|
-
padding: 0;
|
51
|
-
line-height: 14px;
|
52
|
-
font-size: 14px;
|
53
|
-
-moz-tab-size: 2;
|
54
|
-
-o-tab-size: 2;
|
55
|
-
tab-size: 2;
|
56
|
-
}
|
57
|
-
|
58
|
-
div.path { font-size: 110%; }
|
59
|
-
div.path a:link, div.path a:visited { color: #000; }
|
60
|
-
table.coverage { border-collapse: collapse; margin:0; padding: 0 }
|
61
|
-
|
62
|
-
table.coverage td {
|
63
|
-
margin: 0;
|
64
|
-
padding: 0;
|
65
|
-
color: #111;
|
66
|
-
vertical-align: top;
|
67
|
-
}
|
68
|
-
table.coverage td.line-count {
|
69
|
-
width: 50px;
|
70
|
-
text-align: right;
|
71
|
-
padding-right: 5px;
|
72
|
-
}
|
73
|
-
table.coverage td.line-coverage {
|
74
|
-
color: #777 !important;
|
75
|
-
text-align: right;
|
76
|
-
border-left: 1px solid #666;
|
77
|
-
border-right: 1px solid #666;
|
78
|
-
}
|
79
|
-
|
80
|
-
table.coverage td.text {
|
81
|
-
}
|
82
|
-
|
83
|
-
table.coverage td span.cline-any {
|
84
|
-
display: inline-block;
|
85
|
-
padding: 0 5px;
|
86
|
-
width: 40px;
|
87
|
-
}
|
88
|
-
table.coverage td span.cline-neutral {
|
89
|
-
background: #eee;
|
90
|
-
}
|
91
|
-
table.coverage td span.cline-yes {
|
92
|
-
background: #b5d592;
|
93
|
-
color: #999;
|
94
|
-
}
|
95
|
-
table.coverage td span.cline-no {
|
96
|
-
background: #fc8c84;
|
97
|
-
}
|
98
|
-
|
99
|
-
.cstat-yes { color: #111; }
|
100
|
-
.cstat-no { background: #fc8c84; color: #111; }
|
101
|
-
.fstat-no { background: #ffc520; color: #111 !important; }
|
102
|
-
.cbranch-no { background: yellow !important; color: #111; }
|
103
|
-
|
104
|
-
.cstat-skip { background: #ddd; color: #111; }
|
105
|
-
.fstat-skip { background: #ddd; color: #111 !important; }
|
106
|
-
.cbranch-skip { background: #ddd !important; color: #111; }
|
107
|
-
|
108
|
-
.missing-if-branch {
|
109
|
-
display: inline-block;
|
110
|
-
margin-right: 10px;
|
111
|
-
position: relative;
|
112
|
-
padding: 0 4px;
|
113
|
-
background: black;
|
114
|
-
color: yellow;
|
115
|
-
}
|
116
|
-
|
117
|
-
.skip-if-branch {
|
118
|
-
display: none;
|
119
|
-
margin-right: 10px;
|
120
|
-
position: relative;
|
121
|
-
padding: 0 4px;
|
122
|
-
background: #ccc;
|
123
|
-
color: white;
|
124
|
-
}
|
125
|
-
|
126
|
-
.missing-if-branch .typ, .skip-if-branch .typ {
|
127
|
-
color: inherit !important;
|
128
|
-
}
|
129
|
-
|
130
|
-
.entity, .metric { font-weight: bold; }
|
131
|
-
.metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
|
132
|
-
.metric small { font-size: 80%; font-weight: normal; color: #666; }
|
133
|
-
|
134
|
-
div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
|
135
|
-
div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
|
136
|
-
div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
|
137
|
-
div.coverage-summary th.file { border-right: none !important; }
|
138
|
-
div.coverage-summary th.pic { border-left: none !important; text-align: right; }
|
139
|
-
div.coverage-summary th.pct { border-right: none !important; }
|
140
|
-
div.coverage-summary th.abs { border-left: none !important; text-align: right; }
|
141
|
-
div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
|
142
|
-
div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
|
143
|
-
div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
|
144
|
-
div.coverage-summary td.pic { min-width: 120px !important; }
|
145
|
-
div.coverage-summary a:link { text-decoration: none; color: #000; }
|
146
|
-
div.coverage-summary a:visited { text-decoration: none; color: #333; }
|
147
|
-
div.coverage-summary a:hover { text-decoration: underline; }
|
148
|
-
div.coverage-summary tfoot td { border-top: 1px solid #666; }
|
149
|
-
|
150
|
-
div.coverage-summary .yui3-datatable-sort-indicator, div.coverage-summary .dummy-sort-indicator {
|
151
|
-
height: 10px;
|
152
|
-
width: 7px;
|
153
|
-
display: inline-block;
|
154
|
-
margin-left: 0.5em;
|
155
|
-
}
|
156
|
-
div.coverage-summary .yui3-datatable-sort-indicator {
|
157
|
-
background: url("https://yui-s.yahooapis.com/3.6.0/build/datatable-sort/assets/skins/sam/sort-arrow-sprite.png") no-repeat scroll 0 0 transparent;
|
158
|
-
}
|
159
|
-
div.coverage-summary .yui3-datatable-sorted .yui3-datatable-sort-indicator {
|
160
|
-
background-position: 0 -20px;
|
161
|
-
}
|
162
|
-
div.coverage-summary .yui3-datatable-sorted-desc .yui3-datatable-sort-indicator {
|
163
|
-
background-position: 0 -10px;
|
164
|
-
}
|
165
|
-
|
166
|
-
.high { background: #b5d592 !important; }
|
167
|
-
.medium { background: #ffe87c !important; }
|
168
|
-
.low { background: #fc8c84 !important; }
|
169
|
-
|
170
|
-
span.cover-fill, span.cover-empty {
|
171
|
-
display:inline-block;
|
172
|
-
border:1px solid #444;
|
173
|
-
background: white;
|
174
|
-
height: 12px;
|
175
|
-
}
|
176
|
-
span.cover-fill {
|
177
|
-
background: #ccc;
|
178
|
-
border-right: 1px solid #444;
|
179
|
-
}
|
180
|
-
span.cover-empty {
|
181
|
-
background: white;
|
182
|
-
border-left: none;
|
183
|
-
}
|
184
|
-
span.cover-full {
|
185
|
-
border-right: none !important;
|
186
|
-
}
|
187
|
-
pre.prettyprint {
|
188
|
-
border: none !important;
|
189
|
-
padding: 0 !important;
|
190
|
-
margin: 0 !important;
|
191
|
-
}
|
192
|
-
.com { color: #999 !important; }
|
193
|
-
.ignore-none { color: #999; font-weight: normal; }
|
194
|
-
|
195
|
-
</style>
|
196
|
-
</head>
|
197
|
-
<body>
|
198
|
-
<div class="header low">
|
199
|
-
<h1>Code coverage report for <span class="entity">spec/data.js</span></h1>
|
200
|
-
<h2>
|
201
|
-
|
202
|
-
Statements: <span class="metric">17.6% <small>(22 / 125)</small></span>
|
203
|
-
|
204
|
-
|
205
|
-
Branches: <span class="metric">0% <small>(0 / 12)</small></span>
|
206
|
-
|
207
|
-
|
208
|
-
Functions: <span class="metric">6.98% <small>(3 / 43)</small></span>
|
209
|
-
|
210
|
-
|
211
|
-
Lines: <span class="metric">17.6% <small>(22 / 125)</small></span>
|
212
|
-
|
213
|
-
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
214
|
-
</h2>
|
215
|
-
<div class="path"><a href="../index.html">All files</a> » <a href="index.html">spec/</a> » data.js</div>
|
216
|
-
</div>
|
217
|
-
<div class="body">
|
218
|
-
<pre><table class="coverage">
|
219
|
-
<tr><td class="line-count">1
|
220
|
-
2
|
221
|
-
3
|
222
|
-
4
|
223
|
-
5
|
224
|
-
6
|
225
|
-
7
|
226
|
-
8
|
227
|
-
9
|
228
|
-
10
|
229
|
-
11
|
230
|
-
12
|
231
|
-
13
|
232
|
-
14
|
233
|
-
15
|
234
|
-
16
|
235
|
-
17
|
236
|
-
18
|
237
|
-
19
|
238
|
-
20
|
239
|
-
21
|
240
|
-
22
|
241
|
-
23
|
242
|
-
24
|
243
|
-
25
|
244
|
-
26
|
245
|
-
27
|
246
|
-
28
|
247
|
-
29
|
248
|
-
30
|
249
|
-
31
|
250
|
-
32
|
251
|
-
33
|
252
|
-
34
|
253
|
-
35
|
254
|
-
36
|
255
|
-
37
|
256
|
-
38
|
257
|
-
39
|
258
|
-
40
|
259
|
-
41
|
260
|
-
42
|
261
|
-
43
|
262
|
-
44
|
263
|
-
45
|
264
|
-
46
|
265
|
-
47
|
266
|
-
48
|
267
|
-
49
|
268
|
-
50
|
269
|
-
51
|
270
|
-
52
|
271
|
-
53
|
272
|
-
54
|
273
|
-
55
|
274
|
-
56
|
275
|
-
57
|
276
|
-
58
|
277
|
-
59
|
278
|
-
60
|
279
|
-
61
|
280
|
-
62
|
281
|
-
63
|
282
|
-
64
|
283
|
-
65
|
284
|
-
66
|
285
|
-
67
|
286
|
-
68
|
287
|
-
69
|
288
|
-
70
|
289
|
-
71
|
290
|
-
72
|
291
|
-
73
|
292
|
-
74
|
293
|
-
75
|
294
|
-
76
|
295
|
-
77
|
296
|
-
78
|
297
|
-
79
|
298
|
-
80
|
299
|
-
81
|
300
|
-
82
|
301
|
-
83
|
302
|
-
84
|
303
|
-
85
|
304
|
-
86
|
305
|
-
87
|
306
|
-
88
|
307
|
-
89
|
308
|
-
90
|
309
|
-
91
|
310
|
-
92
|
311
|
-
93
|
312
|
-
94
|
313
|
-
95
|
314
|
-
96
|
315
|
-
97
|
316
|
-
98
|
317
|
-
99
|
318
|
-
100
|
319
|
-
101
|
320
|
-
102
|
321
|
-
103
|
322
|
-
104
|
323
|
-
105
|
324
|
-
106
|
325
|
-
107
|
326
|
-
108
|
327
|
-
109
|
328
|
-
110
|
329
|
-
111
|
330
|
-
112
|
331
|
-
113
|
332
|
-
114
|
333
|
-
115
|
334
|
-
116
|
335
|
-
117
|
336
|
-
118
|
337
|
-
119
|
338
|
-
120
|
339
|
-
121
|
340
|
-
122
|
341
|
-
123
|
342
|
-
124
|
343
|
-
125
|
344
|
-
126
|
345
|
-
127
|
346
|
-
128
|
347
|
-
129
|
348
|
-
130
|
349
|
-
131
|
350
|
-
132
|
351
|
-
133
|
352
|
-
134
|
353
|
-
135
|
354
|
-
136
|
355
|
-
137
|
356
|
-
138
|
357
|
-
139
|
358
|
-
140
|
359
|
-
141
|
360
|
-
142
|
361
|
-
143
|
362
|
-
144
|
363
|
-
145
|
364
|
-
146
|
365
|
-
147
|
366
|
-
148
|
367
|
-
149
|
368
|
-
150
|
369
|
-
151
|
370
|
-
152
|
371
|
-
153
|
372
|
-
154
|
373
|
-
155
|
374
|
-
156
|
375
|
-
157
|
376
|
-
158
|
377
|
-
159
|
378
|
-
160
|
379
|
-
161
|
380
|
-
162
|
381
|
-
163
|
382
|
-
164
|
383
|
-
165
|
384
|
-
166
|
385
|
-
167
|
386
|
-
168
|
387
|
-
169
|
388
|
-
170
|
389
|
-
171
|
390
|
-
172
|
391
|
-
173
|
392
|
-
174
|
393
|
-
175
|
394
|
-
176
|
395
|
-
177
|
396
|
-
178
|
397
|
-
179
|
398
|
-
180
|
399
|
-
181
|
400
|
-
182
|
401
|
-
183
|
402
|
-
184
|
403
|
-
185
|
404
|
-
186
|
405
|
-
187
|
406
|
-
188
|
407
|
-
189
|
408
|
-
190
|
409
|
-
191
|
410
|
-
192
|
411
|
-
193
|
412
|
-
194
|
413
|
-
195
|
414
|
-
196
|
415
|
-
197
|
416
|
-
198
|
417
|
-
199
|
418
|
-
200
|
419
|
-
201
|
420
|
-
202
|
421
|
-
203
|
422
|
-
204
|
423
|
-
205
|
424
|
-
206
|
425
|
-
207
|
426
|
-
208
|
427
|
-
209
|
428
|
-
210
|
429
|
-
211
|
430
|
-
212
|
431
|
-
213
|
432
|
-
214
|
433
|
-
215
|
434
|
-
216
|
435
|
-
217
|
436
|
-
218
|
437
|
-
219
|
438
|
-
220
|
439
|
-
221
|
440
|
-
222
|
441
|
-
223
|
442
|
-
224
|
443
|
-
225
|
444
|
-
226
|
445
|
-
227
|
446
|
-
228
|
447
|
-
229
|
448
|
-
230
|
449
|
-
231
|
450
|
-
232
|
451
|
-
233
|
452
|
-
234
|
453
|
-
235
|
454
|
-
236
|
455
|
-
237
|
456
|
-
238
|
457
|
-
239
|
458
|
-
240
|
459
|
-
241
|
460
|
-
242
|
461
|
-
243
|
462
|
-
244
|
463
|
-
245
|
464
|
-
246
|
465
|
-
247
|
466
|
-
248
|
467
|
-
249
|
468
|
-
250
|
469
|
-
251
|
470
|
-
252
|
471
|
-
253
|
472
|
-
254
|
473
|
-
255
|
474
|
-
256
|
475
|
-
257
|
476
|
-
258</td><td class="line-coverage"><span class="cline-any cline-neutral"> </span>
|
477
|
-
<span class="cline-any cline-yes">3</span>
|
478
|
-
<span class="cline-any cline-yes">3</span>
|
479
|
-
<span class="cline-any cline-no"> </span>
|
480
|
-
<span class="cline-any cline-neutral"> </span>
|
481
|
-
<span class="cline-any cline-no"> </span>
|
482
|
-
<span class="cline-any cline-neutral"> </span>
|
483
|
-
<span class="cline-any cline-no"> </span>
|
484
|
-
<span class="cline-any cline-neutral"> </span>
|
485
|
-
<span class="cline-any cline-neutral"> </span>
|
486
|
-
<span class="cline-any cline-neutral"> </span>
|
487
|
-
<span class="cline-any cline-no"> </span>
|
488
|
-
<span class="cline-any cline-no"> </span>
|
489
|
-
<span class="cline-any cline-neutral"> </span>
|
490
|
-
<span class="cline-any cline-neutral"> </span>
|
491
|
-
<span class="cline-any cline-yes">3</span>
|
492
|
-
<span class="cline-any cline-no"> </span>
|
493
|
-
<span class="cline-any cline-no"> </span>
|
494
|
-
<span class="cline-any cline-no"> </span>
|
495
|
-
<span class="cline-any cline-neutral"> </span>
|
496
|
-
<span class="cline-any cline-neutral"> </span>
|
497
|
-
<span class="cline-any cline-yes">3</span>
|
498
|
-
<span class="cline-any cline-no"> </span>
|
499
|
-
<span class="cline-any cline-neutral"> </span>
|
500
|
-
<span class="cline-any cline-no"> </span>
|
501
|
-
<span class="cline-any cline-neutral"> </span>
|
502
|
-
<span class="cline-any cline-no"> </span>
|
503
|
-
<span class="cline-any cline-no"> </span>
|
504
|
-
<span class="cline-any cline-neutral"> </span>
|
505
|
-
<span class="cline-any cline-no"> </span>
|
506
|
-
<span class="cline-any cline-no"> </span>
|
507
|
-
<span class="cline-any cline-neutral"> </span>
|
508
|
-
<span class="cline-any cline-no"> </span>
|
509
|
-
<span class="cline-any cline-neutral"> </span>
|
510
|
-
<span class="cline-any cline-neutral"> </span>
|
511
|
-
<span class="cline-any cline-no"> </span>
|
512
|
-
<span class="cline-any cline-no"> </span>
|
513
|
-
<span class="cline-any cline-neutral"> </span>
|
514
|
-
<span class="cline-any cline-neutral"> </span>
|
515
|
-
<span class="cline-any cline-yes">3</span>
|
516
|
-
<span class="cline-any cline-no"> </span>
|
517
|
-
<span class="cline-any cline-no"> </span>
|
518
|
-
<span class="cline-any cline-neutral"> </span>
|
519
|
-
<span class="cline-any cline-no"> </span>
|
520
|
-
<span class="cline-any cline-neutral"> </span>
|
521
|
-
<span class="cline-any cline-neutral"> </span>
|
522
|
-
<span class="cline-any cline-neutral"> </span>
|
523
|
-
<span class="cline-any cline-no"> </span>
|
524
|
-
<span class="cline-any cline-no"> </span>
|
525
|
-
<span class="cline-any cline-neutral"> </span>
|
526
|
-
<span class="cline-any cline-neutral"> </span>
|
527
|
-
<span class="cline-any cline-yes">3</span>
|
528
|
-
<span class="cline-any cline-no"> </span>
|
529
|
-
<span class="cline-any cline-no"> </span>
|
530
|
-
<span class="cline-any cline-neutral"> </span>
|
531
|
-
<span class="cline-any cline-no"> </span>
|
532
|
-
<span class="cline-any cline-neutral"> </span>
|
533
|
-
<span class="cline-any cline-neutral"> </span>
|
534
|
-
<span class="cline-any cline-neutral"> </span>
|
535
|
-
<span class="cline-any cline-no"> </span>
|
536
|
-
<span class="cline-any cline-no"> </span>
|
537
|
-
<span class="cline-any cline-neutral"> </span>
|
538
|
-
<span class="cline-any cline-neutral"> </span>
|
539
|
-
<span class="cline-any cline-yes">3</span>
|
540
|
-
<span class="cline-any cline-no"> </span>
|
541
|
-
<span class="cline-any cline-no"> </span>
|
542
|
-
<span class="cline-any cline-neutral"> </span>
|
543
|
-
<span class="cline-any cline-no"> </span>
|
544
|
-
<span class="cline-any cline-neutral"> </span>
|
545
|
-
<span class="cline-any cline-neutral"> </span>
|
546
|
-
<span class="cline-any cline-neutral"> </span>
|
547
|
-
<span class="cline-any cline-no"> </span>
|
548
|
-
<span class="cline-any cline-no"> </span>
|
549
|
-
<span class="cline-any cline-neutral"> </span>
|
550
|
-
<span class="cline-any cline-neutral"> </span>
|
551
|
-
<span class="cline-any cline-yes">3</span>
|
552
|
-
<span class="cline-any cline-no"> </span>
|
553
|
-
<span class="cline-any cline-no"> </span>
|
554
|
-
<span class="cline-any cline-neutral"> </span>
|
555
|
-
<span class="cline-any cline-no"> </span>
|
556
|
-
<span class="cline-any cline-neutral"> </span>
|
557
|
-
<span class="cline-any cline-neutral"> </span>
|
558
|
-
<span class="cline-any cline-neutral"> </span>
|
559
|
-
<span class="cline-any cline-no"> </span>
|
560
|
-
<span class="cline-any cline-no"> </span>
|
561
|
-
<span class="cline-any cline-neutral"> </span>
|
562
|
-
<span class="cline-any cline-neutral"> </span>
|
563
|
-
<span class="cline-any cline-yes">3</span>
|
564
|
-
<span class="cline-any cline-no"> </span>
|
565
|
-
<span class="cline-any cline-neutral"> </span>
|
566
|
-
<span class="cline-any cline-no"> </span>
|
567
|
-
<span class="cline-any cline-no"> </span>
|
568
|
-
<span class="cline-any cline-neutral"> </span>
|
569
|
-
<span class="cline-any cline-neutral"> </span>
|
570
|
-
<span class="cline-any cline-neutral"> </span>
|
571
|
-
<span class="cline-any cline-yes">3</span>
|
572
|
-
<span class="cline-any cline-no"> </span>
|
573
|
-
<span class="cline-any cline-no"> </span>
|
574
|
-
<span class="cline-any cline-neutral"> </span>
|
575
|
-
<span class="cline-any cline-no"> </span>
|
576
|
-
<span class="cline-any cline-no"> </span>
|
577
|
-
<span class="cline-any cline-no"> </span>
|
578
|
-
<span class="cline-any cline-neutral"> </span>
|
579
|
-
<span class="cline-any cline-no"> </span>
|
580
|
-
<span class="cline-any cline-neutral"> </span>
|
581
|
-
<span class="cline-any cline-neutral"> </span>
|
582
|
-
<span class="cline-any cline-neutral"> </span>
|
583
|
-
<span class="cline-any cline-no"> </span>
|
584
|
-
<span class="cline-any cline-no"> </span>
|
585
|
-
<span class="cline-any cline-neutral"> </span>
|
586
|
-
<span class="cline-any cline-neutral"> </span>
|
587
|
-
<span class="cline-any cline-yes">3</span>
|
588
|
-
<span class="cline-any cline-no"> </span>
|
589
|
-
<span class="cline-any cline-neutral"> </span>
|
590
|
-
<span class="cline-any cline-no"> </span>
|
591
|
-
<span class="cline-any cline-neutral"> </span>
|
592
|
-
<span class="cline-any cline-neutral"> </span>
|
593
|
-
<span class="cline-any cline-neutral"> </span>
|
594
|
-
<span class="cline-any cline-no"> </span>
|
595
|
-
<span class="cline-any cline-neutral"> </span>
|
596
|
-
<span class="cline-any cline-no"> </span>
|
597
|
-
<span class="cline-any cline-neutral"> </span>
|
598
|
-
<span class="cline-any cline-neutral"> </span>
|
599
|
-
<span class="cline-any cline-neutral"> </span>
|
600
|
-
<span class="cline-any cline-no"> </span>
|
601
|
-
<span class="cline-any cline-no"> </span>
|
602
|
-
<span class="cline-any cline-neutral"> </span>
|
603
|
-
<span class="cline-any cline-neutral"> </span>
|
604
|
-
<span class="cline-any cline-yes">3</span>
|
605
|
-
<span class="cline-any cline-no"> </span>
|
606
|
-
<span class="cline-any cline-neutral"> </span>
|
607
|
-
<span class="cline-any cline-no"> </span>
|
608
|
-
<span class="cline-any cline-neutral"> </span>
|
609
|
-
<span class="cline-any cline-no"> </span>
|
610
|
-
<span class="cline-any cline-neutral"> </span>
|
611
|
-
<span class="cline-any cline-neutral"> </span>
|
612
|
-
<span class="cline-any cline-neutral"> </span>
|
613
|
-
<span class="cline-any cline-no"> </span>
|
614
|
-
<span class="cline-any cline-no"> </span>
|
615
|
-
<span class="cline-any cline-neutral"> </span>
|
616
|
-
<span class="cline-any cline-neutral"> </span>
|
617
|
-
<span class="cline-any cline-yes">3</span>
|
618
|
-
<span class="cline-any cline-no"> </span>
|
619
|
-
<span class="cline-any cline-neutral"> </span>
|
620
|
-
<span class="cline-any cline-no"> </span>
|
621
|
-
<span class="cline-any cline-neutral"> </span>
|
622
|
-
<span class="cline-any cline-no"> </span>
|
623
|
-
<span class="cline-any cline-neutral"> </span>
|
624
|
-
<span class="cline-any cline-neutral"> </span>
|
625
|
-
<span class="cline-any cline-no"> </span>
|
626
|
-
<span class="cline-any cline-neutral"> </span>
|
627
|
-
<span class="cline-any cline-neutral"> </span>
|
628
|
-
<span class="cline-any cline-neutral"> </span>
|
629
|
-
<span class="cline-any cline-no"> </span>
|
630
|
-
<span class="cline-any cline-no"> </span>
|
631
|
-
<span class="cline-any cline-neutral"> </span>
|
632
|
-
<span class="cline-any cline-neutral"> </span>
|
633
|
-
<span class="cline-any cline-yes">3</span>
|
634
|
-
<span class="cline-any cline-no"> </span>
|
635
|
-
<span class="cline-any cline-neutral"> </span>
|
636
|
-
<span class="cline-any cline-no"> </span>
|
637
|
-
<span class="cline-any cline-neutral"> </span>
|
638
|
-
<span class="cline-any cline-no"> </span>
|
639
|
-
<span class="cline-any cline-neutral"> </span>
|
640
|
-
<span class="cline-any cline-neutral"> </span>
|
641
|
-
<span class="cline-any cline-no"> </span>
|
642
|
-
<span class="cline-any cline-neutral"> </span>
|
643
|
-
<span class="cline-any cline-neutral"> </span>
|
644
|
-
<span class="cline-any cline-neutral"> </span>
|
645
|
-
<span class="cline-any cline-no"> </span>
|
646
|
-
<span class="cline-any cline-no"> </span>
|
647
|
-
<span class="cline-any cline-neutral"> </span>
|
648
|
-
<span class="cline-any cline-neutral"> </span>
|
649
|
-
<span class="cline-any cline-yes">3</span>
|
650
|
-
<span class="cline-any cline-no"> </span>
|
651
|
-
<span class="cline-any cline-neutral"> </span>
|
652
|
-
<span class="cline-any cline-no"> </span>
|
653
|
-
<span class="cline-any cline-neutral"> </span>
|
654
|
-
<span class="cline-any cline-no"> </span>
|
655
|
-
<span class="cline-any cline-neutral"> </span>
|
656
|
-
<span class="cline-any cline-neutral"> </span>
|
657
|
-
<span class="cline-any cline-no"> </span>
|
658
|
-
<span class="cline-any cline-neutral"> </span>
|
659
|
-
<span class="cline-any cline-neutral"> </span>
|
660
|
-
<span class="cline-any cline-neutral"> </span>
|
661
|
-
<span class="cline-any cline-no"> </span>
|
662
|
-
<span class="cline-any cline-no"> </span>
|
663
|
-
<span class="cline-any cline-neutral"> </span>
|
664
|
-
<span class="cline-any cline-neutral"> </span>
|
665
|
-
<span class="cline-any cline-yes">3</span>
|
666
|
-
<span class="cline-any cline-no"> </span>
|
667
|
-
<span class="cline-any cline-neutral"> </span>
|
668
|
-
<span class="cline-any cline-no"> </span>
|
669
|
-
<span class="cline-any cline-neutral"> </span>
|
670
|
-
<span class="cline-any cline-no"> </span>
|
671
|
-
<span class="cline-any cline-neutral"> </span>
|
672
|
-
<span class="cline-any cline-neutral"> </span>
|
673
|
-
<span class="cline-any cline-no"> </span>
|
674
|
-
<span class="cline-any cline-neutral"> </span>
|
675
|
-
<span class="cline-any cline-neutral"> </span>
|
676
|
-
<span class="cline-any cline-neutral"> </span>
|
677
|
-
<span class="cline-any cline-no"> </span>
|
678
|
-
<span class="cline-any cline-no"> </span>
|
679
|
-
<span class="cline-any cline-neutral"> </span>
|
680
|
-
<span class="cline-any cline-neutral"> </span>
|
681
|
-
<span class="cline-any cline-neutral"> </span>
|
682
|
-
<span class="cline-any cline-yes">3</span>
|
683
|
-
<span class="cline-any cline-no"> </span>
|
684
|
-
<span class="cline-any cline-neutral"> </span>
|
685
|
-
<span class="cline-any cline-no"> </span>
|
686
|
-
<span class="cline-any cline-neutral"> </span>
|
687
|
-
<span class="cline-any cline-no"> </span>
|
688
|
-
<span class="cline-any cline-neutral"> </span>
|
689
|
-
<span class="cline-any cline-neutral"> </span>
|
690
|
-
<span class="cline-any cline-no"> </span>
|
691
|
-
<span class="cline-any cline-neutral"> </span>
|
692
|
-
<span class="cline-any cline-neutral"> </span>
|
693
|
-
<span class="cline-any cline-neutral"> </span>
|
694
|
-
<span class="cline-any cline-no"> </span>
|
695
|
-
<span class="cline-any cline-no"> </span>
|
696
|
-
<span class="cline-any cline-neutral"> </span>
|
697
|
-
<span class="cline-any cline-neutral"> </span>
|
698
|
-
<span class="cline-any cline-yes">3</span>
|
699
|
-
<span class="cline-any cline-yes">3</span>
|
700
|
-
<span class="cline-any cline-no"> </span>
|
701
|
-
<span class="cline-any cline-no"> </span>
|
702
|
-
<span class="cline-any cline-no"> </span>
|
703
|
-
<span class="cline-any cline-neutral"> </span>
|
704
|
-
<span class="cline-any cline-no"> </span>
|
705
|
-
<span class="cline-any cline-no"> </span>
|
706
|
-
<span class="cline-any cline-neutral"> </span>
|
707
|
-
<span class="cline-any cline-yes">3</span>
|
708
|
-
<span class="cline-any cline-no"> </span>
|
709
|
-
<span class="cline-any cline-no"> </span>
|
710
|
-
<span class="cline-any cline-no"> </span>
|
711
|
-
<span class="cline-any cline-neutral"> </span>
|
712
|
-
<span class="cline-any cline-neutral"> </span>
|
713
|
-
<span class="cline-any cline-neutral"> </span>
|
714
|
-
<span class="cline-any cline-yes">3</span>
|
715
|
-
<span class="cline-any cline-yes">3</span>
|
716
|
-
<span class="cline-any cline-no"> </span>
|
717
|
-
<span class="cline-any cline-no"> </span>
|
718
|
-
<span class="cline-any cline-neutral"> </span>
|
719
|
-
<span class="cline-any cline-neutral"> </span>
|
720
|
-
<span class="cline-any cline-no"> </span>
|
721
|
-
<span class="cline-any cline-no"> </span>
|
722
|
-
<span class="cline-any cline-no"> </span>
|
723
|
-
<span class="cline-any cline-neutral"> </span>
|
724
|
-
<span class="cline-any cline-neutral"> </span>
|
725
|
-
<span class="cline-any cline-neutral"> </span>
|
726
|
-
<span class="cline-any cline-neutral"> </span>
|
727
|
-
<span class="cline-any cline-neutral"> </span>
|
728
|
-
<span class="cline-any cline-neutral"> </span>
|
729
|
-
<span class="cline-any cline-no"> </span>
|
730
|
-
<span class="cline-any cline-neutral"> </span>
|
731
|
-
<span class="cline-any cline-neutral"> </span>
|
732
|
-
<span class="cline-any cline-neutral"> </span>
|
733
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/*global CompilerContext, Handlebars, handlebarsEnv, shouldThrow */
|
734
|
-
describe('data', function() {
|
735
|
-
it("passing in data to a compiled function that expects data - works with helpers", <span class="fstat-no" title="function not covered" >function() {</span>
|
736
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{hello}}", {data: true});</span>
|
737
|
-
|
738
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
739
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
740
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + this.noun;</span>
|
741
|
-
}
|
742
|
-
};
|
743
|
-
|
744
|
-
<span class="cstat-no" title="statement not covered" > var result = template({noun: "cat"}, {helpers: helpers, data: {adjective: "happy"}});</span>
|
745
|
-
<span class="cstat-no" title="statement not covered" > equals("happy cat", result, "Data output by helper");</span>
|
746
|
-
});
|
747
|
-
|
748
|
-
it("data can be looked up via @foo", <span class="fstat-no" title="function not covered" >function() {</span>
|
749
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{@hello}}");</span>
|
750
|
-
<span class="cstat-no" title="statement not covered" > var result = template({}, { data: { hello: "hello" } });</span>
|
751
|
-
<span class="cstat-no" title="statement not covered" > equals("hello", result, "@foo retrieves template data");</span>
|
752
|
-
});
|
753
|
-
|
754
|
-
it("deep @foo triggers automatic top-level data", <span class="fstat-no" title="function not covered" >function() {</span>
|
755
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile('{{#let world="world"}}{{#if foo}}{{#if foo}}Hello {{@world}}{{/if}}{{/if}}{{/let}}');</span>
|
756
|
-
|
757
|
-
<span class="cstat-no" title="statement not covered" > var helpers = Handlebars.createFrame(handlebarsEnv.helpers);</span>
|
758
|
-
|
759
|
-
<span class="cstat-no" title="statement not covered" > helpers.let = <span class="fstat-no" title="function not covered" >function(options) {</span></span>
|
760
|
-
<span class="cstat-no" title="statement not covered" > var frame = Handlebars.createFrame(options.data);</span>
|
761
|
-
|
762
|
-
<span class="cstat-no" title="statement not covered" > for (var prop in options.hash) {</span>
|
763
|
-
<span class="cstat-no" title="statement not covered" > frame[prop] = options.hash[prop];</span>
|
764
|
-
}
|
765
|
-
<span class="cstat-no" title="statement not covered" > return options.fn(this, { data: frame });</span>
|
766
|
-
};
|
767
|
-
|
768
|
-
<span class="cstat-no" title="statement not covered" > var result = template({ foo: true }, { helpers: helpers });</span>
|
769
|
-
<span class="cstat-no" title="statement not covered" > equals("Hello world", result, "Automatic data was triggered");</span>
|
770
|
-
});
|
771
|
-
|
772
|
-
it("parameter data can be looked up via @foo", <span class="fstat-no" title="function not covered" >function() {</span>
|
773
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{hello @world}}");</span>
|
774
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
775
|
-
hello: <span class="fstat-no" title="function not covered" >function(noun) {</span>
|
776
|
-
<span class="cstat-no" title="statement not covered" > return "Hello " + noun;</span>
|
777
|
-
}
|
778
|
-
};
|
779
|
-
|
780
|
-
<span class="cstat-no" title="statement not covered" > var result = template({}, { helpers: helpers, data: { world: "world" } });</span>
|
781
|
-
<span class="cstat-no" title="statement not covered" > equals("Hello world", result, "@foo as a parameter retrieves template data");</span>
|
782
|
-
});
|
783
|
-
|
784
|
-
it("hash values can be looked up via @foo", <span class="fstat-no" title="function not covered" >function() {</span>
|
785
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{hello noun=@world}}");</span>
|
786
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
787
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
788
|
-
<span class="cstat-no" title="statement not covered" > return "Hello " + options.hash.noun;</span>
|
789
|
-
}
|
790
|
-
};
|
791
|
-
|
792
|
-
<span class="cstat-no" title="statement not covered" > var result = template({}, { helpers: helpers, data: { world: "world" } });</span>
|
793
|
-
<span class="cstat-no" title="statement not covered" > equals("Hello world", result, "@foo as a parameter retrieves template data");</span>
|
794
|
-
});
|
795
|
-
|
796
|
-
it("nested parameter data can be looked up via @foo.bar", <span class="fstat-no" title="function not covered" >function() {</span>
|
797
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{hello @world.bar}}");</span>
|
798
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
799
|
-
hello: <span class="fstat-no" title="function not covered" >function(noun) {</span>
|
800
|
-
<span class="cstat-no" title="statement not covered" > return "Hello " + noun;</span>
|
801
|
-
}
|
802
|
-
};
|
803
|
-
|
804
|
-
<span class="cstat-no" title="statement not covered" > var result = template({}, { helpers: helpers, data: { world: {bar: "world" } } });</span>
|
805
|
-
<span class="cstat-no" title="statement not covered" > equals("Hello world", result, "@foo as a parameter retrieves template data");</span>
|
806
|
-
});
|
807
|
-
|
808
|
-
it("nested parameter data does not fail with @world.bar", <span class="fstat-no" title="function not covered" >function() {</span>
|
809
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{hello @world.bar}}");</span>
|
810
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
811
|
-
hello: <span class="fstat-no" title="function not covered" >function(noun) {</span>
|
812
|
-
<span class="cstat-no" title="statement not covered" > return "Hello " + noun;</span>
|
813
|
-
}
|
814
|
-
};
|
815
|
-
|
816
|
-
<span class="cstat-no" title="statement not covered" > var result = template({}, { helpers: helpers, data: { foo: {bar: "world" } } });</span>
|
817
|
-
<span class="cstat-no" title="statement not covered" > equals("Hello undefined", result, "@foo as a parameter retrieves template data");</span>
|
818
|
-
});
|
819
|
-
|
820
|
-
it("parameter data throws when using complex scope references", <span class="fstat-no" title="function not covered" >function() {</span>
|
821
|
-
<span class="cstat-no" title="statement not covered" > var string = "{{#goodbyes}}{{text}} cruel {{@foo/../name}}! {{/goodbyes}}";</span>
|
822
|
-
|
823
|
-
<span class="cstat-no" title="statement not covered" > shouldThrow(<span class="fstat-no" title="function not covered" >function() {</span></span>
|
824
|
-
<span class="cstat-no" title="statement not covered" > CompilerContext.compile(string);</span>
|
825
|
-
}, Error);
|
826
|
-
});
|
827
|
-
|
828
|
-
it("data is inherited downstream", <span class="fstat-no" title="function not covered" >function() {</span>
|
829
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{#let foo=1 bar=2}}{{#let foo=bar.baz}}{{@bar}}{{@foo}}{{/let}}{{@foo}}{{/let}}", { data: true });</span>
|
830
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
831
|
-
let: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
832
|
-
<span class="cstat-no" title="statement not covered" > var frame = Handlebars.createFrame(options.data);</span>
|
833
|
-
<span class="cstat-no" title="statement not covered" > for (var prop in options.hash) {</span>
|
834
|
-
<span class="cstat-no" title="statement not covered" > frame[prop] = options.hash[prop];</span>
|
835
|
-
}
|
836
|
-
<span class="cstat-no" title="statement not covered" > return options.fn(this, {data: frame});</span>
|
837
|
-
}
|
838
|
-
};
|
839
|
-
|
840
|
-
<span class="cstat-no" title="statement not covered" > var result = template({ bar: { baz: "hello world" } }, { helpers: helpers, data: {} });</span>
|
841
|
-
<span class="cstat-no" title="statement not covered" > equals("2hello world1", result, "data variables are inherited downstream");</span>
|
842
|
-
});
|
843
|
-
|
844
|
-
it("passing in data to a compiled function that expects data - works with helpers in partials", <span class="fstat-no" title="function not covered" >function() {</span>
|
845
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{>my_partial}}", {data: true});</span>
|
846
|
-
|
847
|
-
<span class="cstat-no" title="statement not covered" > var partials = {</span>
|
848
|
-
my_partial: CompilerContext.compile("{{hello}}", {data: true})
|
849
|
-
};
|
850
|
-
|
851
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
852
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
853
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + this.noun;</span>
|
854
|
-
}
|
855
|
-
};
|
856
|
-
|
857
|
-
<span class="cstat-no" title="statement not covered" > var result = template({noun: "cat"}, {helpers: helpers, partials: partials, data: {adjective: "happy"}});</span>
|
858
|
-
<span class="cstat-no" title="statement not covered" > equals("happy cat", result, "Data output by helper inside partial");</span>
|
859
|
-
});
|
860
|
-
|
861
|
-
it("passing in data to a compiled function that expects data - works with helpers and parameters", <span class="fstat-no" title="function not covered" >function() {</span>
|
862
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{hello world}}", {data: true});</span>
|
863
|
-
|
864
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
865
|
-
hello: <span class="fstat-no" title="function not covered" >function(noun, options) {</span>
|
866
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + noun + (this.exclaim ? "!" : "");</span>
|
867
|
-
}
|
868
|
-
};
|
869
|
-
|
870
|
-
<span class="cstat-no" title="statement not covered" > var result = template({exclaim: true, world: "world"}, {helpers: helpers, data: {adjective: "happy"}});</span>
|
871
|
-
<span class="cstat-no" title="statement not covered" > equals("happy world!", result, "Data output by helper");</span>
|
872
|
-
});
|
873
|
-
|
874
|
-
it("passing in data to a compiled function that expects data - works with block helpers", <span class="fstat-no" title="function not covered" >function() {</span>
|
875
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{#hello}}{{world}}{{/hello}}", {data: true});</span>
|
876
|
-
|
877
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
878
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
879
|
-
<span class="cstat-no" title="statement not covered" > return options.fn(this);</span>
|
880
|
-
},
|
881
|
-
world: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
882
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " world" + (this.exclaim ? "!" : "");</span>
|
883
|
-
}
|
884
|
-
};
|
885
|
-
|
886
|
-
<span class="cstat-no" title="statement not covered" > var result = template({exclaim: true}, {helpers: helpers, data: {adjective: "happy"}});</span>
|
887
|
-
<span class="cstat-no" title="statement not covered" > equals("happy world!", result, "Data output by helper");</span>
|
888
|
-
});
|
889
|
-
|
890
|
-
it("passing in data to a compiled function that expects data - works with block helpers that use ..", <span class="fstat-no" title="function not covered" >function() {</span>
|
891
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{#hello}}{{world ../zomg}}{{/hello}}", {data: true});</span>
|
892
|
-
|
893
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
894
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
895
|
-
<span class="cstat-no" title="statement not covered" > return options.fn({exclaim: "?"});</span>
|
896
|
-
},
|
897
|
-
world: <span class="fstat-no" title="function not covered" >function(thing, options) {</span>
|
898
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + thing + (this.exclaim || "");</span>
|
899
|
-
}
|
900
|
-
};
|
901
|
-
|
902
|
-
<span class="cstat-no" title="statement not covered" > var result = template({exclaim: true, zomg: "world"}, {helpers: helpers, data: {adjective: "happy"}});</span>
|
903
|
-
<span class="cstat-no" title="statement not covered" > equals("happy world?", result, "Data output by helper");</span>
|
904
|
-
});
|
905
|
-
|
906
|
-
it("passing in data to a compiled function that expects data - data is passed to with block helpers where children use ..", <span class="fstat-no" title="function not covered" >function() {</span>
|
907
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{#hello}}{{world ../zomg}}{{/hello}}", {data: true});</span>
|
908
|
-
|
909
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
910
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
911
|
-
<span class="cstat-no" title="statement not covered" > return options.data.accessData + " " + options.fn({exclaim: "?"});</span>
|
912
|
-
},
|
913
|
-
world: <span class="fstat-no" title="function not covered" >function(thing, options) {</span>
|
914
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + thing + (this.exclaim || "");</span>
|
915
|
-
}
|
916
|
-
};
|
917
|
-
|
918
|
-
<span class="cstat-no" title="statement not covered" > var result = template({exclaim: true, zomg: "world"}, {helpers: helpers, data: {adjective: "happy", accessData: "#win"}});</span>
|
919
|
-
<span class="cstat-no" title="statement not covered" > equals("#win happy world?", result, "Data output by helper");</span>
|
920
|
-
});
|
921
|
-
|
922
|
-
it("you can override inherited data when invoking a helper", <span class="fstat-no" title="function not covered" >function() {</span>
|
923
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{#hello}}{{world zomg}}{{/hello}}", {data: true});</span>
|
924
|
-
|
925
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
926
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
927
|
-
<span class="cstat-no" title="statement not covered" > return options.fn({exclaim: "?", zomg: "world"}, { data: {adjective: "sad"} });</span>
|
928
|
-
},
|
929
|
-
world: <span class="fstat-no" title="function not covered" >function(thing, options) {</span>
|
930
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + thing + (this.exclaim || "");</span>
|
931
|
-
}
|
932
|
-
};
|
933
|
-
|
934
|
-
<span class="cstat-no" title="statement not covered" > var result = template({exclaim: true, zomg: "planet"}, {helpers: helpers, data: {adjective: "happy"}});</span>
|
935
|
-
<span class="cstat-no" title="statement not covered" > equals("sad world?", result, "Overriden data output by helper");</span>
|
936
|
-
});
|
937
|
-
|
938
|
-
|
939
|
-
it("you can override inherited data when invoking a helper with depth", <span class="fstat-no" title="function not covered" >function() {</span>
|
940
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile("{{#hello}}{{world ../zomg}}{{/hello}}", {data: true});</span>
|
941
|
-
|
942
|
-
<span class="cstat-no" title="statement not covered" > var helpers = {</span>
|
943
|
-
hello: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
944
|
-
<span class="cstat-no" title="statement not covered" > return options.fn({exclaim: "?"}, { data: {adjective: "sad"} });</span>
|
945
|
-
},
|
946
|
-
world: <span class="fstat-no" title="function not covered" >function(thing, options) {</span>
|
947
|
-
<span class="cstat-no" title="statement not covered" > return options.data.adjective + " " + thing + (this.exclaim || "");</span>
|
948
|
-
}
|
949
|
-
};
|
950
|
-
|
951
|
-
<span class="cstat-no" title="statement not covered" > var result = template({exclaim: true, zomg: "world"}, {helpers: helpers, data: {adjective: "happy"}});</span>
|
952
|
-
<span class="cstat-no" title="statement not covered" > equals("sad world?", result, "Overriden data output by helper");</span>
|
953
|
-
});
|
954
|
-
|
955
|
-
describe('@root', function() {
|
956
|
-
it('the root context can be looked up via @root', <span class="fstat-no" title="function not covered" >function() {</span>
|
957
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile('{{@root.foo}}');</span>
|
958
|
-
<span class="cstat-no" title="statement not covered" > var result = template({foo: 'hello'}, { data: {} });</span>
|
959
|
-
<span class="cstat-no" title="statement not covered" > equals('hello', result);</span>
|
960
|
-
|
961
|
-
<span class="cstat-no" title="statement not covered" > result = template({foo: 'hello'}, {});</span>
|
962
|
-
<span class="cstat-no" title="statement not covered" > equals('hello', result);</span>
|
963
|
-
});
|
964
|
-
it('passed root values take priority', <span class="fstat-no" title="function not covered" >function() {</span>
|
965
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile('{{@root.foo}}');</span>
|
966
|
-
<span class="cstat-no" title="statement not covered" > var result = template({}, { data: {root: {foo: 'hello'} } });</span>
|
967
|
-
<span class="cstat-no" title="statement not covered" > equals('hello', result);</span>
|
968
|
-
});
|
969
|
-
});
|
970
|
-
|
971
|
-
describe('nesting', function() {
|
972
|
-
it('the root context can be looked up via @root', <span class="fstat-no" title="function not covered" >function() {</span>
|
973
|
-
<span class="cstat-no" title="statement not covered" > var template = CompilerContext.compile('{{#helper}}{{#helper}}{{@./depth}} {{@../depth}} {{@../../depth}}{{/helper}}{{/helper}}');</span>
|
974
|
-
<span class="cstat-no" title="statement not covered" > var result = template({foo: 'hello'}, {</span>
|
975
|
-
helpers: {
|
976
|
-
helper: <span class="fstat-no" title="function not covered" >function(options) {</span>
|
977
|
-
<span class="cstat-no" title="statement not covered" > var frame = Handlebars.createFrame(options.data);</span>
|
978
|
-
<span class="cstat-no" title="statement not covered" > frame.depth = options.data.depth + 1;</span>
|
979
|
-
<span class="cstat-no" title="statement not covered" > return options.fn(this, {data: frame});</span>
|
980
|
-
}
|
981
|
-
},
|
982
|
-
data: {
|
983
|
-
depth: 0
|
984
|
-
}
|
985
|
-
});
|
986
|
-
<span class="cstat-no" title="statement not covered" > equals('2 1 0', result);</span>
|
987
|
-
});
|
988
|
-
});
|
989
|
-
});
|
990
|
-
</pre></td></tr>
|
991
|
-
</table></pre>
|
992
|
-
|
993
|
-
</div>
|
994
|
-
<div class="footer">
|
995
|
-
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Aug 13 2014 23:50:21 GMT-0500 (CDT)</div>
|
996
|
-
</div>
|
997
|
-
|
998
|
-
<script src="../prettify.js"></script>
|
999
|
-
|
1000
|
-
<script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
|
1001
|
-
<script>
|
1002
|
-
|
1003
|
-
YUI().use('datatable', function (Y) {
|
1004
|
-
|
1005
|
-
var formatters = {
|
1006
|
-
pct: function (o) {
|
1007
|
-
o.className += o.record.get('classes')[o.column.key];
|
1008
|
-
try {
|
1009
|
-
return o.value.toFixed(2) + '%';
|
1010
|
-
} catch (ex) { return o.value + '%'; }
|
1011
|
-
},
|
1012
|
-
html: function (o) {
|
1013
|
-
o.className += o.record.get('classes')[o.column.key];
|
1014
|
-
return o.record.get(o.column.key + '_html');
|
1015
|
-
}
|
1016
|
-
},
|
1017
|
-
defaultFormatter = function (o) {
|
1018
|
-
o.className += o.record.get('classes')[o.column.key];
|
1019
|
-
return o.value;
|
1020
|
-
};
|
1021
|
-
|
1022
|
-
function getColumns(theadNode) {
|
1023
|
-
var colNodes = theadNode.all('tr th'),
|
1024
|
-
cols = [],
|
1025
|
-
col;
|
1026
|
-
colNodes.each(function (colNode) {
|
1027
|
-
col = {
|
1028
|
-
key: colNode.getAttribute('data-col'),
|
1029
|
-
label: colNode.get('innerHTML') || ' ',
|
1030
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
1031
|
-
className: colNode.getAttribute('class'),
|
1032
|
-
type: colNode.getAttribute('data-type'),
|
1033
|
-
allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
|
1034
|
-
};
|
1035
|
-
col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
|
1036
|
-
cols.push(col);
|
1037
|
-
});
|
1038
|
-
return cols;
|
1039
|
-
}
|
1040
|
-
|
1041
|
-
function getRowData(trNode, cols) {
|
1042
|
-
var tdNodes = trNode.all('td'),
|
1043
|
-
i,
|
1044
|
-
row = { classes: {} },
|
1045
|
-
node,
|
1046
|
-
name;
|
1047
|
-
for (i = 0; i < cols.length; i += 1) {
|
1048
|
-
name = cols[i].key;
|
1049
|
-
node = tdNodes.item(i);
|
1050
|
-
row[name] = node.getAttribute('data-value') || node.get('innerHTML');
|
1051
|
-
row[name + '_html'] = node.get('innerHTML');
|
1052
|
-
row.classes[name] = node.getAttribute('class');
|
1053
|
-
//Y.log('Name: ' + name + '; Value: ' + row[name]);
|
1054
|
-
if (cols[i].type === 'number') { row[name] = row[name] * 1; }
|
1055
|
-
}
|
1056
|
-
//Y.log(row);
|
1057
|
-
return row;
|
1058
|
-
}
|
1059
|
-
|
1060
|
-
function getData(tbodyNode, cols) {
|
1061
|
-
var data = [];
|
1062
|
-
tbodyNode.all('tr').each(function (trNode) {
|
1063
|
-
data.push(getRowData(trNode, cols));
|
1064
|
-
});
|
1065
|
-
return data;
|
1066
|
-
}
|
1067
|
-
|
1068
|
-
function replaceTable(node) {
|
1069
|
-
if (!node) { return; }
|
1070
|
-
var cols = getColumns(node.one('thead')),
|
1071
|
-
data = getData(node.one('tbody'), cols),
|
1072
|
-
table,
|
1073
|
-
parent = node.get('parentNode');
|
1074
|
-
|
1075
|
-
table = new Y.DataTable({
|
1076
|
-
columns: cols,
|
1077
|
-
data: data,
|
1078
|
-
sortBy: 'file'
|
1079
|
-
});
|
1080
|
-
parent.set('innerHTML', '');
|
1081
|
-
table.render(parent);
|
1082
|
-
}
|
1083
|
-
|
1084
|
-
Y.on('domready', function () {
|
1085
|
-
replaceTable(Y.one('div.coverage-summary table'));
|
1086
|
-
if (typeof prettyPrint === 'function') {
|
1087
|
-
prettyPrint();
|
1088
|
-
}
|
1089
|
-
});
|
1090
|
-
});
|
1091
|
-
</script>
|
1092
|
-
</body>
|
1093
|
-
</html>
|