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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2b151f0faf8347681a6612e0dc65fc1803f2407d
4
- data.tar.gz: 1436364308caacb93120a85a60ffc393c1a4fa01
2
+ SHA256:
3
+ metadata.gz: 56cf18f4031e42dafc326aeb4f3f58bf16242f5e0ce248b3b053b408342a1497
4
+ data.tar.gz: 98417655ed739818bc3e386a23bc6b8749ae5ca0691a8f8316e6cfb53c1e7987
5
5
  SHA512:
6
- metadata.gz: 5958d8a78313c2c7858cba4428cf7f283910fca7c0b5f20dc7979d03c040547ce2165dc25df38d3d9bc67f0fa802618f31b998f47ee746fce50a615f8a1b3f43
7
- data.tar.gz: 5bb7c366ea392b22cc8f94a2a235b0f8cb7cb21c8cf7ab21beb4809156c2b998ec5107aaea75a54e4097f51c3ffdd7e8b6038c10c5d5b948ea27e1832f84ffff
6
+ metadata.gz: f9bc9f6baa13e72cb5b57d874cefd3715e50dc96d9f6f992f258c8fdf0a7204cab276d43c47062ad648b90ef2a24c729f9390bf5624aef5320fdab748995fe73
7
+ data.tar.gz: aefa623d5ca3a4224cbbcf21805be3009cc878580a789f0cf59603466b869a9f0d90101e3dd0ebcc3ffb5bccabeb072748fa48fef30ba08d12b77e46eef31704
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
1
+ source "https://gem-proxy.chime.com"
2
2
 
3
3
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
data/Gemfile.lock CHANGED
@@ -1,30 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sql_enum (0.1.17)
5
- activerecord (~> 5.0)
4
+ sql_enum (0.2.0)
5
+ activerecord (>= 5.0)
6
6
 
7
7
  GEM
8
- remote: https://rubygems.org/
8
+ remote: https://gem-proxy.chime.com/
9
9
  specs:
10
- activemodel (5.2.2)
11
- activesupport (= 5.2.2)
12
- activerecord (5.2.2)
13
- activemodel (= 5.2.2)
14
- activesupport (= 5.2.2)
15
- arel (>= 9.0)
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 (>= 0.7, < 2)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- arel (9.0.0)
22
- concurrent-ruby (1.1.4)
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.4.0)
23
+ i18n (1.8.10)
25
24
  concurrent-ruby (~> 1.0)
26
- minitest (5.11.3)
27
- rake (10.5.0)
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
- thread_safe (0.3.6)
42
- tzinfo (1.2.5)
43
- thread_safe (~> 0.1)
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 (~> 10.0)
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
- decorate_attribute_type(attr, :enum) do |subtype|
24
- EnumType.new(attr, enum_values, subtype)
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)
@@ -1,3 +1,3 @@
1
1
  module SqlEnum
2
- VERSION = "0.1.18"
2
+ VERSION = "0.2.1"
3
3
  end
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", "~> 5.0"
23
+ spec.add_dependency "activerecord", ">= 5.0"
24
24
  spec.add_development_dependency "bundler", "~> 1.16"
25
- spec.add_development_dependency "rake", "~> 10.0"
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.18
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: 2019-01-02 00:00:00.000000000 Z
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: '10.0'
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: '10.0'
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
- rubyforge_project:
117
- rubygems_version: 2.5.2
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: []