crossfilter-rails 1.2.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a63eca9198a9e2ea8403de29dc23dd6e18afde22
4
- data.tar.gz: 377988d5d6d1b9aa9af7f5e8131b0db9aa8494e3
3
+ metadata.gz: 83e206a8b0ebd30768e75d53ef8a679108b9a6b5
4
+ data.tar.gz: 755e13bb4567aa5f86549360b3b831cf25d1ded3
5
5
  SHA512:
6
- metadata.gz: da7b5ee2a3d3968528b21c7c54a8b8c77b5b5a299bd5f8f9f8bfe55bdae87f7dcebeff079d96f7f754e839599ebfcb3d0fe3c7858d0b4026d8155c478fdba77c
7
- data.tar.gz: f3bfab25c2294f1ae2fb401960592be67f01b5ce5522f8c564667015beac978925f2bdf5b665f9b2babd5db0952af476288e65af85f4ef624b5add3a6a471252
6
+ metadata.gz: 6743fae1c995332b84e68860d9dc9a86f3cf0ebdc455862bb3fb9d9dfd06c1e5bf32198b503d2c283951f51acef63d65e3ea8059de7085bb1c40c4443368f6bc
7
+ data.tar.gz: 1dc4083437d0747f9da682ecacfed1d2d1f645f0979c251e318ea92075d68e6fb969d2d2b0ebcc754eb1f565657a9451b9d010b427443300c1b58d58387ffb28
@@ -0,0 +1,3 @@
1
+ �l~#r Q���ΎF'�� �"��JB�7�O�Z�m 0���-�v#*Wq�"{p��;+�E[9s_�u3\y
2
+ �D�P8��H&Nn;7T6�����8�t��Q�?7ٝL��ԍA�?ԅ3yVֵmmoe(��b��a��������^�&BxnU�ie�' �)����Oس��d˶�U��9�T��g���x��G�h�&V�& 6�Rr�h"��͖�w��Z�%��)�o
3
+ B��#|�Z,}��.�h)hT���
Binary file
data/README.md CHANGED
@@ -18,6 +18,18 @@ Add the following directive to your JavaScript manifest file (application.js):
18
18
 
19
19
  //= require crossfilter
20
20
 
21
+
22
+ ## HighSecurity
23
+
24
+ To ensure that you're including a gem with original code, you can install this gem using a HighSecurity policy.
25
+
26
+ gem cert --add <(curl -Ls https://gist.github.com/bai/5150087/raw/public_cert.pem)
27
+ bundle install --trust-policy HighSecurity
28
+
29
+ Or, if you don't use bundler:
30
+
31
+ gem install crossfilter-rails -P HighSecurity
32
+
21
33
  ## Contributing
22
34
 
23
35
  1. Fork it
@@ -0,0 +1,20 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDSDCCAjCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA1MQowCAYDVQQDDAF2MRMw
3
+ EQYKCZImiZPyLGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wHhcNMTMwNTIz
4
+ MjA0MTI3WhcNMTQwNTIzMjA0MTI3WjA1MQowCAYDVQQDDAF2MRMwEQYKCZImiZPy
5
+ LGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wggEiMA0GCSqGSIb3DQEBAQUA
6
+ A4IBDwAwggEKAoIBAQCtb8+GfjqcYl6M4IhIGomKsGgWEC4mwTXIq/Yl+jJAdP7s
7
+ bdV3lWnZybUPKtdHSQIJcxbm8GZspTqSqDgsECI/laTyLj7Srqcbyivf/ov50Tg1
8
+ CxMtt8STA6wNmY0ljO4SK72Pr8uQwFZIgNHBB9LcvrpmRn/TWDXlcqaq0db6QJKk
9
+ jGOv74ukiQun+saqthpxwNN6wm0rj1GDulrDuMeeMj/XDgu0piNHhBtsgQ6KrN94
10
+ cs0XGgwKihL0LdqWiOG9L8tZKeksKk72EcTpvaw1EYUfJ/rAcC8l6SluN2+BDMA0
11
+ /4LU70O+wTwHcHv2HimtKdlcpS936qOez3lXUD+3AgMBAAGjYzBhMAkGA1UdEwQC
12
+ MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSRvHatldjBIKT5agA2bnkfm4KUxTAT
13
+ BgNVHREEDDAKgQh2QGdvci5pbzATBgNVHRIEDDAKgQh2QGdvci5pbzANBgkqhkiG
14
+ 9w0BAQUFAAOCAQEAmyGZCL6ISHS6UCkPAie1LZgyc+yS4ckMPtzBJtjODr5kfRTC
15
+ tLb9W4epJ9Aa2aGkKy/NL8MFS0BwTJmjSfufFDwFZlw0kI9aAvL4Nx9OHWNen9Dm
16
+ GtEWXXKpB0du12DBjfavJYl0QLcz18M0mtvug634t40H06GussO83uu7wHEvIPBP
17
+ Z5VMAbKvOmDgaP2I9XxZ2/lDmBKDZkVNqmqYiScw2CWsKxVPx3vhMGprTIz4O8y/
18
+ JCf887eMZl/8mEIeCLb+gH5sh5yJJpti2HTLnR4Q1QKWR/0T9tASoQPF3kL62n9+
19
+ m1B90+fEzJsBDQIAsnLPqxjivWbIIfZ7GeGZyA==
20
+ -----END CERTIFICATE-----
@@ -11,11 +11,15 @@ Gem::Specification.new do |gem|
11
11
  gem.description = %q{Fast n-dimensional filtering and grouping of records.}
12
12
  gem.summary = %q{Gemified crossfilter.js asset for Rails}
13
13
  gem.homepage = "http://github.com/bai/crossfilter-rails"
14
+ gem.licenses = ["MIT"]
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
19
  gem.require_paths = ["lib"]
19
20
 
21
+ gem.signing_key = File.expand_path("~/.gem/private_key.pem") if $0 =~ /gem\z/
22
+ gem.cert_chain = ["certs/bai.pem"]
23
+
20
24
  gem.add_dependency "railties", ">= 3.0", "< 5.0"
21
25
  end
@@ -1,5 +1,5 @@
1
1
  module Crossfilter
2
2
  module Rails
3
- VERSION = "1.2.0"
3
+ VERSION = '1.3.1'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  (function(exports){
2
- crossfilter.version = "1.2.0";
2
+ crossfilter.version = "1.3.1";
3
3
  function crossfilter_identity(d) {
4
4
  return d;
5
5
  }
@@ -448,6 +448,7 @@ if (typeof Uint8Array !== "undefined") {
448
448
  crossfilter_array32 = function(n) { return new Uint32Array(n); };
449
449
 
450
450
  crossfilter_arrayLengthen = function(array, length) {
451
+ if (array.length >= length) return array;
451
452
  var copy = new array.constructor(length);
452
453
  copy.set(array);
453
454
  return copy;
@@ -517,6 +518,7 @@ exports.crossfilter = crossfilter;
517
518
  function crossfilter() {
518
519
  var crossfilter = {
519
520
  add: add,
521
+ remove: removeData,
520
522
  dimension: dimension,
521
523
  groupAll: groupAll,
522
524
  size: size
@@ -528,7 +530,8 @@ function crossfilter() {
528
530
  M = 8, // number of dimensions that can fit in `filters`
529
531
  filters = crossfilter_array8(0), // M bits per record; 1 is filtered out
530
532
  filterListeners = [], // when the filters change
531
- dataListeners = []; // when data is added
533
+ dataListeners = [], // when data is added
534
+ removeDataListeners = []; // when data is removed
532
535
 
533
536
  // Adds the specified new records to this crossfilter.
534
537
  function add(newData) {
@@ -548,6 +551,32 @@ function crossfilter() {
548
551
  return crossfilter;
549
552
  }
550
553
 
554
+ // Removes all records that match the current filters.
555
+ function removeData() {
556
+ var newIndex = crossfilter_index(n, n),
557
+ removed = [];
558
+ for (var i = 0, j = 0; i < n; ++i) {
559
+ if (filters[i]) newIndex[i] = j++;
560
+ else removed.push(i);
561
+ }
562
+
563
+ // Remove all matching records from groups.
564
+ filterListeners.forEach(function(l) { l(0, [], removed); });
565
+
566
+ // Update indexes.
567
+ removeDataListeners.forEach(function(l) { l(newIndex); });
568
+
569
+ // Remove old filters and data by overwriting.
570
+ for (var i = 0, j = 0, k; i < n; ++i) {
571
+ if (k = filters[i]) {
572
+ if (i !== j) filters[j] = k, data[j] = data[i];
573
+ ++j;
574
+ }
575
+ }
576
+ data.length = j;
577
+ while (n > j) filters[--n] = 0;
578
+ }
579
+
551
580
  // Adds a new dimension with the specified value accessor function.
552
581
  function dimension(value) {
553
582
  var dimension = {
@@ -560,7 +589,8 @@ function crossfilter() {
560
589
  bottom: bottom,
561
590
  group: group,
562
591
  groupAll: groupAll,
563
- remove: remove
592
+ dispose: dispose,
593
+ remove: dispose // for backwards-compatibility
564
594
  };
565
595
 
566
596
  var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000
@@ -583,6 +613,8 @@ function crossfilter() {
583
613
  dataListeners.unshift(preAdd);
584
614
  dataListeners.push(postAdd);
585
615
 
616
+ removeDataListeners.push(removeData);
617
+
586
618
  // Incorporate any existing data into this dimension, and make sure that the
587
619
  // filter bitset is wide enough to handle the new dimension.
588
620
  m |= one;
@@ -664,6 +696,21 @@ function crossfilter() {
664
696
  newValues = newIndex = null;
665
697
  }
666
698
 
699
+ function removeData(reIndex) {
700
+ for (var i = 0, j = 0, k; i < n; ++i) {
701
+ if (filters[k = index[i]]) {
702
+ if (i !== j) values[j] = values[i], index[j] = reIndex[k];
703
+ ++j;
704
+ }
705
+ }
706
+ values.length = j;
707
+ while (j < n) index[j++] = 0;
708
+
709
+ // Bisect again to recompute lo0 and hi0.
710
+ var bounds = refilter(values);
711
+ lo0 = bounds[0], hi0 = bounds[1];
712
+ }
713
+
667
714
  // Updates the selected values based on the specified bounds [lo, hi].
668
715
  // This implementation is used by all the public filter methods.
669
716
  function filterIndexBounds(bounds) {
@@ -818,7 +865,8 @@ function crossfilter() {
818
865
  order: order,
819
866
  orderNatural: orderNatural,
820
867
  size: size,
821
- remove: remove
868
+ dispose: dispose,
869
+ remove: dispose // for backwards-compatibility
822
870
  };
823
871
 
824
872
  // Ensure that this group will be removed when the dimension is removed.
@@ -845,6 +893,7 @@ function crossfilter() {
845
893
  // the parent dimension for when data is added, and compute new keys.
846
894
  filterListeners.push(update);
847
895
  indexListeners.push(add);
896
+ removeDataListeners.push(removeData);
848
897
 
849
898
  // Incorporate any existing data into the grouping.
850
899
  add(values, index, 0, n);
@@ -958,6 +1007,15 @@ function crossfilter() {
958
1007
  }
959
1008
  }
960
1009
 
1010
+ function removeData() {
1011
+ for (var i = 0, j = 0; i < n; ++i) {
1012
+ if (filters[i]) {
1013
+ if (i !== j) groupIndex[j] = groupIndex[i];
1014
+ ++j;
1015
+ }
1016
+ }
1017
+ }
1018
+
961
1019
  // Reduces the specified selected or deselected records.
962
1020
  // This function is only used when the cardinality is greater than 1.
963
1021
  function updateMany(filterOne, added, removed) {
@@ -1098,11 +1156,13 @@ function crossfilter() {
1098
1156
  }
1099
1157
 
1100
1158
  // Removes this group and associated event listeners.
1101
- function remove() {
1159
+ function dispose() {
1102
1160
  var i = filterListeners.indexOf(update);
1103
1161
  if (i >= 0) filterListeners.splice(i, 1);
1104
1162
  i = indexListeners.indexOf(add);
1105
1163
  if (i >= 0) indexListeners.splice(i, 1);
1164
+ i = removeDataListeners.indexOf(removeData);
1165
+ if (i >= 0) removeDataListeners.splice(i, 1);
1106
1166
  return group;
1107
1167
  }
1108
1168
 
@@ -1121,12 +1181,15 @@ function crossfilter() {
1121
1181
  return g;
1122
1182
  }
1123
1183
 
1124
- function remove() {
1125
- dimensionGroups.forEach(function(group) { group.remove(); });
1184
+ // Removes this dimension and associated groups and event listeners.
1185
+ function dispose() {
1186
+ dimensionGroups.forEach(function(group) { group.dispose(); });
1126
1187
  var i = dataListeners.indexOf(preAdd);
1127
1188
  if (i >= 0) dataListeners.splice(i, 1);
1128
1189
  i = dataListeners.indexOf(postAdd);
1129
1190
  if (i >= 0) dataListeners.splice(i, 1);
1191
+ i = removeDataListeners.indexOf(removeData);
1192
+ if (i >= 0) removeDataListeners.splice(i, 1);
1130
1193
  for (i = 0; i < n; ++i) filters[i] &= zero;
1131
1194
  m &= zero;
1132
1195
  return dimension;
@@ -1143,7 +1206,8 @@ function crossfilter() {
1143
1206
  reduceCount: reduceCount,
1144
1207
  reduceSum: reduceSum,
1145
1208
  value: value,
1146
- remove: remove
1209
+ dispose: dispose,
1210
+ remove: dispose // for backwards-compatibility
1147
1211
  };
1148
1212
 
1149
1213
  var reduceValue,
@@ -1238,7 +1302,7 @@ function crossfilter() {
1238
1302
  }
1239
1303
 
1240
1304
  // Removes this group and associated event listeners.
1241
- function remove() {
1305
+ function dispose() {
1242
1306
  var i = filterListeners.indexOf(update);
1243
1307
  if (i >= 0) filterListeners.splice(i);
1244
1308
  i = dataListeners.indexOf(add);
@@ -1 +1 @@
1
- (function(r){function n(r){return r}function t(r,n){for(var t=0,e=n.length,u=Array(e);e>t;++t)u[t]=r[n[t]];return u}function e(r){function n(n,t,e,u){for(;u>e;){var f=e+u>>>1;r(n[f])<t?e=f+1:u=f}return e}function t(n,t,e,u){for(;u>e;){var f=e+u>>>1;t<r(n[f])?u=f:e=f+1}return e}return t.right=t,t.left=n,t}function u(r){function n(r,n,t){for(var u=t-n,f=(u>>>1)+1;--f>0;)e(r,f,u,n);return r}function t(r,n,t){for(var u,f=t-n;--f>0;)u=r[n],r[n]=r[n+f],r[n+f]=u,e(r,1,f,n);return r}function e(n,t,e,u){for(var f,o=n[--u+t],i=r(o);(f=t<<1)<=e&&(e>f&&r(n[u+f])>r(n[u+f+1])&&f++,!(i<=r(n[u+f])));)n[u+t]=n[u+f],t=f;n[u+t]=o}return n.sort=t,n}function f(r){function n(n,e,u,f){var o,i,a,c,l=Array(f=Math.min(u-e,f));for(i=0;f>i;++i)l[i]=n[e++];if(t(l,0,f),u>e){o=r(l[0]);do(a=r(c=n[e])>o)&&(l[0]=c,o=r(t(l,0,f)[0]));while(++e<u)}return l}var t=u(r);return n}function o(r){function n(n,t,e){for(var u=t+1;e>u;++u){for(var f=u,o=n[u],i=r(o);f>t&&r(n[f-1])>i;--f)n[f]=n[f-1];n[f]=o}return n}return n}function i(r){function n(r,n,u){return(U>u-n?e:t)(r,n,u)}function t(t,e,u){var f,o=0|(u-e)/6,i=e+o,a=u-1-o,c=e+u-1>>1,l=c-o,v=c+o,s=t[i],h=r(s),d=t[l],p=r(d),g=t[c],y=r(g),m=t[v],b=r(m),A=t[a],k=r(A);h>p&&(f=s,s=d,d=f,f=h,h=p,p=f),b>k&&(f=m,m=A,A=f,f=b,b=k,k=f),h>y&&(f=s,s=g,g=f,f=h,h=y,y=f),p>y&&(f=d,d=g,g=f,f=p,p=y,y=f),h>b&&(f=s,s=m,m=f,f=h,h=b,b=f),y>b&&(f=g,g=m,m=f,f=y,y=b,b=f),p>k&&(f=d,d=A,A=f,f=p,p=k,k=f),p>y&&(f=d,d=g,g=f,f=p,p=y,y=f),b>k&&(f=m,m=A,A=f,f=b,b=k,k=f);var x=d,w=p,E=m,O=b;t[i]=s,t[l]=t[e],t[c]=g,t[v]=t[u-1],t[a]=A;var M=e+1,U=u-2,z=O>=w&&w>=O;if(z)for(var N=M;U>=N;++N){var C=t[N],S=r(C);if(w>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>w)for(;;){var q=r(t[U]);{if(!(q>w)){if(w>q){t[N]=t[M],t[M++]=t[U],t[U--]=C;break}t[N]=t[U],t[U--]=C;break}U--}}}else for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(w>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>O)for(;;){var q=r(t[U]);{if(!(q>O)){w>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}if(t[e]=t[M-1],t[M-1]=x,t[u-1]=t[U+1],t[U+1]=E,n(t,e,M-1),n(t,U+2,u),z)return t;if(i>M&&U>a){for(var F,q;(F=r(t[M]))<=w&&F>=w;)++M;for(;(q=r(t[U]))<=O&&q>=O;)--U;for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(w>=S&&S>=w)N!==M&&(t[N]=t[M],t[M]=C),M++;else if(O>=S&&S>=O)for(;;){var q=r(t[U]);{if(!(O>=q&&q>=O)){w>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}}return n(t,M,U+1)}var e=o(r);return n}function a(r){return Array(r)}function c(r,n){return function(t){var e=t.length;return[r.left(t,n,0,e),r.right(t,n,0,e)]}}function l(r,n){var t=n[0],e=n[1];return function(n){var u=n.length;return[r.left(n,t,0,u),r.left(n,e,0,u)]}}function v(r){return[0,r.length]}function s(){return null}function h(){return 0}function d(r){return r+1}function p(r){return r-1}function g(r){return function(n,t){return n+ +r(t)}}function y(r){return function(n,t){return n-r(t)}}function m(){function r(r){var n=E,t=r.length;return t&&(w=w.concat(r),U=S(U,E+=t),C.forEach(function(e){e(r,n,t)})),m}function e(r){function e(n,e,u){P=n.map(r),Q=Y(A(u),0,u),P=t(P,Q);var f,o,i=Z(P),a=i[0],c=i[1];if(T)for(f=0;u>f;++f)T(P[f],o=Q[f]+e)||(U[o]|=W);else{for(f=0;a>f;++f)U[Q[f]+e]|=W;for(f=c;u>f;++f)U[Q[f]+e]|=W}if(!e)return K=P,L=Q,rn=a,nn=c,void 0;var l=K,v=L,s=0,h=0;for(K=Array(E),L=b(E,E),f=0;e>s&&u>h;++f)l[s]<P[h]?(K[f]=l[s],L[f]=v[s++]):(K[f]=P[h],L[f]=Q[h++]+e);for(;e>s;++s,++f)K[f]=l[s],L[f]=v[s];for(;u>h;++h,++f)K[f]=P[h],L[f]=Q[h]+e;i=Z(K),rn=i[0],nn=i[1]}function o(r,n,t){$.forEach(function(r){r(P,Q,n,t)}),P=Q=null}function a(r){var n=r[0],t=r[1];if(T)return T=null,B(function(r,e){return e>=n&&t>e}),rn=n,nn=t,V;var e,u,f,o=[],i=[];if(rn>n)for(e=n,u=Math.min(rn,t);u>e;++e)U[f=L[e]]^=W,o.push(f);else if(n>rn)for(e=rn,u=Math.min(n,nn);u>e;++e)U[f=L[e]]^=W,i.push(f);if(t>nn)for(e=Math.max(n,nn),u=t;u>e;++e)U[f=L[e]]^=W,o.push(f);else if(nn>t)for(e=Math.max(rn,t),u=nn;u>e;++e)U[f=L[e]]^=W,i.push(f);return rn=n,nn=t,N.forEach(function(r){r(W,o,i)}),V}function m(r){return null==r?R():Array.isArray(r)?F(r):"function"==typeof r?j(r):z(r)}function z(r){return a((Z=c(x,r))(K))}function F(r){return a((Z=l(x,r))(K))}function R(){return a((Z=v)(K))}function j(r){return Z=v,B(T=r),rn=0,nn=E,V}function B(r){var n,t,e,u=[],f=[];for(n=0;E>n;++n)!(U[t=L[n]]&W)^(e=r(K[n],t))&&(e?(U[t]&=X,u.push(t)):(U[t]|=W,f.push(t)));N.forEach(function(r){r(W,u,f)})}function D(r){for(var n,t=[],e=nn;--e>=rn&&r>0;)U[n=L[e]]||(t.push(w[n]),--r);return t}function G(r){for(var n,t=[],e=rn;nn>e&&r>0;)U[n=L[e]]||(t.push(w[n]),--r),e++;return t}function H(r){function t(n,t,u,f){function c(){++P===J&&(m=q(m,I<<=1),R=q(R,I),J=k(I))}var l,v,h,d,p,g,y=F,m=b(P,J),A=D,x=H,O=P,M=0,z=0;for(V&&(A=x=s),F=Array(P),P=0,R=O>1?S(R,E):b(E,J),O&&(h=(v=y[0]).key);f>z&&!((d=r(n[z]))>=d);)++z;for(;f>z;){for(v&&d>=h?(p=v,g=h,m[M]=P,(v=y[++M])&&(h=v.key)):(p={key:d,value:x()},g=d),F[P]=p;!(d>g||(R[l=t[z]+u]=P,U[l]&X||(p.value=A(p.value,w[l])),++z>=f));)d=r(n[z]);c()}for(;O>M;)F[m[M]=P]=y[M++],c();if(P>M)for(M=0;u>M;++M)R[M]=m[R[M]];l=N.indexOf(Q),P>1?(Q=e,T=i):(1===P?(Q=o,T=a):(Q=s,T=s),R=null),N[l]=Q}function e(r,n,t){if(r!==W&&!V){var e,u,f,o;for(e=0,f=n.length;f>e;++e)U[u=n[e]]&X||(o=F[R[u]],o.value=D(o.value,w[u]));for(e=0,f=t.length;f>e;++e)(U[u=t[e]]&X)===r&&(o=F[R[u]],o.value=G(o.value,w[u]))}}function o(r,n,t){if(r!==W&&!V){var e,u,f,o=F[0];for(e=0,f=n.length;f>e;++e)U[u=n[e]]&X||(o.value=D(o.value,w[u]));for(e=0,f=t.length;f>e;++e)(U[u=t[e]]&X)===r&&(o.value=G(o.value,w[u]))}}function i(){var r,n;for(r=0;P>r;++r)F[r].value=H();for(r=0;E>r;++r)U[r]&X||(n=F[R[r]],n.value=D(n.value,w[r]))}function a(){var r,n=F[0];for(n.value=H(),r=0;E>r;++r)U[r]&X||(n.value=D(n.value,w[r]))}function c(){return V&&(T(),V=!1),F}function l(r){var n=j(c(),0,F.length,r);return B.sort(n,0,n.length)}function v(r,n,t){return D=r,G=n,H=t,V=!0,C}function m(){return v(d,p,h)}function A(r){return v(g(r),y(r),h)}function x(r){function n(n){return r(n.value)}return j=f(n),B=u(n),C}function O(){return x(n)}function M(){return P}function z(){var r=N.indexOf(Q);return r>=0&&N.splice(r,1),r=$.indexOf(t),r>=0&&$.splice(r,1),C}var C={top:l,all:c,reduce:v,reduceCount:m,reduceSum:A,order:x,orderNatural:O,size:M,remove:z};_.push(C);var F,R,j,B,D,G,H,I=8,J=k(I),P=0,Q=s,T=s,V=!0;return arguments.length<1&&(r=n),N.push(Q),$.push(t),t(K,L,0,E),m().orderNatural()}function I(){var r=H(s),n=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return n()[0].value},r}function J(){_.forEach(function(r){r.remove()});var r=C.indexOf(e);for(r>=0&&C.splice(r,1),r=C.indexOf(o),r>=0&&C.splice(r,1),r=0;E>r;++r)U[r]&=X;return O&=X,V}var K,L,P,Q,T,V={filter:m,filterExact:z,filterRange:F,filterFunction:j,filterAll:R,top:D,bottom:G,group:H,groupAll:I,remove:J},W=~O&-~O,X=~W,Y=i(function(r){return P[r]}),Z=v,$=[],_=[],rn=0,nn=0;return C.unshift(e),C.push(o),O|=W,(M>=32?!W:O&(1<<M)-1)&&(U=q(U,M<<=1)),e(w,0,E),o(w,0,E),V}function o(){function r(r,n){var t;if(!m)for(t=n;E>t;++t)U[t]||(a=c(a,w[t]))}function n(r,n,t){var e,u,f;if(!m){for(e=0,f=n.length;f>e;++e)U[u=n[e]]||(a=c(a,w[u]));for(e=0,f=t.length;f>e;++e)U[u=t[e]]===r&&(a=l(a,w[u]))}}function t(){var r;for(a=v(),r=0;E>r;++r)U[r]||(a=c(a,w[r]))}function e(r,n,t){return c=r,l=n,v=t,m=!0,s}function u(){return e(d,p,h)}function f(r){return e(g(r),y(r),h)}function o(){return m&&(t(),m=!1),a}function i(){var t=N.indexOf(n);return t>=0&&N.splice(t),t=C.indexOf(r),t>=0&&C.splice(t),s}var a,c,l,v,s={reduce:e,reduceCount:u,reduceSum:f,value:o,remove:i},m=!0;return N.push(n),C.push(r),r(w,0,E),u()}function a(){return E}var m={add:r,dimension:e,groupAll:o,size:a},w=[],E=0,O=0,M=8,U=z(0),N=[],C=[];return arguments.length?r(arguments[0]):m}function b(r,n){return(257>n?z:65537>n?N:C)(r)}function A(r){for(var n=b(r,r),t=-1;++t<r;)n[t]=t;return n}function k(r){return 8===r?256:16===r?65536:4294967296}m.version="1.2.0",m.permute=t;var x=m.bisect=e(n);x.by=e;var w=m.heap=u(n);w.by=u;var E=m.heapselect=f(n);E.by=f;var O=m.insertionsort=o(n);O.by=o;var M=m.quicksort=i(n);M.by=i;var U=32,z=a,N=a,C=a,S=n,q=n;"undefined"!=typeof Uint8Array&&(z=function(r){return new Uint8Array(r)},N=function(r){return new Uint16Array(r)},C=function(r){return new Uint32Array(r)},S=function(r,n){var t=new r.constructor(n);return t.set(r),t},q=function(r,n){var t;switch(n){case 16:t=N(r.length);break;case 32:t=C(r.length);break;default:throw Error("invalid array width!")}return t.set(r),t}),r.crossfilter=m})(this);
1
+ !function(r){function n(r){return r}function t(r,n){for(var t=0,e=n.length,u=Array(e);e>t;++t)u[t]=r[n[t]];return u}function e(r){function n(n,t,e,u){for(;u>e;){var f=e+u>>>1;r(n[f])<t?e=f+1:u=f}return e}function t(n,t,e,u){for(;u>e;){var f=e+u>>>1;t<r(n[f])?u=f:e=f+1}return e}return t.right=t,t.left=n,t}function u(r){function n(r,n,t){for(var u=t-n,f=(u>>>1)+1;--f>0;)e(r,f,u,n);return r}function t(r,n,t){for(var u,f=t-n;--f>0;)u=r[n],r[n]=r[n+f],r[n+f]=u,e(r,1,f,n);return r}function e(n,t,e,u){for(var f,o=n[--u+t],i=r(o);(f=t<<1)<=e&&(e>f&&r(n[u+f])>r(n[u+f+1])&&f++,!(i<=r(n[u+f])));)n[u+t]=n[u+f],t=f;n[u+t]=o}return n.sort=t,n}function f(r){function n(n,e,u,f){var o,i,a,c,l=Array(f=Math.min(u-e,f));for(i=0;f>i;++i)l[i]=n[e++];if(t(l,0,f),u>e){o=r(l[0]);do(a=r(c=n[e])>o)&&(l[0]=c,o=r(t(l,0,f)[0]));while(++e<u)}return l}var t=u(r);return n}function o(r){function n(n,t,e){for(var u=t+1;e>u;++u){for(var f=u,o=n[u],i=r(o);f>t&&r(n[f-1])>i;--f)n[f]=n[f-1];n[f]=o}return n}return n}function i(r){function n(r,n,u){return(U>u-n?e:t)(r,n,u)}function t(t,e,u){var f,o=0|(u-e)/6,i=e+o,a=u-1-o,c=e+u-1>>1,l=c-o,v=c+o,s=t[i],h=r(s),p=t[l],d=r(p),g=t[c],y=r(g),m=t[v],b=r(m),A=t[a],k=r(A);h>d&&(f=s,s=p,p=f,f=h,h=d,d=f),b>k&&(f=m,m=A,A=f,f=b,b=k,k=f),h>y&&(f=s,s=g,g=f,f=h,h=y,y=f),d>y&&(f=p,p=g,g=f,f=d,d=y,y=f),h>b&&(f=s,s=m,m=f,f=h,h=b,b=f),y>b&&(f=g,g=m,m=f,f=y,y=b,b=f),d>k&&(f=p,p=A,A=f,f=d,d=k,k=f),d>y&&(f=p,p=g,g=f,f=d,d=y,y=f),b>k&&(f=m,m=A,A=f,f=b,b=k,k=f);var x=p,E=d,O=m,w=b;t[i]=s,t[l]=t[e],t[c]=g,t[v]=t[u-1],t[a]=A;var M=e+1,U=u-2,z=w>=E&&E>=w;if(z)for(var N=M;U>=N;++N){var C=t[N],S=r(C);if(E>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>E)for(;;){var q=r(t[U]);{if(!(q>E)){if(E>q){t[N]=t[M],t[M++]=t[U],t[U--]=C;break}t[N]=t[U],t[U--]=C;break}U--}}}else for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(E>S)N!==M&&(t[N]=t[M],t[M]=C),++M;else if(S>w)for(;;){var q=r(t[U]);{if(!(q>w)){E>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}if(t[e]=t[M-1],t[M-1]=x,t[u-1]=t[U+1],t[U+1]=O,n(t,e,M-1),n(t,U+2,u),z)return t;if(i>M&&U>a){for(var F,q;(F=r(t[M]))<=E&&F>=E;)++M;for(;(q=r(t[U]))<=w&&q>=w;)--U;for(var N=M;U>=N;N++){var C=t[N],S=r(C);if(E>=S&&S>=E)N!==M&&(t[N]=t[M],t[M]=C),M++;else if(w>=S&&S>=w)for(;;){var q=r(t[U]);{if(!(w>=q&&q>=w)){E>q?(t[N]=t[M],t[M++]=t[U],t[U--]=C):(t[N]=t[U],t[U--]=C);break}if(U--,N>U)break}}}}return n(t,M,U+1)}var e=o(r);return n}function a(r){return Array(r)}function c(r,n){return function(t){var e=t.length;return[r.left(t,n,0,e),r.right(t,n,0,e)]}}function l(r,n){var t=n[0],e=n[1];return function(n){var u=n.length;return[r.left(n,t,0,u),r.left(n,e,0,u)]}}function v(r){return[0,r.length]}function s(){return null}function h(){return 0}function p(r){return r+1}function d(r){return r-1}function g(r){return function(n,t){return n+ +r(t)}}function y(r){return function(n,t){return n-r(t)}}function m(){function r(r){var n=w,t=r.length;return t&&(O=O.concat(r),N=S(N,w+=t),F.forEach(function(e){e(r,n,t)})),E}function e(){for(var r=b(w,w),n=[],t=0,e=0;w>t;++t)N[t]?r[t]=e++:n.push(t);C.forEach(function(r){r(0,[],n)}),R.forEach(function(n){n(r)});for(var u,t=0,e=0;w>t;++t)(u=N[t])&&(t!==e&&(N[e]=u,O[e]=O[t]),++e);for(O.length=e;w>e;)N[--w]=0}function o(r){function e(n,e,u){T=n.map(r),V=$(A(u),0,u),T=t(T,V);var f,o,i=_(T),a=i[0],c=i[1];if(W)for(f=0;u>f;++f)W(T[f],o=V[f]+e)||(N[o]|=Y);else{for(f=0;a>f;++f)N[V[f]+e]|=Y;for(f=c;u>f;++f)N[V[f]+e]|=Y}if(!e)return P=T,Q=V,tn=a,en=c,void 0;var l=P,v=Q,s=0,h=0;for(P=Array(w),Q=b(w,w),f=0;e>s&&u>h;++f)l[s]<T[h]?(P[f]=l[s],Q[f]=v[s++]):(P[f]=T[h],Q[f]=V[h++]+e);for(;e>s;++s,++f)P[f]=l[s],Q[f]=v[s];for(;u>h;++h,++f)P[f]=T[h],Q[f]=V[h]+e;i=_(P),tn=i[0],en=i[1]}function o(r,n,t){rn.forEach(function(r){r(T,V,n,t)}),T=V=null}function a(r){for(var n,t=0,e=0;w>t;++t)N[n=Q[t]]&&(t!==e&&(P[e]=P[t],Q[e]=r[n]),++e);for(P.length=e;w>e;)Q[e++]=0;var u=_(P);tn=u[0],en=u[1]}function m(r){var n=r[0],t=r[1];if(W)return W=null,G(function(r,e){return e>=n&&t>e}),tn=n,en=t,X;var e,u,f,o=[],i=[];if(tn>n)for(e=n,u=Math.min(tn,t);u>e;++e)N[f=Q[e]]^=Y,o.push(f);else if(n>tn)for(e=tn,u=Math.min(n,en);u>e;++e)N[f=Q[e]]^=Y,i.push(f);if(t>en)for(e=Math.max(n,en),u=t;u>e;++e)N[f=Q[e]]^=Y,o.push(f);else if(en>t)for(e=Math.max(tn,t),u=en;u>e;++e)N[f=Q[e]]^=Y,i.push(f);return tn=n,en=t,C.forEach(function(r){r(Y,o,i)}),X}function E(r){return null==r?B():Array.isArray(r)?j(r):"function"==typeof r?D(r):z(r)}function z(r){return m((_=c(x,r))(P))}function j(r){return m((_=l(x,r))(P))}function B(){return m((_=v)(P))}function D(r){return _=v,G(W=r),tn=0,en=w,X}function G(r){var n,t,e,u=[],f=[];for(n=0;w>n;++n)!(N[t=Q[n]]&Y)^(e=r(P[n],t))&&(e?(N[t]&=Z,u.push(t)):(N[t]|=Y,f.push(t)));C.forEach(function(r){r(Y,u,f)})}function H(r){for(var n,t=[],e=en;--e>=tn&&r>0;)N[n=Q[e]]||(t.push(O[n]),--r);return t}function I(r){for(var n,t=[],e=tn;en>e&&r>0;)N[n=Q[e]]||(t.push(O[n]),--r),e++;return t}function J(r){function t(n,t,e,u){function f(){++T===L&&(m=q(m,K<<=1),B=q(B,K),L=k(K))}var l,v,h,p,d,g,y=j,m=b(T,L),A=H,x=J,E=T,M=0,U=0;for(X&&(A=x=s),j=Array(T),T=0,B=E>1?S(B,w):b(w,L),E&&(h=(v=y[0]).key);u>U&&!((p=r(n[U]))>=p);)++U;for(;u>U;){for(v&&p>=h?(d=v,g=h,m[M]=T,(v=y[++M])&&(h=v.key)):(d={key:p,value:x()},g=p),j[T]=d;!(p>g||(B[l=t[U]+e]=T,N[l]&Z||(d.value=A(d.value,O[l])),++U>=u));)p=r(n[U]);f()}for(;E>M;)j[m[M]=T]=y[M++],f();if(T>M)for(M=0;e>M;++M)B[M]=m[B[M]];l=C.indexOf(V),T>1?(V=o,W=a):(1===T?(V=i,W=c):(V=s,W=s),B=null),C[l]=V}function e(){for(var r=0,n=0;w>r;++r)N[r]&&(r!==n&&(B[n]=B[r]),++n)}function o(r,n,t){if(r!==Y&&!X){var e,u,f,o;for(e=0,f=n.length;f>e;++e)N[u=n[e]]&Z||(o=j[B[u]],o.value=H(o.value,O[u]));for(e=0,f=t.length;f>e;++e)(N[u=t[e]]&Z)===r&&(o=j[B[u]],o.value=I(o.value,O[u]))}}function i(r,n,t){if(r!==Y&&!X){var e,u,f,o=j[0];for(e=0,f=n.length;f>e;++e)N[u=n[e]]&Z||(o.value=H(o.value,O[u]));for(e=0,f=t.length;f>e;++e)(N[u=t[e]]&Z)===r&&(o.value=I(o.value,O[u]))}}function a(){var r,n;for(r=0;T>r;++r)j[r].value=J();for(r=0;w>r;++r)N[r]&Z||(n=j[B[r]],n.value=H(n.value,O[r]))}function c(){var r,n=j[0];for(n.value=J(),r=0;w>r;++r)N[r]&Z||(n.value=H(n.value,O[r]))}function l(){return X&&(W(),X=!1),j}function v(r){var n=D(l(),0,j.length,r);return G.sort(n,0,n.length)}function m(r,n,t){return H=r,I=n,J=t,X=!0,F}function A(){return m(p,d,h)}function x(r){return m(g(r),y(r),h)}function E(r){function n(n){return r(n.value)}return D=f(n),G=u(n),F}function M(){return E(n)}function U(){return T}function z(){var r=C.indexOf(V);return r>=0&&C.splice(r,1),r=rn.indexOf(t),r>=0&&rn.splice(r,1),r=R.indexOf(e),r>=0&&R.splice(r,1),F}var F={top:v,all:l,reduce:m,reduceCount:A,reduceSum:x,order:E,orderNatural:M,size:U,dispose:z,remove:z};nn.push(F);var j,B,D,G,H,I,J,K=8,L=k(K),T=0,V=s,W=s,X=!0;return arguments.length<1&&(r=n),C.push(V),rn.push(t),R.push(e),t(P,Q,0,w),A().orderNatural()}function K(){var r=J(s),n=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return n()[0].value},r}function L(){nn.forEach(function(r){r.dispose()});var r=F.indexOf(e);for(r>=0&&F.splice(r,1),r=F.indexOf(o),r>=0&&F.splice(r,1),r=R.indexOf(a),r>=0&&R.splice(r,1),r=0;w>r;++r)N[r]&=Z;return M&=Z,X}var P,Q,T,V,W,X={filter:E,filterExact:z,filterRange:j,filterFunction:D,filterAll:B,top:H,bottom:I,group:J,groupAll:K,dispose:L,remove:L},Y=~M&-~M,Z=~Y,$=i(function(r){return T[r]}),_=v,rn=[],nn=[],tn=0,en=0;return F.unshift(e),F.push(o),R.push(a),M|=Y,(U>=32?!Y:M&(1<<U)-1)&&(N=q(N,U<<=1)),e(O,0,w),o(O,0,w),X}function a(){function r(r,n){var t;if(!m)for(t=n;w>t;++t)N[t]||(a=c(a,O[t]))}function n(r,n,t){var e,u,f;if(!m){for(e=0,f=n.length;f>e;++e)N[u=n[e]]||(a=c(a,O[u]));for(e=0,f=t.length;f>e;++e)N[u=t[e]]===r&&(a=l(a,O[u]))}}function t(){var r;for(a=v(),r=0;w>r;++r)N[r]||(a=c(a,O[r]))}function e(r,n,t){return c=r,l=n,v=t,m=!0,s}function u(){return e(p,d,h)}function f(r){return e(g(r),y(r),h)}function o(){return m&&(t(),m=!1),a}function i(){var t=C.indexOf(n);return t>=0&&C.splice(t),t=F.indexOf(r),t>=0&&F.splice(t),s}var a,c,l,v,s={reduce:e,reduceCount:u,reduceSum:f,value:o,dispose:i,remove:i},m=!0;return C.push(n),F.push(r),r(O,0,w),u()}function m(){return w}var E={add:r,remove:e,dimension:o,groupAll:a,size:m},O=[],w=0,M=0,U=8,N=z(0),C=[],F=[],R=[];return arguments.length?r(arguments[0]):E}function b(r,n){return(257>n?z:65537>n?N:C)(r)}function A(r){for(var n=b(r,r),t=-1;++t<r;)n[t]=t;return n}function k(r){return 8===r?256:16===r?65536:4294967296}m.version="1.3.1",m.permute=t;var x=m.bisect=e(n);x.by=e;var E=m.heap=u(n);E.by=u;var O=m.heapselect=f(n);O.by=f;var w=m.insertionsort=o(n);w.by=o;var M=m.quicksort=i(n);M.by=i;var U=32,z=a,N=a,C=a,S=n,q=n;"undefined"!=typeof Uint8Array&&(z=function(r){return new Uint8Array(r)},N=function(r){return new Uint16Array(r)},C=function(r){return new Uint32Array(r)},S=function(r,n){if(r.length>=n)return r;var t=new r.constructor(n);return t.set(r),t},q=function(r,n){var t;switch(n){case 16:t=N(r.length);break;case 32:t=C(r.length);break;default:throw Error("invalid array width!")}return t.set(r),t}),r.crossfilter=m}(this);
metadata CHANGED
@@ -1,14 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crossfilter-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlad Gorodetsky
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2013-05-23 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDSDCCAjCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA1MQowCAYDVQQDDAF2MRMw
14
+ EQYKCZImiZPyLGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wHhcNMTMwNTIz
15
+ MjA0MTI3WhcNMTQwNTIzMjA0MTI3WjA1MQowCAYDVQQDDAF2MRMwEQYKCZImiZPy
16
+ LGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wggEiMA0GCSqGSIb3DQEBAQUA
17
+ A4IBDwAwggEKAoIBAQCtb8+GfjqcYl6M4IhIGomKsGgWEC4mwTXIq/Yl+jJAdP7s
18
+ bdV3lWnZybUPKtdHSQIJcxbm8GZspTqSqDgsECI/laTyLj7Srqcbyivf/ov50Tg1
19
+ CxMtt8STA6wNmY0ljO4SK72Pr8uQwFZIgNHBB9LcvrpmRn/TWDXlcqaq0db6QJKk
20
+ jGOv74ukiQun+saqthpxwNN6wm0rj1GDulrDuMeeMj/XDgu0piNHhBtsgQ6KrN94
21
+ cs0XGgwKihL0LdqWiOG9L8tZKeksKk72EcTpvaw1EYUfJ/rAcC8l6SluN2+BDMA0
22
+ /4LU70O+wTwHcHv2HimtKdlcpS936qOez3lXUD+3AgMBAAGjYzBhMAkGA1UdEwQC
23
+ MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSRvHatldjBIKT5agA2bnkfm4KUxTAT
24
+ BgNVHREEDDAKgQh2QGdvci5pbzATBgNVHRIEDDAKgQh2QGdvci5pbzANBgkqhkiG
25
+ 9w0BAQUFAAOCAQEAmyGZCL6ISHS6UCkPAie1LZgyc+yS4ckMPtzBJtjODr5kfRTC
26
+ tLb9W4epJ9Aa2aGkKy/NL8MFS0BwTJmjSfufFDwFZlw0kI9aAvL4Nx9OHWNen9Dm
27
+ GtEWXXKpB0du12DBjfavJYl0QLcz18M0mtvug634t40H06GussO83uu7wHEvIPBP
28
+ Z5VMAbKvOmDgaP2I9XxZ2/lDmBKDZkVNqmqYiScw2CWsKxVPx3vhMGprTIz4O8y/
29
+ JCf887eMZl/8mEIeCLb+gH5sh5yJJpti2HTLnR4Q1QKWR/0T9tASoQPF3kL62n9+
30
+ m1B90+fEzJsBDQIAsnLPqxjivWbIIfZ7GeGZyA==
31
+ -----END CERTIFICATE-----
32
+ date: 2013-09-02 00:00:00.000000000 Z
12
33
  dependencies:
13
34
  - !ruby/object:Gem::Dependency
14
35
  name: railties
@@ -42,13 +63,15 @@ files:
42
63
  - LICENSE
43
64
  - README.md
44
65
  - Rakefile
66
+ - certs/bai.pem
45
67
  - crossfilter-rails.gemspec
46
68
  - lib/crossfilter-rails.rb
47
69
  - lib/crossfilter-rails/version.rb
48
70
  - vendor/assets/javascripts/crossfilter.js
49
71
  - vendor/assets/javascripts/crossfilter.min.js
50
72
  homepage: http://github.com/bai/crossfilter-rails
51
- licenses: []
73
+ licenses:
74
+ - MIT
52
75
  metadata: {}
53
76
  post_install_message:
54
77
  rdoc_options: []
@@ -66,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
89
  version: '0'
67
90
  requirements: []
68
91
  rubyforge_project:
69
- rubygems_version: 2.0.2
92
+ rubygems_version: 2.0.3
70
93
  signing_key:
71
94
  specification_version: 4
72
95
  summary: Gemified crossfilter.js asset for Rails
@@ -0,0 +1 @@
1
+ 0Z�g�2���D��X ���\�z���aUƛz�z�]�% NO�е�G�؞��/~_��6ŵl��/�bjE�{<�.�[J0�^׆��$T�Ezm����dq��Ԍ�P��a��x$��~�"֔o�046:���<���~�V�߷��.63y���Sϕ?֋�s��߻�wy~$ �l��r�P�t/��:�V�do?��]��v�0ڔN���S2^�y����~�$�_���f�������`��4����*