kea-rails 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kea-rails/version.rb +1 -1
  3. data/vendor/assets/components/Keypress/LICENSE +191 -0
  4. data/vendor/assets/components/Keypress/README.md +78 -0
  5. data/vendor/assets/components/Keypress/bower.json +28 -0
  6. data/vendor/assets/components/Keypress/keypress-2.1.0.min.js +33 -0
  7. data/vendor/assets/components/Keypress/keypress.coffee +921 -0
  8. data/vendor/assets/components/Keypress/keypress.js +1132 -0
  9. data/vendor/assets/components/Keypress/package.json +15 -0
  10. data/vendor/assets/components/attachejs/attache-jquery.js +47 -0
  11. data/vendor/assets/components/attachejs/attache-knockout.js +56 -0
  12. data/vendor/assets/components/attachejs/attache.css +10 -0
  13. data/vendor/assets/components/attachejs/attache.js +589 -0
  14. data/vendor/assets/components/attachejs/bower.json +36 -0
  15. data/vendor/assets/components/humane-js/bower.json +8 -0
  16. data/vendor/assets/components/humane-js/changelog.md +165 -0
  17. data/vendor/assets/components/humane-js/humane.js +238 -0
  18. data/vendor/assets/components/humane-js/humane.min.js +11 -0
  19. data/vendor/assets/components/humane-js/index.html +190 -0
  20. data/vendor/assets/components/humane-js/package.json +25 -0
  21. data/vendor/assets/components/humane-js/readme.md +85 -0
  22. data/vendor/assets/components/humane-js/test/issue23.html +11 -0
  23. data/vendor/assets/components/humane-js/test/issue36.html +9 -0
  24. data/vendor/assets/components/humane-js/test/issue38.html +15 -0
  25. data/vendor/assets/components/humane-js/test/issue49.html +9 -0
  26. data/vendor/assets/components/humane-js/theme-src/bigbox.styl +65 -0
  27. data/vendor/assets/components/humane-js/theme-src/boldlight.styl +64 -0
  28. data/vendor/assets/components/humane-js/theme-src/jackedup.styl +69 -0
  29. data/vendor/assets/components/humane-js/theme-src/libnotify.styl +61 -0
  30. data/vendor/assets/components/humane-js/theme-src/original.styl +51 -0
  31. data/vendor/assets/components/humane-js/themes/bigbox.css +123 -0
  32. data/vendor/assets/components/humane-js/themes/boldlight.css +122 -0
  33. data/vendor/assets/components/humane-js/themes/flatty.css +94 -0
  34. data/vendor/assets/components/humane-js/themes/jackedup.css +123 -0
  35. data/vendor/assets/components/humane-js/themes/libnotify.css +115 -0
  36. data/vendor/assets/components/humane-js/themes/original.css +72 -0
  37. data/vendor/assets/components/knockout-sortable/README.md +129 -0
  38. data/vendor/assets/components/knockout-sortable/bower.json +15 -0
  39. data/vendor/assets/components/knockout-sortable/build/knockout-sortable.js +358 -0
  40. data/vendor/assets/components/knockout-sortable/build/knockout-sortable.min.js +2 -0
  41. data/vendor/assets/components/uri.js/README.md +437 -0
  42. data/vendor/assets/components/uri.js/URI.jquery.json +38 -0
  43. data/vendor/assets/components/uri.js/about-uris.html +156 -0
  44. data/vendor/assets/components/uri.js/build.html +66 -0
  45. data/vendor/assets/components/uri.js/build.js +78 -0
  46. data/vendor/assets/components/uri.js/component.json +15 -0
  47. data/vendor/assets/components/uri.js/contribute.md +11 -0
  48. data/vendor/assets/components/uri.js/docs.html +1280 -0
  49. data/vendor/assets/components/uri.js/index.html +173 -0
  50. data/vendor/assets/components/uri.js/jquery-1.10.2.min.js +6 -0
  51. data/vendor/assets/components/uri.js/jquery-1.7.2.min.js +4 -0
  52. data/vendor/assets/components/uri.js/jquery-1.8.2.min.js +2 -0
  53. data/vendor/assets/components/uri.js/jquery-1.9.1.min.js +5 -0
  54. data/vendor/assets/components/uri.js/jquery-uri-plugin.html +203 -0
  55. data/vendor/assets/components/uri.js/package.json +75 -0
  56. data/vendor/assets/components/uri.js/prettify/lang-apollo.js +2 -0
  57. data/vendor/assets/components/uri.js/prettify/lang-clj.js +18 -0
  58. data/vendor/assets/components/uri.js/prettify/lang-css.js +2 -0
  59. data/vendor/assets/components/uri.js/prettify/lang-go.js +1 -0
  60. data/vendor/assets/components/uri.js/prettify/lang-hs.js +2 -0
  61. data/vendor/assets/components/uri.js/prettify/lang-lisp.js +3 -0
  62. data/vendor/assets/components/uri.js/prettify/lang-lua.js +2 -0
  63. data/vendor/assets/components/uri.js/prettify/lang-ml.js +2 -0
  64. data/vendor/assets/components/uri.js/prettify/lang-n.js +4 -0
  65. data/vendor/assets/components/uri.js/prettify/lang-proto.js +1 -0
  66. data/vendor/assets/components/uri.js/prettify/lang-scala.js +2 -0
  67. data/vendor/assets/components/uri.js/prettify/lang-sql.js +2 -0
  68. data/vendor/assets/components/uri.js/prettify/lang-tex.js +1 -0
  69. data/vendor/assets/components/uri.js/prettify/lang-vb.js +2 -0
  70. data/vendor/assets/components/uri.js/prettify/lang-vhdl.js +3 -0
  71. data/vendor/assets/components/uri.js/prettify/lang-wiki.js +2 -0
  72. data/vendor/assets/components/uri.js/prettify/lang-xq.js +3 -0
  73. data/vendor/assets/components/uri.js/prettify/lang-yaml.js +2 -0
  74. data/vendor/assets/components/uri.js/prettify/prettify.css +1 -0
  75. data/vendor/assets/components/uri.js/prettify/prettify.js +28 -0
  76. data/vendor/assets/components/uri.js/prettify/prettify.sunburst.css +52 -0
  77. data/vendor/assets/components/uri.js/screen.css +167 -0
  78. data/vendor/assets/components/uri.js/screen.js +39 -0
  79. data/vendor/assets/components/uri.js/src/IPv6.js +185 -0
  80. data/vendor/assets/components/uri.js/src/SecondLevelDomains.js +220 -0
  81. data/vendor/assets/components/uri.js/src/URI.fragmentQuery.js +103 -0
  82. data/vendor/assets/components/uri.js/src/URI.fragmentURI.js +96 -0
  83. data/vendor/assets/components/uri.js/src/URI.js +1938 -0
  84. data/vendor/assets/components/uri.js/src/URI.min.js +81 -0
  85. data/vendor/assets/components/uri.js/src/URITemplate.js +494 -0
  86. data/vendor/assets/components/uri.js/src/jquery.URI.js +232 -0
  87. data/vendor/assets/components/uri.js/src/jquery.URI.min.js +7 -0
  88. data/vendor/assets/components/uri.js/src/punycode.js +508 -0
  89. data/vendor/assets/components/uri.js/test/index.html +26 -0
  90. data/vendor/assets/components/uri.js/test/pre_libs.js +4 -0
  91. data/vendor/assets/components/uri.js/test/qunit/qunit-composite.css +13 -0
  92. data/vendor/assets/components/uri.js/test/qunit/qunit-composite.js +167 -0
  93. data/vendor/assets/components/uri.js/test/qunit/qunit.css +244 -0
  94. data/vendor/assets/components/uri.js/test/qunit/qunit.js +2212 -0
  95. data/vendor/assets/components/uri.js/test/test.URI.html +26 -0
  96. data/vendor/assets/components/uri.js/test/test.fragmentQuery.html +31 -0
  97. data/vendor/assets/components/uri.js/test/test.fragmentURI.html +31 -0
  98. data/vendor/assets/components/uri.js/test/test.jQuery-1.10.html +31 -0
  99. data/vendor/assets/components/uri.js/test/test.jQuery-1.7.html +31 -0
  100. data/vendor/assets/components/uri.js/test/test.jQuery-1.8.html +31 -0
  101. data/vendor/assets/components/uri.js/test/test.jQuery-1.9.html +31 -0
  102. data/vendor/assets/components/uri.js/test/test.js +1409 -0
  103. data/vendor/assets/components/uri.js/test/test_fragmentQuery.js +57 -0
  104. data/vendor/assets/components/uri.js/test/test_fragmentURI.js +59 -0
  105. data/vendor/assets/components/uri.js/test/test_jim.js +143 -0
  106. data/vendor/assets/components/uri.js/test/test_jquery.js +138 -0
  107. data/vendor/assets/components/uri.js/test/test_template.js +385 -0
  108. data/vendor/assets/components/uri.js/test/urls.js +1236 -0
  109. data/vendor/assets/components/uri.js/uri-template.html +234 -0
  110. data/vendor/assets/components/uri.js/utils/SLDs.php +37 -0
  111. data/vendor/assets/components/uri.js/utils/sld.js +101 -0
  112. data/vendor/assets/components/veiljs/bower.json +36 -0
  113. data/vendor/assets/components/veiljs/veil-jquery.js +47 -0
  114. data/vendor/assets/components/veiljs/veil-knockout.js +55 -0
  115. data/vendor/assets/components/veiljs/veil.js +465 -0
  116. data/vendor/assets/javascripts/fuse.js +472 -0
  117. data/vendor/assets/javascripts/jquery-ui.js +3844 -0
  118. data/vendor/assets/javascripts/knockout-3.2.0-debug.js +5299 -0
  119. data/vendor/assets/javascripts/moment.js +1902 -0
  120. data/vendor/assets/javascripts/pikaday.js +896 -0
  121. data/vendor/assets/stylesheets/pikaday.css +171 -0
  122. metadata +120 -1
