octoball 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0795c1883b68bebf799c031723b21cf2866a36dc7eb265050bd2109ec804d9ff'
4
- data.tar.gz: a5511fa201eeb07e95531ae16d900e2cb8aea2eba7f58aeefcf7b6ee69879d5e
3
+ metadata.gz: bb7caa27776a9d9ab8f6136f4a82544be12783a5efb1802e9a2a0b4dfb7f2c61
4
+ data.tar.gz: 818225f81822a0b77d4a5bc18ffdd6a11373ae47c6142a22ef8f7de23f61dc4f
5
5
  SHA512:
6
- metadata.gz: 3c8453ca9237450c52106bcfae8211f812b008ca7b2de066931980916e7d1beb7af4e7e7e97a878b0db5b32fad3cd6ac9c059319605f3a76be30bffc4091c3ed
7
- data.tar.gz: 736553145f161faa71d32ab6000f3bd1fa4697b315002c64e4683e04236007a90ae21e39ef91964cf172a1451acbffbd37844800e1ca8b1e909c06b140aef776
6
+ metadata.gz: a8210244af4c7d1cbd92693f89bb68c6a3ed978457d51bbfa9e1d4fb5a6b6ec498649d01d0eb70eb1ba9ae0ea350f0914b05756b275381a6244011fb95f6226a
7
+ data.tar.gz: d19f93c68c99e8a0524f13a876f7c742715e7e8303c6d742cd4565837e13b511909312958a716bac1eb4ae22cc22b26b61ffd38c75b18831d5de8594ab9f475d
@@ -12,11 +12,14 @@ class Octoball
12
12
  def #{method}(*args, &block)
13
13
  shard = owner.current_shard
14
14
  return super if !shard || shard == ActiveRecord::Base.current_shard
15
+ ret = nil
15
16
  ActiveRecord::Base.connected_to(shard: shard, role: Octoball.current_role) do
16
17
  ret = super
17
18
  return ret unless ret.is_a?(::ActiveRecord::Relation) || ret.is_a?(::ActiveRecord::QueryMethods::WhereChain)
18
- RelationProxy.new(ret, shard)
19
+ ret = RelationProxy.new(ret, shard)
20
+ nil # return nil to avoid loading relation
19
21
  end
22
+ ret
20
23
  end
21
24
  ruby2_keywords(:#{method}) if respond_to?(:ruby2_keywords, true)
22
25
  END
@@ -62,7 +62,7 @@ class Octoball
62
62
  if mblock
63
63
  ret = #{connected_to} { @rel.to_a }.#{method}(*margs, &mblock)
64
64
  else
65
- #{connected_to} { ret = @rel.#{method}(*margs, &mblock); nil } # return nil avoid loading relation
65
+ #{connected_to} { ret = @rel.#{method}(*margs, &mblock); nil } # return nil to avoid loading relation
66
66
  end
67
67
  #{postamble}
68
68
  EOS
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Octoball
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octoball
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoki Sekiyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord