ember-resource 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/ember-resource.js +4 -0
- data/lib/ember-resource/version.rb +1 -1
- data/vendor/assets/javascripts/ember-resource/base.js +10 -0
- data/vendor/assets/javascripts/{ember-resource.js → ember-resource/ember-resource.js} +0 -0
- data/vendor/assets/javascripts/ember-resource/identity-map.js +594 -0
- data/vendor/assets/javascripts/lru.js +249 -0
- metadata +6 -2
File without changes
|
@@ -0,0 +1,594 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# githubog: http://ogp.me/ns/fb/githubog#">
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
+
<title>404 · GitHub</title>
|
7
|
+
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub" />
|
8
|
+
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub" />
|
9
|
+
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
<link href="https://a248.e.akamai.net/assets.github.com/stylesheets/bundles/github-bc426305c485a26fdfb8b717305d439a674a4394.css" media="screen" rel="stylesheet" type="text/css" />
|
17
|
+
<link href="https://a248.e.akamai.net/assets.github.com/stylesheets/bundles/github2-12aec20c2c4a5ea4a44e04a10aee6b53102fbe6c.css" media="screen" rel="stylesheet" type="text/css" />
|
18
|
+
|
19
|
+
|
20
|
+
<script src="https://a248.e.akamai.net/assets.github.com/javascripts/bundles/jquery-2d0d4e0119675485f7a3d0dd7f49420b63c552ae.js" type="text/javascript"></script>
|
21
|
+
<script src="https://a248.e.akamai.net/assets.github.com/javascripts/bundles/github-d6bbfcc99599106306b2914b9126e21ff397547c.js" type="text/javascript"></script>
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
</head>
|
26
|
+
|
27
|
+
|
28
|
+
<body class="logged_out vis-public env-production " data-blob-contribs-enabled="yes">
|
29
|
+
<div id="wrapper">
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
<div id="header" class="true clearfix">
|
36
|
+
<div class="container clearfix">
|
37
|
+
<a class="site-logo" href="https://github.com">
|
38
|
+
<!--[if IE]>
|
39
|
+
<img alt="GitHub" class="github-logo" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7.png?1323882716" />
|
40
|
+
<img alt="GitHub" class="github-logo-hover" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7-hover.png?1324325358" />
|
41
|
+
<![endif]-->
|
42
|
+
<img alt="GitHub" class="github-logo-4x" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x.png?1323882716" />
|
43
|
+
<img alt="GitHub" class="github-logo-4x-hover" height="30" src="https://a248.e.akamai.net/assets.github.com/images/modules/header/logov7@4x-hover.png?1324325358" />
|
44
|
+
</a>
|
45
|
+
|
46
|
+
<!--
|
47
|
+
make sure to use fully qualified URLs here since this nav
|
48
|
+
is used on error pages on other domains
|
49
|
+
-->
|
50
|
+
<ul class="top-nav logged_out">
|
51
|
+
<li class="pricing"><a href="https://github.com/plans">Signup and Pricing</a></li>
|
52
|
+
<li class="explore"><a href="https://github.com/explore">Explore GitHub</a></li>
|
53
|
+
<li class="features"><a href="https://github.com/features">Features</a></li>
|
54
|
+
<li class="blog"><a href="https://github.com/blog">Blog</a></li>
|
55
|
+
<li class="login"><a href="https://github.com/login?return_to=%2Fstaugaard%2Fember-resource%2Fmaster%2Fsrc%2Fidentity-map.js">Login</a></li>
|
56
|
+
</ul>
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
<div class="site clearfix">
|
67
|
+
<div class="container">
|
68
|
+
|
69
|
+
|
70
|
+
<style type="text/css">
|
71
|
+
#header{
|
72
|
+
border-bottom: 0;
|
73
|
+
}
|
74
|
+
.site{
|
75
|
+
padding: 0;
|
76
|
+
margin-top: -20px;
|
77
|
+
}
|
78
|
+
* {
|
79
|
+
margin: 0px;
|
80
|
+
padding: 0px;
|
81
|
+
}
|
82
|
+
#parallax_field{
|
83
|
+
overflow: hidden;
|
84
|
+
position: absolute;
|
85
|
+
left: 0;
|
86
|
+
top: 0;
|
87
|
+
height: 370px;
|
88
|
+
width: 100%;
|
89
|
+
}
|
90
|
+
#parallax_field #parallax_bg {
|
91
|
+
position: absolute;
|
92
|
+
top: -20px;
|
93
|
+
left: -20px;
|
94
|
+
width: 110%;
|
95
|
+
height: 425px;
|
96
|
+
z-index: 1;
|
97
|
+
}
|
98
|
+
#parallax_illustration {
|
99
|
+
display:block;
|
100
|
+
width: 940px;
|
101
|
+
height: 370px;
|
102
|
+
position: relative;
|
103
|
+
overflow: hidden;
|
104
|
+
clear: both;
|
105
|
+
}
|
106
|
+
#parallax_illustration #parallax_error_text {
|
107
|
+
position: absolute;
|
108
|
+
top: 72px;
|
109
|
+
left: 72px;
|
110
|
+
z-index: 10;
|
111
|
+
}
|
112
|
+
#parallax_illustration #parallax_octocat {
|
113
|
+
position: absolute;
|
114
|
+
top: 94px;
|
115
|
+
left: 356px;
|
116
|
+
z-index: 9;
|
117
|
+
}
|
118
|
+
#parallax_illustration #parallax_speeder {
|
119
|
+
position: absolute;
|
120
|
+
top: 150px;
|
121
|
+
left: 432px;
|
122
|
+
z-index: 8;
|
123
|
+
}
|
124
|
+
#parallax_illustration #parallax_octocatshadow {
|
125
|
+
position: absolute;
|
126
|
+
top: 297px;
|
127
|
+
left: 371px;
|
128
|
+
z-index: 7;
|
129
|
+
}
|
130
|
+
#parallax_illustration #parallax_speedershadow {
|
131
|
+
position: absolute;
|
132
|
+
top: 263px;
|
133
|
+
left: 442px;
|
134
|
+
z-index: 6;
|
135
|
+
}
|
136
|
+
#parallax_illustration #parallax_building_1 {
|
137
|
+
position: absolute;
|
138
|
+
top: 73px;
|
139
|
+
left: 467px;
|
140
|
+
z-index: 5;
|
141
|
+
}
|
142
|
+
#parallax_illustration #parallax_building_2 {
|
143
|
+
position: absolute;
|
144
|
+
top: 113px;
|
145
|
+
left: 762px;
|
146
|
+
z-index: 4;
|
147
|
+
}
|
148
|
+
#footer {
|
149
|
+
margin-top: 0px;
|
150
|
+
z-index: 12;
|
151
|
+
}
|
152
|
+
</style>
|
153
|
+
|
154
|
+
|
155
|
+
<div id="parallax_field">
|
156
|
+
<img alt="building" class="js-plaxify" data-invert="true" data-xrange="0" data-yrange="20" height="415" id="parallax_bg" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_bg.jpg?1315867479" width="940" />
|
157
|
+
</div>
|
158
|
+
<div id="parallax_illustration">
|
159
|
+
<img alt="404 | “This is not the web page you are looking for”" class="js-plaxify" data-xrange="20" data-yrange="10" height="249" id="parallax_error_text" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_errortext.png?1315867479" width="271" />
|
160
|
+
<img alt="Octobi Wan Catnobi" class="js-plaxify" data-xrange="10" data-yrange="10" height="230" id="parallax_octocat" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_octocat.png?1315867479" width="188" />
|
161
|
+
<img alt="land speeder" class="js-plaxify" data-xrange="10" data-yrange="10" height="156" id="parallax_speeder" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_speeder.png?1315867479" width="440" />
|
162
|
+
<img alt="Octobi Wan Catnobi's shadow" class="js-plaxify" data-xrange="10" data-yrange="10" height="49" id="parallax_octocatshadow" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_octocatshadow.png?1315867479" width="166" />
|
163
|
+
<img alt="land speeder's shadow" class="js-plaxify" data-xrange="10" data-yrange="10" height="75" id="parallax_speedershadow" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_speedershadow.png?1315867479" width="430" />
|
164
|
+
<img alt="building" class="js-plaxify" data-invert="true" data-xrange="50" data-yrange="20" height="123" id="parallax_building_1" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_building_1.png?1315867479" width="304" />
|
165
|
+
<img alt="building" class="js-plaxify" data-invert="true" data-xrange="75" data-yrange="30" height="50" id="parallax_building_2" src="https://a248.e.akamai.net/assets.github.com/images/modules/404/parallax_building_2.png?1315867479" width="116" />
|
166
|
+
</div>
|
167
|
+
|
168
|
+
</div>
|
169
|
+
<div class="context-overlay"></div>
|
170
|
+
</div>
|
171
|
+
<div id="footer-push"></div><!-- hack for sticky footer -->
|
172
|
+
</div><!-- end of wrapper - hack for sticky footer -->
|
173
|
+
|
174
|
+
<!-- footer -->
|
175
|
+
<div id="footer" >
|
176
|
+
|
177
|
+
<div class="upper_footer">
|
178
|
+
<div class="container clearfix">
|
179
|
+
|
180
|
+
<!--[if IE]><h4 id="blacktocat_ie">GitHub Links</h4><![endif]-->
|
181
|
+
<![if !IE]><h4 id="blacktocat">GitHub Links</h4><![endif]>
|
182
|
+
|
183
|
+
<ul class="footer_nav">
|
184
|
+
<h4>GitHub</h4>
|
185
|
+
<li><a href="https://github.com/about">About</a></li>
|
186
|
+
<li><a href="https://github.com/blog">Blog</a></li>
|
187
|
+
<li><a href="https://github.com/features">Features</a></li>
|
188
|
+
<li><a href="https://github.com/contact">Contact & Support</a></li>
|
189
|
+
<li><a href="https://github.com/training">Training</a></li>
|
190
|
+
<li><a href="http://enterprise.github.com/">GitHub Enterprise</a></li>
|
191
|
+
<li><a href="http://status.github.com/">Site Status</a></li>
|
192
|
+
</ul>
|
193
|
+
|
194
|
+
<ul class="footer_nav">
|
195
|
+
<h4>Tools</h4>
|
196
|
+
<li><a href="http://get.gaug.es/">Gauges: Analyze web traffic</a></li>
|
197
|
+
<li><a href="http://speakerdeck.com">Speaker Deck: Presentations</a></li>
|
198
|
+
<li><a href="https://gist.github.com">Gist: Code snippets</a></li>
|
199
|
+
<li><a href="http://mac.github.com/">GitHub for Mac</a></li>
|
200
|
+
<li><a href="http://mobile.github.com/">Issues for iPhone</a></li>
|
201
|
+
<li><a href="http://jobs.github.com/">Job Board</a></li>
|
202
|
+
</ul>
|
203
|
+
|
204
|
+
<ul class="footer_nav">
|
205
|
+
<h4>Extras</h4>
|
206
|
+
<li><a href="http://shop.github.com/">GitHub Shop</a></li>
|
207
|
+
<li><a href="http://octodex.github.com/">The Octodex</a></li>
|
208
|
+
</ul>
|
209
|
+
|
210
|
+
<ul class="footer_nav">
|
211
|
+
<h4>Documentation</h4>
|
212
|
+
<li><a href="http://help.github.com/">GitHub Help</a></li>
|
213
|
+
<li><a href="http://developer.github.com/">Developer API</a></li>
|
214
|
+
<li><a href="http://github.github.com/github-flavored-markdown/">GitHub Flavored Markdown</a></li>
|
215
|
+
<li><a href="http://pages.github.com/">GitHub Pages</a></li>
|
216
|
+
</ul>
|
217
|
+
|
218
|
+
</div><!-- /.site -->
|
219
|
+
</div><!-- /.upper_footer -->
|
220
|
+
|
221
|
+
<div class="lower_footer">
|
222
|
+
<div class="container clearfix">
|
223
|
+
<!--[if IE]><div id="legal_ie"><![endif]-->
|
224
|
+
<![if !IE]><div id="legal"><![endif]>
|
225
|
+
<ul>
|
226
|
+
<li><a href="https://github.com/site/terms">Terms of Service</a></li>
|
227
|
+
<li><a href="https://github.com/site/privacy">Privacy</a></li>
|
228
|
+
<li><a href="https://github.com/security">Security</a></li>
|
229
|
+
</ul>
|
230
|
+
|
231
|
+
<p>© 2012 <span title="0.08351s from fe9.rs.github.com">GitHub</span> Inc. All rights reserved.</p>
|
232
|
+
</div><!-- /#legal or /#legal_ie-->
|
233
|
+
|
234
|
+
<div class="sponsor">
|
235
|
+
<a href="http://www.rackspace.com" class="logo">
|
236
|
+
<img alt="Dedicated Server" height="36" src="https://a248.e.akamai.net/assets.github.com/images/modules/footer/rackspaces_logo.png?1329521039" width="38" />
|
237
|
+
</a>
|
238
|
+
Powered by the <a href="http://www.rackspace.com ">Dedicated
|
239
|
+
Servers</a> and<br/> <a href="http://www.rackspacecloud.com">Cloud
|
240
|
+
Computing</a> of Rackspace Hosting<span>®</span>
|
241
|
+
</div>
|
242
|
+
</div><!-- /.site -->
|
243
|
+
</div><!-- /.lower_footer -->
|
244
|
+
|
245
|
+
</div><!-- /#footer -->
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<div id="keyboard_shortcuts_pane" class="instapaper_ignore readability-extra" style="display:none">
|
250
|
+
<h2>Keyboard Shortcuts <small><a href="#" class="js-see-all-keyboard-shortcuts">(see all)</a></small></h2>
|
251
|
+
|
252
|
+
<div class="columns threecols">
|
253
|
+
<div class="column first">
|
254
|
+
<h3>Site wide shortcuts</h3>
|
255
|
+
<dl class="keyboard-mappings">
|
256
|
+
<dt>s</dt>
|
257
|
+
<dd>Focus site search</dd>
|
258
|
+
</dl>
|
259
|
+
<dl class="keyboard-mappings">
|
260
|
+
<dt>?</dt>
|
261
|
+
<dd>Bring up this help dialog</dd>
|
262
|
+
</dl>
|
263
|
+
</div><!-- /.column.first -->
|
264
|
+
|
265
|
+
<div class="column middle" style='display:none'>
|
266
|
+
<h3>Commit list</h3>
|
267
|
+
<dl class="keyboard-mappings">
|
268
|
+
<dt>j</dt>
|
269
|
+
<dd>Move selection down</dd>
|
270
|
+
</dl>
|
271
|
+
<dl class="keyboard-mappings">
|
272
|
+
<dt>k</dt>
|
273
|
+
<dd>Move selection up</dd>
|
274
|
+
</dl>
|
275
|
+
<dl class="keyboard-mappings">
|
276
|
+
<dt>c <em>or</em> o <em>or</em> enter</dt>
|
277
|
+
<dd>Open commit</dd>
|
278
|
+
</dl>
|
279
|
+
<dl class="keyboard-mappings">
|
280
|
+
<dt>y</dt>
|
281
|
+
<dd>Expand URL to its canonical form</dd>
|
282
|
+
</dl>
|
283
|
+
</div><!-- /.column.first -->
|
284
|
+
|
285
|
+
<div class="column last" style='display:none'>
|
286
|
+
<h3>Pull request list</h3>
|
287
|
+
<dl class="keyboard-mappings">
|
288
|
+
<dt>j</dt>
|
289
|
+
<dd>Move selection down</dd>
|
290
|
+
</dl>
|
291
|
+
<dl class="keyboard-mappings">
|
292
|
+
<dt>k</dt>
|
293
|
+
<dd>Move selection up</dd>
|
294
|
+
</dl>
|
295
|
+
<dl class="keyboard-mappings">
|
296
|
+
<dt>o <em>or</em> enter</dt>
|
297
|
+
<dd>Open issue</dd>
|
298
|
+
</dl>
|
299
|
+
<dl class="keyboard-mappings">
|
300
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> enter</dt>
|
301
|
+
<dd>Submit comment</dd>
|
302
|
+
</dl>
|
303
|
+
</div><!-- /.columns.last -->
|
304
|
+
|
305
|
+
</div><!-- /.columns.equacols -->
|
306
|
+
|
307
|
+
<div style='display:none'>
|
308
|
+
<div class="rule"></div>
|
309
|
+
|
310
|
+
<h3>Issues</h3>
|
311
|
+
|
312
|
+
<div class="columns threecols">
|
313
|
+
<div class="column first">
|
314
|
+
<dl class="keyboard-mappings">
|
315
|
+
<dt>j</dt>
|
316
|
+
<dd>Move selection down</dd>
|
317
|
+
</dl>
|
318
|
+
<dl class="keyboard-mappings">
|
319
|
+
<dt>k</dt>
|
320
|
+
<dd>Move selection up</dd>
|
321
|
+
</dl>
|
322
|
+
<dl class="keyboard-mappings">
|
323
|
+
<dt>x</dt>
|
324
|
+
<dd>Toggle selection</dd>
|
325
|
+
</dl>
|
326
|
+
<dl class="keyboard-mappings">
|
327
|
+
<dt>o <em>or</em> enter</dt>
|
328
|
+
<dd>Open issue</dd>
|
329
|
+
</dl>
|
330
|
+
<dl class="keyboard-mappings">
|
331
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> enter</dt>
|
332
|
+
<dd>Submit comment</dd>
|
333
|
+
</dl>
|
334
|
+
</div><!-- /.column.first -->
|
335
|
+
<div class="column last">
|
336
|
+
<dl class="keyboard-mappings">
|
337
|
+
<dt>c</dt>
|
338
|
+
<dd>Create issue</dd>
|
339
|
+
</dl>
|
340
|
+
<dl class="keyboard-mappings">
|
341
|
+
<dt>l</dt>
|
342
|
+
<dd>Create label</dd>
|
343
|
+
</dl>
|
344
|
+
<dl class="keyboard-mappings">
|
345
|
+
<dt>i</dt>
|
346
|
+
<dd>Back to inbox</dd>
|
347
|
+
</dl>
|
348
|
+
<dl class="keyboard-mappings">
|
349
|
+
<dt>u</dt>
|
350
|
+
<dd>Back to issues</dd>
|
351
|
+
</dl>
|
352
|
+
<dl class="keyboard-mappings">
|
353
|
+
<dt>/</dt>
|
354
|
+
<dd>Focus issues search</dd>
|
355
|
+
</dl>
|
356
|
+
</div>
|
357
|
+
</div>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
<div style='display:none'>
|
361
|
+
<div class="rule"></div>
|
362
|
+
|
363
|
+
<h3>Issues Dashboard</h3>
|
364
|
+
|
365
|
+
<div class="columns threecols">
|
366
|
+
<div class="column first">
|
367
|
+
<dl class="keyboard-mappings">
|
368
|
+
<dt>j</dt>
|
369
|
+
<dd>Move selection down</dd>
|
370
|
+
</dl>
|
371
|
+
<dl class="keyboard-mappings">
|
372
|
+
<dt>k</dt>
|
373
|
+
<dd>Move selection up</dd>
|
374
|
+
</dl>
|
375
|
+
<dl class="keyboard-mappings">
|
376
|
+
<dt>o <em>or</em> enter</dt>
|
377
|
+
<dd>Open issue</dd>
|
378
|
+
</dl>
|
379
|
+
</div><!-- /.column.first -->
|
380
|
+
</div>
|
381
|
+
</div>
|
382
|
+
|
383
|
+
<div style='display:none'>
|
384
|
+
<div class="rule"></div>
|
385
|
+
|
386
|
+
<h3>Network Graph</h3>
|
387
|
+
<div class="columns equacols">
|
388
|
+
<div class="column first">
|
389
|
+
<dl class="keyboard-mappings">
|
390
|
+
<dt><span class="badmono">←</span> <em>or</em> h</dt>
|
391
|
+
<dd>Scroll left</dd>
|
392
|
+
</dl>
|
393
|
+
<dl class="keyboard-mappings">
|
394
|
+
<dt><span class="badmono">→</span> <em>or</em> l</dt>
|
395
|
+
<dd>Scroll right</dd>
|
396
|
+
</dl>
|
397
|
+
<dl class="keyboard-mappings">
|
398
|
+
<dt><span class="badmono">↑</span> <em>or</em> k</dt>
|
399
|
+
<dd>Scroll up</dd>
|
400
|
+
</dl>
|
401
|
+
<dl class="keyboard-mappings">
|
402
|
+
<dt><span class="badmono">↓</span> <em>or</em> j</dt>
|
403
|
+
<dd>Scroll down</dd>
|
404
|
+
</dl>
|
405
|
+
<dl class="keyboard-mappings">
|
406
|
+
<dt>t</dt>
|
407
|
+
<dd>Toggle visibility of head labels</dd>
|
408
|
+
</dl>
|
409
|
+
</div><!-- /.column.first -->
|
410
|
+
<div class="column last">
|
411
|
+
<dl class="keyboard-mappings">
|
412
|
+
<dt>shift <span class="badmono">←</span> <em>or</em> shift h</dt>
|
413
|
+
<dd>Scroll all the way left</dd>
|
414
|
+
</dl>
|
415
|
+
<dl class="keyboard-mappings">
|
416
|
+
<dt>shift <span class="badmono">→</span> <em>or</em> shift l</dt>
|
417
|
+
<dd>Scroll all the way right</dd>
|
418
|
+
</dl>
|
419
|
+
<dl class="keyboard-mappings">
|
420
|
+
<dt>shift <span class="badmono">↑</span> <em>or</em> shift k</dt>
|
421
|
+
<dd>Scroll all the way up</dd>
|
422
|
+
</dl>
|
423
|
+
<dl class="keyboard-mappings">
|
424
|
+
<dt>shift <span class="badmono">↓</span> <em>or</em> shift j</dt>
|
425
|
+
<dd>Scroll all the way down</dd>
|
426
|
+
</dl>
|
427
|
+
</div><!-- /.column.last -->
|
428
|
+
</div>
|
429
|
+
</div>
|
430
|
+
|
431
|
+
<div >
|
432
|
+
<div class="rule"></div>
|
433
|
+
<div class="columns threecols">
|
434
|
+
<div class="column first" >
|
435
|
+
<h3>Source Code Browsing</h3>
|
436
|
+
<dl class="keyboard-mappings">
|
437
|
+
<dt>t</dt>
|
438
|
+
<dd>Activates the file finder</dd>
|
439
|
+
</dl>
|
440
|
+
<dl class="keyboard-mappings">
|
441
|
+
<dt>l</dt>
|
442
|
+
<dd>Jump to line</dd>
|
443
|
+
</dl>
|
444
|
+
<dl class="keyboard-mappings">
|
445
|
+
<dt>w</dt>
|
446
|
+
<dd>Switch branch/tag</dd>
|
447
|
+
</dl>
|
448
|
+
<dl class="keyboard-mappings">
|
449
|
+
<dt>y</dt>
|
450
|
+
<dd>Expand URL to its canonical form</dd>
|
451
|
+
</dl>
|
452
|
+
</div>
|
453
|
+
</div>
|
454
|
+
</div>
|
455
|
+
|
456
|
+
<div style='display:none'>
|
457
|
+
<div class="rule"></div>
|
458
|
+
<div class="columns threecols">
|
459
|
+
<div class="column first">
|
460
|
+
<h3>Browsing Commits</h3>
|
461
|
+
<dl class="keyboard-mappings">
|
462
|
+
<dt><span class="platform-mac">⌘</span><span class="platform-other">ctrl</span> <em>+</em> enter</dt>
|
463
|
+
<dd>Submit comment</dd>
|
464
|
+
</dl>
|
465
|
+
<dl class="keyboard-mappings">
|
466
|
+
<dt>escape</dt>
|
467
|
+
<dd>Close form</dd>
|
468
|
+
</dl>
|
469
|
+
</div>
|
470
|
+
</div>
|
471
|
+
</div>
|
472
|
+
</div>
|
473
|
+
|
474
|
+
<div id="markdown-help" class="instapaper_ignore readability-extra">
|
475
|
+
<h2>Markdown Cheat Sheet</h2>
|
476
|
+
|
477
|
+
<div class="cheatsheet-content">
|
478
|
+
|
479
|
+
<div class="mod">
|
480
|
+
<div class="col">
|
481
|
+
<h3>Format Text</h3>
|
482
|
+
<p>Headers</p>
|
483
|
+
<pre>
|
484
|
+
# This is an <h1> tag
|
485
|
+
## This is an <h2> tag
|
486
|
+
###### This is an <h6> tag</pre>
|
487
|
+
<p>Text styles</p>
|
488
|
+
<pre>
|
489
|
+
*This text will be italic*
|
490
|
+
_This will also be italic_
|
491
|
+
**This text will be bold**
|
492
|
+
__This will also be bold__
|
493
|
+
|
494
|
+
*You **can** combine them*
|
495
|
+
</pre>
|
496
|
+
</div>
|
497
|
+
<div class="col">
|
498
|
+
<h3>Lists</h3>
|
499
|
+
<p>Unordered</p>
|
500
|
+
<pre>
|
501
|
+
* Item 1
|
502
|
+
* Item 2
|
503
|
+
* Item 2a
|
504
|
+
* Item 2b</pre>
|
505
|
+
<p>Ordered</p>
|
506
|
+
<pre>
|
507
|
+
1. Item 1
|
508
|
+
2. Item 2
|
509
|
+
3. Item 3
|
510
|
+
* Item 3a
|
511
|
+
* Item 3b</pre>
|
512
|
+
</div>
|
513
|
+
<div class="col">
|
514
|
+
<h3>Miscellaneous</h3>
|
515
|
+
<p>Images</p>
|
516
|
+
<pre>
|
517
|
+
![GitHub Logo](/images/logo.png)
|
518
|
+
Format: ![Alt Text](url)
|
519
|
+
</pre>
|
520
|
+
<p>Links</p>
|
521
|
+
<pre>
|
522
|
+
http://github.com - automatic!
|
523
|
+
[GitHub](http://github.com)</pre>
|
524
|
+
<p>Blockquotes</p>
|
525
|
+
<pre>
|
526
|
+
As Kanye West said:
|
527
|
+
|
528
|
+
> We're living the future so
|
529
|
+
> the present is our past.
|
530
|
+
</pre>
|
531
|
+
</div>
|
532
|
+
</div>
|
533
|
+
<div class="rule"></div>
|
534
|
+
|
535
|
+
<h3>Code Examples in Markdown</h3>
|
536
|
+
<div class="col">
|
537
|
+
<p>Syntax highlighting with <a href="http://github.github.com/github-flavored-markdown/" title="GitHub Flavored Markdown" target="_blank">GFM</a></p>
|
538
|
+
<pre>
|
539
|
+
```javascript
|
540
|
+
function fancyAlert(arg) {
|
541
|
+
if(arg) {
|
542
|
+
$.facebox({div:'#foo'})
|
543
|
+
}
|
544
|
+
}
|
545
|
+
```</pre>
|
546
|
+
</div>
|
547
|
+
<div class="col">
|
548
|
+
<p>Or, indent your code 4 spaces</p>
|
549
|
+
<pre>
|
550
|
+
Here is a Python code example
|
551
|
+
without syntax highlighting:
|
552
|
+
|
553
|
+
def foo:
|
554
|
+
if not bar:
|
555
|
+
return true</pre>
|
556
|
+
</div>
|
557
|
+
<div class="col">
|
558
|
+
<p>Inline code for comments</p>
|
559
|
+
<pre>
|
560
|
+
I think you should use an
|
561
|
+
`<addr>` element here instead.</pre>
|
562
|
+
</div>
|
563
|
+
</div>
|
564
|
+
|
565
|
+
</div>
|
566
|
+
</div>
|
567
|
+
|
568
|
+
|
569
|
+
<div class="ajax-error-message">
|
570
|
+
<p><span class="icon"></span> Something went wrong with that request. Please try again. <a href="javascript:;" class="ajax-error-dismiss">Dismiss</a></p>
|
571
|
+
</div>
|
572
|
+
|
573
|
+
<div id="logo-popup">
|
574
|
+
<h2>Looking for the GitHub logo?</h2>
|
575
|
+
<ul>
|
576
|
+
<li>
|
577
|
+
<h4>GitHub Logo</h4>
|
578
|
+
<a href="http://github-media-downloads.s3.amazonaws.com/GitHub_Logos.zip"><img alt="Github_logo" src="https://a248.e.akamai.net/assets.github.com/images/modules/about_page/github_logo.png?1315867479" /></a>
|
579
|
+
<a href="http://github-media-downloads.s3.amazonaws.com/GitHub_Logos.zip" class="minibutton btn-download download"><span><span class="icon"></span>Download</span></a>
|
580
|
+
</li>
|
581
|
+
<li>
|
582
|
+
<h4>The Octocat</h4>
|
583
|
+
<a href="http://github-media-downloads.s3.amazonaws.com/Octocats.zip"><img alt="Octocat" src="https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png?1315867479" /></a>
|
584
|
+
<a href="http://github-media-downloads.s3.amazonaws.com/Octocats.zip" class="minibutton btn-download download"><span><span class="icon"></span>Download</span></a>
|
585
|
+
</li>
|
586
|
+
</ul>
|
587
|
+
</div>
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
<span id='server_response_time' data-time='0.08585' data-host='fe9'></span>
|
593
|
+
</body>
|
594
|
+
</html>
|
@@ -0,0 +1,249 @@
|
|
1
|
+
/**
|
2
|
+
* A doubly linked list-based Least Recently Used (LRU) cache. Will keep most
|
3
|
+
* recently used items while discarding least recently used items when its limit
|
4
|
+
* is reached.
|
5
|
+
*
|
6
|
+
* Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>
|
7
|
+
* See README.md for details.
|
8
|
+
*
|
9
|
+
* Illustration of the design:
|
10
|
+
*
|
11
|
+
* entry entry entry entry
|
12
|
+
* ______ ______ ______ ______
|
13
|
+
* | head |.newer => | |.newer => | |.newer => | tail |
|
14
|
+
* | A | | B | | C | | D |
|
15
|
+
* |______| <= older.|______| <= older.|______| <= older.|______|
|
16
|
+
*
|
17
|
+
* removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added
|
18
|
+
*/
|
19
|
+
function LRUCache (limit) {
|
20
|
+
// Current size of the cache. (Read-only).
|
21
|
+
this.size = 0;
|
22
|
+
// Maximum number of items this cache can hold.
|
23
|
+
this.limit = limit;
|
24
|
+
this._keymap = {};
|
25
|
+
}
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Put <value> into the cache associated with <key>. Returns the entry which was
|
29
|
+
* removed to make room for the new entry. Otherwise undefined is returned
|
30
|
+
* (i.e. if there was enough room already).
|
31
|
+
*/
|
32
|
+
LRUCache.prototype.put = function(key, value) {
|
33
|
+
var entry = {key:key, value:value};
|
34
|
+
// Note: No protection agains replacing, and thus orphan entries. By design.
|
35
|
+
this._keymap[key] = entry;
|
36
|
+
if (this.tail) {
|
37
|
+
// link previous tail to the new tail (entry)
|
38
|
+
this.tail.newer = entry;
|
39
|
+
entry.older = this.tail;
|
40
|
+
} else {
|
41
|
+
// we're first in -- yay
|
42
|
+
this.head = entry;
|
43
|
+
}
|
44
|
+
// add new entry to the end of the linked list -- it's now the freshest entry.
|
45
|
+
this.tail = entry;
|
46
|
+
if (this.size === this.limit) {
|
47
|
+
// we hit the limit -- remove the head
|
48
|
+
return this.shift();
|
49
|
+
} else {
|
50
|
+
// increase the size counter
|
51
|
+
this.size++;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Purge the least recently used (oldest) entry from the cache. Returns the
|
57
|
+
* removed entry or undefined if the cache was empty.
|
58
|
+
*
|
59
|
+
* If you need to perform any form of finalization of purged items, this is a
|
60
|
+
* good place to do it. Simply override/replace this function:
|
61
|
+
*
|
62
|
+
* var c = new LRUCache(123);
|
63
|
+
* c.shift = function() {
|
64
|
+
* var entry = LRUCache.prototype.shift.call(this);
|
65
|
+
* doSomethingWith(entry);
|
66
|
+
* return entry;
|
67
|
+
* }
|
68
|
+
*/
|
69
|
+
LRUCache.prototype.shift = function() {
|
70
|
+
// todo: handle special case when limit == 1
|
71
|
+
var entry = this.head;
|
72
|
+
if (entry) {
|
73
|
+
if (this.head.newer) {
|
74
|
+
this.head = this.head.newer;
|
75
|
+
this.head.older = undefined;
|
76
|
+
} else {
|
77
|
+
this.head = undefined;
|
78
|
+
}
|
79
|
+
// Remove last strong reference to <entry> and remove links from the purged
|
80
|
+
// entry being returned:
|
81
|
+
entry.newer = entry.older = undefined;
|
82
|
+
// delete is slow, but we need to do this to avoid uncontrollable growth:
|
83
|
+
delete this._keymap[entry.key];
|
84
|
+
}
|
85
|
+
return entry;
|
86
|
+
}
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Get and register recent use of <key>. Returns the value associated with <key>
|
90
|
+
* or undefined if not in cache.
|
91
|
+
*/
|
92
|
+
LRUCache.prototype.get = function(key, returnEntry) {
|
93
|
+
// First, find our cache entry
|
94
|
+
var entry = this._keymap[key];
|
95
|
+
if (entry === undefined) return; // Not cached. Sorry.
|
96
|
+
// As <key> was found in the cache, register it as being requested recently
|
97
|
+
if (entry === this.tail) {
|
98
|
+
// Already the most recenlty used entry, so no need to update the list
|
99
|
+
return entry.value;
|
100
|
+
}
|
101
|
+
// HEAD--------------TAIL
|
102
|
+
// <.older .newer>
|
103
|
+
// <--- add direction --
|
104
|
+
// A B C <D> E
|
105
|
+
if (entry.newer) {
|
106
|
+
if (entry === this.head)
|
107
|
+
this.head = entry.newer;
|
108
|
+
entry.newer.older = entry.older; // C <-- E.
|
109
|
+
}
|
110
|
+
if (entry.older)
|
111
|
+
entry.older.newer = entry.newer; // C. --> E
|
112
|
+
entry.newer = undefined; // D --x
|
113
|
+
entry.older = this.tail; // D. --> E
|
114
|
+
if (this.tail)
|
115
|
+
this.tail.newer = entry; // E. <-- D
|
116
|
+
this.tail = entry;
|
117
|
+
return returnEntry ? entry : entry.value;
|
118
|
+
}
|
119
|
+
|
120
|
+
// ----------------------------------------------------------------------------
|
121
|
+
// Following code is optional and can be removed without breaking the core
|
122
|
+
// functionality.
|
123
|
+
|
124
|
+
/**
|
125
|
+
* Check if <key> is in the cache without registering recent use. Feasible if
|
126
|
+
* you do not want to chage the state of the cache, but only "peek" at it.
|
127
|
+
* Returns the entry associated with <key> if found, or undefined if not found.
|
128
|
+
*/
|
129
|
+
LRUCache.prototype.find = function(key) {
|
130
|
+
return this._keymap[key];
|
131
|
+
}
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Update the value of entry with <key>. Returns the old value, or undefined if
|
135
|
+
* entry was not in the cache.
|
136
|
+
*/
|
137
|
+
LRUCache.prototype.set = function(key, value) {
|
138
|
+
var oldvalue, entry = this.get(key, true);
|
139
|
+
if (entry) {
|
140
|
+
oldvalue = entry.value;
|
141
|
+
entry.value = value;
|
142
|
+
} else {
|
143
|
+
oldvalue = this.put(key, value);
|
144
|
+
if (oldvalue) oldvalue = oldvalue.value;
|
145
|
+
}
|
146
|
+
return oldvalue;
|
147
|
+
}
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Remove entry <key> from cache and return its value. Returns undefined if not
|
151
|
+
* found.
|
152
|
+
*/
|
153
|
+
LRUCache.prototype.remove = function(key) {
|
154
|
+
var entry = this._keymap[key];
|
155
|
+
if (!entry) return;
|
156
|
+
delete this._keymap[entry.key]; // need to do delete unfortunately
|
157
|
+
if (entry.newer && entry.older) {
|
158
|
+
// relink the older entry with the newer entry
|
159
|
+
entry.older.newer = entry.newer;
|
160
|
+
entry.newer.older = entry.older;
|
161
|
+
} else if (entry.newer) {
|
162
|
+
// remove the link to us
|
163
|
+
entry.newer.older = undefined;
|
164
|
+
// link the newer entry to head
|
165
|
+
this.head = entry.newer;
|
166
|
+
} else if (entry.older) {
|
167
|
+
// remove the link to us
|
168
|
+
entry.older.newer = undefined;
|
169
|
+
// link the newer entry to head
|
170
|
+
this.tail = entry.older;
|
171
|
+
} else {// if(entry.older === undefined && entry.newer === undefined) {
|
172
|
+
this.head = this.tail = undefined;
|
173
|
+
}
|
174
|
+
|
175
|
+
this.size--;
|
176
|
+
return entry.value;
|
177
|
+
}
|
178
|
+
|
179
|
+
/** Removes all entries */
|
180
|
+
LRUCache.prototype.removeAll = function() {
|
181
|
+
// This should be safe, as we never expose strong refrences to the outside
|
182
|
+
this.head = this.tail = undefined;
|
183
|
+
this.size = 0;
|
184
|
+
this._keymap = {};
|
185
|
+
}
|
186
|
+
|
187
|
+
/**
|
188
|
+
* Return an array containing all keys of entries stored in the cache object, in
|
189
|
+
* arbitrary order.
|
190
|
+
*/
|
191
|
+
if (typeof Object.keys === 'function') {
|
192
|
+
LRUCache.prototype.keys = function() { return Object.keys(this._keymap); }
|
193
|
+
} else {
|
194
|
+
LRUCache.prototype.keys = function() {
|
195
|
+
var keys = [];
|
196
|
+
for (var k in this._keymap) keys.push(k);
|
197
|
+
return keys;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Call `fun` for each entry. Starting with the newest entry if `desc` is a true
|
203
|
+
* value, otherwise starts with the oldest (head) enrty and moves towards the
|
204
|
+
* tail.
|
205
|
+
*
|
206
|
+
* `fun` is called with 3 arguments in the context `context`:
|
207
|
+
* `fun.call(context, Object key, Object value, LRUCache self)`
|
208
|
+
*/
|
209
|
+
LRUCache.prototype.forEach = function(fun, context, desc) {
|
210
|
+
if (context === true) { desc = true; context = undefined; }
|
211
|
+
else if (typeof context !== 'object') context = this;
|
212
|
+
if (desc) {
|
213
|
+
var entry = this.tail;
|
214
|
+
while (entry) {
|
215
|
+
fun.call(context, entry.key, entry.value, this);
|
216
|
+
entry = entry.older;
|
217
|
+
}
|
218
|
+
} else {
|
219
|
+
var entry = this.head;
|
220
|
+
while (entry) {
|
221
|
+
fun.call(context, entry.key, entry.value, this);
|
222
|
+
entry = entry.newer;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
/** Returns a JSON (array) representation */
|
228
|
+
LRUCache.prototype.toJSON = function() {
|
229
|
+
var s = [], entry = this.head;
|
230
|
+
while (entry) {
|
231
|
+
s.push({key:entry.key.toJSON(), value:entry.value.toJSON()});
|
232
|
+
entry = entry.newer;
|
233
|
+
}
|
234
|
+
return s;
|
235
|
+
}
|
236
|
+
|
237
|
+
/** Returns a String representation */
|
238
|
+
LRUCache.prototype.toString = function() {
|
239
|
+
var s = '', entry = this.head;
|
240
|
+
while (entry) {
|
241
|
+
s += String(entry.key)+':'+entry.value;
|
242
|
+
if (entry = entry.newer)
|
243
|
+
s += ' < ';
|
244
|
+
}
|
245
|
+
return s;
|
246
|
+
}
|
247
|
+
|
248
|
+
// Export ourselves
|
249
|
+
if (typeof this === 'object') this.LRUCache = LRUCache;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ember-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -24,10 +24,14 @@ files:
|
|
24
24
|
- LICENSE
|
25
25
|
- README.md
|
26
26
|
- Rakefile
|
27
|
+
- app/assets/javascripts/ember-resource.js
|
27
28
|
- ember-resource.gemspec
|
28
29
|
- lib/ember-resource.rb
|
29
30
|
- lib/ember-resource/version.rb
|
30
|
-
- vendor/assets/javascripts/ember-resource.js
|
31
|
+
- vendor/assets/javascripts/ember-resource/base.js
|
32
|
+
- vendor/assets/javascripts/ember-resource/ember-resource.js
|
33
|
+
- vendor/assets/javascripts/ember-resource/identity-map.js
|
34
|
+
- vendor/assets/javascripts/lru.js
|
31
35
|
homepage: https://github.com/hedtek/ember-resource
|
32
36
|
licenses: []
|
33
37
|
post_install_message:
|