ru.Bee 2.6.3 → 2.6.5
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/lib/db/test.db +0 -0
- data/lib/rubee/models/assoc_array.rb +4 -0
- data/lib/rubee/models/sequel_object.rb +1 -1
- data/lib/rubee.rb +1 -1
- data/lib/tests/models/comment_model_test.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d7004443a68344f9fd24df9a4a3381e7191b2ced2cc9ed3c9c793a9aa96c7dd
|
|
4
|
+
data.tar.gz: 1e6692e0b3a6e83956d283f768c7d16bc148546c509fc32dc085f35b8bdc9234
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6138d471e1fab6a8ba89911c039cc25ce288268f1cd08ccabbd5fca05aa1a39f09c394364021a588008aab272dc1adba32a08e320542216e1dd25fd7c522fb01
|
|
7
|
+
data.tar.gz: 2ed721ff4543db57497aeb4265ecbbe079b05e7f45799550d14d0e0506dd0c228eada92957842bf0de63890c2105c8672a3ceb4b1a97e6765c3aeefe36a5693b
|
data/lib/db/test.db
CHANGED
|
Binary file
|
|
@@ -38,6 +38,10 @@ module Rubee
|
|
|
38
38
|
@__model.offset(*args, __query_dataset: @__query_dataset)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
def owns_many(*args)
|
|
42
|
+
@__model.owns_many(*args, __query_dataset: @__query_dataset)
|
|
43
|
+
end
|
|
44
|
+
|
|
41
45
|
def paginate(*args)
|
|
42
46
|
total_count = @__query_dataset.count
|
|
43
47
|
current_page, per_page = args
|
|
@@ -118,7 +118,7 @@ module Rubee
|
|
|
118
118
|
sequel_dataset = klass
|
|
119
119
|
.dataset
|
|
120
120
|
.join(over.to_sym, "#{singularized_assoc_name.snakeize}_id".to_sym => :id)
|
|
121
|
-
.where(Sequel[over][fk_name.to_sym] => id).select_all(original_assoc)
|
|
121
|
+
.where(Sequel[over][fk_name.to_sym] => id).select_all(original_assoc)
|
|
122
122
|
|
|
123
123
|
::Rubee::AssocArray.new([], klass, sequel_dataset)
|
|
124
124
|
else
|
data/lib/rubee.rb
CHANGED
|
@@ -22,6 +22,13 @@ describe 'Comment model' do
|
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
describe 'owns_many chain' do
|
|
26
|
+
it 'returns target records' do
|
|
27
|
+
_(Comment.where(text: 'test_enough').last.users.where(email: 'ok-test@test.com').count)
|
|
28
|
+
.must_equal(1)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
25
32
|
describe 'sequel dataset query' do
|
|
26
33
|
it 'returns all records' do
|
|
27
34
|
result = Comment.dataset.join(:posts, comment_id: :id)
|