ransack 1.8.4 → 1.8.6
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/.gitignore +1 -0
- data/CHANGELOG.md +42 -0
- data/Gemfile +1 -0
- data/lib/ransack.rb +3 -1
- data/lib/ransack/adapters/active_record/3.0/context.rb +2 -2
- data/lib/ransack/adapters/active_record/3.1/context.rb +2 -2
- data/lib/ransack/adapters/active_record/base.rb +2 -2
- data/lib/ransack/adapters/active_record/context.rb +5 -5
- data/lib/ransack/adapters/active_record/ransack/context.rb +7 -8
- data/lib/ransack/adapters/mongoid/context.rb +3 -3
- data/lib/ransack/adapters/mongoid/ransack/context.rb +6 -7
- data/lib/ransack/configuration.rb +21 -1
- data/lib/ransack/context.rb +8 -8
- data/lib/ransack/locale/tr.yml +70 -0
- data/lib/ransack/nodes/grouping.rb +1 -1
- data/lib/ransack/predicate.rb +11 -19
- data/lib/ransack/translate.rb +2 -2
- data/lib/ransack/version.rb +1 -1
- data/ransack.gemspec +3 -3
- data/spec/spec_helper.rb +2 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f251a5a3d39a780d575f8f18abd01de4a9096caa
|
4
|
+
data.tar.gz: 8846114332ef60596d2fc18b52cdb5715928e425
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86d509ea419bfe2bb1d43096e670f0736826c996a36f5fac74c650eaeb081a77832f8ff7edba63beaae0ad17ae2d4d8211aa99e5d003d259dff5fcb127187514
|
7
|
+
data.tar.gz: 705778bb578589bd055606eedfbe1ec10fdc01ab26508695fc0386d276f233c0bcdb767220331cf2b6b6b8b352d8b9c60edd9ef1c303e66ea4ea6cdb86725cb5
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,47 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## Version 1.8.6 - 2018-01-23
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
* Improve memory usage
|
8
|
+
PR [#820](https://github.com/activerecord-hackery/ransack/pull/820)
|
9
|
+
|
10
|
+
* Bump Polyamorous version to 1.3.2
|
11
|
+
PR [#858](https://github.com/activerecord-hackery/ransack/pull/858)
|
12
|
+
|
13
|
+
## Version 1.8.5
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
* Added Turkish Translations
|
18
|
+
PR [#835](https://github.com/activerecord-hackery/ransack/issues/835).
|
19
|
+
|
20
|
+
## Version 1.8.4 - 2017-10-09
|
21
|
+
|
22
|
+
### Added
|
23
|
+
|
24
|
+
* Added italian translations.
|
25
|
+
PR [#833](https://github.com/activerecord-hackery/ransack/pull/833).
|
26
|
+
|
27
|
+
* Add an optional default arrow for unsorted fields.
|
28
|
+
PR [#816](https://github.com/activerecord-hackery/ransack/pull/816/files).
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
|
32
|
+
* Cast Postgres money type to float.
|
33
|
+
PR [#823](https://github.com/activerecord-hackery/ransack/pull/823).
|
34
|
+
|
35
|
+
* Fix the bug in sort_link, which causes the multiple fields option to be
|
36
|
+
ignored when block parameter is specified.
|
37
|
+
PR [#818](https://github.com/activerecord-hackery/ransack/pull/818).
|
38
|
+
|
39
|
+
* No need pass some arugments to JoinAssociation#join_constraints in Rails 5.1.
|
40
|
+
PR [#814](https://github.com/activerecord-hackery/ransack/pull/814).
|
41
|
+
Fixes [#807](https://github.com/activerecord-hackery/ransack/issues/807).
|
42
|
+
Reference [rails/rails#28267](https://github.com/rails/rails/pull/28267)
|
43
|
+
and [rails/rails#27851](https://github.com/rails/rails/pull/27851).
|
44
|
+
|
3
45
|
## Version 1.8.3 - 2017-06-15
|
4
46
|
|
5
47
|
### Added
|
data/Gemfile
CHANGED
data/lib/ransack.rb
CHANGED
@@ -44,7 +44,7 @@ module Ransack
|
|
44
44
|
|
45
45
|
if ransackable_attribute?(str, klass)
|
46
46
|
exists = true
|
47
|
-
elsif (segments = str.split(
|
47
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
48
48
|
remainder = []
|
49
49
|
found_assoc = nil
|
50
50
|
while !found_assoc && remainder.unshift(segments.pop) &&
|
@@ -98,7 +98,7 @@ module Ransack
|
|
98
98
|
|
99
99
|
if ransackable_attribute?(str, klassify(parent))
|
100
100
|
attr_name = str
|
101
|
-
elsif (segments = str.split(
|
101
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
102
102
|
remainder = []
|
103
103
|
found_assoc = nil
|
104
104
|
while remainder.unshift(segments.pop) && segments.size > 0 &&
|
@@ -38,7 +38,7 @@ module Ransack
|
|
38
38
|
|
39
39
|
if ransackable_attribute?(str, klass)
|
40
40
|
exists = true
|
41
|
-
elsif (segments = str.split(
|
41
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
42
42
|
remainder = []
|
43
43
|
found_assoc = nil
|
44
44
|
while !found_assoc && remainder.unshift(segments.pop) &&
|
@@ -105,7 +105,7 @@ module Ransack
|
|
105
105
|
|
106
106
|
if ransackable_attribute?(str, klassify(parent))
|
107
107
|
attr_name = str
|
108
|
-
elsif (segments = str.split(
|
108
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
109
109
|
remainder = []
|
110
110
|
found_assoc = nil
|
111
111
|
while remainder.unshift(segments.pop) && segments.size > 0 &&
|
@@ -32,7 +32,7 @@ module Ransack
|
|
32
32
|
# For overriding with a whitelist array of strings.
|
33
33
|
#
|
34
34
|
def ransackable_attributes(auth_object = nil)
|
35
|
-
if Ransack::SUPPORTS_ATTRIBUTE_ALIAS
|
35
|
+
@ransackable_attributes ||= if Ransack::SUPPORTS_ATTRIBUTE_ALIAS
|
36
36
|
column_names + _ransackers.keys + _ransack_aliases.keys +
|
37
37
|
attribute_aliases.keys
|
38
38
|
else
|
@@ -45,7 +45,7 @@ module Ransack
|
|
45
45
|
# For overriding with a whitelist array of strings.
|
46
46
|
#
|
47
47
|
def ransackable_associations(auth_object = nil)
|
48
|
-
reflect_on_all_associations.map { |a| a.name.to_s }
|
48
|
+
@ransackable_associations ||= reflect_on_all_associations.map { |a| a.name.to_s }
|
49
49
|
end
|
50
50
|
|
51
51
|
# Ransortable_attributes, by default, returns the names
|
@@ -45,7 +45,7 @@ module Ransack
|
|
45
45
|
exists = false
|
46
46
|
if ransackable_attribute?(str, klass)
|
47
47
|
exists = true
|
48
|
-
elsif (segments = str.split(
|
48
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
49
49
|
remainder = []
|
50
50
|
found_assoc = nil
|
51
51
|
while !found_assoc && remainder.unshift(segments.pop) &&
|
@@ -268,7 +268,8 @@ module Ransack
|
|
268
268
|
association_joins = buckets[:association_join]
|
269
269
|
stashed_association_joins = buckets[:stashed_join]
|
270
270
|
join_nodes = buckets[:join_node].uniq
|
271
|
-
string_joins = buckets[:string_join].map(&:strip)
|
271
|
+
string_joins = buckets[:string_join].map(&:strip)
|
272
|
+
string_joins.uniq!
|
272
273
|
|
273
274
|
join_list =
|
274
275
|
if ::ActiveRecord::VERSION::MAJOR >= 5
|
@@ -295,10 +296,9 @@ module Ransack
|
|
295
296
|
end
|
296
297
|
|
297
298
|
def convert_join_strings_to_ast(table, joins)
|
299
|
+
joins.map! { |join| table.create_string_join(Arel.sql(join)) unless join.blank? }
|
300
|
+
joins.compact!
|
298
301
|
joins
|
299
|
-
.flatten
|
300
|
-
.reject(&:blank?)
|
301
|
-
.map { |join| table.create_string_join(Arel.sql(join)) }
|
302
302
|
end
|
303
303
|
|
304
304
|
def build_or_find_association(name, parent = @base, klass = nil)
|
@@ -37,15 +37,14 @@ module Ransack
|
|
37
37
|
@base = @join_dependency.join_base
|
38
38
|
@engine = @base.arel_engine
|
39
39
|
end
|
40
|
+
end
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
@bind_pairs
|
45
|
-
parent, attr_name = get_parent_and_attribute_name(key)
|
46
|
-
if parent && attr_name
|
47
|
-
hash[key] = [parent, attr_name]
|
48
|
-
end
|
42
|
+
def bind_pair_for(key)
|
43
|
+
@bind_pairs ||= {}
|
44
|
+
|
45
|
+
@bind_pairs[key] ||= begin
|
46
|
+
parent, attr_name = get_parent_and_attribute_name(key.to_s)
|
47
|
+
[parent, attr_name] if parent && attr_name
|
49
48
|
end
|
50
49
|
end
|
51
50
|
|
@@ -34,7 +34,7 @@ module Ransack
|
|
34
34
|
|
35
35
|
name = '_id' if name == 'id'
|
36
36
|
|
37
|
-
t = object.klass.fields[name].try(:type) ||
|
37
|
+
t = object.klass.fields[name].try(:type) || bind_pair_for(attr.name).first.fields[name].type
|
38
38
|
|
39
39
|
t.to_s.demodulize.underscore.to_sym
|
40
40
|
end
|
@@ -61,7 +61,7 @@ module Ransack
|
|
61
61
|
exists = false
|
62
62
|
if ransackable_attribute?(str, klass)
|
63
63
|
exists = true
|
64
|
-
elsif (segments = str.split(
|
64
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
65
65
|
remainder = []
|
66
66
|
found_assoc = nil
|
67
67
|
while !found_assoc && remainder.unshift(
|
@@ -111,7 +111,7 @@ module Ransack
|
|
111
111
|
|
112
112
|
if ransackable_attribute?(str, klassify(parent))
|
113
113
|
attr_name = str
|
114
|
-
elsif (segments = str.split(
|
114
|
+
elsif (segments = str.split(Constants::UNDERSCORE)).size > 1
|
115
115
|
remainder = []
|
116
116
|
found_assoc = nil
|
117
117
|
while remainder.unshift(
|
@@ -30,15 +30,14 @@ module Ransack
|
|
30
30
|
|
31
31
|
@base = @object.klass
|
32
32
|
# @engine = @base.arel_engine
|
33
|
+
end
|
34
|
+
|
35
|
+
def bind_pair_for(key)
|
36
|
+
@bind_pairs ||= {}
|
33
37
|
|
34
|
-
|
35
|
-
# @base.table_name, :as => @base.aliased_table_name, :engine => @engine
|
36
|
-
# )
|
37
|
-
@bind_pairs = Hash.new do |hash, key|
|
38
|
+
@bind_pairs[key] ||= begin
|
38
39
|
parent, attr_name = get_parent_and_attribute_name(key.to_s)
|
39
|
-
if parent && attr_name
|
40
|
-
hash[key] = [parent, attr_name]
|
41
|
-
end
|
40
|
+
[parent, attr_name] if parent && attr_name
|
42
41
|
end
|
43
42
|
end
|
44
43
|
|
@@ -5,7 +5,27 @@ module Ransack
|
|
5
5
|
module Configuration
|
6
6
|
|
7
7
|
mattr_accessor :predicates, :options
|
8
|
-
|
8
|
+
|
9
|
+
class PredicateCollection
|
10
|
+
attr_reader :sorted_names_with_underscores
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@collection = {}
|
14
|
+
@sorted_names_with_underscores = []
|
15
|
+
end
|
16
|
+
|
17
|
+
delegate :[], :keys, :has_key?, to: :@collection
|
18
|
+
|
19
|
+
def []=(key, value)
|
20
|
+
@sorted_names_with_underscores << [key, '_' + key]
|
21
|
+
@sorted_names_with_underscores.sort! { |(a, _), (b, _)| b.length <=> a.length }
|
22
|
+
|
23
|
+
@collection[key] = value
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
self.predicates = PredicateCollection.new
|
28
|
+
|
9
29
|
self.options = {
|
10
30
|
:search_key => :q,
|
11
31
|
:ignore_unknown_conditions => true,
|
data/lib/ransack/context.rb
CHANGED
@@ -40,7 +40,7 @@ module Ransack
|
|
40
40
|
# Convert a string representing a chain of associations and an attribute
|
41
41
|
# into the attribute itself
|
42
42
|
def contextualize(str)
|
43
|
-
parent, attr_name =
|
43
|
+
parent, attr_name = bind_pair_for(str)
|
44
44
|
table_for(parent)[attr_name]
|
45
45
|
end
|
46
46
|
|
@@ -59,24 +59,24 @@ module Ransack
|
|
59
59
|
|
60
60
|
def bind(object, str)
|
61
61
|
return nil unless str
|
62
|
-
object.parent, object.attr_name =
|
62
|
+
object.parent, object.attr_name = bind_pair_for(str)
|
63
63
|
end
|
64
64
|
|
65
65
|
def traverse(str, base = @base)
|
66
66
|
str ||= ''.freeze
|
67
67
|
|
68
|
-
if (segments = str.split(
|
68
|
+
if (segments = str.split(Constants::UNDERSCORE)).size > 0
|
69
69
|
remainder = []
|
70
70
|
found_assoc = nil
|
71
71
|
while !found_assoc && segments.size > 0 do
|
72
72
|
# Strip the _of_Model_type text from the association name, but hold
|
73
73
|
# onto it in klass, for use as the next base
|
74
74
|
assoc, klass = unpolymorphize_association(
|
75
|
-
segments.join(
|
75
|
+
segments.join(Constants::UNDERSCORE)
|
76
76
|
)
|
77
77
|
if found_assoc = get_association(assoc, base)
|
78
78
|
base = traverse(
|
79
|
-
remainder.join(
|
79
|
+
remainder.join(Constants::UNDERSCORE), klass || found_assoc.klass
|
80
80
|
)
|
81
81
|
end
|
82
82
|
|
@@ -93,9 +93,9 @@ module Ransack
|
|
93
93
|
base = klassify(base)
|
94
94
|
str ||= ''.freeze
|
95
95
|
path = []
|
96
|
-
segments = str.split(
|
96
|
+
segments = str.split(Constants::UNDERSCORE)
|
97
97
|
association_parts = []
|
98
|
-
if (segments = str.split(
|
98
|
+
if (segments = str.split(Constants::UNDERSCORE)).size > 0
|
99
99
|
while segments.size > 0 &&
|
100
100
|
!base.columns_hash[segments.join(Constants::UNDERSCORE)] &&
|
101
101
|
association_parts << segments.shift do
|
@@ -135,7 +135,7 @@ module Ransack
|
|
135
135
|
end
|
136
136
|
|
137
137
|
def ransackable_scope?(str, klass)
|
138
|
-
klass.ransackable_scopes(auth_object).any? { |s| s.
|
138
|
+
klass.ransackable_scopes(auth_object).any? { |s| s.to_sym == str.to_sym }
|
139
139
|
end
|
140
140
|
|
141
141
|
def searchable_attributes(str = ''.freeze)
|
@@ -0,0 +1,70 @@
|
|
1
|
+
tr:
|
2
|
+
ransack:
|
3
|
+
search: "ara"
|
4
|
+
predicate: "doğrula"
|
5
|
+
and: "ve"
|
6
|
+
or: "veya"
|
7
|
+
any: "herhangi"
|
8
|
+
all: "hepsi"
|
9
|
+
combinator: "birleştirici"
|
10
|
+
attribute: "nitelik"
|
11
|
+
value: "değer"
|
12
|
+
condition: "şart"
|
13
|
+
sort: "sırala"
|
14
|
+
asc: "artan"
|
15
|
+
desc: "azalan"
|
16
|
+
predicates:
|
17
|
+
eq: "eşit"
|
18
|
+
eq_any: "herhangi birine eşit"
|
19
|
+
eq_all: "hepsine eşit"
|
20
|
+
not_eq: "eşit değil"
|
21
|
+
not_eq_any: "herhangi birine eşit değil"
|
22
|
+
not_eq_all: "hiçbirine eşit değil"
|
23
|
+
matches: "eşleşen"
|
24
|
+
matches_any: "herhangi biri ile eşleşen"
|
25
|
+
matches_all: "hepsi ile eşleşen"
|
26
|
+
does_not_match: "eşleşmeyen"
|
27
|
+
does_not_match_any: "herhangi biri ile eşleşmeyen"
|
28
|
+
does_not_match_all: "hiçbiri ile eşleşmeyen"
|
29
|
+
lt: "daha küçük"
|
30
|
+
lt_any: "herhangi birinden küçük"
|
31
|
+
lt_all: "hepsinden küçük"
|
32
|
+
lteq: "daha küçük veya eşit"
|
33
|
+
lteq_any: "daha küçük veya herhangi birine eşit"
|
34
|
+
lteq_all: "daha küçük veya hepsine eşit"
|
35
|
+
gt: "daha büyük "
|
36
|
+
gt_any: "herhangi birinden daha büyük"
|
37
|
+
gt_all: "hepsinden daha büyük"
|
38
|
+
gteq: "daha büyük veya eşit"
|
39
|
+
gteq_any: "daha büyük veya herhangi birine eşit"
|
40
|
+
gteq_all: "daha büyük veya hepsine eşit"
|
41
|
+
in: "içinde"
|
42
|
+
in_any: "herhangi birinde"
|
43
|
+
in_all: "hepsinde"
|
44
|
+
not_in: "içinde değil"
|
45
|
+
not_in_any: "herhangi birinde değil"
|
46
|
+
not_in_all: "hiçbirinde değil"
|
47
|
+
cont: "içeren"
|
48
|
+
cont_any: "herhangi birini içeren"
|
49
|
+
cont_all: "hepsini içeren"
|
50
|
+
not_cont: "içermeyen"
|
51
|
+
not_cont_any: "herhangi birini içermeyen"
|
52
|
+
not_cont_all: "hiçbirini birini içermeyen"
|
53
|
+
start: "ile başlayan"
|
54
|
+
start_any: "herhangi biriyle başlayan"
|
55
|
+
start_all: "hepsiyle başlayan"
|
56
|
+
not_start: "ile başlamayan"
|
57
|
+
not_start_any: "herhangi biriyle başlamayan"
|
58
|
+
not_start_all: "hiçbiriyle başlamayan"
|
59
|
+
end: "ile biten"
|
60
|
+
end_any: "herhangi biriyle biten"
|
61
|
+
end_all: "hepsi ile biten"
|
62
|
+
not_end: "ile bitmeyen"
|
63
|
+
not_end_any: "herhangi biriyle bitmeyen"
|
64
|
+
not_end_all: "hiçbiriyle bitmeyen"
|
65
|
+
'true': "doğru"
|
66
|
+
'false': "yanlış"
|
67
|
+
present: "mevcut"
|
68
|
+
blank: "boş"
|
69
|
+
'null': "geçersiz"
|
70
|
+
not_null: "geçerli"
|
data/lib/ransack/predicate.rb
CHANGED
@@ -9,34 +9,26 @@ module Ransack
|
|
9
9
|
Ransack.predicates.keys
|
10
10
|
end
|
11
11
|
|
12
|
-
def names_by_decreasing_length
|
13
|
-
names.sort { |a, b| b.length <=> a.length }
|
14
|
-
end
|
15
|
-
|
16
12
|
def named(name)
|
17
13
|
Ransack.predicates[name.to_s]
|
18
14
|
end
|
19
15
|
|
20
16
|
def detect_and_strip_from_string!(str)
|
21
|
-
|
22
|
-
str.sub! /_#{p}$/, ''.freeze
|
23
|
-
p
|
24
|
-
end
|
17
|
+
detect_from_string str, chomp: true
|
25
18
|
end
|
26
19
|
|
27
|
-
def detect_from_string(str)
|
28
|
-
|
29
|
-
end
|
20
|
+
def detect_from_string(str, chomp: false)
|
21
|
+
return unless str
|
30
22
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
Ransack.predicates.sorted_names_with_underscores.each do |predicate, underscored|
|
24
|
+
if str.end_with? underscored
|
25
|
+
str.chomp! underscored if chomp
|
26
|
+
return predicate
|
27
|
+
end
|
28
|
+
end
|
36
29
|
|
37
|
-
|
38
|
-
|
39
|
-
# end
|
30
|
+
nil
|
31
|
+
end
|
40
32
|
|
41
33
|
end
|
42
34
|
|
data/lib/ransack/translate.rb
CHANGED
@@ -24,8 +24,8 @@ module Ransack
|
|
24
24
|
base_ancestors = base_class.ancestors.select {
|
25
25
|
|x| x.respond_to?(:model_name)
|
26
26
|
}
|
27
|
-
|
28
|
-
|
27
|
+
attributes_str = original_name.dup # will be modified by ⬇
|
28
|
+
predicate = Predicate.detect_and_strip_from_string!(attributes_str)
|
29
29
|
attribute_names = attributes_str.split(/_and_|_or_/)
|
30
30
|
combinator = attributes_str.match(/_and_/) ? :and : :or
|
31
31
|
defaults = base_ancestors.map do |klass|
|
data/lib/ransack/version.rb
CHANGED
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.}
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_dependency 'activerecord', '>= 3.0'
|
21
21
|
s.add_dependency 'activesupport', '>= 3.0'
|
22
22
|
s.add_dependency 'i18n'
|
23
|
-
s.add_dependency 'polyamorous', '~> 1.3'
|
23
|
+
s.add_dependency 'polyamorous', '~> 1.3.2'
|
24
24
|
s.add_development_dependency 'rspec', '~> 3'
|
25
25
|
s.add_development_dependency 'machinist', '~> 1.0.6'
|
26
26
|
s.add_development_dependency 'faker', '~> 0.9.5'
|
data/spec/spec_helper.rb
CHANGED
@@ -3,7 +3,9 @@ require 'sham'
|
|
3
3
|
require 'faker'
|
4
4
|
require 'ransack'
|
5
5
|
require 'pry'
|
6
|
+
require 'simplecov'
|
6
7
|
|
8
|
+
SimpleCov.start
|
7
9
|
I18n.enforce_available_locales = false
|
8
10
|
Time.zone = 'Eastern Time (US & Canada)'
|
9
11
|
I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'support', '*.yml')]
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ransack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernie Miller
|
8
8
|
- Ryan Bigg
|
9
9
|
- Jon Atack
|
10
|
+
- Sean Carroll
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date:
|
14
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: actionpack
|
@@ -74,14 +75,14 @@ dependencies:
|
|
74
75
|
requirements:
|
75
76
|
- - "~>"
|
76
77
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
78
|
+
version: 1.3.2
|
78
79
|
type: :runtime
|
79
80
|
prerelease: false
|
80
81
|
version_requirements: !ruby/object:Gem::Requirement
|
81
82
|
requirements:
|
82
83
|
- - "~>"
|
83
84
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
85
|
+
version: 1.3.2
|
85
86
|
- !ruby/object:Gem::Dependency
|
86
87
|
name: rspec
|
87
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,6 +187,7 @@ email:
|
|
186
187
|
- ernie@erniemiller.org
|
187
188
|
- radarlistener@gmail.com
|
188
189
|
- jonnyatack@gmail.com
|
190
|
+
- sfcarroll@gmail.com
|
189
191
|
executables: []
|
190
192
|
extensions: []
|
191
193
|
extra_rdoc_files: []
|
@@ -246,6 +248,7 @@ files:
|
|
246
248
|
- lib/ransack/locale/nl.yml
|
247
249
|
- lib/ransack/locale/pt-BR.yml
|
248
250
|
- lib/ransack/locale/ro.yml
|
251
|
+
- lib/ransack/locale/tr.yml
|
249
252
|
- lib/ransack/locale/zh-CN.yml
|
250
253
|
- lib/ransack/locale/zh-TW.yml
|
251
254
|
- lib/ransack/naming.rb
|