remote_db 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 2f13f30015558908476fbb5caf672b8e57d9db23
4
- data.tar.gz: 1ef50bbf360259529de1d92169900dba96d45498
3
+ metadata.gz: 897782b1480916843610989aeab9f14c1709090e
4
+ data.tar.gz: fbb1d2b9d1d22335a7a72fe7bbd8461131e0c744
5
5
  SHA512:
6
- metadata.gz: ed0efc35aa4f730609f62ade1b3fa81ce48ee3c5b0927b1a83f47c38babab64ddcb3267c42c17143eb9b8fed304a4d31ff33696e8486cd71da427ce9059d61ec
7
- data.tar.gz: f695d526a91dc99d559e9ad9f0124087c215252df92362a803a6e685b7969ca7e00b7bb0da78c1d066ca5036b1d9b9e9432f07115207e70cde79ad5dfaacf304
6
+ metadata.gz: 29bce29570019e4e55d7ecdadf7bffdde33caddab0bbf428ce3c105caa1dc45d5bad6b5f39503ab653a3999a1b9af5f97f3bd9ff0326f5206ae07528ba910e99
7
+ data.tar.gz: d6e08127decae61c17ed6bcbac541de4dcb5e461817f2ff3a31fc24da6448613a0626393b0d8c04653b96bfdcb12cf6ad9ae2e7d3c4200b36881628a5906fe5d
@@ -29,10 +29,14 @@ module RemoteDb
29
29
  private
30
30
 
31
31
  def define_base_record
32
+ module_name = self.name
32
33
  connection_spec = configuration.connection_spec
33
34
  klass = Class.new(ActiveRecord::Base) do
34
35
  self.abstract_class = true
35
36
 
37
+ # AR 4 requires AR models to be named.
38
+ define_singleton_method(:name) { "#{module_name}::BaseRecord" }
39
+
36
40
  # Connect via custom db settings
37
41
  establish_connection(connection_spec)
38
42
 
@@ -43,12 +47,6 @@ module RemoteDb
43
47
  include Concerns::RestrictedColumns
44
48
  end
45
49
 
46
- # AR 4 requires AR models to be named.
47
- module_name = self.name
48
- klass.define_singleton_method(:name) do
49
- "#{module_name}::BaseRecord"
50
- end
51
-
52
50
  self.const_set 'BaseRecord', klass
53
51
  end
54
52
  end
@@ -1,3 +1,3 @@
1
1
  module RemoteDb
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omar Skalli