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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf823b1802ec254b166149a6f3b53df61897b66a8c961692ac7e0c3c41a42071
4
- data.tar.gz: fe2b8826451cd454b1c19845dca4342efffa6e6a6ba6806a131f01348de8f4e5
3
+ metadata.gz: 94ccab5f507787082888f5a4d3b0e858157d4bd3cc32a8e705a2f77ea3175780
4
+ data.tar.gz: 2b318d3c952f5e743b9313ec66367410cc858c61aea41514c3006242612390ad
5
5
  SHA512:
6
- metadata.gz: ffd78380a1931f48043b7d3c2f6a6fc7b4e2f40847a6c0eba6fbf14022e8b40e8d69b4c71df98f2c00f0d00aa19b94d35f6e516ee13686bfaf6a773d62c86cb1
7
- data.tar.gz: d81d4bcc6477de0b3b3c4f1f0a18a8511b0a4cae2e3191332806e24503e2c54fef738c1133fdb2ea8cdc48923793ff4a5a23a3885780433cac1fc9814bd64b2f
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
- t.column col[:name], col[:type]
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, **(idx_options)
63
+ t.index column_names, **idx_options
61
64
  end
62
65
  t.timestamps if timestamps
63
66
  end
@@ -1,3 +1,3 @@
1
1
  module AnonymousActiveRecord
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  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.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: 2018-11-29 00:00:00.000000000 Z
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
- rubyforge_project:
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