enum_type 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 94e443bdb2349b66f3c88f2cf08420a46cec5553
4
- data.tar.gz: 0b2a7406a96f7e7b37c5fff4bf66d15f59f5bb28
2
+ SHA256:
3
+ metadata.gz: 89bc30e3e226b181141db43882f5fab69b0535a3440fe11e2abd2a2682a68fd5
4
+ data.tar.gz: e0ee22403862c1f77000691cd0e0a01f1c0757690f8154332f019d1632dfc442
5
5
  SHA512:
6
- metadata.gz: 77cb03044e0796c8f02917eecc3b84fbde000c2c5dadc74b2e11f22520986257d05ed5a7cc992486bd58d23f40c82261a127c2266efb92457e6cdc16880679b4
7
- data.tar.gz: b6c47f3f60dd12ec1a70418ae14067df7126bd5e2cd1af707f93493461c8f606b9eaa6f10ca1768730939164e6d6e91d0c0ddd73418ca05190dbc0dfe518138b
6
+ metadata.gz: cc1b7a7596e279ce9d59f32e9eededb064bb756023a6a4331dd9dde97f2147c7362752ada6ef3bd8431cc875f3a6a0a9c3d0927128a838e0bc7950b1db9f0b3b
7
+ data.tar.gz: cf62c7272e2aa16ea21bb7f9c8d23b6280cbe0f463085161c9234fcdfbab0c630d4837543114a3022a76a407bc7acd58c06fefd287b0098f25c2cc6179717c37
data/.rspec CHANGED
@@ -1 +1,2 @@
1
- -cfs
1
+ --color
2
+ --format documentation
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.0.0
1
+ 2.4.2
data/Gemfile CHANGED
@@ -1,8 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # DEPENDENCIES
4
- gem 'activerecord', '>= 4.0', require: 'active_record'
5
- gem 'activesupport', '>= 4.0', require: 'active_support/core_ext/object/try'
4
+ gem 'rails', '~> 4'
6
5
 
7
6
  group :development do
8
7
  # DEVELOPMENT
@@ -12,7 +11,7 @@ group :development do
12
11
 
13
12
  # TEST
14
13
  gem 'rspec'
15
- gem 'factory_girl'
14
+ gem 'factory_bot'
16
15
  gem 'pg', platform: :mri
17
16
  gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
18
17
  end
data/Gemfile.lock CHANGED
@@ -1,107 +1,183 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activemodel (4.0.2)
5
- activesupport (= 4.0.2)
6
- builder (~> 3.1.0)
7
- activerecord (4.0.2)
8
- activemodel (= 4.0.2)
9
- activerecord-deprecated_finders (~> 1.0.2)
10
- activesupport (= 4.0.2)
11
- arel (~> 4.0.0)
12
- activerecord-deprecated_finders (1.0.3)
13
- activerecord-jdbc-adapter (1.3.4)
4
+ actionmailer (4.2.10)
5
+ actionpack (= 4.2.10)
6
+ actionview (= 4.2.10)
7
+ activejob (= 4.2.10)
8
+ mail (~> 2.5, >= 2.5.4)
9
+ rails-dom-testing (~> 1.0, >= 1.0.5)
10
+ actionpack (4.2.10)
11
+ actionview (= 4.2.10)
12
+ activesupport (= 4.2.10)
13
+ rack (~> 1.6)
14
+ rack-test (~> 0.6.2)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
+ actionview (4.2.10)
18
+ activesupport (= 4.2.10)
19
+ builder (~> 3.1)
20
+ erubis (~> 2.7.0)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
23
+ activejob (4.2.10)
24
+ activesupport (= 4.2.10)
25
+ globalid (>= 0.3.0)
26
+ activemodel (4.2.10)
27
+ activesupport (= 4.2.10)
28
+ builder (~> 3.1)
29
+ activerecord (4.2.10)
30
+ activemodel (= 4.2.10)
31
+ activesupport (= 4.2.10)
32
+ arel (~> 6.0)
33
+ activerecord-jdbc-adapter (50.0)
14
34
  activerecord (>= 2.2)
