ransack 1.7.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/.travis.yml +16 -48
- data/CHANGELOG.md +409 -26
- data/CONTRIBUTING.md +48 -20
- data/Gemfile +9 -13
- data/README.md +352 -92
- data/Rakefile +6 -25
- data/lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb +2 -0
- data/lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb +2 -0
- data/lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb +32 -0
- data/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +112 -0
- data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +32 -0
- data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +113 -0
- data/lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb +31 -0
- data/lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb +57 -0
- data/lib/polyamorous/join.rb +70 -0
- data/lib/polyamorous/swapping_reflection_class.rb +11 -0
- data/lib/polyamorous/tree_node.rb +7 -0
- data/lib/polyamorous.rb +25 -0
- data/lib/ransack/adapters/active_record/base.rb +23 -2
- data/lib/ransack/adapters/active_record/context.rb +210 -135
- data/lib/ransack/adapters/active_record/ransack/constants.rb +53 -53
- data/lib/ransack/adapters/active_record/ransack/context.rb +11 -15
- data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +33 -30
- data/lib/ransack/adapters/active_record/ransack/translate.rb +1 -5
- data/lib/ransack/adapters/active_record/ransack/visitor.rb +23 -0
- data/lib/ransack/adapters/active_record.rb +11 -10
- data/lib/ransack/adapters.rb +45 -23
- data/lib/ransack/configuration.rb +91 -4
- data/lib/ransack/constants.rb +14 -26
- data/lib/ransack/context.rb +29 -18
- data/lib/ransack/helpers/form_builder.rb +27 -12
- data/lib/ransack/helpers/form_helper.rb +75 -70
- data/lib/ransack/locale/ar.yml +70 -0
- data/lib/ransack/locale/az.yml +70 -0
- data/lib/ransack/locale/bg.yml +70 -0
- data/lib/ransack/locale/da.yml +70 -0
- data/lib/ransack/locale/el.yml +70 -0
- data/lib/ransack/locale/id.yml +70 -0
- data/lib/ransack/locale/it.yml +70 -0
- data/lib/ransack/locale/ja.yml +70 -0
- data/lib/ransack/locale/nl.yml +4 -4
- data/lib/ransack/locale/pt-BR.yml +70 -0
- data/lib/ransack/locale/ru.yml +70 -0
- data/lib/ransack/locale/tr.yml +70 -0
- data/lib/ransack/locale/{zh.yml → zh-CN.yml} +13 -13
- data/lib/ransack/locale/zh-TW.yml +70 -0
- data/lib/ransack/nodes/attribute.rb +5 -2
- data/lib/ransack/nodes/bindable.rb +18 -6
- data/lib/ransack/nodes/condition.rb +77 -28
- data/lib/ransack/nodes/grouping.rb +16 -10
- data/lib/ransack/nodes/sort.rb +9 -5
- data/lib/ransack/nodes/value.rb +74 -68
- data/lib/ransack/nodes.rb +1 -1
- data/lib/ransack/predicate.rb +15 -19
- data/lib/ransack/search.rb +14 -7
- data/lib/ransack/translate.rb +3 -3
- data/lib/ransack/version.rb +1 -1
- data/lib/ransack/visitor.rb +1 -12
- data/lib/ransack.rb +7 -7
- data/logo/ransack-h.png +0 -0
- data/logo/ransack-h.svg +34 -0
- data/logo/ransack-v.png +0 -0
- data/logo/ransack-v.svg +34 -0
- data/logo/ransack.png +0 -0
- data/logo/ransack.svg +21 -0
- data/ransack.gemspec +9 -10
- data/spec/console.rb +4 -0
- data/spec/helpers/polyamorous_helper.rb +24 -0
- data/spec/ransack/adapters/active_record/base_spec.rb +365 -74
- data/spec/ransack/adapters/active_record/context_spec.rb +14 -19
- data/spec/ransack/configuration_spec.rb +87 -14
- data/spec/ransack/helpers/form_builder_spec.rb +2 -11
- data/spec/ransack/helpers/form_helper_spec.rb +481 -113
- data/spec/ransack/join_association_spec.rb +28 -0
- data/spec/ransack/join_dependency_spec.rb +86 -0
- data/spec/ransack/join_spec.rb +19 -0
- data/spec/ransack/nodes/condition_spec.rb +24 -0
- data/spec/ransack/nodes/grouping_spec.rb +56 -0
- data/spec/ransack/predicate_spec.rb +27 -5
- data/spec/ransack/search_spec.rb +84 -70
- data/spec/spec_helper.rb +4 -0
- data/spec/support/schema.rb +86 -41
- metadata +60 -81
- data/lib/ransack/adapters/active_record/3.0/compat.rb +0 -179
- data/lib/ransack/adapters/active_record/3.0/context.rb +0 -201
- data/lib/ransack/adapters/active_record/3.1/context.rb +0 -215
- data/lib/ransack/adapters/active_record/3.2/context.rb +0 -44
- data/lib/ransack/adapters/active_record/compat.rb +0 -14
- data/lib/ransack/adapters/mongoid/3.2/.gitkeep +0 -0
- data/lib/ransack/adapters/mongoid/attributes/attribute.rb +0 -37
- data/lib/ransack/adapters/mongoid/attributes/order_predications.rb +0 -17
- data/lib/ransack/adapters/mongoid/attributes/predications.rb +0 -141
- data/lib/ransack/adapters/mongoid/base.rb +0 -130
- data/lib/ransack/adapters/mongoid/context.rb +0 -208
- data/lib/ransack/adapters/mongoid/inquiry_hash.rb +0 -23
- data/lib/ransack/adapters/mongoid/ransack/constants.rb +0 -88
- data/lib/ransack/adapters/mongoid/ransack/context.rb +0 -60
- data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +0 -27
- data/lib/ransack/adapters/mongoid/ransack/translate.rb +0 -13
- data/lib/ransack/adapters/mongoid/ransack/visitor.rb +0 -24
- data/lib/ransack/adapters/mongoid/table.rb +0 -35
- data/lib/ransack/adapters/mongoid.rb +0 -13
- data/spec/mongoid/adapters/mongoid/base_spec.rb +0 -276
- data/spec/mongoid/adapters/mongoid/context_spec.rb +0 -56
- data/spec/mongoid/configuration_spec.rb +0 -102
- data/spec/mongoid/dependencies_spec.rb +0 -8
- data/spec/mongoid/helpers/ransack_helper.rb +0 -11
- data/spec/mongoid/nodes/condition_spec.rb +0 -34
- data/spec/mongoid/nodes/grouping_spec.rb +0 -13
- data/spec/mongoid/predicate_spec.rb +0 -155
- data/spec/mongoid/search_spec.rb +0 -446
- data/spec/mongoid/support/mongoid.yml +0 -6
- data/spec/mongoid/support/schema.rb +0 -128
- data/spec/mongoid/translate_spec.rb +0 -14
- data/spec/mongoid_spec_helper.rb +0 -59
- data/spec/ransack/dependencies_spec.rb +0 -12
data/logo/ransack-h.svg
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg width="100%" height="100%" viewBox="0 0 519 114" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
4
|
+
<g transform="matrix(1,0,0,1,-1217.17,-115.878)">
|
5
|
+
<g transform="matrix(1,0,0,1,1076.45,0)">
|
6
|
+
<g transform="matrix(1,0,0,1,-38.0018,0)">
|
7
|
+
<g transform="matrix(0.952133,0,0,0.952133,-804.114,-1490.95)">
|
8
|
+
<path d="M1032.25,1692.74C1032.25,1689.9 1034.55,1687.61 1037.38,1687.61C1052.29,1687.61 1094.52,1687.61 1094.52,1687.61L1094.52,1687.61C1117.36,1687.65 1135.89,1706.2 1135.89,1729.05C1135.89,1741.48 1128.4,1752.63 1119.73,1760.23C1119.73,1760.23 1136.6,1789.45 1143.57,1801.53C1144.18,1802.58 1144.18,1803.88 1143.57,1804.94C1142.96,1806 1141.83,1806.65 1140.61,1806.65C1130.61,1806.65 1110.85,1806.65 1104.56,1806.65C1103.34,1806.65 1102.21,1806 1101.6,1804.94C1097.46,1797.77 1081.71,1770.49 1081.71,1770.49L1073.76,1770.49C1073.76,1770.49 1073.76,1792.44 1073.76,1802.14C1073.76,1803.34 1073.29,1804.48 1072.44,1805.33C1071.6,1806.17 1070.45,1806.65 1069.25,1806.65C1061.27,1806.65 1044.74,1806.65 1036.76,1806.65C1035.56,1806.65 1034.41,1806.17 1033.57,1805.33C1032.72,1804.48 1032.25,1803.34 1032.25,1802.14C1032.25,1783.5 1032.25,1712.5 1032.25,1692.74Z" style="fill:url(#_Linear1);"/>
|
9
|
+
<clipPath id="_clip2">
|
10
|
+
<path d="M1032.25,1692.74C1032.25,1689.9 1034.55,1687.61 1037.38,1687.61C1052.29,1687.61 1094.52,1687.61 1094.52,1687.61L1094.52,1687.61C1117.36,1687.65 1135.89,1706.2 1135.89,1729.05C1135.89,1741.48 1128.4,1752.63 1119.73,1760.23C1119.73,1760.23 1136.6,1789.45 1143.57,1801.53C1144.18,1802.58 1144.18,1803.88 1143.57,1804.94C1142.96,1806 1141.83,1806.65 1140.61,1806.65C1130.61,1806.65 1110.85,1806.65 1104.56,1806.65C1103.34,1806.65 1102.21,1806 1101.6,1804.94C1097.46,1797.77 1081.71,1770.49 1081.71,1770.49L1073.76,1770.49C1073.76,1770.49 1073.76,1792.44 1073.76,1802.14C1073.76,1803.34 1073.29,1804.48 1072.44,1805.33C1071.6,1806.17 1070.45,1806.65 1069.25,1806.65C1061.27,1806.65 1044.74,1806.65 1036.76,1806.65C1035.56,1806.65 1034.41,1806.17 1033.57,1805.33C1032.72,1804.48 1032.25,1803.34 1032.25,1802.14C1032.25,1783.5 1032.25,1712.5 1032.25,1692.74Z"/>
|
11
|
+
</clipPath>
|
12
|
+
<g clip-path="url(#_clip2)">
|
13
|
+
<g transform="matrix(1.05537,0,0,1.05537,-56.2001,-93.6352)">
|
14
|
+
<path d="M1090.07,1757.11C1087.62,1757.78 1085.05,1758.14 1082.39,1758.14C1066.34,1758.14 1053.3,1745.1 1053.3,1729.05C1053.3,1712.99 1066.34,1699.96 1082.39,1699.96C1098.45,1699.96 1111.49,1712.99 1111.49,1729.05C1111.49,1738.8 1106.68,1747.44 1099.3,1752.72C1099.3,1752.72 1110.29,1771.75 1116.66,1782.78C1117.57,1784.36 1117.57,1786.31 1116.66,1787.89C1115.75,1789.47 1114.06,1790.44 1112.23,1790.44C1112.23,1790.44 1112.23,1790.44 1112.23,1790.44C1110.43,1790.44 1108.76,1789.48 1107.86,1787.92C1103.37,1780.15 1090.07,1757.11 1090.07,1757.11ZM1082.52,1708.18C1084.31,1708.32 1084.32,1708.88 1084.66,1709.62C1085.4,1711.22 1084.12,1713.13 1081.99,1713.18C1073.82,1713.44 1066.55,1720.54 1066.53,1729.05C1066.53,1729.05 1066.41,1730.38 1065.53,1731.04C1063.81,1732.34 1061.32,1730.94 1061.59,1727.44C1062.36,1717.22 1071.49,1708.34 1082.13,1708.18C1082.26,1708.18 1082.39,1708.18 1082.52,1708.18Z" style="fill:rgb(52,52,107);fill-opacity:0.4;"/>
|
15
|
+
</g>
|
16
|
+
<path d="M1090.07,1757.11C1087.62,1757.78 1085.05,1758.14 1082.39,1758.14C1066.34,1758.14 1053.3,1745.1 1053.3,1729.05C1053.3,1712.99 1066.34,1699.96 1082.39,1699.96C1098.45,1699.96 1111.49,1712.99 1111.49,1729.05C1111.49,1738.8 1106.68,1747.44 1099.3,1752.72C1099.3,1752.72 1110.19,1771.58 1116.57,1782.63C1117.5,1784.24 1117.5,1786.23 1116.57,1787.84C1115.64,1789.45 1113.92,1790.44 1112.06,1790.44C1112.06,1790.44 1112.06,1790.44 1112.06,1790.44C1110.36,1790.44 1108.79,1789.54 1107.94,1788.07C1103.54,1780.44 1090.07,1757.11 1090.07,1757.11ZM1082.52,1708.18C1084.31,1708.32 1084.32,1708.88 1084.66,1709.62C1085.4,1711.22 1084.12,1713.13 1081.99,1713.18C1073.82,1713.44 1066.55,1720.54 1066.53,1729.05C1066.53,1729.05 1066.41,1730.38 1065.53,1731.04C1063.81,1732.34 1061.32,1730.94 1061.59,1727.44C1062.36,1717.22 1071.49,1708.34 1082.13,1708.18C1082.26,1708.18 1082.39,1708.18 1082.52,1708.18Z" style="fill:rgb(251,248,255);"/>
|
17
|
+
</g>
|
18
|
+
</g>
|
19
|
+
<g transform="matrix(1,0,0,1,-37.1645,15.0997)">
|
20
|
+
<path d="M399.069,182.651L389.349,168.611L388.773,168.611L378.621,168.611L378.621,182.651L366.957,182.651L366.957,132.251L388.773,132.251C393.237,132.251 397.113,132.995 400.401,134.483C403.689,135.971 406.221,138.083 407.997,140.819C409.773,143.555 410.661,146.795 410.661,150.539C410.661,154.283 409.761,157.511 407.961,160.223C406.161,162.935 403.605,165.011 400.293,166.451L411.597,182.651L399.069,182.651ZM398.853,150.539C398.853,147.707 397.941,145.535 396.117,144.023C394.293,142.511 391.629,141.755 388.125,141.755L378.621,141.755L378.621,159.323L388.125,159.323C391.629,159.323 394.293,158.555 396.117,157.019C397.941,155.483 398.853,153.323 398.853,150.539Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
21
|
+
<path d="M453.069,171.851L429.669,171.851L425.205,182.651L413.253,182.651L435.717,132.251L447.237,132.251L469.773,182.651L457.533,182.651L453.069,171.851ZM449.397,162.995L441.405,143.699L433.413,162.995L449.397,162.995Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
22
|
+
<path d="M521.253,132.251L521.253,182.651L511.677,182.651L486.549,152.051L486.549,182.651L475.029,182.651L475.029,132.251L484.677,132.251L509.733,162.851L509.733,132.251L521.253,132.251Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
23
|
+
<path d="M549.765,183.515C545.781,183.515 541.929,182.975 538.209,181.895C534.489,180.815 531.501,179.411 529.245,177.683L533.205,168.899C535.365,170.483 537.933,171.755 540.909,172.715C543.885,173.675 546.861,174.155 549.837,174.155C553.149,174.155 555.597,173.663 557.181,172.679C558.765,171.695 559.557,170.387 559.557,168.755C559.557,167.555 559.089,166.559 558.153,165.767C557.217,164.975 556.017,164.339 554.553,163.859C553.089,163.379 551.109,162.851 548.613,162.275C544.773,161.363 541.629,160.451 539.181,159.539C536.733,158.627 534.633,157.163 532.881,155.147C531.129,153.131 530.253,150.443 530.253,147.083C530.253,144.155 531.045,141.503 532.629,139.127C534.213,136.751 536.601,134.867 539.793,133.475C542.985,132.083 546.885,131.387 551.493,131.387C554.709,131.387 557.853,131.771 560.925,132.539C563.997,133.307 566.685,134.411 568.989,135.851L565.389,144.707C560.733,142.067 556.077,140.747 551.421,140.747C548.157,140.747 545.745,141.275 544.185,142.331C542.625,143.387 541.845,144.779 541.845,146.507C541.845,148.235 542.745,149.519 544.545,150.359C546.345,151.199 549.093,152.027 552.789,152.843C556.629,153.755 559.773,154.667 562.221,155.579C564.669,156.491 566.769,157.931 568.521,159.899C570.273,161.867 571.149,164.531 571.149,167.891C571.149,170.771 570.345,173.399 568.737,175.775C567.129,178.151 564.717,180.035 561.501,181.427C558.285,182.819 554.373,183.515 549.765,183.515Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
24
|
+
<path d="M612.333,171.851L588.933,171.851L584.469,182.651L572.517,182.651L594.981,132.251L606.501,132.251L629.037,182.651L616.797,182.651L612.333,171.851ZM608.661,162.995L600.669,143.699L592.677,162.995L608.661,162.995Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
25
|
+
<path d="M657.693,183.515C652.557,183.515 647.913,182.399 643.761,180.167C639.609,177.935 636.345,174.839 633.969,170.879C631.593,166.919 630.405,162.443 630.405,157.451C630.405,152.459 631.593,147.983 633.969,144.023C636.345,140.063 639.609,136.967 643.761,134.735C647.913,132.503 652.581,131.387 657.765,131.387C662.133,131.387 666.081,132.155 669.609,133.691C673.137,135.227 676.101,137.435 678.501,140.315L671.013,147.227C667.605,143.291 663.381,141.323 658.341,141.323C655.221,141.323 652.437,142.007 649.989,143.375C647.541,144.743 645.633,146.651 644.265,149.099C642.897,151.547 642.213,154.331 642.213,157.451C642.213,160.571 642.897,163.355 644.265,165.803C645.633,168.251 647.541,170.159 649.989,171.527C652.437,172.895 655.221,173.579 658.341,173.579C663.381,173.579 667.605,171.587 671.013,167.603L678.501,174.515C676.101,177.443 673.125,179.675 669.573,181.211C666.021,182.747 662.061,183.515 657.693,183.515Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
26
|
+
<path d="M704.709,162.851L697.941,169.907L697.941,182.651L686.349,182.651L686.349,132.251L697.941,132.251L697.941,155.795L720.261,132.251L733.221,132.251L712.341,154.715L734.445,182.651L720.837,182.651L704.709,162.851Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
27
|
+
</g>
|
28
|
+
</g>
|
29
|
+
</g>
|
30
|
+
</g>
|
31
|
+
<defs>
|
32
|
+
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(121.538,125.482,-125.482,121.538,1032.25,1687.61)"><stop offset="0" style="stop-color:rgb(132,132,220);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(51,51,180);stop-opacity:1"/></linearGradient>
|
33
|
+
</defs>
|
34
|
+
</svg>
|
data/logo/ransack-v.png
ADDED
Binary file
|
data/logo/ransack-v.svg
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg width="100%" height="100%" viewBox="0 0 291 223" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
4
|
+
<g transform="matrix(1,0,0,1,-1132.77,-491.089)">
|
5
|
+
<g transform="matrix(1,0,0,1,1076.45,0)">
|
6
|
+
<g transform="matrix(1.25996,0,0,1.25996,-1171.73,-1635.23)">
|
7
|
+
<path d="M1032.25,1691.49C1032.25,1689.34 1033.99,1687.61 1036.13,1687.61C1049.74,1687.61 1094.52,1687.61 1094.52,1687.61L1094.52,1687.61C1117.36,1687.65 1135.89,1706.2 1135.89,1729.05C1135.89,1741.48 1128.4,1752.63 1119.73,1760.23C1119.73,1760.23 1137.85,1791.63 1144.29,1802.78C1144.75,1803.58 1144.75,1804.56 1144.29,1805.36C1143.83,1806.16 1142.98,1806.65 1142.05,1806.65C1132.41,1806.65 1110.05,1806.65 1104.08,1806.65C1103.15,1806.65 1102.3,1806.16 1101.84,1805.36C1098.12,1798.91 1081.71,1770.49 1081.71,1770.49L1073.76,1770.49C1073.76,1770.49 1073.76,1794.23 1073.76,1803.24C1073.76,1805.12 1072.24,1806.65 1070.35,1806.65C1062.55,1806.65 1043.46,1806.65 1035.66,1806.65C1034.75,1806.65 1033.89,1806.29 1033.25,1805.65C1032.61,1805.01 1032.25,1804.14 1032.25,1803.24C1032.25,1786.12 1032.25,1709.65 1032.25,1691.49Z" style="fill:url(#_Linear1);"/>
|
8
|
+
<clipPath id="_clip2">
|
9
|
+
<path d="M1032.25,1691.49C1032.25,1689.34 1033.99,1687.61 1036.13,1687.61C1049.74,1687.61 1094.52,1687.61 1094.52,1687.61L1094.52,1687.61C1117.36,1687.65 1135.89,1706.2 1135.89,1729.05C1135.89,1741.48 1128.4,1752.63 1119.73,1760.23C1119.73,1760.23 1137.85,1791.63 1144.29,1802.78C1144.75,1803.58 1144.75,1804.56 1144.29,1805.36C1143.83,1806.16 1142.98,1806.65 1142.05,1806.65C1132.41,1806.65 1110.05,1806.65 1104.08,1806.65C1103.15,1806.65 1102.3,1806.16 1101.84,1805.36C1098.12,1798.91 1081.71,1770.49 1081.71,1770.49L1073.76,1770.49C1073.76,1770.49 1073.76,1794.23 1073.76,1803.24C1073.76,1805.12 1072.24,1806.65 1070.35,1806.65C1062.55,1806.65 1043.46,1806.65 1035.66,1806.65C1034.75,1806.65 1033.89,1806.29 1033.25,1805.65C1032.61,1805.01 1032.25,1804.14 1032.25,1803.24C1032.25,1786.12 1032.25,1709.65 1032.25,1691.49Z"/>
|
10
|
+
</clipPath>
|
11
|
+
<g clip-path="url(#_clip2)">
|
12
|
+
<g transform="matrix(1.05537,0,0,1.05537,-56.2001,-93.6352)">
|
13
|
+
<path d="M1090.07,1757.11C1087.62,1757.78 1085.05,1758.14 1082.39,1758.14C1066.34,1758.14 1053.3,1745.1 1053.3,1729.05C1053.3,1712.99 1066.34,1699.96 1082.39,1699.96C1098.45,1699.96 1111.49,1712.99 1111.49,1729.05C1111.49,1738.8 1106.68,1747.44 1099.3,1752.72C1099.3,1752.72 1110.29,1771.75 1116.66,1782.78C1117.57,1784.36 1117.57,1786.31 1116.66,1787.89C1115.75,1789.47 1114.06,1790.44 1112.23,1790.44C1112.23,1790.44 1112.23,1790.44 1112.23,1790.44C1110.43,1790.44 1108.76,1789.48 1107.86,1787.92C1103.37,1780.15 1090.07,1757.11 1090.07,1757.11ZM1082.52,1708.18C1084.31,1708.32 1084.32,1708.88 1084.66,1709.62C1085.4,1711.22 1084.12,1713.13 1081.99,1713.18C1073.82,1713.44 1066.55,1720.54 1066.53,1729.05C1066.53,1729.05 1066.41,1730.38 1065.53,1731.04C1063.81,1732.34 1061.32,1730.94 1061.59,1727.44C1062.36,1717.22 1071.49,1708.34 1082.13,1708.18C1082.26,1708.18 1082.39,1708.18 1082.52,1708.18Z" style="fill:rgb(52,52,107);fill-opacity:0.4;"/>
|
14
|
+
</g>
|
15
|
+
<path d="M1090.07,1757.11C1087.62,1757.78 1085.05,1758.14 1082.39,1758.14C1066.34,1758.14 1053.3,1745.1 1053.3,1729.05C1053.3,1712.99 1066.34,1699.96 1082.39,1699.96C1098.45,1699.96 1111.49,1712.99 1111.49,1729.05C1111.49,1738.8 1106.68,1747.44 1099.3,1752.72C1099.3,1752.72 1110.19,1771.58 1116.57,1782.63C1117.5,1784.24 1117.5,1786.23 1116.57,1787.84C1115.64,1789.45 1113.92,1790.44 1112.06,1790.44C1112.06,1790.44 1112.06,1790.44 1112.06,1790.44C1110.36,1790.44 1108.79,1789.54 1107.94,1788.07C1103.54,1780.44 1090.07,1757.11 1090.07,1757.11ZM1082.52,1708.18C1084.31,1708.32 1084.32,1708.88 1084.66,1709.62C1085.4,1711.22 1084.12,1713.13 1081.99,1713.18C1073.82,1713.44 1066.55,1720.54 1066.53,1729.05C1066.53,1729.05 1066.41,1730.38 1065.53,1731.04C1063.81,1732.34 1061.32,1730.94 1061.59,1727.44C1062.36,1717.22 1071.49,1708.34 1082.13,1708.18C1082.26,1708.18 1082.39,1708.18 1082.52,1708.18Z" style="fill:rgb(251,248,255);"/>
|
16
|
+
</g>
|
17
|
+
</g>
|
18
|
+
</g>
|
19
|
+
<g transform="matrix(1,0,0,1,1076.45,0)">
|
20
|
+
<g transform="matrix(0.789583,0,0,0.789583,-233.422,568.437)">
|
21
|
+
<path d="M399.069,182.651L389.349,168.611L388.773,168.611L378.621,168.611L378.621,182.651L366.957,182.651L366.957,132.251L388.773,132.251C393.237,132.251 397.113,132.995 400.401,134.483C403.689,135.971 406.221,138.083 407.997,140.819C409.773,143.555 410.661,146.795 410.661,150.539C410.661,154.283 409.761,157.511 407.961,160.223C406.161,162.935 403.605,165.011 400.293,166.451L411.597,182.651L399.069,182.651ZM398.853,150.539C398.853,147.707 397.941,145.535 396.117,144.023C394.293,142.511 391.629,141.755 388.125,141.755L378.621,141.755L378.621,159.323L388.125,159.323C391.629,159.323 394.293,158.555 396.117,157.019C397.941,155.483 398.853,153.323 398.853,150.539Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
22
|
+
<path d="M453.069,171.851L429.669,171.851L425.205,182.651L413.253,182.651L435.717,132.251L447.237,132.251L469.773,182.651L457.533,182.651L453.069,171.851ZM449.397,162.995L441.405,143.699L433.413,162.995L449.397,162.995Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
23
|
+
<path d="M521.253,132.251L521.253,182.651L511.677,182.651L486.549,152.051L486.549,182.651L475.029,182.651L475.029,132.251L484.677,132.251L509.733,162.851L509.733,132.251L521.253,132.251Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
24
|
+
<path d="M549.765,183.515C545.781,183.515 541.929,182.975 538.209,181.895C534.489,180.815 531.501,179.411 529.245,177.683L533.205,168.899C535.365,170.483 537.933,171.755 540.909,172.715C543.885,173.675 546.861,174.155 549.837,174.155C553.149,174.155 555.597,173.663 557.181,172.679C558.765,171.695 559.557,170.387 559.557,168.755C559.557,167.555 559.089,166.559 558.153,165.767C557.217,164.975 556.017,164.339 554.553,163.859C553.089,163.379 551.109,162.851 548.613,162.275C544.773,161.363 541.629,160.451 539.181,159.539C536.733,158.627 534.633,157.163 532.881,155.147C531.129,153.131 530.253,150.443 530.253,147.083C530.253,144.155 531.045,141.503 532.629,139.127C534.213,136.751 536.601,134.867 539.793,133.475C542.985,132.083 546.885,131.387 551.493,131.387C554.709,131.387 557.853,131.771 560.925,132.539C563.997,133.307 566.685,134.411 568.989,135.851L565.389,144.707C560.733,142.067 556.077,140.747 551.421,140.747C548.157,140.747 545.745,141.275 544.185,142.331C542.625,143.387 541.845,144.779 541.845,146.507C541.845,148.235 542.745,149.519 544.545,150.359C546.345,151.199 549.093,152.027 552.789,152.843C556.629,153.755 559.773,154.667 562.221,155.579C564.669,156.491 566.769,157.931 568.521,159.899C570.273,161.867 571.149,164.531 571.149,167.891C571.149,170.771 570.345,173.399 568.737,175.775C567.129,178.151 564.717,180.035 561.501,181.427C558.285,182.819 554.373,183.515 549.765,183.515Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
25
|
+
<path d="M612.333,171.851L588.933,171.851L584.469,182.651L572.517,182.651L594.981,132.251L606.501,132.251L629.037,182.651L616.797,182.651L612.333,171.851ZM608.661,162.995L600.669,143.699L592.677,162.995L608.661,162.995Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
26
|
+
<path d="M657.693,183.515C652.557,183.515 647.913,182.399 643.761,180.167C639.609,177.935 636.345,174.839 633.969,170.879C631.593,166.919 630.405,162.443 630.405,157.451C630.405,152.459 631.593,147.983 633.969,144.023C636.345,140.063 639.609,136.967 643.761,134.735C647.913,132.503 652.581,131.387 657.765,131.387C662.133,131.387 666.081,132.155 669.609,133.691C673.137,135.227 676.101,137.435 678.501,140.315L671.013,147.227C667.605,143.291 663.381,141.323 658.341,141.323C655.221,141.323 652.437,142.007 649.989,143.375C647.541,144.743 645.633,146.651 644.265,149.099C642.897,151.547 642.213,154.331 642.213,157.451C642.213,160.571 642.897,163.355 644.265,165.803C645.633,168.251 647.541,170.159 649.989,171.527C652.437,172.895 655.221,173.579 658.341,173.579C663.381,173.579 667.605,171.587 671.013,167.603L678.501,174.515C676.101,177.443 673.125,179.675 669.573,181.211C666.021,182.747 662.061,183.515 657.693,183.515Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
27
|
+
<path d="M704.709,162.851L697.941,169.907L697.941,182.651L686.349,182.651L686.349,132.251L697.941,132.251L697.941,155.795L720.261,132.251L733.221,132.251L712.341,154.715L734.445,182.651L720.837,182.651L704.709,162.851Z" style="fill:rgb(5,5,14);fill-rule:nonzero;"/>
|
28
|
+
</g>
|
29
|
+
</g>
|
30
|
+
</g>
|
31
|
+
<defs>
|
32
|
+
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(121.538,125.482,-125.482,121.538,1032.25,1687.61)"><stop offset="0" style="stop-color:rgb(132,132,220);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(51,51,180);stop-opacity:1"/></linearGradient>
|
33
|
+
</defs>
|
34
|
+
</svg>
|
data/logo/ransack.png
ADDED
Binary file
|
data/logo/ransack.svg
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg width="100%" height="100%" viewBox="0 0 401 417" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
4
|
+
<g transform="matrix(1,0,0,1,-199.992,-191.649)">
|
5
|
+
<g transform="matrix(3.50044,0,0,3.50044,-3413.33,-5715.71)">
|
6
|
+
<path d="M1032.25,1689C1032.25,1688.23 1032.87,1687.61 1033.64,1687.61C1042.86,1687.61 1094.52,1687.61 1094.52,1687.61L1094.52,1687.61C1117.36,1687.65 1135.89,1706.2 1135.89,1729.05C1135.89,1741.48 1128.4,1752.63 1119.73,1760.23C1119.73,1760.23 1141.26,1797.52 1145.72,1805.26C1145.88,1805.54 1145.88,1805.9 1145.72,1806.18C1145.55,1806.47 1145.25,1806.65 1144.91,1806.65C1137.59,1806.65 1107.52,1806.65 1103.12,1806.65C1102.79,1806.65 1102.49,1806.47 1102.32,1806.18C1099.89,1801.97 1081.71,1770.49 1081.71,1770.49L1073.76,1770.49C1073.76,1770.49 1073.76,1799.1 1073.76,1805.42C1073.76,1806.1 1073.21,1806.65 1072.54,1806.65C1066.45,1806.65 1039.56,1806.65 1033.47,1806.65C1032.8,1806.65 1032.25,1806.1 1032.25,1805.42C1032.25,1793.69 1032.25,1701.48 1032.25,1689Z" style="fill:url(#_Linear1);"/>
|
7
|
+
<clipPath id="_clip2">
|
8
|
+
<path d="M1032.25,1689C1032.25,1688.23 1032.87,1687.61 1033.64,1687.61C1042.86,1687.61 1094.52,1687.61 1094.52,1687.61L1094.52,1687.61C1117.36,1687.65 1135.89,1706.2 1135.89,1729.05C1135.89,1741.48 1128.4,1752.63 1119.73,1760.23C1119.73,1760.23 1141.26,1797.52 1145.72,1805.26C1145.88,1805.54 1145.88,1805.9 1145.72,1806.18C1145.55,1806.47 1145.25,1806.65 1144.91,1806.65C1137.59,1806.65 1107.52,1806.65 1103.12,1806.65C1102.79,1806.65 1102.49,1806.47 1102.32,1806.18C1099.89,1801.97 1081.71,1770.49 1081.71,1770.49L1073.76,1770.49C1073.76,1770.49 1073.76,1799.1 1073.76,1805.42C1073.76,1806.1 1073.21,1806.65 1072.54,1806.65C1066.45,1806.65 1039.56,1806.65 1033.47,1806.65C1032.8,1806.65 1032.25,1806.1 1032.25,1805.42C1032.25,1793.69 1032.25,1701.48 1032.25,1689Z"/>
|
9
|
+
</clipPath>
|
10
|
+
<g clip-path="url(#_clip2)">
|
11
|
+
<g transform="matrix(1.05537,0,0,1.05537,-56.2001,-93.6352)">
|
12
|
+
<path d="M1090.07,1757.11C1087.62,1757.78 1085.05,1758.14 1082.39,1758.14C1066.34,1758.14 1053.3,1745.1 1053.3,1729.05C1053.3,1712.99 1066.34,1699.96 1082.39,1699.96C1098.45,1699.96 1111.49,1712.99 1111.49,1729.05C1111.49,1738.8 1106.68,1747.44 1099.3,1752.72C1099.3,1752.72 1110.29,1771.75 1116.66,1782.78C1117.57,1784.36 1117.57,1786.31 1116.66,1787.89C1115.75,1789.47 1114.06,1790.44 1112.23,1790.44C1112.23,1790.44 1112.23,1790.44 1112.23,1790.44C1110.43,1790.44 1108.76,1789.48 1107.86,1787.92C1103.37,1780.15 1090.07,1757.11 1090.07,1757.11ZM1082.52,1708.18C1084.31,1708.32 1084.32,1708.88 1084.66,1709.62C1085.4,1711.22 1084.12,1713.13 1081.99,1713.18C1073.82,1713.44 1066.55,1720.54 1066.53,1729.05C1066.53,1729.05 1066.41,1730.38 1065.53,1731.04C1063.81,1732.34 1061.32,1730.94 1061.59,1727.44C1062.36,1717.22 1071.49,1708.34 1082.13,1708.18C1082.26,1708.18 1082.39,1708.18 1082.52,1708.18Z" style="fill:rgb(52,52,107);fill-opacity:0.4;"/>
|
13
|
+
</g>
|
14
|
+
<path d="M1090.07,1757.11C1087.62,1757.78 1085.05,1758.14 1082.39,1758.14C1066.34,1758.14 1053.3,1745.1 1053.3,1729.05C1053.3,1712.99 1066.34,1699.96 1082.39,1699.96C1098.45,1699.96 1111.49,1712.99 1111.49,1729.05C1111.49,1738.8 1106.68,1747.44 1099.3,1752.72C1099.3,1752.72 1110.19,1771.58 1116.57,1782.63C1117.5,1784.24 1117.5,1786.23 1116.57,1787.84C1115.64,1789.45 1113.92,1790.44 1112.06,1790.44C1112.06,1790.44 1112.06,1790.44 1112.06,1790.44C1110.36,1790.44 1108.79,1789.54 1107.94,1788.07C1103.54,1780.44 1090.07,1757.11 1090.07,1757.11ZM1082.52,1708.18C1084.31,1708.32 1084.32,1708.88 1084.66,1709.62C1085.4,1711.22 1084.12,1713.13 1081.99,1713.18C1073.82,1713.44 1066.55,1720.54 1066.53,1729.05C1066.53,1729.05 1066.41,1730.38 1065.53,1731.04C1063.81,1732.34 1061.32,1730.94 1061.59,1727.44C1062.36,1717.22 1071.49,1708.34 1082.13,1708.18C1082.26,1708.18 1082.39,1708.18 1082.52,1708.18Z" style="fill:rgb(251,248,255);"/>
|
15
|
+
</g>
|
16
|
+
</g>
|
17
|
+
</g>
|
18
|
+
<defs>
|
19
|
+
<linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(121.538,125.482,-125.482,121.538,1032.25,1687.61)"><stop offset="0" style="stop-color:rgb(132,132,220);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(51,51,180);stop-opacity:1"/></linearGradient>
|
20
|
+
</defs>
|
21
|
+
</svg>
|
data/ransack.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "ransack"
|
7
7
|
s.version = Ransack::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Ernie Miller", "Ryan Bigg", "Jon Atack"]
|
10
|
-
s.email = ["ernie@erniemiller.org", "radarlistener@gmail.com", "jonnyatack@gmail.com"]
|
9
|
+
s.authors = ["Ernie Miller", "Ryan Bigg", "Jon Atack","Sean Carroll"]
|
10
|
+
s.email = ["ernie@erniemiller.org", "radarlistener@gmail.com", "jonnyatack@gmail.com","sfcarroll@gmail.com"]
|
11
11
|
s.homepage = "https://github.com/activerecord-hackery/ransack"
|
12
12
|
s.summary = %q{Object-based searching for Active Record and Mongoid (currently).}
|
13
13
|
s.description = %q{Ransack is the successor to the MetaSearch gem. It improves and expands upon MetaSearch's functionality, but does not have a 100%-compatible API.}
|
@@ -16,18 +16,17 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.rubyforge_project = "ransack"
|
18
18
|
|
19
|
-
s.add_dependency 'actionpack', '>=
|
20
|
-
s.add_dependency 'activerecord', '>=
|
21
|
-
s.add_dependency 'activesupport', '>=
|
19
|
+
s.add_dependency 'actionpack', '>= 5.0'
|
20
|
+
s.add_dependency 'activerecord', '>= 5.0'
|
21
|
+
s.add_dependency 'activesupport', '>= 5.0'
|
22
22
|
s.add_dependency 'i18n'
|
23
|
-
s.
|
24
|
-
s.add_development_dependency 'rspec', '~> 2'
|
23
|
+
s.add_development_dependency 'rspec', '~> 3'
|
25
24
|
s.add_development_dependency 'machinist', '~> 1.0.6'
|
26
25
|
s.add_development_dependency 'faker', '~> 0.9.5'
|
27
26
|
s.add_development_dependency 'sqlite3', '~> 1.3.3'
|
28
|
-
s.add_development_dependency 'pg'
|
29
|
-
s.add_development_dependency 'mysql2', '0.3.
|
30
|
-
s.add_development_dependency 'pry', '0.
|
27
|
+
s.add_development_dependency 'pg', '~> 0.21'
|
28
|
+
s.add_development_dependency 'mysql2', '0.3.20'
|
29
|
+
s.add_development_dependency 'pry', '0.10'
|
31
30
|
|
32
31
|
s.files = `git ls-files`.split("\n")
|
33
32
|
|
data/spec/console.rb
CHANGED
@@ -16,6 +16,10 @@ Sham.define do
|
|
16
16
|
salary { |index| 30000 + (index * 1000) }
|
17
17
|
tag_name { Faker::Lorem.words(3).join(' ') }
|
18
18
|
note { Faker::Lorem.words(7).join(' ') }
|
19
|
+
only_admin { Faker::Lorem.words(3).join(' ') }
|
20
|
+
only_search { Faker::Lorem.words(3).join(' ') }
|
21
|
+
only_sort { Faker::Lorem.words(3).join(' ') }
|
22
|
+
notable_id { |id| id }
|
19
23
|
end
|
20
24
|
|
21
25
|
Schema.create
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module PolyamorousHelper
|
2
|
+
def new_join_association(reflection, children, klass)
|
3
|
+
Polyamorous::JoinAssociation.new reflection, children, klass
|
4
|
+
end
|
5
|
+
|
6
|
+
if ActiveRecord::VERSION::STRING > "5.2.0"
|
7
|
+
def new_join_dependency(klass, associations = {})
|
8
|
+
Polyamorous::JoinDependency.new klass, klass.arel_table, associations
|
9
|
+
end
|
10
|
+
elsif ActiveRecord::VERSION::STRING == "5.2.0"
|
11
|
+
def new_join_dependency(klass, associations = {})
|
12
|
+
alias_tracker = ::ActiveRecord::Associations::AliasTracker.create(klass.connection, klass.table_name, [])
|
13
|
+
Polyamorous::JoinDependency.new klass, klass.arel_table, associations, alias_tracker
|
14
|
+
end
|
15
|
+
else
|
16
|
+
def new_join_dependency(klass, associations = {})
|
17
|
+
Polyamorous::JoinDependency.new klass, associations, []
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def new_join(name, type = Polyamorous::InnerJoin, klass = nil)
|
22
|
+
Polyamorous::Join.new name, type, klass
|
23
|
+
end
|
24
|
+
end
|