ransack 1.8.8 → 1.8.9
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/.travis.yml +9 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -6
- data/README.md +37 -0
- data/lib/polyamorous.rb +55 -0
- data/lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_association.rb +76 -0
- data/lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_dependency.rb +96 -0
- data/lib/polyamorous/activerecord_4.1_ruby_1.9/join_association.rb +2 -0
- data/lib/polyamorous/activerecord_4.1_ruby_1.9/join_dependency.rb +4 -0
- data/lib/polyamorous/activerecord_4.1_ruby_2/join_association.rb +2 -0
- data/lib/polyamorous/activerecord_4.1_ruby_2/join_dependency.rb +3 -0
- data/lib/polyamorous/activerecord_4.1_ruby_2/make_polyamorous_inner_joins.rb +14 -0
- data/lib/polyamorous/activerecord_4.2_ruby_1.9/join_association.rb +46 -0
- data/lib/polyamorous/activerecord_4.2_ruby_1.9/join_dependency.rb +87 -0
- data/lib/polyamorous/activerecord_4.2_ruby_2/join_association.rb +2 -0
- data/lib/polyamorous/activerecord_4.2_ruby_2/join_dependency.rb +24 -0
- 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 +39 -0
- data/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +130 -0
- data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +39 -0
- data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +131 -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/ransack/adapters/active_record/3.0/compat.rb +1 -7
- data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +3 -8
- data/lib/ransack/adapters/mongoid/ransack/visitor.rb +1 -7
- data/lib/ransack/helpers/form_builder.rb +14 -8
- data/lib/ransack/locale/az.yml +70 -0
- data/lib/ransack/nodes/grouping.rb +1 -5
- data/lib/ransack/version.rb +1 -1
- data/lib/ransack/visitor.rb +1 -7
- data/ransack.gemspec +3 -5
- data/spec/helpers/polyamorous_helper.rb +26 -0
- data/spec/ransack/join_association_spec.rb +54 -0
- data/spec/ransack/join_dependency_spec.rb +102 -0
- data/spec/ransack/join_spec.rb +19 -0
- data/spec/spec_helper.rb +1 -0
- metadata +51 -17
@@ -0,0 +1,11 @@
|
|
1
|
+
module Polyamorous
|
2
|
+
module SwappingReflectionClass
|
3
|
+
def swapping_reflection_klass(reflection, klass)
|
4
|
+
new_reflection = reflection.clone
|
5
|
+
new_reflection.instance_variable_set(:@options, reflection.options.clone)
|
6
|
+
new_reflection.options.delete(:polymorphic)
|
7
|
+
new_reflection.instance_variable_set(:@klass, klass)
|
8
|
+
yield new_reflection
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -3,13 +3,7 @@ if Arel::Nodes::And < Arel::Nodes::Binary
|
|
3
3
|
class Ransack::Visitor
|
4
4
|
def visit_Ransack_Nodes_And(object)
|
5
5
|
nodes = object.values.map { |o| accept(o) }.compact
|
6
|
-
|
7
|
-
|
8
|
-
if nodes.size > 1
|
9
|
-
nodes.inject(&:and)
|
10
|
-
else
|
11
|
-
nodes.first
|
12
|
-
end
|
6
|
+
nodes.inject(&:and)
|
13
7
|
end
|
14
8
|
end
|
15
9
|
end
|
@@ -10,15 +10,10 @@ module Ransack
|
|
10
10
|
)
|
11
11
|
end
|
12
12
|
|
13
|
-
if predicates.size > 1
|
14
|
-
|
15
|
-
when 'and'
|
16
|
-
Arel::Nodes::Grouping.new(Arel::Nodes::And.new(predicates))
|
17
|
-
when 'or'
|
18
|
-
predicates.inject(&:or)
|
19
|
-
end
|
13
|
+
if predicates.size > 1 && combinator == 'and'
|
14
|
+
Arel::Nodes::Grouping.new(Arel::Nodes::And.new(predicates))
|
20
15
|
else
|
21
|
-
predicates.
|
16
|
+
predicates.inject(&:or)
|
22
17
|
end
|
23
18
|
end
|
24
19
|
|
@@ -2,13 +2,7 @@ module Ransack
|
|
2
2
|
class Visitor
|
3
3
|
def visit_and(object)
|
4
4
|
nodes = object.values.map { |o| accept(o) }.compact
|
5
|
-
|
6
|
-
|
7
|
-
if nodes.size > 1
|
8
|
-
nodes.inject(&:and)
|
9
|
-
else
|
10
|
-
nodes.first
|
11
|
-
end
|
5
|
+
nodes.inject(&:and)
|
12
6
|
end
|
13
7
|
|
14
8
|
def quoted?(object)
|
@@ -6,15 +6,21 @@ module ActionView::Helpers::Tags
|
|
6
6
|
# https://github.com/rails/rails/commit/c1a118a
|
7
7
|
class Base
|
8
8
|
private
|
9
|
-
if ::ActiveRecord
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
if defined? ::ActiveRecord
|
10
|
+
if ::ActiveRecord::VERSION::STRING < '5.2'
|
11
|
+
def value(object)
|
12
|
+
object.send @method_name if object # use send instead of public_send
|
13
|
+
end
|
14
|
+
else # rails/rails#29791
|
15
|
+
def value
|
16
|
+
if @allow_method_names_outside_object
|
17
|
+
object.send @method_name if object && object.respond_to?(@method_name, true)
|
18
|
+
else
|
19
|
+
object.send @method_name if object
|
20
|
+
end
|
21
|
+
end
|
16
22
|
end
|
17
|
-
end
|
23
|
+
end
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
@@ -0,0 +1,70 @@
|
|
1
|
+
tr:
|
2
|
+
ransack:
|
3
|
+
search: "axtar"
|
4
|
+
predicate: "təsdiqlə"
|
5
|
+
and: "və"
|
6
|
+
or: "və ya"
|
7
|
+
any: "hər hansı"
|
8
|
+
all: "hamısı"
|
9
|
+
combinator: "birləşdirici"
|
10
|
+
attribute: "xüsusiyyət"
|
11
|
+
value: "dəyər"
|
12
|
+
condition: "şərt"
|
13
|
+
sort: "sırala"
|
14
|
+
asc: "artan"
|
15
|
+
desc: "azalan"
|
16
|
+
predicates:
|
17
|
+
eq: "bərabər"
|
18
|
+
eq_any: "hər hansı birinə bərabər"
|
19
|
+
eq_all: "hamısına bərabər"
|
20
|
+
not_eq: "bərabər deyil"
|
21
|
+
not_eq_any: "hər hansı birinə bərabər deyil"
|
22
|
+
not_eq_all: "heç birinə bərabər deyil"
|
23
|
+
matches: "uyğunlaşan"
|
24
|
+
matches_any: "hər hansı biri ilə uyğunlaşan"
|
25
|
+
matches_all: "hamısı ilə uyğunlaşan"
|
26
|
+
does_not_match: "uyğunlaşmayan"
|
27
|
+
does_not_match_any: "hər hansı biri ilə uyğunlaşmayan"
|
28
|
+
does_not_match_all: "heç biri ilə uyğunlaşmayan"
|
29
|
+
lt: "daha kiçik"
|
30
|
+
lt_any: "hər hansı birindən kiçik"
|
31
|
+
lt_all: "hamısından kiçik"
|
32
|
+
lteq: "daha kiçik və ya bərabər"
|
33
|
+
lteq_any: "daha kiçik və ya hər hansı birinə bərabər"
|
34
|
+
lteq_all: "daha kiçik və ya hamısına bərabər"
|
35
|
+
gt: "daha böyük "
|
36
|
+
gt_any: "hər hansı birindən daha böyük"
|
37
|
+
gt_all: "hamısından daha böyük"
|
38
|
+
gteq: "daha böyük və ya bərabər"
|
39
|
+
gteq_any: "daha böyük və ya hər hansı birine bərabər"
|
40
|
+
gteq_all: "daha böyük və ya hamısıne bərabər"
|
41
|
+
in: "içində"
|
42
|
+
in_any: "hər hansı birində"
|
43
|
+
in_all: "hamısında"
|
44
|
+
not_in: "içində deyil"
|
45
|
+
not_in_any: "hər hansı birində deyil"
|
46
|
+
not_in_all: "heç birində deyil"
|
47
|
+
cont: "ehtiva edən"
|
48
|
+
cont_any: "hər hansı birini ehtiva edən"
|
49
|
+
cont_all: "hamısını ehtiva edən"
|
50
|
+
not_cont: "ehtiva etməyən"
|
51
|
+
not_cont_any: "hər hansı birini ehtiva etməyən"
|
52
|
+
not_cont_all: "heç birini birini ehtiva etməyən"
|
53
|
+
start: "ilə başlayan"
|
54
|
+
start_any: "hər hansı biri ilə başlayan"
|
55
|
+
start_all: "hamısı ilə başlayan"
|
56
|
+
not_start: "ilə başlamayan"
|
57
|
+
not_start_any: "hər hansı biri ilə başlamayan"
|
58
|
+
not_start_all: "hiçbiri ilə başlamayan"
|
59
|
+
end: "ilə bitən"
|
60
|
+
end_any: "hər hansı biri ilə bitən"
|
61
|
+
end_all: "hamısı ilə bitən"
|
62
|
+
not_end: "ilə bitməyən"
|
63
|
+
not_end_any: "hər hansı biri ilə bitməyən"
|
64
|
+
not_end_all: "heç biri ilə bitməyən"
|
65
|
+
'true': "doğru"
|
66
|
+
'false': "yanlış"
|
67
|
+
present: "mövcüd"
|
68
|
+
blank: "boş"
|
69
|
+
'null': "keçərsiz"
|
70
|
+
not_null: "keçərli"
|
data/lib/ransack/version.rb
CHANGED
data/lib/ransack/visitor.rb
CHANGED
@@ -31,13 +31,7 @@ module Ransack
|
|
31
31
|
|
32
32
|
def visit_or(object)
|
33
33
|
nodes = object.values.map { |o| accept(o) }.compact
|
34
|
-
|
35
|
-
|
36
|
-
if nodes.size > 1
|
37
|
-
nodes.inject(&:or)
|
38
|
-
else
|
39
|
-
nodes.first
|
40
|
-
end
|
34
|
+
nodes.inject(&:or)
|
41
35
|
end
|
42
36
|
|
43
37
|
def quoted?(object)
|
data/ransack.gemspec
CHANGED
@@ -15,12 +15,10 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.license = 'MIT'
|
16
16
|
|
17
17
|
s.rubyforge_project = "ransack"
|
18
|
-
|
19
|
-
s.add_dependency '
|
20
|
-
s.add_dependency '
|
21
|
-
s.add_dependency 'activesupport', '>= 3.0'
|
18
|
+
s.add_dependency 'actionpack', '>= 3.0', '<= 5.1.1'
|
19
|
+
s.add_dependency 'activerecord', '>= 3.0', '<= 5.1.1'
|
20
|
+
s.add_dependency 'activesupport', '>= 3.0', '<= 5.1.1'
|
22
21
|
s.add_dependency 'i18n'
|
23
|
-
s.add_dependency 'polyamorous', '~> 1.3.2'
|
24
22
|
s.add_development_dependency 'rspec', '~> 3'
|
25
23
|
s.add_development_dependency 'machinist', '~> 1.0.6'
|
26
24
|
s.add_development_dependency 'faker', '~> 0.9.5'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module PolyamorousHelper
|
2
|
+
if ActiveRecord::VERSION::STRING >= "4.1"
|
3
|
+
def new_join_association(reflection, children, klass)
|
4
|
+
Polyamorous::JoinAssociation.new reflection, children, klass
|
5
|
+
end
|
6
|
+
else
|
7
|
+
def new_join_association(reflection, join_dependency, parent, klass)
|
8
|
+
Polyamorous::JoinAssociation.new reflection, join_dependency, parent, klass
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
if ActiveRecord::VERSION::STRING >= "5.2"
|
13
|
+
def new_join_dependency(klass, associations = {})
|
14
|
+
alias_tracker = ::ActiveRecord::Associations::AliasTracker.create(klass.connection, klass.table_name, [])
|
15
|
+
Polyamorous::JoinDependency.new klass, klass.arel_table, associations, alias_tracker
|
16
|
+
end
|
17
|
+
else
|
18
|
+
def new_join_dependency(klass, associations = {})
|
19
|
+
Polyamorous::JoinDependency.new klass, associations, []
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def new_join(name, type = Polyamorous::InnerJoin, klass = nil)
|
24
|
+
Polyamorous::Join.new name, type, klass
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Polyamorous
|
4
|
+
describe JoinAssociation do
|
5
|
+
|
6
|
+
join_base, join_association_args, polymorphic =
|
7
|
+
if ActiveRecord::VERSION::STRING >= '4.1'
|
8
|
+
[:join_root, 'parent.children', 'reflection.options[:polymorphic]']
|
9
|
+
else
|
10
|
+
[:join_base, 'join_dependency, parent', 'options[:polymorphic]']
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:join_dependency) { new_join_dependency Note, {} }
|
14
|
+
let(:reflection) { Note.reflect_on_association(:notable) }
|
15
|
+
let(:parent) { join_dependency.send(join_base) }
|
16
|
+
let(:join_association) {
|
17
|
+
eval("new_join_association(reflection, #{join_association_args}, Article)")
|
18
|
+
}
|
19
|
+
|
20
|
+
subject {
|
21
|
+
join_dependency.build_join_association_respecting_polymorphism(
|
22
|
+
reflection, parent, Person
|
23
|
+
)
|
24
|
+
}
|
25
|
+
|
26
|
+
it 'respects polymorphism on equality test' do
|
27
|
+
expect(subject).to eq(
|
28
|
+
join_dependency.build_join_association_respecting_polymorphism(
|
29
|
+
reflection, parent, Person
|
30
|
+
)
|
31
|
+
)
|
32
|
+
expect(subject).not_to eq(
|
33
|
+
join_dependency.build_join_association_respecting_polymorphism(
|
34
|
+
reflection, parent, Article
|
35
|
+
)
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'leaves the orginal reflection intact for thread safety' do
|
40
|
+
reflection.instance_variable_set(:@klass, Article)
|
41
|
+
join_association
|
42
|
+
.swapping_reflection_klass(reflection, Person) do |new_reflection|
|
43
|
+
expect(new_reflection.options).not_to equal reflection.options
|
44
|
+
expect(new_reflection.options).not_to have_key(:polymorphic)
|
45
|
+
expect(new_reflection.klass).to eq(Person)
|
46
|
+
expect(reflection.klass).to eq(Article)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'sets the polymorphic option to true after initializing' do
|
51
|
+
expect(join_association.instance_eval(polymorphic)).to be true
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Polyamorous
|
4
|
+
describe JoinDependency do
|
5
|
+
|
6
|
+
method, join_associations, join_base =
|
7
|
+
if ActiveRecord::VERSION::STRING >= '4.1'
|
8
|
+
[:instance_eval, 'join_root.drop(1)', :join_root]
|
9
|
+
else
|
10
|
+
[:send, 'join_associations', :join_base]
|
11
|
+
end
|
12
|
+
|
13
|
+
context 'with symbol joins' do
|
14
|
+
subject { new_join_dependency Person, articles: :comments }
|
15
|
+
|
16
|
+
specify { expect(subject.send(method, join_associations).size)
|
17
|
+
.to eq(2) }
|
18
|
+
specify { expect(subject.send(method, join_associations).map(&:join_type))
|
19
|
+
.to be_all { Polyamorous::InnerJoin } }
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'with has_many :through association' do
|
23
|
+
subject { new_join_dependency Person, :authored_article_comments }
|
24
|
+
|
25
|
+
specify { expect(subject.send(method, join_associations).size)
|
26
|
+
.to eq 1 }
|
27
|
+
specify { expect(subject.send(method, join_associations).first.table_name)
|
28
|
+
.to eq 'comments' }
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'with outer join' do
|
32
|
+
subject { new_join_dependency Person, new_join(:articles, :outer) }
|
33
|
+
|
34
|
+
specify { expect(subject.send(method, join_associations).size)
|
35
|
+
.to eq 1 }
|
36
|
+
specify { expect(subject.send(method, join_associations).first.join_type)
|
37
|
+
.to eq Polyamorous::OuterJoin }
|
38
|
+
end
|
39
|
+
|
40
|
+
context 'with nested outer joins' do
|
41
|
+
subject { new_join_dependency Person,
|
42
|
+
new_join(:articles, :outer) => new_join(:comments, :outer) }
|
43
|
+
|
44
|
+
specify { expect(subject.send(method, join_associations).size)
|
45
|
+
.to eq 2 }
|
46
|
+
specify { expect(subject.send(method, join_associations).map(&:join_type))
|
47
|
+
.to eq [Polyamorous::OuterJoin, Polyamorous::OuterJoin] }
|
48
|
+
specify { expect(subject.send(method, join_associations).map(&:join_type))
|
49
|
+
.to be_all { Polyamorous::OuterJoin } }
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'with polymorphic belongs_to join' do
|
53
|
+
subject { new_join_dependency Note, new_join(:notable, :inner, Person) }
|
54
|
+
|
55
|
+
specify { expect(subject.send(method, join_associations).size)
|
56
|
+
.to eq 1 }
|
57
|
+
specify { expect(subject.send(method, join_associations).first.join_type)
|
58
|
+
.to eq Polyamorous::InnerJoin }
|
59
|
+
specify { expect(subject.send(method, join_associations).first.table_name)
|
60
|
+
.to eq 'people' }
|
61
|
+
|
62
|
+
it 'finds a join association respecting polymorphism' do
|
63
|
+
parent = subject.send(join_base)
|
64
|
+
reflection = Note.reflect_on_association(:notable)
|
65
|
+
|
66
|
+
expect(subject.find_join_association_respecting_polymorphism(
|
67
|
+
reflection, parent, Person))
|
68
|
+
.to eq subject.send(method, join_associations).first
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context 'with polymorphic belongs_to join and nested symbol join' do
|
73
|
+
subject { new_join_dependency Note,
|
74
|
+
new_join(:notable, :inner, Person) => :comments }
|
75
|
+
|
76
|
+
specify { expect(subject.send(method, join_associations).size)
|
77
|
+
.to eq 2 }
|
78
|
+
specify { expect(subject.send(method, join_associations).map(&:join_type))
|
79
|
+
.to be_all { Polyamorous::InnerJoin } }
|
80
|
+
specify { expect(subject.send(method, join_associations).first.table_name)
|
81
|
+
.to eq 'people' }
|
82
|
+
specify { expect(subject.send(method, join_associations)[1].table_name)
|
83
|
+
.to eq 'comments' }
|
84
|
+
end
|
85
|
+
|
86
|
+
context '#left_outer_join in Rails 5 overrides join type specified',
|
87
|
+
if: ActiveRecord::VERSION::MAJOR >= 5 && ActiveRecord::VERSION::MINOR < 2 do
|
88
|
+
|
89
|
+
let(:join_type_class) do
|
90
|
+
new_join_dependency(
|
91
|
+
Person,
|
92
|
+
new_join(:articles)
|
93
|
+
).join_constraints(
|
94
|
+
[],
|
95
|
+
Arel::Nodes::OuterJoin
|
96
|
+
).first.joins.map(&:class)
|
97
|
+
end
|
98
|
+
|
99
|
+
specify { expect(join_type_class).to eq [Arel::Nodes::OuterJoin] }
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Polyamorous
|
4
|
+
describe Join do
|
5
|
+
it 'is a tree node' do
|
6
|
+
join = new_join(:articles, :outer)
|
7
|
+
expect(join).to be_kind_of(TreeNode)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'can be added to a tree' do
|
11
|
+
join = new_join(:articles, :outer)
|
12
|
+
|
13
|
+
tree_hash = {}
|
14
|
+
join.add_to_tree(tree_hash)
|
15
|
+
|
16
|
+
expect(tree_hash[join]).to be {}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
CHANGED
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: 1.8.
|
4
|
+
version: 1.8.9
|
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-
|
14
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: actionpack
|
@@ -20,6 +20,9 @@ dependencies:
|
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '3.0'
|
23
|
+
- - "<="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 5.1.1
|
23
26
|
type: :runtime
|
24
27
|
prerelease: false
|
25
28
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,6 +30,9 @@ dependencies:
|
|
27
30
|
- - ">="
|
28
31
|
- !ruby/object:Gem::Version
|
29
32
|
version: '3.0'
|
33
|
+
- - "<="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 5.1.1
|
30
36
|
- !ruby/object:Gem::Dependency
|
31
37
|
name: activerecord
|
32
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -34,6 +40,9 @@ dependencies:
|
|
34
40
|
- - ">="
|
35
41
|
- !ruby/object:Gem::Version
|
36
42
|
version: '3.0'
|
43
|
+
- - "<="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 5.1.1
|
37
46
|
type: :runtime
|
38
47
|
prerelease: false
|
39
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,6 +50,9 @@ dependencies:
|
|
41
50
|
- - ">="
|
42
51
|
- !ruby/object:Gem::Version
|
43
52
|
version: '3.0'
|
53
|
+
- - "<="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 5.1.1
|
44
56
|
- !ruby/object:Gem::Dependency
|
45
57
|
name: activesupport
|
46
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -48,6 +60,9 @@ dependencies:
|
|
48
60
|
- - ">="
|
49
61
|
- !ruby/object:Gem::Version
|
50
62
|
version: '3.0'
|
63
|
+
- - "<="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 5.1.1
|
51
66
|
type: :runtime
|
52
67
|
prerelease: false
|
53
68
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -55,6 +70,9 @@ dependencies:
|
|
55
70
|
- - ">="
|
56
71
|
- !ruby/object:Gem::Version
|
57
72
|
version: '3.0'
|
73
|
+
- - "<="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 5.1.1
|
58
76
|
- !ruby/object:Gem::Dependency
|
59
77
|
name: i18n
|
60
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,20 +87,6 @@ dependencies:
|
|
69
87
|
- - ">="
|
70
88
|
- !ruby/object:Gem::Version
|
71
89
|
version: '0'
|
72
|
-
- !ruby/object:Gem::Dependency
|
73
|
-
name: polyamorous
|
74
|
-
requirement: !ruby/object:Gem::Requirement
|
75
|
-
requirements:
|
76
|
-
- - "~>"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 1.3.2
|
79
|
-
type: :runtime
|
80
|
-
prerelease: false
|
81
|
-
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
requirements:
|
83
|
-
- - "~>"
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 1.3.2
|
86
90
|
- !ruby/object:Gem::Dependency
|
87
91
|
name: rspec
|
88
92
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +204,27 @@ files:
|
|
200
204
|
- LICENSE
|
201
205
|
- README.md
|
202
206
|
- Rakefile
|
207
|
+
- lib/polyamorous.rb
|
208
|
+
- lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_association.rb
|
209
|
+
- lib/polyamorous/activerecord_3_and_4.0_ruby_1.9/join_dependency.rb
|
210
|
+
- lib/polyamorous/activerecord_4.1_ruby_1.9/join_association.rb
|
211
|
+
- lib/polyamorous/activerecord_4.1_ruby_1.9/join_dependency.rb
|
212
|
+
- lib/polyamorous/activerecord_4.1_ruby_2/join_association.rb
|
213
|
+
- lib/polyamorous/activerecord_4.1_ruby_2/join_dependency.rb
|
214
|
+
- lib/polyamorous/activerecord_4.1_ruby_2/make_polyamorous_inner_joins.rb
|
215
|
+
- lib/polyamorous/activerecord_4.2_ruby_1.9/join_association.rb
|
216
|
+
- lib/polyamorous/activerecord_4.2_ruby_1.9/join_dependency.rb
|
217
|
+
- lib/polyamorous/activerecord_4.2_ruby_2/join_association.rb
|
218
|
+
- lib/polyamorous/activerecord_4.2_ruby_2/join_dependency.rb
|
219
|
+
- lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb
|
220
|
+
- lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb
|
221
|
+
- lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb
|
222
|
+
- lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb
|
223
|
+
- lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb
|
224
|
+
- lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb
|
225
|
+
- lib/polyamorous/join.rb
|
226
|
+
- lib/polyamorous/swapping_reflection_class.rb
|
227
|
+
- lib/polyamorous/tree_node.rb
|
203
228
|
- lib/ransack.rb
|
204
229
|
- lib/ransack/adapters.rb
|
205
230
|
- lib/ransack/adapters/active_record.rb
|
@@ -235,6 +260,7 @@ files:
|
|
235
260
|
- lib/ransack/helpers.rb
|
236
261
|
- lib/ransack/helpers/form_builder.rb
|
237
262
|
- lib/ransack/helpers/form_helper.rb
|
263
|
+
- lib/ransack/locale/az.yml
|
238
264
|
- lib/ransack/locale/cs.yml
|
239
265
|
- lib/ransack/locale/da.yml
|
240
266
|
- lib/ransack/locale/de.yml
|
@@ -273,6 +299,7 @@ files:
|
|
273
299
|
- spec/blueprints/people.rb
|
274
300
|
- spec/blueprints/tags.rb
|
275
301
|
- spec/console.rb
|
302
|
+
- spec/helpers/polyamorous_helper.rb
|
276
303
|
- spec/helpers/ransack_helper.rb
|
277
304
|
- spec/mongoid/adapters/mongoid/base_spec.rb
|
278
305
|
- spec/mongoid/adapters/mongoid/context_spec.rb
|
@@ -293,6 +320,9 @@ files:
|
|
293
320
|
- spec/ransack/dependencies_spec.rb
|
294
321
|
- spec/ransack/helpers/form_builder_spec.rb
|
295
322
|
- spec/ransack/helpers/form_helper_spec.rb
|
323
|
+
- spec/ransack/join_association_spec.rb
|
324
|
+
- spec/ransack/join_dependency_spec.rb
|
325
|
+
- spec/ransack/join_spec.rb
|
296
326
|
- spec/ransack/nodes/condition_spec.rb
|
297
327
|
- spec/ransack/nodes/grouping_spec.rb
|
298
328
|
- spec/ransack/predicate_spec.rb
|
@@ -321,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
351
|
version: '0'
|
322
352
|
requirements: []
|
323
353
|
rubyforge_project: ransack
|
324
|
-
rubygems_version: 2.7.
|
354
|
+
rubygems_version: 2.7.6
|
325
355
|
signing_key:
|
326
356
|
specification_version: 4
|
327
357
|
summary: Object-based searching for Active Record and Mongoid (currently).
|
@@ -332,6 +362,7 @@ test_files:
|
|
332
362
|
- spec/blueprints/people.rb
|
333
363
|
- spec/blueprints/tags.rb
|
334
364
|
- spec/console.rb
|
365
|
+
- spec/helpers/polyamorous_helper.rb
|
335
366
|
- spec/helpers/ransack_helper.rb
|
336
367
|
- spec/mongoid/adapters/mongoid/base_spec.rb
|
337
368
|
- spec/mongoid/adapters/mongoid/context_spec.rb
|
@@ -352,6 +383,9 @@ test_files:
|
|
352
383
|
- spec/ransack/dependencies_spec.rb
|
353
384
|
- spec/ransack/helpers/form_builder_spec.rb
|
354
385
|
- spec/ransack/helpers/form_helper_spec.rb
|
386
|
+
- spec/ransack/join_association_spec.rb
|
387
|
+
- spec/ransack/join_dependency_spec.rb
|
388
|
+
- spec/ransack/join_spec.rb
|
355
389
|
- spec/ransack/nodes/condition_spec.rb
|
356
390
|
- spec/ransack/nodes/grouping_spec.rb
|
357
391
|
- spec/ransack/predicate_spec.rb
|