15
- activerecord-jdbcpostgresql-adapter (1.3.4)
16
- activerecord-jdbc-adapter (~> 1.3.4)
17
- jdbc-postgres (>= 9.1)
18
- activesupport (4.0.2)
19
- i18n (~> 0.6, >= 0.6.4)
20
- minitest (~> 4.2)
21
- multi_json (~> 1.3)
22
- thread_safe (~> 0.1)
23
- tzinfo (~> 0.3.37)
24
- addressable (2.3.5)
25
- arel (4.0.1)
26
- atomic (1.1.14)
27
- atomic (1.1.14-java)
28
- builder (3.1.4)
29
- diff-lcs (1.2.5)
30
- factory_girl (4.3.0)
35
+ activerecord-jdbcpostgresql-adapter (50.0)
36
+ activerecord-jdbc-adapter (~> 50.0)
37
+ jdbc-postgres (>= 9.4, < 43)
38
+ activesupport (4.2.10)
39
+ i18n (~> 0.7)
40
+ minitest (~> 5.1)
41
+ thread_safe (~> 0.3, >= 0.3.4)
42
+ tzinfo (~> 1.1)
43
+ addressable (2.4.0)
44
+ arel (6.0.4)
45
+ builder (3.2.3)
46
+ concurrent-ruby (1.0.5)
47
+ concurrent-ruby (1.0.5-java)
48
+ crass (1.0.3)
49
+ descendants_tracker (0.0.4)
50
+ thread_safe (~> 0.3, >= 0.3.1)
51
+ diff-lcs (1.3)
52
+ erubis (2.7.0)
53
+ factory_bot (4.8.2)
31
54
  activesupport (>= 3.0.0)
32
- faraday (0.8.8)
33
- multipart-post (~> 1.2.0)
34
- git (1.2.6)
35
- github_api (0.10.1)
36
- addressable
37
- faraday (~> 0.8.1)
38
- hashie (>= 1.2)
39
- multi_json (~> 1.4)
40
- nokogiri (~> 1.5.2)
41
- oauth2
42
- hashie (2.0.5)
43
- highline (1.6.20)
44
- httpauth (0.2.0)
45
- i18n (0.6.9)
46
- jdbc-postgres (9.3.1100)
47
- jeweler (1.8.8)
55
+ faraday (0.9.2)
56
+ multipart-post (>= 1.2, < 3)
57
+ git (1.3.0)
58
+ github_api (0.16.0)
59
+ addressable (~> 2.4.0)
60
+ descendants_tracker (~> 0.0.4)
61
+ faraday (~> 0.8, < 0.10)
62
+ hashie (>= 3.4)
63
+ mime-types (>= 1.16, < 3.0)
64
+ oauth2 (~> 1.0)
65
+ globalid (0.4.1)
66
+ activesupport (>= 4.2.0)
67
+ hashie (3.5.6)
68
+ highline (1.7.10)
69
+ i18n (0.9.1)
70
+ concurrent-ruby (~> 1.0)
71
+ jar-dependencies (0.3.11)
72
+ jdbc-postgres (42.1.4)
73
+ jeweler (2.3.7)
48
74
  builder
49
- bundler (~> 1.0)
75
+ bundler (>= 1)
50
76
  git (>= 1.2.5)
51
- github_api (= 0.10.1)
77
+ github_api (~> 0.16.0)
52
78
  highline (>= 1.6.15)
53
- nokogiri (= 1.5.10)
79
+ nokogiri (>= 1.5.10)
80
+ psych (~> 2.2)
54
81
  rake
55
82
  rdoc
56
- json (1.8.1)
57
- json (1.8.1-java)
58
- jwt (0.1.8)
59
- multi_json (>= 1.5)
60
- minitest (4.7.5)
61
- multi_json (1.8.2)
62
- multi_xml (0.5.5)
63
- multipart-post (1.2.0)
64
- nokogiri (1.5.10)
65
- nokogiri (1.5.10-java)
66
- oauth2 (0.9.2)
67
- faraday (~> 0.8)
68
- httpauth (~> 0.2)
69
- jwt (~> 0.1.4)
70
- multi_json (~> 1.0)
83
+ semver2
84
+ jwt (1.5.6)
85
+ loofah (2.1.1)
86
+ crass (~> 1.0.2)
87
+ nokogiri (>= 1.5.9)
88
+ mail (2.7.0)
89
+ mini_mime (>= 0.1.1)
90
+ mime-types (2.99.3)
91
+ mini_mime (1.0.0)
92
+ mini_portile2 (2.3.0)
93
+ minitest (5.10.3)
94
+ multi_json (1.12.2)
95
+ multi_xml (0.6.0)
96
+ multipart-post (2.0.0)
97
+ nokogiri (1.8.1)
98
+ mini_portile2 (~> 2.3.0)
99
+ nokogiri (1.8.1-java)
100
+ oauth2 (1.4.0)
101
+ faraday (>= 0.8, < 0.13)
102
+ jwt (~> 1.0)
103
+ multi_json (~> 1.3)
71
104
  multi_xml (~> 0.5)
