ransack 2.0.1 → 2.1.0

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
  SHA256:
3
- metadata.gz: 1e44db6020449735b694bd18943195f6e7cdd3597a8dc776d22a54114b4b9273
4
- data.tar.gz: cdcb6ef8b863873fcaa7c2067cb20636c4e856e27f431488978201a310023f45
3
+ metadata.gz: 026204df0f9ca612c6e56f7594088687e766d142b5dbd7c72c65998b28e43b7a
4
+ data.tar.gz: 499ad9c08f2a0192e3f3e10fb22955a14546aff315f2eb0500bf2ff8303ebf76
5
5
  SHA512:
6
- metadata.gz: ded22ffb680b2a358ee72ab348b8f9debc7f2c927c878ec5a4ad872b552b715e561e9b0aac188d874c67cce70f6463d62b3be7655e46900a706214d58d69fa88
7
- data.tar.gz: 6f45114a54ef6f83cbd99780ba432069cf4111c4b9d2294141f238526655edc1cb035422705565389e4c60f75666716d8fd201887f7ca9fd90c92314bbb3b9e6
6
+ metadata.gz: 0440a8d177d9e40c9237481ae6908b38a6986627d486849588fd71e212a5b769dbf39eda8f23e74b9f2eaec10ad4822afc84dcb3b7370ced035d031532cf5f10
7
+ data.tar.gz: a7fc0507b34ff03389504d92c9d79169768288201ad89f7fde2dbf6e4baa7cc103ae680ae2c42a24b723d63a8ffdb2e68e5eca307cba5d61868475ee067e316a
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  coverage/*
6
+ .DS_Store
@@ -4,7 +4,6 @@ sudo: false
4
4
 
5
5
  rvm:
6
6
  - 2.5
7
- - 2.2
8
7
 
9
8
  env:
10
9
  - RAILS=5-2-stable DB=sqlite3
@@ -23,10 +22,6 @@ env:
23
22
  - RAILS=5-1-stable DB=mysql
24
23
  - RAILS=5-1-stable DB=postgres
25
24
 
26
- - RAILS=5-0-stable DB=sqlite3
27
- - RAILS=5-0-stable DB=mysql
28
- - RAILS=5-0-stable DB=postgres
29
-
30
25
  matrix:
31
26
  allow_failures:
32
27
  - env: RAILS=5-2-stable DB=sqlite3
@@ -1,6 +1,47 @@
1
1
  # Change Log
2
2
 
3
- ## Unreleased
3
+ ## Version 2.1.0 - 2018-10.-26
4
+
5
+ * Add support for sorting by scopes
6
+ PR [973](https://github.com/activerecord-hackery/ransack/pull/973)
7
+
8
+ *Diego Borges*
9
+
10
+ * Added a new logo for Ransack
11
+ PR [972](https://github.com/activerecord-hackery/ransack/pull/972)
12
+
13
+ *Anıl Kılıç*, *Greg Molnar*
14
+
15
+ * Greek translations
16
+ PR [971](https://github.com/activerecord-hackery/ransack/pull/971)
17
+ PR [960](https://github.com/activerecord-hackery/ransack/pull/960)
18
+
19
+ *Sean Carroll*, *Greg Molnar*
20
+
21
+ * README improvements
22
+ PR [963](https://github.com/activerecord-hackery/ransack/pull/963)
23
+
24
+ *tommaso1*
25
+
26
+ * Bulgarian translations
27
+ PR [961](https://github.com/activerecord-hackery/ransack/pull/961)
28
+
29
+ *Sean Carroll*
30
+
31
+ * README improvements
32
+ PR [956](https://github.com/activerecord-hackery/ransack/pull/956)
33
+
34
+ *Alex Konoval*
35
+
36
+ * Remove lib/ransack/adapters/active_record/compat.rb
37
+ PR [954](https://github.com/activerecord-hackery/ransack/pull/954)
38
+
39
+ *Ryuta Kamizono*
40
+
41
+ * Remove unused aliases
42
+ PR [953](https://github.com/activerecord-hackery/ransack/pull/953)
43
+
44
+ *Ryuta Kamizono*
4
45
 
5
46
  ## Version 2.0.1 - 2018-08-18
6
47
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ransack
1
+ # ![Ransack](./logo/ransack-h.png "Ransack")
2
2
 
3
3
  [![Build Status](https://travis-ci.org/activerecord-hackery/ransack.svg)](https://travis-ci.org/activerecord-hackery/ransack)
4
4
  [![Gem Version](https://badge.fury.io/rb/ransack.svg)](http://badge.fury.io/rb/ransack)
@@ -9,7 +9,7 @@ created by [Ernie Miller](http://twitter.com/erniemiller)
9
9
  and developed/maintained for years by
10
10
  [Jon Atack](http://twitter.com/jonatack) and
11
11
  [Ryan Bigg](http://twitter.com/ryanbigg) with the help of a great group of
12
- [contributors](https://github.com/activerecord-hackery/ransack/graphs/contributors).
12
+ [contributors](https://github.com/activerecord-hackery/ransack/graphs/contributors). Ransack's logo is designed by [Anıl Kılıç](https://github.com/anilkilic).
13
13
  While it supports many of the same features as MetaSearch, its underlying
14
14
  implementation differs greatly from MetaSearch,
15
15
  and backwards compatibility is not a design goal.
@@ -132,6 +132,11 @@ which are defined in
132
132
  <% end %>
133
133
  ```
134
134
 
135
+ The argument of `f.search_field` has to be in this form:
136
+ `attribute_name[_or_attribute_name]..._predicate`
137
+
138
+ where `[_or_another_attribute_name]...` means any repetition of `_or_` plus the name of the attribute.
139
+
135
140
  `cont` (contains) and `start` (starts with) are just two of the available
136
141
  search predicates. See
137
142
  [Constants](https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/constants.rb)
@@ -196,6 +201,23 @@ This example toggles the sort directions of both fields, by default
196
201
  initially sorting the `last_name` field by ascending order, and the
197
202
  `first_name` field by descending order.
198
203
 
204
+ In the case that you wish to sort by some complex value, such as the result
205
+ of a SQL function, you may do so using scopes. In your model, define scopes
206
+ whose names line up with the name of the virtual field you wish to sort by,
207
+ as so:
208
+
209
+ ```ruby
210
+ class Person < ActiveRecord::Base
211
+ scope :sort_by_reverse_name_asc, lambda { order("REVERSE(name) ASC") }
212
+ scope :sort_by_reverse_name_desc, lambda { order("REVERSE(name) DESC") }
213
+ ...
214
+ ```
215
+
216
+ and you can then sort by this virtual field:
217
+
218
+ ```erb
219
+ <%= sort_link(@q, :reverse_name) %>
220
+ ```
199
221
 
200
222
  The sort link order indicator arrows may be globally customized by setting a
201
223
  `custom_arrows` option in an initializer file like
@@ -483,7 +505,7 @@ avoid returning duplicate rows, even if conditions on a join would otherwise
483
505
  result in some. It generates the same SQL as calling `uniq` on the relation.
484
506
 
485
507
  Please note that for many databases, a sort on an associated table's columns
486
- may result in invalid SQL with `distinct: true` -- in those cases, you will
508
+ may result in invalid SQL with `distinct: true` -- in those cases, you
487
509
  will need to modify the result as needed to allow these queries to work.
488
510
 
489
511
  For example, you could call joins and includes on the result which has the
@@ -722,7 +744,7 @@ Ransack.configure do |c|
722
744
  end
723
745
  ```
724
746
 
725
- To turn this off on a per-scope basis Ransack adds the following method to
747
+ To turn this off on a per-scope basis Ransack adds the following method to
726
748
  `ActiveRecord::Base` that you can redefine to selectively override sanitization:
727
749
 
728
750
  `ransackable_scopes_skip_sanitize_args`
@@ -1,22 +1,10 @@
1
1
  if defined?(::ActiveRecord)
2
2
  module Polyamorous
3
- if defined?(Arel::InnerJoin)
4
- InnerJoin = Arel::InnerJoin
5
- OuterJoin = Arel::OuterJoin
6
- else
7
- InnerJoin = Arel::Nodes::InnerJoin
8
- OuterJoin = Arel::Nodes::OuterJoin
9
- end
3
+ InnerJoin = Arel::Nodes::InnerJoin
4
+ OuterJoin = Arel::Nodes::OuterJoin
10
5
 
11
- if defined?(::ActiveRecord::Associations::JoinDependency)
12
- JoinDependency = ::ActiveRecord::Associations::JoinDependency
13
- JoinAssociation = ::ActiveRecord::Associations::JoinDependency::JoinAssociation
14
- JoinBase = ::ActiveRecord::Associations::JoinDependency::JoinBase
15
- else
16
- JoinDependency = ::ActiveRecord::Associations::ClassMethods::JoinDependency
17
- JoinAssociation = ::ActiveRecord::Associations::ClassMethods::JoinDependency::JoinAssociation
18
- JoinBase = ::ActiveRecord::Associations::ClassMethods::JoinDependency::JoinBase
19
- end
6
+ JoinDependency = ::ActiveRecord::Associations::JoinDependency
7
+ JoinAssociation = ::ActiveRecord::Associations::JoinDependency::JoinAssociation
20
8
  end
21
9
 
22
10
  require 'polyamorous/tree_node'
@@ -33,10 +21,4 @@ if defined?(::ActiveRecord)
33
21
  Polyamorous::JoinDependency.send(:prepend, Polyamorous::JoinDependencyExtensions)
34
22
  Polyamorous::JoinDependency.singleton_class.send(:prepend, Polyamorous::JoinDependencyExtensions::ClassMethods)
35
23
  Polyamorous::JoinAssociation.send(:prepend, Polyamorous::JoinAssociationExtensions)
36
-
37
- Polyamorous::JoinBase.class_eval do
38
- if method_defined?(:active_record)
39
- alias_method :base_klass, :active_record
40
- end
41
- end
42
24
  end
@@ -1,5 +1,4 @@
1
1
  require 'ransack/context'
2
- require 'ransack/adapters/active_record/compat'
3
2
  require 'polyamorous'
4
3
 
5
4
  module Ransack
@@ -7,11 +6,6 @@ module Ransack
7
6
  module ActiveRecord
8
7
  class Context < ::Ransack::Context
9
8
 
10
- # Because the AR::Associations namespace is insane
11
- if defined? ::ActiveRecord::Associations::JoinDependency
12
- JoinDependency = ::ActiveRecord::Associations::JoinDependency
13
- end
14
-
15
9
  def initialize(object, options = {})
16
10
  super
17
11
  if ::ActiveRecord::VERSION::STRING < Constants::RAILS_5_2
@@ -37,9 +31,29 @@ module Ransack
37
31
  def evaluate(search, opts = {})
38
32
  viz = Visitor.new
39
33
  relation = @object.where(viz.accept(search.base))
34
+
40
35
  if search.sorts.any?
41
- relation = relation.except(:order).reorder(viz.accept(search.sorts))
36
+ relation = relation.except(:order)
37
+ # Rather than applying all of the search's sorts in one fell swoop,
38
+ # as the original implementation does, we apply one at a time.
39
+ #
40
+ # If the sort (returned by the Visitor above) is a symbol, we know
41
+ # that it represents a scope on the model and we can apply that
42
+ # scope.
43
+ #
44
+ # Otherwise, we fall back to the applying the sort with the "order"
45
+ # method as the original implementation did. Actually the original
46
+ # implementation used "reorder," which was overkill since we already
47
+ # have a clean slate after "relation.except(:order)" above.
48
+ viz.accept(search.sorts).each do |scope_or_sort|
49
+ if scope_or_sort.is_a?(Symbol)
50
+ relation = relation.send(scope_or_sort)
51
+ else
52
+ relation = relation.order(scope_or_sort)
53
+ end
54
+ end
42
55
  end
56
+
43
57
  opts[:distinct] ? relation.distinct : relation
44
58
  end
45
59
 
@@ -235,19 +249,19 @@ module Ransack
235
249
  join_list = join_nodes + convert_join_strings_to_ast(relation.table, string_joins)
236
250
 
237
251
  if ::ActiveRecord::VERSION::STRING < Constants::RAILS_5_2_0
238
- join_dependency = JoinDependency.new(relation.klass, association_joins, join_list)
252
+ join_dependency = Polyamorous::JoinDependency.new(relation.klass, association_joins, join_list)
239
253
  join_nodes.each do |join|
240
254
  join_dependency.send(:alias_tracker).aliases[join.left.name.downcase] = 1
241
255
  end
242
256
  elsif ::ActiveRecord::VERSION::STRING == Constants::RAILS_5_2_0
243
257
  alias_tracker = ::ActiveRecord::Associations::AliasTracker.create(self.klass.connection, relation.table.name, join_list)
244
- join_dependency = JoinDependency.new(relation.klass, relation.table, association_joins, alias_tracker)
258
+ join_dependency = Polyamorous::JoinDependency.new(relation.klass, relation.table, association_joins, alias_tracker)
245
259
  join_nodes.each do |join|
246
260
  join_dependency.send(:alias_tracker).aliases[join.left.name.downcase] = 1
247
261
  end
248
262
  else
249
263
  alias_tracker = ::ActiveRecord::Associations::AliasTracker.create(self.klass.connection, relation.table.name, join_list)
250
- join_dependency = JoinDependency.new(relation.klass, relation.table, association_joins)
264
+ join_dependency = Polyamorous::JoinDependency.new(relation.klass, relation.table, association_joins)
251
265
  join_dependency.instance_variable_set(:@alias_tracker, alias_tracker)
252
266
  join_nodes.each do |join|
253
267
  join_dependency.send(:alias_tracker).aliases[join.left.name.downcase] = 1
@@ -276,7 +290,7 @@ module Ransack
276
290
 
277
291
  def build_association(name, parent = @base, klass = nil)
278
292
  if ::ActiveRecord::VERSION::STRING < Constants::RAILS_5_2_0
279
- jd = JoinDependency.new(
293
+ jd = Polyamorous::JoinDependency.new(
280
294
  parent.base_klass,
281
295
  Polyamorous::Join.new(name, @join_type, klass),
282
296
  []
@@ -284,7 +298,7 @@ module Ransack
284
298
  found_association = jd.join_root.children.last
285
299
  elsif ::ActiveRecord::VERSION::STRING == Constants::RAILS_5_2_0
286
300
  alias_tracker = ::ActiveRecord::Associations::AliasTracker.create(self.klass.connection, parent.table.name, [])
287
- jd = JoinDependency.new(
301
+ jd = Polyamorous::JoinDependency.new(
288
302
  parent.base_klass,
289
303
  parent.base_klass.arel_table,
290
304
  Polyamorous::Join.new(name, @join_type, klass),
@@ -292,7 +306,7 @@ module Ransack
292
306
  )
293
307
  found_association = jd.instance_variable_get(:@join_root).children.last
294
308
  else
295
- jd = JoinDependency.new(
309
+ jd = Polyamorous::JoinDependency.new(
296
310
  parent.base_klass,
297
311
  parent.base_klass.arel_table,
298
312
  Polyamorous::Join.new(name, @join_type, klass),
@@ -21,11 +21,15 @@ module Ransack
21
21
  end
22
22
 
23
23
  def visit_Ransack_Nodes_Sort(object)
24
- return unless object.valid?
25
- if object.attr.is_a?(Arel::Attributes::Attribute)
26
- object.attr.send(object.dir)
24
+ if object.valid?
25
+ if object.attr.is_a?(Arel::Attributes::Attribute)
26
+ object.attr.send(object.dir)
27
+ else
28
+ ordered(object)
29
+ end
27
30
  else
28
- ordered(object)
31
+ scope_name = :"sort_by_#{object.name}_#{object.dir}"
32
+ scope_name if object.context.object.respond_to?(scope_name)
29
33
  end
30
34
  end
31
35
 
@@ -0,0 +1,70 @@
1
+ bg:
2
+ ransack:
3
+ search: "търсене"
4
+ predicate: "предикат"
5
+ and: "и"
6
+ or: "или"
7
+ any: "всякакво"
8
+ all: "всички"
9
+ combinator: "комбинатор"
10
+ attribute: "атрибут"
11
+ value: "стойност"
12
+ condition: "условие"
13
+ sort: "сортиране"
14
+ asc: "възходящ"
15
+ desc: "низходящ"
16
+ predicates:
17
+ eq: "се равнява на"
18
+ eq_any: "се равнява на всяко"
19
+ eq_all: "се равнява на всички"
20
+ not_eq: "не е равно на"
21
+ not_eq_any: "не е равно на никое от"
22
+ not_eq_all: "не е равно на всички"
23
+ matches: "съвпада"
24
+ matches_any: "съвпада с някое"
25
+ matches_all: "съвпада с всички"
26
+ does_not_match: "не съвпада"
27
+ does_not_match_any: "не съвпада с никое"
28
+ does_not_match_all: "не съвпада с всички"
29
+ lt: "по-малко от"
30
+ lt_any: "по-малко от някое"
31
+ lt_all: "по-малко от всички"
32
+ lteq: "по-малко или равно на"
33
+ lteq_any: "по-малко или равно на някое"
34
+ lteq_all: "по-малко или равно на всички"
35
+ gt: "по-голямо от"
36
+ gt_any: "по-голямо от всякое"
37
+ gt_all: "по-голямо от всички"
38
+ gteq: "по-голямо или равно на"
39
+ gteq_any: "по-голямо или равно на всякое"
40
+ gteq_all: "по-голямо или равно на всички"
41
+ in: "в"
42
+ in_any: "във всякое"
43
+ in_all: "във всички"
44
+ not_in: "не в"
45
+ not_in_any: "не в никое"
46
+ not_in_all: "не във всички"
47
+ cont: "съдържа"
48
+ cont_any: "съдържа всякое"
49
+ cont_all: "съдържа всички"
50
+ not_cont: "не съдържа"
51
+ not_cont_any: "не съдържа никое"
52
+ not_cont_all: "не съдържа всички"
53
+ start: "започва с"
54
+ start_any: "започва с всякое"
55
+ start_all: "започва с всички"
56
+ not_start: "не започва с"
57
+ not_start_any: "не започва с никое"
58
+ not_start_all: "не започва с всички"
59
+ end: "завършва с"
60
+ end_any: "завършва с всякое"
61
+ end_all: "завършва с всички"
62
+ not_end: "не завършва с"
63
+ not_end_any: "не завършва с никое"
64
+ not_end_all: "не завършва с всички"
65
+ 'true': "истина"
66
+ 'false': "неистина"
67
+ present: "присъства"
68
+ blank: "е празно"
69
+ 'null': "е нула"
70
+ not_null: "не е нула"
@@ -0,0 +1,70 @@
1
+ el:
2
+ ransack:
3
+ search: "αναζήτηση"
4
+ predicate: "κατηγορούμενο"
5
+ and: "και"
6
+ or: "ή"
7
+ any: "οποιοδήποτε"
8
+ all: "όλα"
9
+ combinator: "συνδυαστής"
10
+ attribute: "ιδιότητα"
11
+ value: "τιμή"
12
+ condition: "συνθήκη"
13
+ sort: "ταξινόμηση"
14
+ asc: "αύξουσα"
15
+ desc: "φθίνουσα"
16
+ predicates:
17
+ eq: "ίσον"
18
+ eq_any: "ισούται με οποιοδήποτε"
19
+ eq_all: "ισούται με όλα"
20
+ not_eq: "άνισο"
21
+ not_eq_any: "άνισο με οποιοδήποτε"
22
+ not_eq_all: "άνισο με όλα"
23
+ matches: "αντιστοιχεί"
24
+ matches_any: "αντιστοιχεί με οποιοδήποτε"
25
+ matches_all: "αντιστοιχεί με όλα"
26
+ does_not_match: "δεν αντιστοιχεί"
27
+ does_not_match_any: "δεν αντιστοιχεί με οποιοδήποτε"
28
+ does_not_match_all: "δεν αντιστοιχεί με όλα"
29
+ lt: "μικρότερο από"
30
+ lt_any: "μικρότερο από οποιοδήποτε"
31
+ lt_all: "μικρότερο από όλα"
32
+ lteq: "μικρότερο ή ίσον"
33
+ lteq_any: "μικρότερο ή ίσον από οποιοδήποτε"
34
+ lteq_all: "μικρότερο ή ίσον από όλα"
35
+ gt: "μεγαλύτερο από"
36
+ gt_any: "μεγαλύτερο από οποιοδήποτε"
37
+ gt_all: μεγαλύτερο από όλα"
38
+ gteq: "μεγαλύτερο ή ίσον από"
39
+ gteq_any: "μεγαλύτερο ή ίσον από οποιοδήποτε"
40
+ gteq_all: "μεγαλύτερο ή ίσον από όλα"
41
+ in: "περιέχεται"
42
+ in_any: "περιέχεται σε οποιοδήποτε"
43
+ in_all: "περιέχεται σε όλα"
44
+ not_in: "δεν περιέχεται"
45
+ not_in_any: "δεν περιέχεται σε οποιοδήποτε"
46
+ not_in_all: "δεν περιέχεται σε όλα"
47
+ cont: "περιέχει"
48
+ cont_any: "περιέχει οποιοδήποτε"
49
+ cont_all: "περιέχει όλα"
50
+ not_cont: "δεν περιέχει"
51
+ not_cont_any: "δεν περιέχει οποιοδήποτε"
52
+ not_cont_all: "δεν περιέχει όλα"
53
+ start: "αρχίζει με"
54
+ start_any: "αρχίζει με οποιοδήποτε"
55
+ start_all: "αρχίζει με όλα"
56
+ not_start: "δεν αρχίζει με"
57
+ not_start_any: "δεν αρχίζει με οποιοδήποτε"
58
+ not_start_all: "δεν αρχίζει με όλα"
59
+ end: "τελειώνει με"
60
+ end_any: "τελειώνει οποιοδήποτε"
61
+ end_all: "τελειώνει με όλα"
62
+ not_end: "δεν τελειώνει με"
63
+ not_end_any: "δεν τελειώνει οποιοδήποτε"
64
+ not_end_all: "δεν τελειώνει με όλα"
65
+ 'true': "αληθές"
66
+ 'false': "ψευδές"
67
+ present: "υπάρχει"
68
+ blank: "είναι κενό"
69
+ 'null': "άκυρο"
70
+ not_null: "δεν είναι άκυρο"
@@ -1,3 +1,3 @@
1
1
  module Ransack
2
- VERSION = '2.0.1'
2
+ VERSION = '2.1.0'
3
3
  end
Binary file
@@ -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>
Binary file
@@ -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>
Binary file
@@ -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>
@@ -605,6 +605,13 @@ module Ransack
605
605
  expect(search.result.to_sql).to match /ORDER BY .* ASC/
606
606
  end
607
607
  end
608
+
609
+ context 'sorting by a scope' do
610
+ it 'applies the correct scope' do
611
+ search = Person.search(sorts: ['reverse_name asc'])
612
+ expect(search.result.to_sql).to include("ORDER BY REVERSE(name) ASC")
613
+ end
614
+ end
608
615
  end
609
616
 
610
617
  describe '#ransackable_attributes' do
@@ -43,6 +43,9 @@ class Person < ActiveRecord::Base
43
43
  of_age ? where("age >= ?", 18) : where("age < ?", 18)
44
44
  }
45
45
 
46
+ scope :sort_by_reverse_name_asc, lambda { order("REVERSE(name) ASC") }
47
+ scope :sort_by_reverse_name_desc, lambda { order("REVERSE(name) DESC") }
48
+
46
49
  alias_attribute :full_name, :name
47
50
 
48
51
  ransack_alias :term, :name_or_email
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-08-18 00:00:00.000000000 Z
14
+ date: 2018-10-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: actionpack
@@ -202,7 +202,6 @@ files:
202
202
  - lib/ransack/adapters.rb
203
203
  - lib/ransack/adapters/active_record.rb
204
204
  - lib/ransack/adapters/active_record/base.rb
205
- - lib/ransack/adapters/active_record/compat.rb
206
205
  - lib/ransack/adapters/active_record/context.rb
207
206
  - lib/ransack/adapters/active_record/ransack/constants.rb
208
207
  - lib/ransack/adapters/active_record/ransack/context.rb
@@ -216,9 +215,11 @@ files:
216
215
  - lib/ransack/helpers/form_builder.rb
217
216
  - lib/ransack/helpers/form_helper.rb
218
217
  - lib/ransack/locale/az.yml
218
+ - lib/ransack/locale/bg.yml
219
219
  - lib/ransack/locale/cs.yml
220
220
  - lib/ransack/locale/da.yml
221
221
  - lib/ransack/locale/de.yml
222
+ - lib/ransack/locale/el.yml
222
223
  - lib/ransack/locale/en.yml
223
224
  - lib/ransack/locale/es.yml
224
225
  - lib/ransack/locale/fr.yml
@@ -248,6 +249,12 @@ files:
248
249
  - lib/ransack/translate.rb
249
250
  - lib/ransack/version.rb
250
251
  - lib/ransack/visitor.rb
252
+ - logo/ransack-h.png
253
+ - logo/ransack-h.svg
254
+ - logo/ransack-v.png
255
+ - logo/ransack-v.svg
256
+ - logo/ransack.png
257
+ - logo/ransack.svg
251
258
  - ransack.gemspec
252
259
  - spec/blueprints/articles.rb
253
260
  - spec/blueprints/comments.rb
@@ -1,14 +0,0 @@
1
- module Arel
2
-
3
- module Visitors
4
-
5
- class DepthFirst < Visitor
6
-
7
- unless method_defined?(:visit_Arel_Nodes_InfixOperation)
8
- alias :visit_Arel_Nodes_InfixOperation :binary
9
- end
10
-
11
- end
12
-
13
- end
14
- end