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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/arql/definition.rb +3 -2
- data/lib/arql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcf50149ad9ded8d667ea9afc40dea78d432525c8c62fe4f33d0d164e02acb81
|
4
|
+
data.tar.gz: a6fd83949c0c87f1d4891fae1a8fb0fa65e13a48f9e8ddb327b02f499bdbc73a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f73ccc2e3669a6f10fa7555737d09fadec7e0c0457c5b8819dae65055aa6a045153cce2137ccf9a9742f509d9f5c8567fd617e9f3dda7e2136935cf3686a2f3
|
7
|
+
data.tar.gz: ca3d6d547e8267066d72a6e67b09012b42b2e4defa36669c8b304707dc434cd6194a84a201c0fac8d3ed3f749ca017f2b4eaba6ce1f0a3813cfab34140827bc5
|
data/Gemfile.lock
CHANGED
data/lib/arql/definition.rb
CHANGED
@@ -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(
|
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(
|
142
|
+
Class.new(::ArqlModel) do
|
142
143
|
include Arql::Extension
|
143
144
|
self.primary_key = pkey
|
144
145
|
self.table_name = table_name
|
data/lib/arql/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|