72
- rack (~> 1.2)
73
- pg (0.17.1)
74
- rack (1.5.2)
75
- rake (10.1.1)
76
- rdoc (4.1.0)
77
- json (~> 1.4)
78
- redcarpet (3.0.0)
79
- rspec (2.14.1)
80
- rspec-core (~> 2.14.0)
81
- rspec-expectations (~> 2.14.0)
82
- rspec-mocks (~> 2.14.0)
83
- rspec-core (2.14.7)
84
- rspec-expectations (2.14.4)
85
- diff-lcs (>= 1.1.3, < 2.0)
86
- rspec-mocks (2.14.4)
87
- thread_safe (0.1.3)
88
- atomic
89
- thread_safe (0.1.3-java)
90
- atomic
91
- tzinfo (0.3.38)
92
- yard (0.8.7.3)
105
+ rack (>= 1.2, < 3)
106
+ pg (0.21.0)
107
+ psych (2.2.4)
108
+ psych (2.2.4-java)
109
+ jar-dependencies (>= 0.1.7)
110
+ rack (1.6.8)
111
+ rack-test (0.6.3)
112
+ rack (>= 1.0)
113
+ rails (4.2.10)
114
+ actionmailer (= 4.2.10)
115
+ actionpack (= 4.2.10)
116
+ actionview (= 4.2.10)
117
+ activejob (= 4.2.10)
118
+ activemodel (= 4.2.10)
119
+ activerecord (= 4.2.10)
120
+ activesupport (= 4.2.10)
121
+ bundler (>= 1.3.0, < 2.0)
122
+ railties (= 4.2.10)
123
+ sprockets-rails
124
+ rails-deprecated_sanitizer (1.0.3)
125
+ activesupport (>= 4.2.0.alpha)
126
+ rails-dom-testing (1.0.8)
127
+ activesupport (>= 4.2.0.beta, < 5.0)
128
+ nokogiri (~> 1.6)
129
+ rails-deprecated_sanitizer (>= 1.0.1)
130
+ rails-html-sanitizer (1.0.3)
131
+ loofah (~> 2.0)
132
+ railties (4.2.10)
133
+ actionpack (= 4.2.10)
134
+ activesupport (= 4.2.10)
135
+ rake (>= 0.8.7)
136
+ thor (>= 0.18.1, < 2.0)
137
+ rake (12.3.0)
138
+ rdoc (6.0.0)
139
+ redcarpet (3.4.0)
140
+ rspec (3.7.0)
141
+ rspec-core (~> 3.7.0)
142
+ rspec-expectations (~> 3.7.0)
143
+ rspec-mocks (~> 3.7.0)
144
+ rspec-core (3.7.0)
145
+ rspec-support (~> 3.7.0)
146
+ rspec-expectations (3.7.0)
147
+ diff-lcs (>= 1.2.0, < 2.0)
148
+ rspec-support (~> 3.7.0)
149
+ rspec-mocks (3.7.0)
150
+ diff-lcs (>= 1.2.0, < 2.0)
151
+ rspec-support (~> 3.7.0)
152
+ rspec-support (3.7.0)
153
+ semver2 (3.4.2)
154
+ sprockets (3.7.1)
155
+ concurrent-ruby (~> 1.0)
156
+ rack (> 1, < 3)
157
+ sprockets-rails (3.2.1)
158
+ actionpack (>= 4.0)
159
+ activesupport (>= 4.0)
160
+ sprockets (>= 3.0.0)
161
+ thor (0.20.0)
162
+ thread_safe (0.3.6)
163
+ thread_safe (0.3.6-java)
164
+ tzinfo (1.2.4)
165
+ thread_safe (~> 0.1)
166
+ yard (0.9.12)
93
167
 
94
168
  PLATFORMS
95
169
  java
96
170
  ruby
97
171
 
98
172
  DEPENDENCIES
99
- activerecord (>= 4.0)
100
173
  activerecord-jdbcpostgresql-adapter
101
- activesupport (>= 4.0)
102
- factory_girl
174
+ factory_bot
103
175
  jeweler
104
176
  pg
177
+ rails (~> 4)
105
178
  redcarpet
106
179
  rspec
107
180
  yard
181
+
182
+ BUNDLED WITH
183
+ 1.16.0
data/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ > ⚠️ **DEPRECATED:** `enum_type` is no longer maintained. Modern Rails has
2
+ > native ActiveRecord enum support (`enum`) that covers most use cases; for
3
+ > PostgreSQL native ENUM types, consider alternatives like the
4
+ > `activerecord-postgres_enum` gem family. The final release is v2.2.1.
5
+
1
6
  enum_type
2
7
  =========
3
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.1
data/enum_type.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: enum_type 2.2.0 ruby lib
5
+ # stub: enum_type 2.2.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "enum_type"
9
- s.version = "2.2.0"
9
+ s.version = "2.2.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -39,7 +39,16 @@ Gem::Specification.new do |s|
39
39
  s.homepage = "http://github.com/riscfuture/enum_type"
