hooch 0.15.11 → 0.15.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/hooch.js +41 -27
- data/lib/hooch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ae40f00494aeea8ac9532cbef935639ef337e00
|
4
|
+
data.tar.gz: 0bb2734f4c2005693839b1892c30fcd08a42031f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a909412afcdeaddee763d204783b31dcfe48fb735bda1f568ada026907577b7525ef99e774428a704b9ddad46f16c6371f48e590194b6c6ec2632f33213f7b
|
7
|
+
data.tar.gz: 787cee14e5a66a76bf5c3f9220863f07b7aa181e558f5ecc9559cac774c39f8301fa2ccb2fc53b2050b7d5a8aaa3f031c9c721eddf27451a1e6ecde7a2cd2bb4
|
@@ -1,36 +1,50 @@
|
|
1
1
|
Set.prototype.isSuperset = function(subset) {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
let this_set = this
|
3
|
+
subset.forEach (function(elem) {
|
4
|
+
if (!this_set.has(elem)) {
|
5
|
+
return false;
|
6
6
|
}
|
7
|
-
|
7
|
+
})
|
8
|
+
return true;
|
8
9
|
}
|
9
10
|
|
10
11
|
Set.prototype.union = function(setB) {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
let union = Set.from_iterable(this);
|
13
|
+
let this_set = this
|
14
|
+
setB.forEach(function(elem) {
|
15
|
+
union.add(elem);
|
16
|
+
})
|
17
|
+
return union;
|
16
18
|
}
|
17
19
|
|
18
20
|
Set.prototype.intersection = function(setB) {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
var intersection = new Set();
|
22
|
+
let this_set = this
|
23
|
+
setB.forEach(function(elem) {
|
24
|
+
if (this_set.has(elem)) {
|
25
|
+
intersection.add(elem);
|
24
26
|
}
|
25
|
-
|
27
|
+
})
|
28
|
+
return intersection;
|
26
29
|
}
|
27
30
|
|
28
31
|
Set.prototype.difference = function(setB) {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
32
|
+
var difference = Set.from_iterable(this);
|
33
|
+
setB.forEach( function (elem) {
|
34
|
+
difference.delete(elem);
|
35
|
+
})
|
36
|
+
return difference;
|
37
|
+
}
|
38
|
+
Set.prototype.from_iterable = function(arr) {
|
39
|
+
if(typeof Set.prototype.values == 'undefined'){
|
40
|
+
var new_set = Set.new()
|
41
|
+
arr.forEach(function(v,i,t){
|
42
|
+
new_set.add(v)
|
43
|
+
})
|
44
|
+
}else{
|
45
|
+
var new_set = Set.new(arr)
|
46
|
+
}
|
47
|
+
return new_set
|
34
48
|
}
|
35
49
|
var initHooch = function(){
|
36
50
|
hooch = {
|
@@ -1503,8 +1517,8 @@ var initHooch = function(){
|
|
1503
1517
|
any = false
|
1504
1518
|
break
|
1505
1519
|
}
|
1506
|
-
let include_source =
|
1507
|
-
let include_test =
|
1520
|
+
let include_source = Set.from_iterable(recipient_filters[key])
|
1521
|
+
let include_test = Set.from_iterable(element_filters.any[key])
|
1508
1522
|
if(include_source.intersection(include_test).size == 0){
|
1509
1523
|
any = false
|
1510
1524
|
break
|
@@ -1519,8 +1533,8 @@ var initHooch = function(){
|
|
1519
1533
|
all = false
|
1520
1534
|
break
|
1521
1535
|
}
|
1522
|
-
let include_source =
|
1523
|
-
let include_test =
|
1536
|
+
let include_source = Set.from_iterable(recipient_filters[key])
|
1537
|
+
let include_test = Set.from_iterable(element_filters.all[key])
|
1524
1538
|
if(!include_source.isSuperset(include_test)){
|
1525
1539
|
all = false
|
1526
1540
|
break
|
@@ -1531,8 +1545,8 @@ var initHooch = function(){
|
|
1531
1545
|
var none = true
|
1532
1546
|
for(var key in element_filters.none){
|
1533
1547
|
if(!recipient_filters.hasOwnProperty(key)){continue}
|
1534
|
-
let exclude_source =
|
1535
|
-
let exclude_test =
|
1548
|
+
let exclude_source = Set.from_iterable(recipient_filters[key])
|
1549
|
+
let exclude_test = Set.from_iterable(element_filters.none[key])
|
1536
1550
|
if(exclude_source.intersection(exclude_test).size != 0){
|
1537
1551
|
none = false
|
1538
1552
|
break
|
data/lib/hooch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|