arql 0.2.3 → 0.2.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
  SHA256:
3
- metadata.gz: bf94862baf6c8e5ff36589e84a022e892b4b88664ecc300c51d313a541e982fd
4
- data.tar.gz: baa0a4b30e5efeb4083347c18f2863faa764052505e46442e45dd9af519612b0
3
+ metadata.gz: bcf50149ad9ded8d667ea9afc40dea78d432525c8c62fe4f33d0d164e02acb81
4
+ data.tar.gz: a6fd83949c0c87f1d4891fae1a8fb0fa65e13a48f9e8ddb327b02f499bdbc73a
5
5
  SHA512:
6
- metadata.gz: aa3a4aba5288c64c7969efe368713e9f2a64ff9dfde3f41d47b9d8f3ec2f64fbfbe5479d6dc1c95281d82f68497616f44f78e84b635e312b6c6e40528871e6cf
7
- data.tar.gz: cae343a1411c59e683dcc99ee309d1ca91100c2c8cf22cbff37ffe04cc02e338d38562e0623a752c5f0803926fba1b0f5a2332074ec3f98083dadd0b8439ab0e
6
+ metadata.gz: 9f73ccc2e3669a6f10fa7555737d09fadec7e0c0457c5b8819dae65055aa6a045153cce2137ccf9a9742f509d9f5c8567fd617e9f3dda7e2136935cf3686a2f3
7
+ data.tar.gz: ca3d6d547e8267066d72a6e67b09012b42b2e4defa36669c8b304707dc434cd6194a84a201c0fac8d3ed3f749ca017f2b4eaba6ce1f0a3813cfab34140827bc5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arql (0.2.3)
4
+ arql (0.2.4)
5
5
  activerecord (~> 6.0.3)
6
6
  activesupport (~> 6.0.3)
7
7
  caxlsx (~> 3.0.2)
@@ -87,7 +87,7 @@ module Arql
87
87
  table_name.camelize.tap do |const_name|
88
88
  const_name = 'Modul' if const_name == 'Module'
89
89
  const_name = 'Clazz' if const_name == 'Class'
90
- Class.new(ActiveRecord::Base) do
90
+ Class.new(::ArqlModel) do
91
91
  include Arql::Extension
92
92
  self.primary_key = pkey
93
93
  self.table_name = table_name
@@ -133,12 +133,13 @@ module Arql
133
133
  @@options = options
134
134
  @@models = []
135
135
  ActiveRecord::Base.connection.tap do |conn|
136
+ Object.const_set('ArqlModel', Class.new(ActiveRecord::Base) { self.abstract_class = true })
136
137
  conn.tables.each do |table_name|
137
138
  conn.primary_key(table_name).tap do |pkey|
138
139
  table_name.camelize.tap do |const_name|
139
140
  const_name = 'Modul' if const_name == 'Module'
140
141
  const_name = 'Clazz' if const_name == 'Class'
141
- Class.new(ActiveRecord::Base) do
142
+ Class.new(::ArqlModel) do
142
143
  include Arql::Extension
143
144
  self.primary_key = pkey
144
145
  self.table_name = table_name
@@ -1,3 +1,3 @@
1
1
  module Arql
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Xiang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-24 00:00:00.000000000 Z
11
+ date: 2020-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2