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,156 @@
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 - About URIs</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
+ </head>
29
+ <body>
30
+ <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>
31
+
32
+ <div id="container">
33
+ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
34
+
35
+ <ul class="menu">
36
+ <li><a href="/URI.js/">Intro</a></li>
37
+ <li class="active"><a href="about-uris.html">Understanding URIs</a></li>
38
+ <li><a href="docs.html">API-Documentation</a></li>
39
+ <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
40
+ <li><a href="uri-template.html">URI Template</a></li>
41
+ <li><a href="build.html">Build</a></li>
42
+ <li><a href="http://rodneyrehm.de/en/">Author</a></li>
43
+ </ul>
44
+
45
+ <h2>Understanding URIs</h2>
46
+
47
+ <p>
48
+ Uniform Resource Identifiers (URI) can be one of two things, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN).
49
+ You likely deal with URLs most of the time. See RFC 3986 for a proper definition of the terms <a href="http://tools.ietf.org/html/rfc3986#section-1.1.3">URI, URL and URN</a>
50
+ </p>
51
+
52
+ <p>
53
+ URLs are used to address the individual resources of your website.
54
+ URNs are usually used for hooking into other applications, as <code>mailto:</code>, <code>magnet:</code> or <code>spotify:</code> suggest.
55
+ While RFC 3986 defines the structure of an URL in depth, URNs are not. The structure (and meaning) of URNs are up to their distinct specifications.
56
+ </p>
57
+
58
+ <h2 id="components">Components of an URI</h2>
59
+ <p><a href="http://tools.ietf.org/html/rfc3986#section-3">RFC 3986 Section 3</a> visualizes the structure of <abbr title="Uniform Resource Indicator">URI</abbr>s as follows:</p>
60
+ <pre class="ascii-art">
61
+ URL: foo://example.com:8042/over/there?name=ferret#nose
62
+ <span class="line"> \_/ \______________/\_________/ \_________/ \__/
63
+ | | | | |
64
+ </span><span class="label"> scheme authority path query fragment
65
+ </span><span class="line"> | _____________________|__
66
+ / \ / \
67
+ </span>URN: urn:example:animal:ferret:nose</pre>
68
+
69
+ <h3 id="components-url">Components of an <abbr title="Uniform Resource Locator">URL</abbr> in URI.js</h3>
70
+
71
+ <pre class="ascii-art">
72
+ <a href="docs.html#accessors-authority">authority</a>
73
+ <span class="line"> __________|_________
74
+ / \
75
+ </span> <a href="docs.html#accessors-userinfo">userinfo</a> <a href="docs.html#accessors-host">host</a> <a href="docs.html#accessors-resource">resource</a>
76
+ <span class="line"> __|___ ___|___ __________|___________
77
+ / \ / \ / \
78
+ </span> <a href="docs.html#accessors-username">username</a> <a href="docs.html#accessors-password">password</a> <a href="docs.html#accessors-hostname">hostname</a> <a href="docs.html#accessors-port">port</a> <a href="docs.html#accessors-pathname">path</a> &amp; <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
79
+ <span class="line"> __|___ __|__ ______|______ | __________|_________ ____|____ |
80
+ / \ / \ / \ / \ / \ / \ / \
81
+ </span> foo://username:password@www.example.com:123/hello/world/there.html?name=ferret#foo
82
+ <span class="line"> \_/ \ / \ \ / \__________/ \ \__/
83
+ | | \ | | \ |
84
+ </span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-subdomain">subdomain</a> <span class="line">\</span> <a href="docs.html#accessors-tld">tld</a> <a href="docs.html#accessors-directory">directory</a> <span class="line">\</span> <a href="docs.html#accessors-suffix">suffix</a>
85
+ <span class="line"> \____/ \___/
86
+ | |
87
+ </span> <a href="docs.html#accessors-domain">domain</a> <a href="docs.html#accessors-filename">filename</a>
88
+
89
+ </pre>
90
+
91
+ <p>
92
+ In Javascript the <em>query</em> is often referred to as the <em>search</em>.
93
+ URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-search">.search()</a> beginning with the <code>?</code>-character
94
+ and <a href="docs.html#accessors-search">.query()</a> not.
95
+ </p>
96
+ <p>
97
+ In Javascript the <em>fragment</em> is often referred to as the <em>hash</em>.
98
+ URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-hash">.hash()</a> beginning with the <code>#</code>-character
99
+ and <a href="docs.html#accessors-hash">.fragment()</a> not.
100
+ </p>
101
+
102
+ <h3 id="components-urn">Components of an <abbr title="Uniform Resource Name">URN</abbr> in URI.js</h3>
103
+
104
+ <pre class="ascii-art">
105
+ urn:example:animal:ferret:nose?name=ferret#foo
106
+ <span class="line"> \ / \________________________/ \_________/ \ /
107
+ | | | |
108
+ </span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-pathname">path</a> &amp; <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
109
+ </pre>
110
+
111
+ <p>While <a href="http://tools.ietf.org/html/rfc3986">RFC 3986</a> does not define URNs having a query or fragment component, URI.js enables these accessors for convenience.</p>
112
+
113
+ <h2 id="problems">URLs - Man Made Problems</h2>
114
+
115
+ <p>URLs (URIs, whatever) aren't easy. There are a couple of issues that make this simple text representation of a resource a real pain</p>
116
+ <ul>
117
+ <li>Look simple but have tricky encoding issues</li>
118
+ <li>Domains aren't part of the specification</li>
119
+ <li>Query String Format isn't part of the specification</li>
120
+ <li>Environments (PHP, JS, Ruby, …) handle Query Strings quite differently</li>
121
+ </ul>
122
+
123
+ <h3 id="problems-encoding">Parsing (seemingly) invalid URLs</h3>
124
+ <p>Because URLs look very simple, most people haven't read the formal specification. As a result, most people get URLs wrong on many different levels. The one thing most everybody screws up is proper encoding/escaping.</p>
125
+ <p><code>http://username:pass:word@example.org/</code> is such a case. Often times homebrew URL handling misses escaping the less frequently used parts such as the userinfo.</p>
126
+ <p><code>http://example.org/@foo</code> that "@" doesn't have to be escaped according to RFC3986. Homebrew URL handlers often just treat everything between "://" and "@" as the userinfo.</p>
127
+ <p><code>some/path/:foo</code> is a valid relative path (as URIs don't have to contain scheme and authority). Since homebrew URL handlers usually just look for the first occurence of ":" to delimit the scheme, they'll screw this up as well.</p>
128
+ <p><code>+</code> is the proper escape-sequence for a space-character within the query string component, while every other component prefers <code>%20</code>. This is due to the fact that the actual format used within the query string component is not defined in RFC 3986, but in the HTML spec.</p>
129
+ <p>There is encoding and strict encoding - and Javascript won't get them right: <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent#Description">encodeURIComponent()</a></p>
130
+
131
+ <h3 id="problems-tld">Top Level Domains</h3>
132
+ <p>The hostname component can be one of may things. An IPv4 or IPv6 address, an IDN or Punycode domain name, or a regular domain name. While the format (and meaning) of IPv4 and IPv6 addresses is defined in RFC 3986, the meaning of domain names is not.</p>
133
+ <p>DNS is the base of translating domain names to IP addresses. DNS itself only specifies syntax, not semantics. The missing semantics is what's driving us crazy here.</p>
134
+ <p>ICANN provides a <a href="http://www.iana.org/domains/root/db/">list of registered Top Level Domains</a> (TLD). There are country code TLDs (ccTLDs, assigned to each country, like ".uk" for United Kindom) and generic TLDs (gTLDs, like ".xxx" for you know what). Also note that a TLD may be non-ASCII <code>.香港</code> (IDN version of HK, Hong Kong).</p>
135
+ <p>IDN TLDs such as <code>.香港</code> and the fact that any possible new TLD could pop up next month has lead to a lot of URL/Domain verification tools to fail.</p>
136
+
137
+ <h3 id="problems-sld">Second Level Domains</h3>
138
+ <p>To make Things worse, people thought it to be a good idea to introduce Second Level Domains (SLD, ".co.uk" - the commercial namespace of United Kingdom). These SLDs are not up to ICANN to define, they're handled individually by each NIC (Network Information Center, the orgianisation responsible for a specific TLD).</p>
139
+ <p>Since there is no central oversight, things got really messy in this particular space. Germany doesn't do SDLs, Australia does. Australia has different SLDs than the United Kingdom (".csiro.au" but no ".csiro.uk"). The individual NICs are not required to publish their arbitrarily chosen SLDs in a defined syntax anywhere.</p>
140
+ <p>You can scour each NIC's website to find some hints at their SLDs. You can look them up on Wikipedia and hope they're right. Or you can use <a href="http://publicsuffix.org/">PublicSuffix</a>.</p>
141
+ <p>Speaking of PublicSuffix, it's time mentioning that browser vendors actually keep a list of known Second Level Domains. They need to know those for security issues. Remember cookies? They can be read and set on a domain level. What do you think would happen if "co.uk" was treated as the domain? <code>amazon.co.uk</code> would be able to read the cookies of <code>google.co.uk</code>. PublicSuffix also contains custom SLDs, such as <code>.dyndns.org</code>. While this makes perfect sense for browser security, it's not what we need for basic URL handling.</p>
142
+ <p>TL;DR: It's a mess.</p>
143
+
144
+ <h3 id="problems-querystring">The Query String</h3>
145
+ <p>PHP (<a href="http://php.net/manual/en/function.parse-str.php">parse_str()</a>) will automatically parse the query string and populate the superglobal <code>$_GET</code> for you. <code>?foo=1&amp;foo=2</code> becomes <code>$_GET = array('foo' => 2);</code>, while <code>?foo[]=1&amp;foo[]=2</code> becomes <code>$_GET = array('foo' => array("1", "2"));</code>.</p>
146
+ <p>Ruby's <code>CGI.parse()</code> turns <code>?a=1&amp;b=2</code> into <code>{"a" : ["1", "2"]}</code>, while Ruby on Rails chose the PHP-way.</p>
147
+ <p>Python's <a href="http://docs.python.org/2/library/urlparse.html#urlparse.parse_qs">parse_qs()</a> doesn't care for <code>[]</code> either.
148
+ <p>Most other languages don't follow the <code>[]</code>-style array-notation and deal with this mess differently.</p>
149
+ <p>TL;DR: You need to know the target-environment, to know how complex query string data has to be encoded</p>
150
+
151
+ <h3 id="problems-fragment">The Fragment</h3>
152
+ <p>Given the URL <code>http://example.org/index.html#foobar</code>, browsers only request <code>http://example.org/index.html</code>, the fragment <code>#foobar</code> is a client-side thing.</p>
153
+
154
+ </div>
155
+ </body>
156
+ </html>
@@ -0,0 +1,66 @@
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 - Custom Build</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="screen.js" type="text/javascript"></script>
11
+ <script src="build.js" type="text/javascript"></script>
12
+ <link href="screen.css" rel="stylesheet" type="text/css" />
13
+ </head>
14
+ <body>
15
+
16
+ <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>
17
+
18
+ <div id="container">
19
+ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
20
+
21
+ <ul class="menu">
22
+ <li><a href="/URI.js/">Intro</a></li>
23
+ <li><a href="about-uris.html">Understanding URIs</a></li>
24
+ <li><a href="docs.html">API-Documentation</a></li>
25
+ <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
26
+ <li><a href="uri-template.html">URI Template</a></li>
27
+ <li class="active"><a href="build.html">Build</a></li>
28
+ <li><a href="http://rodneyrehm.de/en/">Author</a></li>
29
+ </ul>
30
+
31
+ <h2>Building URI.js</h2>
32
+ <p>Choose the Modules you want to include in your custom build of URI.js:</p>
33
+ <form id="builder">
34
+ <ul>
35
+ <li><label><input type="checkbox" value="IPv6.js" checked> IPv6.js - Support for IPv6 Addresses</label></li>
36
+ <li><label><input type="checkbox" value="punycode.js" checked> punycode.js - Support for IDN Addresses</label></li>
37
+ <li><label><input type="checkbox" value="SecondLevelDomains.js" checked> SecondLevelDomains.js - Support for resolving SLDs</label></li>
38
+ <li><label><input type="checkbox" value="URI.js" checked readonly disabled> URI.js - Base URI.js</label></li>
39
+ <li><label><input type="checkbox" value="URITemplate.js" checked> URITemplate.js - Support for <a href="uri-template.html">URI Templates</a></label></li>
40
+ <li><label><input type="checkbox" value="jquery.URI.js" checked> jquery.URI.js - <a href="jquery-uri-plugin.html">jQuery Plugin</a></label></li>
41
+ </ul>
42
+ <p>Optional "Fragment Abuse" plugins:</p>
43
+ <ul>
44
+ <li><label><input type="radio" name="fragments" value="" checked> No Fragment abuse</label></li>
45
+ <li><label><input type="radio" name="fragments" value="URI.fragmentQuery.js"> URI.fragmentQuery.js - support for <a href="docs.html#fragment-abuse-query">Query String Fragments</a></label></li>
46
+ <li><label><input type="radio" name="fragments" value="URI.fragmentQuery.js"> URI.fragmentURI.js - support for <a href="docs.html#fragment-abuse-uri">URI Fragments</a></label></li>
47
+ </ul>
48
+ <input type="submit" value="Build!">
49
+ <progress id="prog" value="0" max="3" style="display:none"></progress>
50
+ <div style="display:none;">
51
+ <h2>Custom Built URI.js</h2>
52
+ <p class="download"> your custom built <code>URI.js</code> or copy the following code:</p>
53
+ <textarea id="output" cols="50" rows="5" style="width: 100%; height: 200px;"></textarea>
54
+ </div>
55
+
56
+ <hr>
57
+
58
+ <p>
59
+ This "build tool" does nothing but downloading the selected files, concatenating them and pushing them through <a href="http://closure-compiler.appspot.com/home">Closure Compiler</a>.
60
+ Since Closure Compiler is running on a different domain, this trick will only work on modern browsers.
61
+ I'm sorry for the ~2% of you IE users. You'll have to do this <a href="https://github.com/medialize/URI.js#minify">manually</a>.
62
+ </p>
63
+ </form>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1,78 @@
1
+ (function($, undefined){
2
+ window.URL = window.webkitURL || window.URL;
3
+ window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
4
+
5
+ function build(files) {
6
+ var $out = $('#output'),
7
+ $progress = $('#prog'),
8
+ sources = [],
9
+ connections = [],
10
+ source;
11
+
12
+ $out.parent().hide();
13
+ $progress.show().prop('value', 1).text('Loading Files');
14
+
15
+ for (var i = 0, length = files.length; i < length; i++) {
16
+ sources.push("");
17
+ (function(i, file){
18
+ connections.push($.get("src/" + file, function(data) {
19
+ sources[i] = data;
20
+ }, "text"));
21
+ })(i, files[i]);
22
+ }
23
+
24
+ $.when.apply($, connections).done(function() {
25
+ $progress.prop('value', 2).text('Compiling Scripts');
26
+ $.post('http://closure-compiler.appspot.com/compile', {
27
+ js_code: sources.join("\n\n"),
28
+ compilation_level: "SIMPLE_OPTIMIZATIONS",
29
+ output_format: "text",
30
+ output_info: "compiled_code"
31
+ }, function(data) {
32
+ var code = "/*! URI.js v1.11.2 http://medialize.github.com/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
33
+ $progress.hide();
34
+ $out.val(code).parent().show();
35
+ $out.prev().find('a').remove();
36
+ $out.prev().prepend(download(code));
37
+ }).error(function() {
38
+ alert("Your browser is incapable of cross-domain communication.\nPlease see instructions for manual build below.");
39
+ });
40
+ });
41
+ };
42
+
43
+ function download(code) {
44
+ var blob = new Blob([code], {type: 'text\/javascript'});
45
+
46
+ var a = document.createElement('a');
47
+ a.download = 'URI.js';
48
+ a.href = window.URL.createObjectURL(blob);
49
+ a.textContent = 'Download';
50
+ a.dataset.downloadurl = ['text/javascript', a.download, a.href].join(':');
51
+
52
+ return a;
53
+ };
54
+
55
+ $(function(){
56
+ $('#builder').on('submit', function(e) {
57
+ var $this = $(this),
58
+ $files = $this.find('input:checked'),
59
+ files = [];
60
+
61
+ e.preventDefault();
62
+ e.stopImmediatePropagation();
63
+
64
+ if (!$files.length) {
65
+ alert("please choose at least one file!");
66
+ return;
67
+ }
68
+
69
+ $files.each(function() {
70
+ var val = $(this).val();
71
+ val.length && files.push(val);
72
+ });
73
+
74
+ build(files);
75
+ });
76
+ });
77
+
78
+ })(jQuery);
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "URIjs",
3
+ "version": "1.11.2",
4
+ "main": [
5
+ "src/URI.js",
6
+ "src/IPv6.js",
7
+ "src/SecondLevelDomains.js",
8
+ "src/punycode.js",
9
+ "src/URITemplate.js",
10
+ "src/jquery.URI.js"
11
+ ],
12
+ "dependencies": {
13
+ "jquery": ">=1.7.0"
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ # Contributing to URI.js #
2
+
3
+ Thanks for your help!
4
+
5
+ Pull Requests go into the branch **master**. The *gh-pages* branch is a presentation of the *master* branch at the last given release.
6
+
7
+ Whenever you change code, make sure you run the test suite before sending a pull request. Please add tests for any features you add to the code base. We're using [QUnit](http://qunitjs.com/) for testing.
8
+
9
+ We're looking forward to splitting URI.js in several files, each dealing with a specific domain, to make the 1800 lines of code more bearable to work with. This will lead to using [Grunt](http://gruntjs.com/) to build a distributable version (and the removal of `build.html`). We're not sure when we'll get to this. If you want to pitch in, just holler!
10
+
11
+