prerender_rails_embedded 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGZmNjNmMGNjMWI1ZjA0MDFhMzMwZDVmNWQxY2I0NmVmOTQwZjEwYQ==
4
+ MmIxNDlhYjM2ZDk2ZmVkMmViNjM1NDU1YjE5YTA5MDNiMjE2ZDljNg==
5
5
  data.tar.gz: !binary |-
6
- MGM1MTljNjQ3ZDFlZmJiNTY5OGM0NDYxZTlmODczN2VjNTE2NjVmZA==
6
+ OTlkZGExOGVmYzg4NDBmZDMyYTU5OWE5NWRkN2NmZjMyZTEyMzVhMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDcyODM5NzY0N2IwMTE4ZGNhYzg4ZjBjZGQwMjMzN2Y5MjVjZjZiYTFkMDcw
10
- MzY1ODUzM2NjODU2ZjhlOGIxZjFmZGVlNDVjNzliNjliMTRlYmU0YzFkMDlk
11
- NWNhMzZjZjBlZjRjMzQwNzExMjY2MDlkMmQzYmYxMTJmYzVkZDY=
9
+ MmQzMGZkYWFmZGUwMjQ3ZmM4ZmQxZjNkZDQxMGEzMWZmNzlhODEwNTExOWM1
10
+ MmQwYmEyMjJmNjg4MzI2ZGRlZTdkYTU5OGYzYTFmMTNjMzYxMjk1NTAzZDlk
11
+ ZDk0MTRiNTk4Y2RhZDc1YzMzMzJkNmQ0OGYxZmMwNTcwYjEwMDE=
12
12
  data.tar.gz: !binary |-
