sql_enum 0.1.18 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/Gemfile.lock +21 -22
- data/lib/active_record/enum_override.rb +9 -2
- data/lib/sql_enum/version.rb +1 -1
- data/sql_enum.gemspec +2 -2
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 56cf18f4031e42dafc326aeb4f3f58bf16242f5e0ce248b3b053b408342a1497
|
4
|
+
data.tar.gz: 98417655ed739818bc3e386a23bc6b8749ae5ca0691a8f8316e6cfb53c1e7987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9bc9f6baa13e72cb5b57d874cefd3715e50dc96d9f6f992f258c8fdf0a7204cab276d43c47062ad648b90ef2a24c729f9390bf5624aef5320fdab748995fe73
|
7
|
+
data.tar.gz: aefa623d5ca3a4224cbbcf21805be3009cc878580a789f0cf59603466b869a9f0d90101e3dd0ebcc3ffb5bccabeb072748fa48fef30ba08d12b77e46eef31704
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,30 +1,29 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sql_enum (0.
|
5
|
-
activerecord (
|
4
|
+
sql_enum (0.2.0)
|
5
|
+
activerecord (>= 5.0)
|
6
6
|
|
7
7
|
GEM
|
8
|
-
remote: https://
|
8
|
+
remote: https://gem-proxy.chime.com/
|
9
9
|
specs:
|
10
|
-
activemodel (
|
11
|
-
activesupport (=
|
12
|
-
activerecord (
|
13
|
-
activemodel (=
|
14
|
-
activesupport (=
|
15
|
-
|
16
|
-
activesupport (5.2.2)
|
10
|
+
activemodel (6.1.3.2)
|
11
|
+
activesupport (= 6.1.3.2)
|
12
|
+
activerecord (6.1.3.2)
|
13
|
+
activemodel (= 6.1.3.2)
|
14
|
+
activesupport (= 6.1.3.2)
|
15
|
+
activesupport (6.1.3.2)
|
17
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (>=
|
19
|
-
minitest (
|
20
|
-
tzinfo (~>
|
21
|
-
|
22
|
-
concurrent-ruby (1.1.
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
20
|
+
zeitwerk (~> 2.3)
|
21
|
+
concurrent-ruby (1.1.8)
|
23
22
|
diff-lcs (1.3)
|
24
|
-
i18n (1.
|
23
|
+
i18n (1.8.10)
|
25
24
|
concurrent-ruby (~> 1.0)
|
26
|
-
minitest (5.
|
27
|
-
rake (
|
25
|
+
minitest (5.14.4)
|
26
|
+
rake (13.0.3)
|
28
27
|
rspec (3.7.0)
|
29
28
|
rspec-core (~> 3.7.0)
|
30
29
|
rspec-expectations (~> 3.7.0)
|
@@ -38,16 +37,16 @@ GEM
|
|
38
37
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
38
|
rspec-support (~> 3.7.0)
|
40
39
|
rspec-support (3.7.1)
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
tzinfo (2.0.4)
|
41
|
+
concurrent-ruby (~> 1.0)
|
42
|
+
zeitwerk (2.4.2)
|
44
43
|
|
45
44
|
PLATFORMS
|
46
45
|
ruby
|
47
46
|
|
48
47
|
DEPENDENCIES
|
49
48
|
bundler (~> 1.16)
|
50
|
-
rake (~>
|
49
|
+
rake (~> 13.0)
|
51
50
|
rspec (~> 3.0)
|
52
51
|
sql_enum!
|
53
52
|
|
@@ -20,8 +20,15 @@ module ActiveRecord
|
|
20
20
|
detect_enum_conflict!(name, "#{name}=")
|
21
21
|
|
22
22
|
attr = attribute_alias?(name) ? attribute_alias(name) : name
|
23
|
-
|
24
|
-
|
23
|
+
|
24
|
+
if Rails.version >= '6.1'
|
25
|
+
decorate_attribute_type(name) do |subtype|
|
26
|
+
EnumType.new(attr, enum_values, subtype)
|
27
|
+
end
|
28
|
+
else
|
29
|
+
decorate_attribute_type(attr, :enum) do |subtype|
|
30
|
+
EnumType.new(attr, enum_values, subtype)
|
31
|
+
end
|
25
32
|
end
|
26
33
|
|
27
34
|
enum_values = values(name)
|
data/lib/sql_enum/version.rb
CHANGED
data/sql_enum.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_dependency "activerecord", "
|
23
|
+
spec.add_dependency "activerecord", ">= 5.0"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.16"
|
25
|
-
spec.add_development_dependency "rake", "~>
|
25
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
27
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sql_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Fowler
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email:
|
71
71
|
- fletch@fzf.me
|
72
72
|
executables: []
|
@@ -98,7 +98,7 @@ homepage: https://github.com/1debit/sql_enum
|
|
98
98
|
licenses:
|
99
99
|
- MIT
|
100
100
|
metadata: {}
|
101
|
-
post_install_message:
|
101
|
+
post_install_message:
|
102
102
|
rdoc_options: []
|
103
103
|
require_paths:
|
104
104
|
- lib
|
@@ -113,9 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
|
117
|
-
|
118
|
-
signing_key:
|
116
|
+
rubygems_version: 3.0.8
|
117
|
+
signing_key:
|
119
118
|
specification_version: 4
|
120
119
|
summary: Enable using native sql enums
|
121
120
|
test_files: []
|