ar-enum 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ar/enum.rb +1 -0
- data/lib/ar/enum/schema_dumper.rb +2 -2
- data/lib/ar/enum/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: c54482529b0c9ca4c656af951d450a415701f1f5be9bb03bb1779f28b3e1a61d
|
4
|
+
data.tar.gz: 79feea073eb9ac0669e5a7b1d28218ae6b800f59270ca023c38b0f7dc4705b60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6909bccd2dff996432fa2117b07746f4c5cc12c6905f31b5b1eae16fbbc57bca9a8fde2843fe0de705cbd786e138f5db072131420eea90a0693da87b1dae024
|
7
|
+
data.tar.gz: 7502f7eb5291001f8e51bc52184426002c0d075042380fa2e27d01316b32b64ee399a2c1a93cce40a8d0a9dbbe006e7de389a35ace07df7f311b824664b42134
|
data/lib/ar/enum.rb
CHANGED
@@ -18,3 +18,4 @@ end
|
|
18
18
|
ActiveRecord::Migration::CommandRecorder.include AR::Enum::CommandRecorder
|
19
19
|
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include AR::Enum::Adapter
|
20
20
|
ActiveRecord::SchemaDumper.prepend AR::Enum::SchemaDumper
|
21
|
+
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:enum] = {name: "character varying"}
|
@@ -15,11 +15,11 @@ module AR
|
|
15
15
|
|
16
16
|
list.each do |row|
|
17
17
|
labels = row["labels"].split(",")
|
18
|
-
name = row["name"]
|
18
|
+
name = row["name"].to_sym
|
19
19
|
|
20
20
|
statement = [
|
21
21
|
" create_enum",
|
22
|
-
"#{name.
|
22
|
+
"#{name.inspect},",
|
23
23
|
labels.inspect
|
24
24
|
].join(" ")
|
25
25
|
|
data/lib/ar/enum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ar-enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|