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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 066655ef03cfa0f000d95d634a06a9f1d40259ec45ea21d86e0ee85f74bf17ed
4
- data.tar.gz: 45d04a51041408d8bdd2e690618e92f288e73fda5cb4447515319cc6f498918b
3
+ metadata.gz: c385384e96fe32c753b81051b7bcb24d8d623d2c61898ee8602e5bbfe2bdd9a1
4
+ data.tar.gz: 239f84f0499d800d899894d29b4df27305d94a7728d3b4d5bfbfaf150e9379e0
5
5
  SHA512:
6
- metadata.gz: 468195453447949e93d0ea7b18e5fea7384bbf80ecc07447df37b70731f698113a8e27d8015afcef1366cb6a463860ea67c4006519bc4315f5a0e72a73bbfc48
7
- data.tar.gz: 33e8dac0437cec2fd495d5fe17af96daf786696a3061a392fff6b31e352bea3025f29c8a8e2db131a2c6e781727648403e998cec24a327a0b41b76c208108ded
6
+ metadata.gz: 0777d3758de544f5455f61378ded65d83fa56502b1c8b9343d3d8fc7edaf545664e003bb7b6f11d90fda858ec9f3c67d917e3333e0fe5e3b891004bb83450b88
7
+ data.tar.gz: aa7b2833b2cdfef147e37dcdcfc1e30508b392aa56f885e3cb578d5276db5a32237a1140e76938be606fd78da5f11204cbf32aba20575e2b91116a4c3b936e29
data/lib/db/test.db CHANGED
Binary file
@@ -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
- load_support(root_directory, black_list)
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
@@ -20,7 +20,7 @@ module Rubee
20
20
  RUBEE_SUPPORT = { "Rubee::Support::Hash" => Hash, "Rubee::Support::String" => String }
21
21
  end
22
22
 
23
- VERSION = '2.4.0'
23
+ VERSION = '2.4.2'
24
24
 
25
25
  require_relative 'rubee/router'
26
26
  require_relative 'rubee/logger'
@@ -27,7 +27,7 @@ describe 'TestAsyncRunnner' do
27
27
  subject
28
28
 
29
29
  Timeout.timeout(1) do
30
- sleep(0.05) until User.count == 5
30
+ sleep(0.1) until User.count == 5
31
31
  end
32
32
 
33
33
  assert_equal 5, User.count
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ru.Bee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Saltykov