13
- Yzk4YTcxNzkzMWRlZGIzMGY5MjNjYzhlNTE0MGNkYTFjZjgzMmIyZGM5M2E0
14
- ZmI3MmJlOTI2YTYwNzdhODk5YTUwNzllMGM2YWFiNmMwNDNiYWM4M2I3NjA5
15
- M2EzMDMzNGMyY2Y5MWE3OTUyMzFlYjBkMWMzNWY0N2M0NjY3Nzg=
13
+ YTFlYWU1ZDM0MzRmMGVlYzVhOTU4MmI3NzgwMzhlM2ZlNTNhYTEzYjk0OTQ0
14
+ NTAxOWI2ZDVmMDhjZDI0NzAzOWU3MDAyZWVlMDBlMTU3NWZkODA4ZjM4NWUz
15
+ YjI1YzhjMjc3NDI2NGFiNjAwNTAyM2U0M2I2MjNmNzUyM2VhY2Q=
@@ -0,0 +1,188 @@
1
+ /*!
2
+ * URI.js - Mutating URLs
3
+ * IPv6 Support
4
+ *
5
+ * Version: 1.14.1
6
+ *
7
+ * Author: Rodney Rehm
8
+ * Web: http://medialize.github.io/URI.js/
9
+ *
10
+ * Licensed under
11
+ * MIT License http://www.opensource.org/licenses/mit-license
12
+ * GPL v3 http://opensource.org/licenses/GPL-3.0
13
+ *
14
+ */
15
+
16
+ (function (root, factory) {
17
+ 'use strict';
18
+ // https://github.com/umdjs/umd/blob/master/returnExports.js
19
+ if (typeof exports === 'object') {
20
+ // Node
21
+ module.exports = factory();
22
+ } else if (typeof define === 'function' && define.amd) {
23
+ // AMD. Register as an anonymous module.
24
+ define(factory);
25
+ } else {
26
+ // Browser globals (root is window)
27
+ root.IPv6 = factory(root);
28
+ }
29
+ }(this, function (root) {
30
+ 'use strict';
31
+
32
+ /*
33
+ var _in = "fe80:0000:0000:0000:0204:61ff:fe9d:f156";
34
+ var _out = IPv6.best(_in);
35
+ var _expected = "fe80::204:61ff:fe9d:f156";
36
+
37
+ console.log(_in, _out, _expected, _out === _expected);
38
+ */
39
+
40
+ // save current IPv6 variable, if any
41
+ var _IPv6 = root && root.IPv6;
42
+
43
+ function bestPresentation(address) {
44
+ // based on:
45
+ // Javascript to test an IPv6 address for proper format, and to
46
+ // present the "best text representation" according to IETF Draft RFC at
47
+ // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04
48
+ // 8 Feb 2010 Rich Brown, Dartware, LLC
49
+ // Please feel free to use this code as long as you provide a link to
50
+ // http://www.intermapper.com
51
+ // http://intermapper.com/support/tools/IPV6-Validator.aspx
52
+ // http://download.dartware.com/thirdparty/ipv6validator.js
53
+
54
+ var _address = address.toLowerCase();
55
+ var segments = _address.split(':');
56
+ var length = segments.length;
57
+ var total = 8;
58
+
59
+ // trim colons (:: or ::a:b:c… or …a:b:c::)
60
+ if (segments[0] === '' && segments[1] === '' && segments[2] === '') {
61
+ // must have been ::
62
+ // remove first two items
63
+ segments.shift();
64
+ segments.shift();
65
+ } else if (segments[0] === '' && segments[1] === '') {
66
+ // must have been ::xxxx
67
+ // remove the first item
68
+ segments.shift();
69
+ } else if (segments[length - 1] === '' && segments[length - 2] === '') {
70
+ // must have been xxxx::
71
+ segments.pop();
72
+ }
73
+
74
+ length = segments.length;
75
+
76
+ // adjust total segments for IPv4 trailer
77
+ if (segments[length - 1].indexOf('.') !== -1) {
78
+ // found a "." which means IPv4
79
+ total = 7;
80
+ }
81
+
82
+ // fill empty segments them with "0000"
83
+ var pos;
84
+ for (pos = 0; pos < length; pos++) {
85
+ if (segments[pos] === '') {
86
+ break;
87
+ }
88
+ }
89
+
90
+ if (pos < total) {
91
+ segments.splice(pos, 1, '0000');
92
+ while (segments.length < total) {
93
+ segments.splice(pos, 0, '0000');
94
+ }
95
+
96
+ length = segments.length;
97
+ }
98
+
99
+ // strip leading zeros
100
+ var _segments;
101
+ for (var i = 0; i < total; i++) {
102
+ _segments = segments[i].split('');
103
+ for (var j = 0; j < 3 ; j++) {
104
+ if (_segments[0] === '0' && _segments.length > 1) {
105
+ _segments.splice(0,1);
106
+ } else {
107
+ break;
108
+ }
109
+ }
110
+
111
+ segments[i] = _segments.join('');
112
+ }
113
+
114
+ // find longest sequence of zeroes and coalesce them into one segment
115
+ var best = -1;
116
+ var _best = 0;
117
+ var _current = 0;
118
+ var current = -1;
119
+ var inzeroes = false;
120
+ // i; already declared
121
+
122
+ for (i = 0; i < total; i++) {
123
+ if (inzeroes) {
124
+ if (segments[i] === '0') {
125
+ _current += 1;
126
+ } else {
127
+ inzeroes = false;
128
+ if (_current > _best) {
129
+ best = current;
130
+ _best = _current;
131
+ }
132
+ }
133
+ } else {
134
+ if (segments[i] === '0') {
135
+ inzeroes = true;
136
+ current = i;
137
+ _current = 1;
138
+ }
139
+ }
140
+ }
141
+
142
+ if (_current > _best) {
143
+ best = current;
144
+ _best = _current;
145
+ }
146
+
147
+ if (_best > 1) {
148
+ segments.splice(best, _best, '');
149
+ }
150
+
151
+ length = segments.length;
152
+
153
+ // assemble remaining segments
154
+ var result = '';
155
+ if (segments[0] === '') {
156
+ result = ':';
157
+ }
158
+
159
+ for (i = 0; i < length; i++) {
160
+ result += segments[i];
161
+ if (i === length - 1) {
162
+ break;
163
+ }
164
+
165
+ result += ':';
166
+ }
167
+
168
+ if (segments[length - 1] === '') {
169
+ result += ':';
170
+ }
171
+
172
+ return result;
173
+ }
174
+
175
+ function noConflict() {
176
+ /*jshint validthis: true */
177
+ if (root.IPv6 === this) {
178
+ root.IPv6 = _IPv6;
179
+ }
180
+
181
+ return this;
182
+ }
183
+
184
+ return {
185
+ best: bestPresentation,
186
+ noConflict: noConflict
187
+ };
188
+ }));
@@ -0,0 +1,241 @@
1
+ /*!
2
+ * URI.js - Mutating URLs
3
+ * Second Level Domain (SLD) Support
4
+ *
5
+ * Version: 1.14.1
6
+ *
7
+ * Author: Rodney Rehm
8
+ * Web: http://medialize.github.io/URI.js/
9
+ *
10
+ * Licensed under
11
+ * MIT License http://www.opensource.org/licenses/mit-license
12
+ * GPL v3 http://opensource.org/licenses/GPL-3.0
13
+ *
14
+ */
15
+
16
+ (function (root, factory) {
17
+ 'use strict';
18
+ // https://github.com/umdjs/umd/blob/master/returnExports.js
19
+ if (typeof exports === 'object') {
20
+ // Node
21
+ module.exports = factory();
22
+ } else if (typeof define === 'function' && define.amd) {
23
+ // AMD. Register as an anonymous module.
24
+ define(factory);
25
+ } else {
26
+ // Browser globals (root is window)
27
+ root.SecondLevelDomains = factory(root);
28
+ }
29
+ }(this, function (root) {
30
+ 'use strict';
31
+
32
+ // save current SecondLevelDomains variable, if any
33
+ var _SecondLevelDomains = root && root.SecondLevelDomains;
34
+
35
+ var SLD = {
36
+ // list of known Second Level Domains
37
+ // converted list of SLDs from https://github.com/gavingmiller/second-level-domains
38
+ // ----
39
+ // publicsuffix.org is more current and actually used by a couple of browsers internally.
40
+ // downside is it also contains domains like "dyndns.org" - which is fine for the security
41
+ // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js
42
+ // ----
43
+ list: {
44
+ 'ac':' com gov mil net org ',
45
+ 'ae':' ac co gov mil name net org pro sch ',
46
+ 'af':' com edu gov net org ',
47
+ 'al':' com edu gov mil net org ',
48
+ 'ao':' co ed gv it og pb ',
49
+ 'ar':' com edu gob gov int mil net org tur ',
50
+ 'at':' ac co gv or ',
51
+ 'au':' asn com csiro edu gov id net org ',
52
+ 'ba':' co com edu gov mil net org rs unbi unmo unsa untz unze ',
53
+ 'bb':' biz co com edu gov info net org store tv ',
54
+ 'bh':' biz cc com edu gov info net org ',
55
+ 'bn':' com edu gov net org ',
56
+ 'bo':' com edu gob gov int mil net org tv ',
57
+ 'br':' adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ',
58
+ 'bs':' com edu gov net org ',
59
+ 'bz':' du et om ov rg ',
60
+ 'ca':' ab bc mb nb nf nl ns nt nu on pe qc sk yk ',
61
+ 'ck':' biz co edu gen gov info net org ',
62
+ 'cn':' ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ',
63
+ 'co':' com edu gov mil net nom org ',
64
+ 'cr':' ac c co ed fi go or sa ',
65
+ 'cy':' ac biz com ekloges gov ltd name net org parliament press pro tm ',
66
+ 'do':' art com edu gob gov mil net org sld web ',
67
+ 'dz':' art asso com edu gov net org pol ',
68
+ 'ec':' com edu fin gov info med mil net org pro ',
69
+ 'eg':' com edu eun gov mil name net org sci ',
70
+ 'er':' com edu gov ind mil net org rochest w ',
71
+ 'es':' com edu gob nom org ',
72
+ 'et':' biz com edu gov info name net org ',
73
+ 'fj':' ac biz com info mil name net org pro ',
74
+ 'fk':' ac co gov net nom org ',
75
+ 'fr':' asso com f gouv nom prd presse tm ',
76
+ 'gg':' co net org ',
77
+ 'gh':' com edu gov mil org ',
78
+ 'gn':' ac com gov net org ',
79
+ 'gr':' com edu gov mil net org ',
80
+ 'gt':' com edu gob ind mil net org ',
81
+ 'gu':' com edu gov net org ',
82
+ 'hk':' com edu gov idv net org ',
83
+ 'hu':' 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ',
84
+ 'id':' ac co go mil net or sch web ',
85
+ 'il':' ac co gov idf k12 muni net org ',
86
+ 'in':' ac co edu ernet firm gen gov i ind mil net nic org res ',
87
+ 'iq':' com edu gov i mil net org ',
88
+ 'ir':' ac co dnssec gov i id net org sch ',
89
+ 'it':' edu gov ',
90
+ 'je':' co net org ',
91
+ 'jo':' com edu gov mil name net org sch ',
92
+ 'jp':' ac ad co ed go gr lg ne or ',
93
+ 'ke':' ac co go info me mobi ne or sc ',
94
+ 'kh':' com edu gov mil net org per ',
95
+ 'ki':' biz com de edu gov info mob net org tel ',
96
+ 'km':' asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ',
97
+ 'kn':' edu gov net org ',
98
+ 'kr':' ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ',
99
+ 'kw':' com edu gov net org ',
100
+ 'ky':' com edu gov net org ',
101
+ 'kz':' com edu gov mil net org ',
102
+ 'lb':' com edu gov net org ',
103
+ 'lk':' assn com edu gov grp hotel int ltd net ngo org sch soc web ',
104
+ 'lr':' com edu gov net org ',
105
+ 'lv':' asn com conf edu gov id mil net org ',
106
+ 'ly':' com edu gov id med net org plc sch ',
107
+ 'ma':' ac co gov m net org press ',
108
+ 'mc':' asso tm ',
109
+ 'me':' ac co edu gov its net org priv ',
110
+ 'mg':' com edu gov mil nom org prd tm ',
111
+ 'mk':' com edu gov inf name net org pro ',
112
+ 'ml':' com edu gov net org presse ',
113
+ 'mn':' edu gov org ',
114
+ 'mo':' com edu gov net org ',
115
+ 'mt':' com edu gov net org ',
116
+ 'mv':' aero biz com coop edu gov info int mil museum name net org pro ',
117
+ 'mw':' ac co com coop edu gov int museum net org ',
118
+ 'mx':' com edu gob net org ',
119
+ 'my':' com edu gov mil name net org sch ',
120
+ 'nf':' arts com firm info net other per rec store web ',
121
+ 'ng':' biz com edu gov mil mobi name net org sch ',
122
+ 'ni':' ac co com edu gob mil net nom org ',
123
+ 'np':' com edu gov mil net org ',
124
+ 'nr':' biz com edu gov info net org ',
125
+ 'om':' ac biz co com edu gov med mil museum net org pro sch ',
126
+ 'pe':' com edu gob mil net nom org sld ',
127
+ 'ph':' com edu gov i mil net ngo org ',
128
+ 'pk':' biz com edu fam gob gok gon gop gos gov net org web ',
129
+ 'pl':' art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ',
130
+ 'pr':' ac biz com edu est gov info isla name net org pro prof ',
131
+ 'ps':' com edu gov net org plo sec ',
132
+ 'pw':' belau co ed go ne or ',
133
+ 'ro':' arts com firm info nom nt org rec store tm www ',
134
+ 'rs':' ac co edu gov in org ',
135
+ 'sb':' com edu gov net org ',
136
+ 'sc':' com edu gov net org ',
137
+ 'sh':' co com edu gov net nom org ',
138
+ 'sl':' com edu gov net org ',
139
+ 'st':' co com consulado edu embaixada gov mil net org principe saotome store ',
140
+ 'sv':' com edu gob org red ',
141
+ 'sz':' ac co org ',
142
+ 'tr':' av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ',
143
+ 'tt':' aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ',
144
+ 'tw':' club com ebiz edu game gov idv mil net org ',
145
+ 'mu':' ac co com gov net or org ',
146
+ 'mz':' ac co edu gov org ',
147
+ 'na':' co com ',
148
+ 'nz':' ac co cri geek gen govt health iwi maori mil net org parliament school ',
149
+ 'pa':' abo ac com edu gob ing med net nom org sld ',
150
+ 'pt':' com edu gov int net nome org publ ',
151
+ 'py':' com edu gov mil net org ',
152
+ 'qa':' com edu gov mil net org ',
153
+ 're':' asso com nom ',
154
+ 'ru':' ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ',
155
+ 'rw':' ac co com edu gouv gov int mil net ',
156
+ 'sa':' com edu gov med net org pub sch ',
157
+ 'sd':' com edu gov info med net org tv ',
158
+ 'se':' a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ',
159
+ 'sg':' com edu gov idn net org per ',
160
+ 'sn':' art com edu gouv org perso univ ',
161
+ 'sy':' com edu gov mil net news org ',
162
+ 'th':' ac co go in mi net or ',
163
+ 'tj':' ac biz co com edu go gov info int mil name net nic org test web ',
164
+ 'tn':' agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ',
165
+ 'tz':' ac co go ne or ',
166
+ 'ua':' biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ',
167
+ 'ug':' ac co go ne or org sc ',
168
+ 'uk':' ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ',
169
+ 'us':' dni fed isa kids nsn ',
170
+ 'uy':' com edu gub mil net org ',
171
+ 've':' co com edu gob info mil net org web ',
172
+ 'vi':' co com k12 net org ',
173
+ 'vn':' ac biz com edu gov health info int name net org pro ',
174
+ 'ye':' co com gov ltd me net org plc ',
175
+ 'yu':' ac co edu gov org ',
176
+ 'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',
177
+ 'zm':' ac co com edu gov net org sch '
178
+ },
179
+ // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
180
+ // in both performance and memory footprint. No initialization required.
181
+ // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4
182
+ // Following methods use lastIndexOf() rather than array.split() in order
183
+ // to avoid any memory allocations.
184
+ has: function(domain) {
185
+ var tldOffset = domain.lastIndexOf('.');
186
+ if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
187
+ return false;
188
+ }
189
+ var sldOffset = domain.lastIndexOf('.', tldOffset-1);
190
+ if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
191
+ return false;
192
+ }
193
+ var sldList = SLD.list[domain.slice(tldOffset+1)];
194
+ if (!sldList) {
195
+ return false;
196
+ }
197
+ return sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') >= 0;
198
+ },
199
+ is: function(domain) {
200
+ var tldOffset = domain.lastIndexOf('.');
201
+ if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
202
+ return false;
203
+ }
204
+ var sldOffset = domain.lastIndexOf('.', tldOffset-1);
205
+ if (sldOffset >= 0) {
206
+ return false;
207
+ }
208
+ var sldList = SLD.list[domain.slice(tldOffset+1)];
209
+ if (!sldList) {
210
+ return false;
211
+ }
212
+ return sldList.indexOf(' ' + domain.slice(0, tldOffset) + ' ') >= 0;
213
+ },
214
+ get: function(domain) {
215
+ var tldOffset = domain.lastIndexOf('.');
216
+ if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
217
+ return null;
218
+ }
219
+ var sldOffset = domain.lastIndexOf('.', tldOffset-1);
220
+ if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
221
+ return null;
222
+ }
223
+ var sldList = SLD.list[domain.slice(tldOffset+1)];
224
+ if (!sldList) {
225
+ return null;
226
+ }
227
+ if (sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') < 0) {
228
+ return null;
229
+ }
230
+ return domain.slice(sldOffset+1);
231
+ },
232
+ noConflict: function(){
233
+ if (root.SecondLevelDomains === this) {
234
+ root.SecondLevelDomains = _SecondLevelDomains;
235
+ }
236
+ return this;
237
+ }
238
+ };
239
+
240
+ return SLD;
241
+ }));