40
40
  s.required_ruby_version = Gem::Requirement.new(">= 1.9")
41
41
  s.rubygems_version = "2.2.0"
42
- s.summary = "PostgreSQL enumerated types in ActiveRecord"
42
+ s.summary = "[DEPRECATED] PostgreSQL enumerated types in ActiveRecord"
43
+ s.post_install_message = <<~MSG
44
+
45
+ ⚠️ DEPRECATED: enum_type is no longer maintained.
46
+
47
+ No longer maintained. Modern Rails has native ActiveRecord enum support (`enum`) that covers most use cases; for PostgreSQL native ENUM types, consider alternatives like the `activerecord-postgres_enum` gem family.
48
+
49
+ This is the final release. No further updates are planned.
50
+
51
+ MSG
43
52
 
44
53
  if s.respond_to? :specification_version then
45
54
  s.specification_version = 4
@@ -12,7 +12,9 @@ module SpecSupport
12
12
  enum_type @field
13
13
  end
14
14
 
15
- def self.field() @field end
15
+ def self.field()
16
+ @field
17
+ end
16
18
 
17
19
  def read_attribute(_)
18
20
  instance_variable_get :"@#{self.class.field}"
@@ -67,7 +69,7 @@ describe EnumType do
67
69
 
68
70
  context "[validations]" do
69
71
  before :each do
70
- @field = FactoryGirl.generate(:enum_field)
72
+ @field = FactoryBot.generate(:enum_field)
71
73
  SpecSupport::EnumTypeTester.set_field(@field)
72
74
  @model = SpecSupport::EnumTypeTester.new
73
75
  end
@@ -102,16 +104,18 @@ describe EnumType do
102
104
  end
103
105
 
104
106
  context '[:register_type option]' do
105
- before(:each) { @field = FactoryGirl.generate(:enum_field) }
107
+ before(:each) { @field = FactoryBot.generate(:enum_field) }
106
108
 
107
109
  it "should register each new PostgreSQL type with ActiveRecord when set" do
108
110
  expect(Model.connection).
109
- to receive(:select_one).once.
110
- with(/SELECT atttypid FROM pg_catalog.pg_attribute WHERE attrelid = 'models'::regclass AND attname = '#{@field}'/).
111
- and_return('atttypid' => '12345')
111
+ to receive(:select_one).once.
112
+ with(/SELECT atttypid FROM pg_catalog.pg_attribute WHERE attrelid = 'models'::regclass AND attname = '#{@field}'/).
113
+ and_return('atttypid' => '12345')
112
114
  Model.enum_type @field, register_type: true
113
- expect(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::TYPE_MAP[12345]).
114
- to be_kind_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity)
115
+ if ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID.const_defined?(:TYPE_MAP)
116
+ expect(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::TYPE_MAP[12345]).
117
+ to be_kind_of(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity)
118
+ end
115
119
  end
116
120
  end
117
121
 
data/spec/factories.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  require 'factory_girl'
2
- FactoryGirl.define do
2
+ FactoryBot.define do
3
3
  sequence(:enum_field) { |i| :"field#{i}" }
4
4
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require 'bundler'
2
2
  Bundler.require :default, :development
3
3
 
4
+ require 'rails/all'
5
+ Rails.logger = ActiveSupport::Logger.new(STDOUT)
6
+
4
7
  $LOAD_PATH.unshift(File.dirname(__FILE__))
5
8
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
9
 
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Morgan
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
10
  date: 2013-12-26 00:00:00.000000000 Z
@@ -163,7 +162,14 @@ files:
163
162
  homepage: http://github.com/riscfuture/enum_type
164
163
  licenses: []
165
164
  metadata: {}
166
- post_install_message:
165
+ post_install_message: |2+
166
+
167
+ ⚠️ DEPRECATED: enum_type is no longer maintained.
168
+
169
+ No longer maintained. Modern Rails has native ActiveRecord enum support (`enum`) that covers most use cases; for PostgreSQL native ENUM types, consider alternatives like the `activerecord-postgres_enum` gem family.
170
+
171
+ This is the final release. No further updates are planned.
172
+
167
173
  rdoc_options: []
168
174
  require_paths:
169
175
  - lib
@@ -178,10 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
184
  - !ruby/object:Gem::Version
179
185
  version: '0'
180
186
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.2.0
183
- signing_key:
187
+ rubygems_version: 4.0.11
184
188
  specification_version: 4
185
- summary: PostgreSQL enumerated types in ActiveRecord
189
+ summary: "[DEPRECATED] PostgreSQL enumerated types in ActiveRecord"
186
190
  test_files: []
187
- has_rdoc:
191
+ ...