ru.Bee 2.4.0 → 2.4.2
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/autoload.rb +2 -1
- data/lib/rubee/models/sequel_object.rb +2 -1
- data/lib/rubee.rb +1 -1
- data/lib/tests/async/thread_async_test.rb +1 -1
- data/readme.md +1 -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: c385384e96fe32c753b81051b7bcb24d8d623d2c61898ee8602e5bbfe2bdd9a1
|
|
4
|
+
data.tar.gz: 239f84f0499d800d899894d29b4df27305d94a7728d3b4d5bfbfaf150e9379e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0777d3758de544f5455f61378ded65d83fa56502b1c8b9343d3d8fc7edaf545664e003bb7b6f11d90fda858ec9f3c67d917e3333e0fe5e3b891004bb83450b88
|
|
7
|
+
data.tar.gz: aa7b2833b2cdfef147e37dcdcfc1e30508b392aa56f885e3cb578d5276db5a32237a1140e76938be606fd78da5f11204cbf32aba20575e2b91116a4c3b936e29
|
data/lib/db/test.db
CHANGED
|
Binary file
|
data/lib/rubee/autoload.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Rubee
|
|
|
7
7
|
# autoload all rbs
|
|
8
8
|
root_directory = File.join(Rubee::ROOT_PATH, '/lib')
|
|
9
9
|
priority_order_require(root_directory, black_list)
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
load_inits(root_directory, black_list)
|
|
12
12
|
# ensure sequel object is connected
|
|
13
13
|
Rubee::SequelObject.reconnect!
|
|
@@ -58,6 +58,7 @@ module Rubee
|
|
|
58
58
|
Dir[File.join(root_directory, 'rubee/async/**', '*.rb')].each do |file|
|
|
59
59
|
require_relative file unless black_list.include?("#{file}.rb")
|
|
60
60
|
end
|
|
61
|
+
load_support(root_directory, black_list)
|
|
61
62
|
# app config and routes
|
|
62
63
|
unless black_list.include?('base_configuration.rb')
|
|
63
64
|
require_relative File.join(Rubee::APP_ROOT, Rubee::LIB,
|
|
@@ -102,6 +102,7 @@ module Rubee
|
|
|
102
102
|
# > user.comments
|
|
103
103
|
# > [<comment1>, <comment2>]
|
|
104
104
|
def owns_many(assoc, fk_name: nil, over: nil, **options)
|
|
105
|
+
original_assoc = assoc
|
|
105
106
|
singularized_assoc_name = assoc.to_s.singularize
|
|
106
107
|
fk_name ||= "#{name.to_s.downcase}_id"
|
|
107
108
|
namespace = options[:namespace]
|
|
@@ -116,7 +117,7 @@ module Rubee
|
|
|
116
117
|
if over
|
|
117
118
|
sequel_dataset = klass
|
|
118
119
|
.join(over.to_sym, "#{singularized_assoc_name.snakeize}_id".to_sym => :id)
|
|
119
|
-
.where(Sequel[over][fk_name.to_sym] => id)
|
|
120
|
+
.where(Sequel[over][fk_name.to_sym] => id).select_all(original_assoc).all
|
|
120
121
|
self.class.serialize(sequel_dataset, klass)
|
|
121
122
|
else
|
|
122
123
|
klass.where(fk_name.to_sym => id)
|
data/lib/rubee.rb
CHANGED
data/readme.md
CHANGED
|
@@ -1052,6 +1052,7 @@ Here are list of additionl APIs extended for:
|
|
|
1052
1052
|
# By adding to configuration Rubee::Suport::Hash class or just applying all, Hash will tollerate string or symbol keys.
|
|
1053
1053
|
{one: 1}[:one] # => 1
|
|
1054
1054
|
{one: 1}["one"] # => 1
|
|
1055
|
+
```
|
|
1055
1056
|
|
|
1056
1057
|
# By adding to configuration Rubee::Support::String or just applying all, String will be enriched with handy helper methods.
|
|
1057
1058
|
```ruby
|