enum_kit 0.3.0 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46151b7e3c722bdc1167009a555fdad2185b388e052ab79435f42db13854efe9
|
4
|
+
data.tar.gz: 5ab21f12c01a51d2b4a8a73dd7b49309e3553605aa34353e2e80b6fa379ed334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dd953c03f3b9fcf604ad95b230bd4449e2047117aa7e5b735aaa2ff999a19254729a0b54aa3bb1c48a5f3c306dd2844bacd8589be486f356f460b5d646afc73
|
7
|
+
data.tar.gz: e40481b46c5f01d4185dfec50557b908bdd5e6abce649220d08a149bb970122c0c0a2fea791bef3a61d013b110ee910099ead0802a17361e069bd950f1bf2d76
|
@@ -44,13 +44,13 @@ module EnumKit
|
|
44
44
|
|
45
45
|
# Invert the creation of an enum type by deleting it.
|
46
46
|
#
|
47
|
-
def invert_create_enum(args)
|
47
|
+
def invert_create_enum(*args)
|
48
48
|
record(:drop_enum, args.first)
|
49
49
|
end
|
50
50
|
|
51
51
|
# Invert the renaming of an enum by renaming it back to the previous name.
|
52
52
|
#
|
53
|
-
def invert_rename_enum(args)
|
53
|
+
def invert_rename_enum(*args)
|
54
54
|
record(:rename_enum, args.reverse)
|
55
55
|
end
|
56
56
|
|
@@ -59,7 +59,7 @@ module EnumKit
|
|
59
59
|
# Note that `drop_enum` can only be reversed if given a collection of values to call `create_enum` with as the
|
60
60
|
# previously deleted enum values cannot be automatically determined.
|
61
61
|
#
|
62
|
-
def invert_drop_enum(args)
|
62
|
+
def invert_drop_enum(*args)
|
63
63
|
unless args.length > 1
|
64
64
|
raise ActiveRecord::IrreversibleMigration, 'drop_enum is only reversible if given an Array of values.'
|
65
65
|
end
|
@@ -69,13 +69,13 @@ module EnumKit
|
|
69
69
|
|
70
70
|
# Invert the addition of a value to an enum type by removing the value.
|
71
71
|
#
|
72
|
-
def invert_add_enum_value(
|
72
|
+
def invert_add_enum_value(*args)
|
73
73
|
raise ActiveRecord::IrreversibleMigration, 'add_enum_value is not reversible.'
|
74
74
|
end
|
75
75
|
|
76
76
|
# Invert the renaming of an enum's value by renaming it back to the previous value.
|
77
77
|
#
|
78
|
-
def invert_rename_enum_value(args)
|
78
|
+
def invert_rename_enum_value(*args)
|
79
79
|
record(:rename_enum_value, args[0], args[2], args[1])
|
80
80
|
end
|
81
81
|
end
|
data/lib/enum_kit/constants.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enum_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nialto Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
238
|
+
rubygems_version: 3.1.2
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Native PostgreSQL enum support for Ruby on Rails.
|