@@ -0,0 +1,234 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <title>URI.js - URI-Template</title>
7
+ <meta name="description" content="URI.js is a Javascript library for working with URLs." />
8
+
9
+ <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
10
+ <script src="prettify/prettify.js" type="text/javascript"></script>
11
+ <script src="screen.js" type="text/javascript"></script>
12
+ <link href="screen.css" rel="stylesheet" type="text/css" />
13
+ <link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
14
+ <script src="src/URI.min.js" type="text/javascript"></script>
15
+ <script type="text/javascript">
16
+
17
+ var _gaq = _gaq || [];
18
+ _gaq.push(['_setAccount', 'UA-8922143-3']);
19
+ _gaq.push(['_trackPageview']);
20
+
21
+ (function() {
22
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
23
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
24
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
25
+ })();
26
+
27
+ </script>
28
+ <style type="text/css">
29
+ .tpl-operator {
30
+ font-weight: bold;
31
+ color: #669933;
32
+ }
33
+ .tpl-variable {
34
+ font-weight: bold;
35
+ color: #336699;
36
+ }
37
+ .tpl-modifier {
38
+ font-weight: bold;
39
+ color: #663399;
40
+ }
41
+
42
+ pre {
43
+ padding: 10px;
44
+ background: #EEE;
45
+ }
46
+
47
+ table {
48
+ width: 100%;
49
+ border: 1px solid #AAA;
50
+ border-collapse: collapse;
51
+ }
52
+ td, th {
53
+ border: 1px solid #AAA;
54
+ text-align: left;
55
+ padding: 3px;
56
+ }
57
+ th {
58
+ background: #EEE;
59
+ }
60
+ </style>
61
+ </head>
62
+ <body>
63
+ <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
64
+
65
+ <div id="container">
66
+ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
67
+
68
+ <ul class="menu">
69
+ <li><a href="/URI.js/">Intro</a></li>
70
+ <li><a href="about-uris.html">Understanding URIs</a></li>
71
+ <li><a href="docs.html">API-Documentation</a></li>
72
+ <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
73
+ <li class="active"><a href="uri-template.html">URI Template</a></li>
74
+ <li><a href="build.html">Build</a></li>
75
+ <li><a href="http://rodneyrehm.de/en/">Author</a></li>
76
+ </ul>
77
+
78
+ <h2>URI Template</h2>
79
+
80
+ <p>As of version 1.7.0 URI.js includes an implementation of URI Templates, as specified in <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a> (Level 4, March 2012).</p>
81
+
82
+
83
+ <h2>Using URI Templates</h2>
84
+
85
+ <pre class="prettyprint lang-js">
86
+ // creating a new URI Template
87
+ var template = new URITemplate("http://example.org/{file}");
88
+ var result = template.expand({file: "hello world.html"});
89
+ result === "http://example.org/hello%20world.html";
90
+
91
+ // of course you can call the constructor like a function and chain things:
92
+ result = URITemplate("http://example.org/{file}")
93
+ .expand({file: "hello world.html"});
94
+ result === "http://example.org/hello%20world.html";
95
+
96
+ // access via URI
97
+ result = URI.expand("http://example.org/{file}", {file: "hello world.html"});
98
+ // result == new URI("http://example.org/hello%20world.html");
99
+
100
+ // expand() accepts data-callbacks:
101
+ template.expand(function(key) {
102
+ var data = {file: "hello world.html"};
103
+ return data[key];
104
+ });
105
+
106
+ // expand() accepts key-callbacks:
107
+ template.expand({file : function(key) {
108
+ return "hello world.html";
109
+ }});
110
+ </pre>
111
+
112
+
113
+
114
+ <h2>URI Template Syntax</h2>
115
+
116
+ <p><em>Expressions</em> are placeholders which are to be substituted by the values their variables reference.</p>
117
+ <ul>
118
+ <li><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/</code></li>
119
+ <li><code>http://example.org/dictionary/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong></code></li>
120
+ <li><code>http://example.org/search<strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></li>
121
+ </ul>
122
+ <p>
123
+ An expression consists of an <span class="tpl-operator">operator</span> and a (comma-separated) list of <em>variable-specifications</em>.
124
+ A variable-specification consists of a <em class="tpl-variable">variable</em> and an optional <em class="tpl-modifier">modifier</em>.
125
+ </p>
126
+
127
+ <hr>
128
+ <p>Given the template</p>
129
+ <pre><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong><strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></pre>
130
+ <p>and the following data: </p>
131
+ <pre><code>{username: "rodneyrehm", term: "hello world", q: {a: "mars", b: "jupiter"}, lang: "en"}</code></pre>
132
+ <p>the expansion looks as follows:
133
+ <pre><code>"http://example.org/~rodneyrehm/h/hello%20world?a=mars&amp;b=jupiter&amp;lang=en"</code></pre>
134
+ <hr>
135
+
136
+ <p>List of supported <span class="tpl-operator">operators</span>:</p>
137
+ <table>
138
+ <tr><th>Operator</th><th>Description</th></tr>
139
+ <tr><td><code><em>None</em></code></td><td>Simple String Expansion;</td></tr>
140
+ <tr><td><code>+</code></td><td>Reserved character strings;</td></tr>
141
+ <tr><td><code>#</code></td><td>Fragment identifiers prefixed by "#";</td></tr>
142
+ <tr><td><code>.</code></td><td>Name labels or extensions prefixed by ".";</td></tr>
143
+ <tr><td><code>/</code></td><td>Path segments prefixed by "/";</td></tr>
144
+ <tr><td><code>;</code></td><td>Path parameter name or name=value pairs prefixed by ";";</td></tr>
145
+ <tr><td><code>?</code></td><td>Query component beginning with "?" and consisting of name=value pairs separated by "&amp;"; and,</td></tr>
146
+ <tr><td><code>&amp;</code></td><td>Continuation of query-style &amp;name=value pairs within a literal query component.</td></tr>
147
+ </table>
148
+
149
+ <p>List of supported <span class="tpl-modifier">modifiers</span>:</p>
150
+ <table>
151
+ <tr><th>Modifier</th><th>Description</th></tr>
152
+ <tr><td><code><em>None</em></code></td><td>No modification, arrays and objects are joined with ","</td></tr>
153
+ <tr><td><code>*</code></td><td>Explode arrays and objects (see tables below)</td></tr>
154
+ <tr><td><code>:3</code></td><td>Substring of the first 3 characters of the variable's value</td></tr>
155
+ </table>
156
+
157
+ <h3>Strings and Numbers</h3>
158
+ <p>
159
+ Given <code>{"var": "hello[world]"}</code>, the expression <code>{var}</code> expands to <code>hello%5Bworld%5D</code>.
160
+ The following table shows an output matrix for every possible operator/modifier combination produced for <code>string</code> input.
161
+ </p>
162
+ <table>
163
+ <tr><th></th><th colspan="3">Modifier</th></tr>
164
+ <tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
165
+ <tr><td><code><em>None</em></code></td><td><code>hello%5Bworld%5D</code></td><td><code>hello%5Bworld%5D</code></td><td><code>he</code></td></tr>
166
+ <tr><td><code><em>+</em></code></td><td><code>hello[world]</code></td><td><code>hello[world]</code></td><td><code>he</code></td></tr>
167
+ <tr><td><code>#</code></td><td><code>#hello[world]</code></td><td><code>#hello[world]</code></td><td><code>#he</code></td></tr>
168
+ <tr><td><code>.</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.he</code></td></tr>
169
+ <tr><td><code>/</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/he</code></td></tr>
170
+ <tr><td><code>;</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=he</code></td></tr>
171
+ <tr><td><code>?</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=he</code></td></tr>
172
+ <tr><td><code>&amp;</code></td><td><code>&amp;var=hello%5Bworld%5D</code></td><td><code>&amp;var=hello%5Bworld%5D</code></td><td><code>&amp;var=he</code></td></tr>
173
+ </table>
174
+
175
+
176
+ <h3>Arrays</h3>
177
+ <p>
178
+ Given <code>{"var": ["one", "two", "three"]}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
179
+ The following table shows an output matrix for every possible operator/modifier combination produced for <code>array</code> input.
180
+ </p>
181
+ <table>
182
+ <tr><th></th><th colspan="3">Modifier</th></tr>
183
+ <tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
184
+ <tr><td><code><em>None</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
185
+ <tr><td><code><em>+</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
186
+ <tr><td><code>#</code></td><td><code>#one,two,three</code></td><td><code>#one,two,three</code></td><td><code>#on,tw,th</code></td></tr>
187
+ <tr><td><code>.</code></td><td><code>.one,two,three</code></td><td><code>.one.two.three</code></td><td><code>.on,tw,th</code></td></tr>
188
+ <tr><td><code>/</code></td><td><code>/one,two,three</code></td><td><code>/one/two/three</code></td><td><code>/on,tw,th</code></td></tr>
189
+ <tr><td><code>;</code></td><td><code>;var=one,two,three</code></td><td><code>;var=one;var=two;var=three</code></td><td><code>;var=on,tw,th</code></td></tr>
190
+ <tr><td><code>?</code></td><td><code>?var=one,two,three</code></td><td><code>?var=one&amp;var=two&amp;var=three</code></td><td><code>?var=on,tw,th</code></td></tr>
191
+ <tr><td><code>&amp;</code></td><td><code>&amp;var=one,two,three</code></td><td><code>&amp;var=one&amp;var=two&amp;var=three</code></td><td><code>&amp;var=on,tw,th</code></td></tr>
192
+ </table>
193
+
194
+ <h3>Objects ("plain objects" / "hash maps")</h3>
195
+ <p>
196
+ Given <code>{"var": {"one": "alpha", "two": "bravo"}}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
197
+ The following table shows an output matrix for every possible operator/modifier combination produced for <code>object</code> input.
198
+ </p>
199
+ <table>
200
+ <tr><th></th><th colspan="3">Modifier</th></tr>
201
+ <tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
202
+ <tr><td><code><em>None</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
203
+ <tr><td><code><em>+</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
204
+ <tr><td><code>#</code></td><td><code>#one,alpha,two,bravo</code></td><td><code>#one=alpha,two=bravo</code></td><td><code>#on,al,tw,br</code></td></tr>
205
+ <tr><td><code>.</code></td><td><code>.one,alpha,two,bravo</code></td><td><code>.one=alpha.two=bravo</code></td><td><code>.on,al,tw,br</code></td></tr>
206
+ <tr><td><code>/</code></td><td><code>/one,alpha,two,bravo</code></td><td><code>/one=alpha/two=bravo</code></td><td><code>/on,al,tw,br</code></td></tr>
207
+ <tr><td><code>;</code></td><td><code>;var=one,alpha,two,bravo</code></td><td><code>;one=alpha;two=bravo</code></td><td><code>;var=on,al,tw,br</code></td></tr>
208
+ <tr><td><code>?</code></td><td><code>?var=one,alpha,two,bravo</code></td><td><code>?one=alpha&amp;two=bravo</code></td><td><code>?var=on,al,tw,br</code></td></tr>
209
+ <tr><td><code>&amp;</code></td><td><code>&amp;var=one,alpha,two,bravo</code></td><td><code>&amp;one=alpha&amp;two=bravo</code></td><td><code>&amp;var=on,al,tw,br</code></td></tr>
210
+ </table>
211
+
212
+
213
+
214
+ <h2>Limitations</h2>
215
+ <p>URI Template is a <em>Proposed Standard</em> and because of that I did not want to deviate from it. That said I'm not at all happy with how the specification turned out. Here are some of my thoughts:</p>
216
+ <ul>
217
+ <li>The <em>explode modifier</em> works the wrong way. <code>{?some_object}</code> should lead to <code>?foo=bar&amp;hello=world</code>, as this is the common expansion</li>
218
+ <li>The <em>prefix modifier</em> (which I would've named <em>truncate modifier</em>) only has an end-offset.
219
+ The specification says it's »used to partition an identifier space hierarchically«. <code>abc</code> may become <code>a/bc</code> or <code>a/ab/abc</code>.
220
+ But there is no way of modifying output to <code>a/b/c</code> or <code>a/b/abc</code>. Whenever I had to partition identifier spaces, I used one of the latter patterns.</li>
221
+ <li>Operators like <code>.</code> automatically prefix the expansion. So <code>{"var": ["filename", "extension"]}</code> and <code>{.var*}</code> results in <code>.filename.extension</code> - obviously not what I wanted.</li>
222
+ <li>Variable names (<em>varname</em>) may only contain <code>ALPHA / DIGIT / "_" / pct-encoded</code> and may not be decoded for resolving the reference. This simply feels weird, especially the "may not be decoded" part.</li>
223
+ <li>Other possible modifiers could include some simple character-munging like <em>UPPERCASE</em>, <em>LOWERCASE</em>, <em>CAPITALCASE</em></li>
224
+ <li><code>{/var,empty,empty}</code> results in <code>/foobar//</code> - clearly not what one intended</li>
225
+ <li><code>{var}</code> and <code>{"var" : {"a": "1", "b": "2"}}</code> results in <code>a,1,b,2</code> - excusemewhat? I would've expected <code>a=1,b=2</code> or <code>a:1,b:2</code> (in a perverse parallel universe).</li>
226
+ <li>Spaces in the <em>query string</em> should be encoded to <code>+</code>, not <code>%20</code> according to <a href="http://www.w3.org/TR/html401/interact/forms.html#form-content-type">application/x-www-form-urlencoded</a></li>
227
+ </ul>
228
+
229
+
230
+
231
+
232
+ </div>
233
+ </body>
234
+ </html>
@@ -0,0 +1,37 @@
1
+ <?php
2
+
3
+ $map = array();
4
+
5
+ // grab list of known SLDs from https://github.com/gavingmiller/second-level-domains
6
+ // using curl since file_get_contents() won't do SSL...
7
+ $url = 'https://raw.github.com/gavingmiller/second-level-domains/master/SLDs.csv';
8
+ $curl = curl_init($url);
9
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
10
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
11
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
12
+ curl_setopt($curl, CURLOPT_MAXREDIRS, 10);
13
+ $source = curl_exec($curl);
14
+
15
+
16
+ // $source is a CSV, but a rather simple one I wouldn't go through the hassle of using str_getcsv() for
17
+ $source = preg_split("/\r\n|\r|\n/", $source);
18
+ foreach ($source as $line) {
19
+ $t = explode(',', $line);
20
+ $tld = strtolower(substr($t[0], 1)); // skip the leading dot
21
+ $sld = strtolower(substr($t[1], 1, strrpos($t[1], '.') - 1));
22
+ if (!$tld || !$sld || strpos($sld, '.') !== false) {
23
+ continue;
24
+ }
25
+
26
+ $map[$tld][] = $sld;
27
+ }
28
+
29
+ // source seems to be tainted with duplicates (and false SLDs like "govt.uk")
30
+ // for now we don't care about false (or missing) SLDs
31
+ foreach ($map as $tld => &$slds) {
32
+ $slds = array_unique($slds);
33
+ sort($slds);
34
+ $slds = join('|', $slds);
35
+ }
36
+
37
+ echo json_encode($map);
@@ -0,0 +1,101 @@
1
+ var fs = require('fs');
2
+ var url = require('url');
3
+ var http = require('http');
4
+ var domains = {};
5
+
6
+ /*
7
+ Problem with PublicSuffix:
8
+ The list not only contains TLDs/SLDs, but also domains like "dyndns.org".
9
+ While this may be useful for Cookie-Origin-Policy, these domains are possibly
10
+ being handled by URI.js, considering URI("//dyndns.org").tld("com").
11
+ The list does not distinguish "official" TLDs from such domains.
12
+ (At least I have problems with treating "cc.ga.us" as a SLD)
13
+ */
14
+
15
+ http.get("http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1", function(res) {
16
+ res.on('data', function(data) {
17
+ data.toString().replace(/\r/g, "").split("\n").forEach(function(line) {
18
+ // skip empty lines, comments and TLDs
19
+ if (!line || (line[0] === "/" && line[1] === "/") || line.indexOf('.') === -1) {
20
+ return;
21
+ }
22
+
23
+ var parts = line.split('.');
24
+ var sld = parts.slice(0, -1).join('.');
25
+ var tld = parts.slice(-1);
26
+
27
+ if (parts.length < 2) {
28
+ return;
29
+ }
30
+
31
+ if (!domains[tld]) {
32
+ domains[tld] = [];
33
+ }
34
+
35
+ domains[tld].push(sld);
36
+ });
37
+ }).on('end', function() {
38
+ //file.end();
39
+ for (var tld in domains) {
40
+ domains[tld].sort();
41
+
42
+ // ! and * are sorted to the top
43
+ if (domains[tld][0][0] == '!') {
44
+ // we have wildcards and exclusions
45
+ } else if (domains[tld][0][0] == '*') {
46
+ // we have wildcards
47
+ } else {
48
+ // simple list
49
+ }
50
+ }
51
+
52
+ console.log(JSON.stringify(domains, null, 2));
53
+ //console.log(domains.jp);
54
+ });
55
+ });
56
+
57
+ /*
58
+
59
+
60
+ // https://github.com/oncletom/tld.js
61
+ // generates a 430KB file, which is inacceptible for the web
62
+
63
+ build a regex pattern from this -- http://publicsuffix.org/list/
64
+ "!exclusion"
65
+ "*" wildcard
66
+
67
+ uk: [ '!bl',
68
+ '!british-library',
69
+ '!jet',
70
+ '!mod',
71
+ '!national-library-scotland',
72
+ '!nel',
73
+ '!nic',
74
+ '!nls',
75
+ '!parliament',
76
+ '*',
77
+ '*.nhs',
78
+ '*.police',
79
+ '*.sch',
80
+ 'blogspot.co' ]
81
+
82
+ jp: [ '!city.kawasaki',
83
+ '!city.kitakyushu',
84
+ '!city.kobe',
85
+ '!city.nagoya',
86
+ '!city.sapporo',
87
+ '!city.sendai',
88
+ '!city.yokohama',
89
+ '*.kawasaki',
90
+ '*.kitakyushu',
91
+ '*.kobe',
92
+ '*.nagoya',
93
+ '*.sapporo',
94
+ '*.sendai',
95
+ '*.yokohama',
96
+ 'abashiri.hokkaido',
97
+ 'abeno.osaka',
98
+ 'abiko.chiba',
99
+ … ]
100
+
101
+ */
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "veiljs",
3
+ "version": "0.0.4",
4
+ "homepage": "https://github.com/janfoeh/veiljs",
5
+ "authors": [
6
+ "Jan-Christian Foeh <jan@programmanstalt.de>"
7
+ ],
8
+ "description": "Veil is a JS library for overlays and modal dialogues",
9
+ "main": [
10
+ "veil.js",
11
+ "veil-jquery.js",
12
+ "veil-knockout.js",
13
+ "veil.css"
14
+ ],
15
+ "keywords": [
16
+ "overlay",
17
+ "modal",
18
+ "ui"
19
+ ],
20
+ "license": "MIT",
21
+ "ignore": [
22
+ "**/.*",
23
+ "node_modules",
24
+ "bower_components",
25
+ "Gemfile*",
26
+ "Gruntfile.js",
27
+ "package.json",
28
+ "veiljs.sublime-project",
29
+ "LICENSE",
30
+ "README.md",
31
+ "test",
32
+ "tests",
33
+ "doc",
34
+ "sass"
35
+ ]
36
+ }
@@ -0,0 +1,47 @@
1
+
2
+ // Expose plugin as an AMD module if AMD loader is present:
3
+ (function (factory) {
4
+ 'use strict';
5
+
6
+ if (typeof define === 'function' && define.amd) {
7
+ define(['jquery', 'veil'], factory);
8
+ } else {
9
+ factory(jQuery, Veil);
10
+ }
11
+
12
+ }(function ($, Veil) {
13
+ 'use strict';
14
+
15
+ $.Veil = Veil;
16
+
17
+ // Create chainable jQuery plugin:
18
+ $.fn.veil = function (optionsOrFnName, args) {
19
+ var dataKey = 'veil';
20
+
21
+ // If function invoked without argument return
22
+ // instance of the first matched element
23
+ if (arguments.length === 0 && this.first().data(dataKey)) {
24
+ return this.first().data(dataKey);
25
+ }
26
+
27
+ return this.each(function () {
28
+ var inputElement = $(this),
29
+ instance = inputElement.data(dataKey);
30
+
31
+ if (typeof optionsOrFnName === 'string') {
32
+ if (instance && typeof instance[optionsOrFnName] === 'function') {
33
+ instance[optionsOrFnName](args);
34
+ }
35
+
36
+ } else {
37
+ // If instance already exists, destroy it:
38
+ if (instance && instance.dispose) {
39
+ instance.dispose();
40
+ }
41
+
42
+ instance = new Veil(optionsOrFnName);
43
+ inputElement.data(dataKey, instance);
44
+ }
45
+ });
46
+ };
47
+ }));
@@ -0,0 +1,55 @@
1
+ // Expose plugin as an AMD module if AMD loader is present:
2
+ (function (factory) {
3
+ 'use strict';
4
+
5
+ if (typeof define === 'function' && define.amd) {
6
+ define(['knockout', 'jquery'], factory);
7
+ } else {
8
+ window.ko.bindingHandlers.veil = factory(ko, jQuery);
9
+ }
10
+
11
+ }(function (ko, $) {
12
+ 'use strict';
13
+
14
+ /**
15
+ * A Knockout binding handler for Veil
16
+ *
17
+ * @global
18
+ */
19
+ var veil = {
20
+ /** @lends ko.bindingHandlers.veil */
21
+ init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
22
+ var $element = $(element),
23
+ veilTemplate = allBindingsAccessor().veilTemplate,
24
+ veilOptions = allBindingsAccessor().veilOptions || {},
25
+ contentCallback;
26
+
27
+ contentCallback = function(overlay) {
28
+ ko.renderTemplate(veilTemplate, valueAccessor(), {}, overlay.get(0));
29
+ };
30
+
31
+ $element.veil(veilOptions);
32
+ $element.veil().addCallback('afterCreate', contentCallback);
33
+
34
+ $element.on('click', function(ev) {
35
+ if ($element.veil().isActive()) {
36
+ $element.veil().hide();
37
+ } else {
38
+ $element.veil().show();
39
+ }
40
+
41
+ ev.stopPropagation();
42
+ });
43
+
44
+ ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
45
+ try {
46
+ $(element).veil().destroy();
47
+ } catch (e) {
48
+
49
+ }
50
+ });
51
+ }
52
+ };
53
+
54
+ return veil;
55
+ }));