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,499 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<title>Code coverage report for spec/utils.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/utils.js</span></h1>
|
200
|
-
<h2>
|
201
|
-
|
202
|
-
Statements: <span class="metric">32.43% <small>(12 / 37)</small></span>
|
203
|
-
|
204
|
-
|
205
|
-
Branches: <span class="metric">0% <small>(0 / 2)</small></span>
|
206
|
-
|
207
|
-
|
208
|
-
Functions: <span class="metric">33.33% <small>(4 / 12)</small></span>
|
209
|
-
|
210
|
-
|
211
|
-
Lines: <span class="metric">32.43% <small>(12 / 37)</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> » utils.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</td><td class="line-coverage"><span class="cline-any cline-neutral"> </span>
|
279
|
-
<span class="cline-any cline-neutral"> </span>
|
280
|
-
<span class="cline-any cline-yes">3</span>
|
281
|
-
<span class="cline-any cline-yes">3</span>
|
282
|
-
<span class="cline-any cline-yes">3</span>
|
283
|
-
<span class="cline-any cline-no"> </span>
|
284
|
-
<span class="cline-any cline-no"> </span>
|
285
|
-
<span class="cline-any cline-no"> </span>
|
286
|
-
<span class="cline-any cline-neutral"> </span>
|
287
|
-
<span class="cline-any cline-no"> </span>
|
288
|
-
<span class="cline-any cline-neutral"> </span>
|
289
|
-
<span class="cline-any cline-neutral"> </span>
|
290
|
-
<span class="cline-any cline-yes">3</span>
|
291
|
-
<span class="cline-any cline-no"> </span>
|
292
|
-
<span class="cline-any cline-neutral"> </span>
|
293
|
-
<span class="cline-any cline-no"> </span>
|
294
|
-
<span class="cline-any cline-neutral"> </span>
|
295
|
-
<span class="cline-any cline-neutral"> </span>
|
296
|
-
<span class="cline-any cline-neutral"> </span>
|
297
|
-
<span class="cline-any cline-yes">3</span>
|
298
|
-
<span class="cline-any cline-yes">3</span>
|
299
|
-
<span class="cline-any cline-no"> </span>
|
300
|
-
<span class="cline-any cline-neutral"> </span>
|
301
|
-
<span class="cline-any cline-yes">3</span>
|
302
|
-
<span class="cline-any cline-no"> </span>
|
303
|
-
<span class="cline-any cline-no"> </span>
|
304
|
-
<span class="cline-any cline-neutral"> </span>
|
305
|
-
<span class="cline-any cline-neutral"> </span>
|
306
|
-
<span class="cline-any cline-yes">3</span>
|
307
|
-
<span class="cline-any cline-no"> </span>
|
308
|
-
<span class="cline-any cline-no"> </span>
|
309
|
-
<span class="cline-any cline-no"> </span>
|
310
|
-
<span class="cline-any cline-no"> </span>
|
311
|
-
<span class="cline-any cline-neutral"> </span>
|
312
|
-
<span class="cline-any cline-no"> </span>
|
313
|
-
<span class="cline-any cline-neutral"> </span>
|
314
|
-
<span class="cline-any cline-yes">3</span>
|
315
|
-
<span class="cline-any cline-no"> </span>
|
316
|
-
<span class="cline-any cline-no"> </span>
|
317
|
-
<span class="cline-any cline-neutral"> </span>
|
318
|
-
<span class="cline-any cline-neutral"> </span>
|
319
|
-
<span class="cline-any cline-neutral"> </span>
|
320
|
-
<span class="cline-any cline-yes">3</span>
|
321
|
-
<span class="cline-any cline-yes">3</span>
|
322
|
-
<span class="cline-any cline-no"> </span>
|
323
|
-
<span class="cline-any cline-no"> </span>
|
324
|
-
<span class="cline-any cline-no"> </span>
|
325
|
-
<span class="cline-any cline-no"> </span>
|
326
|
-
<span class="cline-any cline-no"> </span>
|
327
|
-
<span class="cline-any cline-neutral"> </span>
|
328
|
-
<span class="cline-any cline-neutral"> </span>
|
329
|
-
<span class="cline-any cline-yes">3</span>
|
330
|
-
<span class="cline-any cline-no"> </span>
|
331
|
-
<span class="cline-any cline-no"> </span>
|
332
|
-
<span class="cline-any cline-no"> </span>
|
333
|
-
<span class="cline-any cline-no"> </span>
|
334
|
-
<span class="cline-any cline-neutral"> </span>
|
335
|
-
<span class="cline-any cline-neutral"> </span>
|
336
|
-
<span class="cline-any cline-neutral"> </span>
|
337
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/*global Handlebars, shouldCompileTo */
|
338
|
-
|
339
|
-
describe('utils', function() {
|
340
|
-
describe('#SafeString', function() {
|
341
|
-
it("constructing a safestring from a string and checking its type", <span class="fstat-no" title="function not covered" >function() {</span>
|
342
|
-
<span class="cstat-no" title="statement not covered" > var safe = new Handlebars.SafeString("testing 1, 2, 3");</span>
|
343
|
-
<span class="cstat-no" title="statement not covered" > if (!(safe instanceof Handlebars.SafeString)) {</span>
|
344
|
-
<span class="cstat-no" title="statement not covered" > throw new Error('Must be instance of SafeString');</span>
|
345
|
-
}
|
346
|
-
<span class="cstat-no" title="statement not covered" > equals(safe == 'testing 1, 2, 3', true, 'SafeString is equivalent to its underlying string');</span>
|
347
|
-
});
|
348
|
-
|
349
|
-
it("it should not escape SafeString properties", <span class="fstat-no" title="function not covered" >function() {</span>
|
350
|
-
<span class="cstat-no" title="statement not covered" > var name = new Handlebars.SafeString("<em>Sean O&#x27;Malley</em>");</span>
|
351
|
-
|
352
|
-
<span class="cstat-no" title="statement not covered" > shouldCompileTo('{{name}}', [{ name: name }], "<em>Sean O&#x27;Malley</em>");</span>
|
353
|
-
});
|
354
|
-
});
|
355
|
-
|
356
|
-
describe('#escapeExpression', function() {
|
357
|
-
it('shouhld escape html', <span class="fstat-no" title="function not covered" >function() {</span>
|
358
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression('foo<&"\'>'), 'foo&lt;&amp;&quot;&#x27;&gt;');</span>
|
359
|
-
});
|
360
|
-
it('should not escape SafeString', <span class="fstat-no" title="function not covered" >function() {</span>
|
361
|
-
<span class="cstat-no" title="statement not covered" > var string = new Handlebars.SafeString('foo<&"\'>');</span>
|
362
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression(string), 'foo<&"\'>');</span>
|
363
|
-
|
364
|
-
});
|
365
|
-
it('should handle falsy', <span class="fstat-no" title="function not covered" >function() {</span>
|
366
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression(''), '');</span>
|
367
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression(undefined), '');</span>
|
368
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression(null), '');</span>
|
369
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression(false), '');</span>
|
370
|
-
|
371
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression(0), '0');</span>
|
372
|
-
});
|
373
|
-
it('should handle empty objects', <span class="fstat-no" title="function not covered" >function() {</span>
|
374
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression({}), {}.toString());</span>
|
375
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.escapeExpression([]), [].toString());</span>
|
376
|
-
});
|
377
|
-
});
|
378
|
-
|
379
|
-
describe('#isEmpty', function() {
|
380
|
-
it('should not be empty', <span class="fstat-no" title="function not covered" >function() {</span>
|
381
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty(undefined), true);</span>
|
382
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty(null), true);</span>
|
383
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty(false), true);</span>
|
384
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty(''), true);</span>
|
385
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty([]), true);</span>
|
386
|
-
});
|
387
|
-
|
388
|
-
it('should be empty', <span class="fstat-no" title="function not covered" >function() {</span>
|
389
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty(0), false);</span>
|
390
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty([1]), false);</span>
|
391
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty('foo'), false);</span>
|
392
|
-
<span class="cstat-no" title="statement not covered" > equals(Handlebars.Utils.isEmpty({bar: 1}), false);</span>
|
393
|
-
});
|
394
|
-
});
|
395
|
-
});
|
396
|
-
</pre></td></tr>
|
397
|
-
</table></pre>
|
398
|
-
|
399
|
-
</div>
|
400
|
-
<div class="footer">
|
401
|
-
<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>
|
402
|
-
</div>
|
403
|
-
|
404
|
-
<script src="../prettify.js"></script>
|
405
|
-
|
406
|
-
<script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
|
407
|
-
<script>
|
408
|
-
|
409
|
-
YUI().use('datatable', function (Y) {
|
410
|
-
|
411
|
-
var formatters = {
|
412
|
-
pct: function (o) {
|
413
|
-
o.className += o.record.get('classes')[o.column.key];
|
414
|
-
try {
|
415
|
-
return o.value.toFixed(2) + '%';
|
416
|
-
} catch (ex) { return o.value + '%'; }
|
417
|
-
},
|
418
|
-
html: function (o) {
|
419
|
-
o.className += o.record.get('classes')[o.column.key];
|
420
|
-
return o.record.get(o.column.key + '_html');
|
421
|
-
}
|
422
|
-
},
|
423
|
-
defaultFormatter = function (o) {
|
424
|
-
o.className += o.record.get('classes')[o.column.key];
|
425
|
-
return o.value;
|
426
|
-
};
|
427
|
-
|
428
|
-
function getColumns(theadNode) {
|
429
|
-
var colNodes = theadNode.all('tr th'),
|
430
|
-
cols = [],
|
431
|
-
col;
|
432
|
-
colNodes.each(function (colNode) {
|
433
|
-
col = {
|
434
|
-
key: colNode.getAttribute('data-col'),
|
435
|
-
label: colNode.get('innerHTML') || ' ',
|
436
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
437
|
-
className: colNode.getAttribute('class'),
|
438
|
-
type: colNode.getAttribute('data-type'),
|
439
|
-
allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
|
440
|
-
};
|
441
|
-
col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
|
442
|
-
cols.push(col);
|
443
|
-
});
|
444
|
-
return cols;
|
445
|
-
}
|
446
|
-
|
447
|
-
function getRowData(trNode, cols) {
|
448
|
-
var tdNodes = trNode.all('td'),
|
449
|
-
i,
|
450
|
-
row = { classes: {} },
|
451
|
-
node,
|
452
|
-
name;
|
453
|
-
for (i = 0; i < cols.length; i += 1) {
|
454
|
-
name = cols[i].key;
|
455
|
-
node = tdNodes.item(i);
|
456
|
-
row[name] = node.getAttribute('data-value') || node.get('innerHTML');
|
457
|
-
row[name + '_html'] = node.get('innerHTML');
|
458
|
-
row.classes[name] = node.getAttribute('class');
|
459
|
-
//Y.log('Name: ' + name + '; Value: ' + row[name]);
|
460
|
-
if (cols[i].type === 'number') { row[name] = row[name] * 1; }
|
461
|
-
}
|
462
|
-
//Y.log(row);
|
463
|
-
return row;
|
464
|
-
}
|
465
|
-
|
466
|
-
function getData(tbodyNode, cols) {
|
467
|
-
var data = [];
|
468
|
-
tbodyNode.all('tr').each(function (trNode) {
|
469
|
-
data.push(getRowData(trNode, cols));
|
470
|
-
});
|
471
|
-
return data;
|
472
|
-
}
|
473
|
-
|
474
|
-
function replaceTable(node) {
|
475
|
-
if (!node) { return; }
|
476
|
-
var cols = getColumns(node.one('thead')),
|
477
|
-
data = getData(node.one('tbody'), cols),
|
478
|
-
table,
|
479
|
-
parent = node.get('parentNode');
|
480
|
-
|
481
|
-
table = new Y.DataTable({
|
482
|
-
columns: cols,
|
483
|
-
data: data,
|
484
|
-
sortBy: 'file'
|
485
|
-
});
|
486
|
-
parent.set('innerHTML', '');
|
487
|
-
table.render(parent);
|
488
|
-
}
|
489
|
-
|
490
|
-
Y.on('domready', function () {
|
491
|
-
replaceTable(Y.one('div.coverage-summary table'));
|
492
|
-
if (typeof prettyPrint === 'function') {
|
493
|
-
prettyPrint();
|
494
|
-
}
|
495
|
-
});
|
496
|
-
});
|
497
|
-
</script>
|
498
|
-
</body>
|
499
|
-
</html>
|