anonymous_active_record 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/anonymous_active_record.rb +5 -2
- data/lib/anonymous_active_record/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94ccab5f507787082888f5a4d3b0e858157d4bd3cc32a8e705a2f77ea3175780
|
4
|
+
data.tar.gz: 2b318d3c952f5e743b9313ec66367410cc858c61aea41514c3006242612390ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7d02aebe3a9cdd0680d65f2a47c04f9dfafd2731d0cfaad8284b16e0ecd2189cda5d738359f298036c62f16cccb18456194da1c3bdc4878f90670f43eb7e3f
|
7
|
+
data.tar.gz: 8ab2c97394a88cb8de4cf6ef62c766d30d2b09fc6a021b65543689fccaf4c1173f1e6e07588bbe4873bf6f414e4e5104ebe90bb805a3d182ab0926e1197855a8
|
@@ -50,14 +50,17 @@ module AnonymousActiveRecord
|
|
50
50
|
klass.connection.create_table gen.table_name do |t|
|
51
51
|
columns.each do |col|
|
52
52
|
if col.is_a?(Hash)
|
53
|
-
|
53
|
+
# :name and :type are required at minimum
|
54
|
+
name = col.delete(:name)
|
55
|
+
type = col.delete(:type)
|
56
|
+
t.column(name, type, **col)
|
54
57
|
else
|
55
58
|
t.column col, :string
|
56
59
|
end
|
57
60
|
end
|
58
61
|
indexes.each do |idx_options|
|
59
62
|
column_names = idx_options.delete(:columns)
|
60
|
-
t.index column_names, **
|
63
|
+
t.index column_names, **idx_options
|
61
64
|
end
|
62
65
|
t.timestamps if timestamps
|
63
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anonymous_active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -163,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
|
167
|
-
rubygems_version: 2.7.8
|
166
|
+
rubygems_version: 3.0.1
|
168
167
|
signing_key:
|
169
168
|
specification_version: 4
|
170
169
|
summary: Almost Anonymous ActiveRecord classes
|